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" 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" 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" title="Link to this section">§</a><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
446 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
453 http://fr.wikipedia.org/wiki/🍺
454 <!-- EasterEgg we love beer, better be able be able to link to it -->
456 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
460 # Note that the html+tidy output removes the spaces after the <li>,
461 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
462 # This is an issue for all tests with lists. We intentionally do
463 # *not* add html+tidy clauses for these, as we don't want to
464 # document/test the broken behavior. (Parsoid matches the non-tidy
465 # output in these cases.)
474 <li> Item 2</li></ul>
482 * plain''italic''plain
483 * plain''italic''plain''italic''plain
484 * plain'''bold'''plain
485 * plain'''bold'''plain'''bold'''plain
486 * plain''italic''plain'''bold'''plain
487 * plain'''bold'''plain''italic''plain
488 * plain''italic'''bold-italic'''italic''plain
489 * plain'''bold''bold-italic''bold'''plain
490 * plain'''''bold-italic'''italic''plain
491 * plain'''''bold-italic''bold'''plain
492 * plain''italic'''bold-italic'''''plain
493 * plain'''bold''bold-italic'''''plain
494 * plain l'''italic''plain
495 * plain l''''bold''' plain
498 <li> plain<i>italic</i>plain</li>
499 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
500 <li> plain<b>bold</b>plain</li>
501 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
502 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
503 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
504 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
505 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
506 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
507 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
508 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
509 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
510 <li> plain l'<i>italic</i>plain</li>
511 <li> plain l'<b>bold</b> plain</li></ul>
515 # this example taken from the [[simple:Moon]] article (bug 47326)
517 Italics and possessives (1)
519 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
521 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
525 # this example taken from [[en:Flaming Pie]] (bug 49926)
527 Italics and possessives (2)
529 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
531 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
535 # this example taken from [[en:Dictionary]] (bug 49926)
537 Italics and possessives (3)
539 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
541 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
547 ### 2-quote opening sequence tests
550 Italics and bold: 2-quote opening sequence: (2,2)
559 Italics and bold: 2-quote opening sequence: (2,3)
568 Italics and bold: 2-quote opening sequence: (2,4)
578 # same html as previous, but wikitext adjusted to match parsoid html2wt
580 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
582 ''foo<nowiki>''</nowiki>''
588 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
590 Italics and bold: 2-quote opening sequence: (2,5)
603 # same html as previous, but wikitext adjusted to match parsoid html2wt
605 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
607 ''foo'''''<nowiki/>'''
618 ### 3-quote opening sequence tests
622 Italics and bold: 3-quote opening sequence: (3,2)
631 Italics and bold: 3-quote opening sequence: (3,3)
640 Italics and bold: 3-quote opening sequence: (3,4)
648 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
650 Italics and bold: 3-quote opening sequence: (3,5)
663 # same html as previous, but wikitext adjusted to match parsoid html2wt
665 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
667 '''foo'''''<nowiki/>''
678 ### 4-quote opening sequence tests
682 Italics and bold: 4-quote opening sequence: (4,2)
692 # same html as previous, but wikitext adjusted to match parsoid html2wt
694 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
696 <nowiki>''</nowiki>''foo''
703 Italics and bold: 4-quote opening sequence: (4,3)
712 Italics and bold: 4-quote opening sequence: (4,4)
722 # same html as previous, but wikitext adjusted to match parsoid html2wt
724 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
732 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
734 Italics and bold: 4-quote opening sequence: (4,5)
743 <p>'<b>foo</b><i></i>
747 # same html as previous, but wikitext adjusted to match parsoid html2wt
749 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
751 '<nowiki/>'''foo'''''<nowiki/>''
756 <p>'<b>foo</b><i></i>
762 ### 5-quote opening sequence tests
766 Italics and bold: 5-quote opening sequence: (5,2)
776 # same html as previous, but wikitext adjusted to match parsoid html2wt
777 # skipping wt2html and html2html because it wants to put <i> before <b>
779 Italics and bold: 5-quote opening sequence: (5,2+3)
781 parsoid=wt2wt,html2wt
790 Italics and bold: 5-quote opening sequence: (5,3)
800 # same html as previous, but wikitext adjusted to match parsoid html2wt
802 Italics and bold: 5-quote opening sequence: (5,3+2)
811 Italics and bold: 5-quote opening sequence: (5,4)
817 <p><i><b>foo'</b></i>
822 Italics and bold: 5-quote opening sequence: (5,5)
831 Italics and bold: 5-quote opening sequence: (5,6)
835 <p><i><b>foo'</b></i>
840 ### multiple quote sequences in a line
843 Italics and bold: multiple quote sequences: (2,4,2)
849 <p><i>foo'<b>bar</b></i>
854 # same html as previous, but wikitext adjusted to match parsoid html2wt
856 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
858 ''foo'<nowiki/>'''bar'''''
860 <p><i>foo'<b>bar</b></i>
866 Italics and bold: multiple quote sequences: (2,4,3)
872 <p><i>foo'<b>bar</b></i>
877 # same html as previous, but wikitext adjusted to match parsoid html2wt
879 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
881 ''foo'<nowiki/>'''bar'''''
883 <p><i>foo'<b>bar</b></i>
889 Italics and bold: multiple quote sequences: (2,4,4)
895 <p><i>foo'<b>bar'</b></i>
900 # same html as previous, but wikitext adjusted to match parsoid html2wt
902 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
904 ''foo'<nowiki/>'''bar'<nowiki/>'''''
906 <p><i>foo'<b>bar'</b></i>
911 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
913 Italics and bold: multiple quote sequences: (3,4,2)
922 <p><b>foo'</b>bar<i></i>
926 # same html as previous, but wikitext adjusted to match parsoid html2wt
928 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
932 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
937 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
942 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
944 Italics and bold: multiple quote sequences: (3,4,3)
953 <p><b>foo'</b>bar<b></b>
957 # same html as previous, but wikitext adjusted to match parsoid html2wt
959 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
961 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
966 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
971 ### other quote tests
974 Italics and bold: other quote tests: (2,3,5)
976 ''this is about '''foo's family'''''
978 <p><i>this is about <b>foo's family</b></i>
984 Italics and bold: other quote tests: (2,(3,3),2)
986 ''this is about '''foo's''' family''
988 <p><i>this is about <b>foo's</b> family</i>
994 Italics and bold: other quote tests: (3,2,3,2)
998 '''this is about ''foo'''s family''
1000 <p><b>this is about <i>foo</i></b><i>s family</i>
1005 # same html as previous, but wikitext adjusted to match parsoid html2wt
1007 Italics and bold: other quote tests: (3,2,3+2+2,2)
1009 '''this is about ''foo'''''<nowiki/>''s family''
1011 <p><b>this is about <i>foo</i></b><i>s family</i>
1017 Italics and bold: other quote tests: (3,2,3,3)
1019 '''this is about ''foo'''s family'''
1021 <p>'<i>this is about </i>foo<b>s family</b>
1027 Italics and bold: other quote tests: (3,(2,2),3)
1029 '''this is about ''foo's'' family'''
1031 <p><b>this is about <i>foo's</i> family</b>
1037 Italicized possessive
1039 The ''[[Main Page]]'''s talk page.
1041 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1044 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1048 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1049 (Requires tidy for PHP parser output to be fixed up)
1051 parsoid=wt2html,wt2wt
1068 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1069 <td><i>a</i></td><td><i>b</i></td></tr>
1078 Non-html5 tags should be accepted
1080 <center>''foo''</center>
1082 <font>''foo''</font>
1083 <strike>''foo''</strike>
1086 <center><i>foo</i></center>
1087 <p><big><i>foo</i></big>
1088 <font><i>foo</i></font>
1089 <strike><i>foo</i></strike>
1095 <wbr> is valid wikitext (bug 52468)
1103 # <strike> is HTML4, <s> is HTML4/5.
1105 <s> or <strike> for strikethrough
1107 <strike>strike</strike>
1111 <p><strike>strike</strike>
1119 Text-level semantic html elements in wikitext
1122 <strong>text</strong>
1138 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1145 <strong>text</strong>
1161 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1169 # test cases taken from
1170 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1172 Ruby markup (W3C-style)
1174 ; Mono-ruby for individual base characters
1175 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1177 : <ruby>今日<rt>きょう</rt></ruby>
1179 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1181 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1183 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1185 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1186 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1187 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1190 <dl><dt> Mono-ruby for individual base characters</dt>
1191 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1192 <dt> Group ruby</dt>
1193 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1194 <dt> Jukugo ruby</dt>
1195 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1196 <dt> Inline ruby</dt>
1197 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1198 <dt> Double-sided ruby</dt>
1199 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1201 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1202 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1203 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1208 # The next two test different paths in the sanitizer.
1210 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1212 <b→> doesn't terminate </b→>
1214 <bä> doesn't terminate </bä>
1216 <boo> doesn't terminate </boo>
1218 <s.foo> doesn't terminate </s.foo>
1222 <p><b→> doesn't terminate </b→>
1223 </p><p><bä> doesn't terminate </bä>
1224 </p><p><boo> doesn't terminate </boo>
1225 </p><p><s.foo> doesn't terminate </s.foo>
1226 </p><p><sub-ID#1>
1230 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1232 Non-word characters don't terminate tag names + tidy
1234 <b→> doesn't terminate </b→>
1236 <bä> doesn't terminate </bä>
1238 <boo> doesn't terminate </boo>
1240 <s.foo> doesn't terminate </s.foo>
1244 <p><b→> doesn't terminate </b→></p>
1245 <p><bä> doesn't terminate </bä></p>
1246 <p><boo> doesn't terminate </boo></p>
1247 <p><s.foo> doesn't terminate </s.foo></p>
1248 <p><sub-ID#1></p>
1252 Isolated close tags should be treated as literal text (bug 52760)
1259 </p><p><s.foo>s</s>
1264 ### Special characters
1268 Bare pipe character (bug 52363)
1277 Bare pipe character from a template (bug 52363)
1286 ### <nowiki> test cases
1290 <nowiki> unordered list
1292 <nowiki>* This is not an unordered list item.</nowiki>
1294 <p>* This is not an unordered list item.
1301 <nowiki>Lorem ipsum dolor
1309 <p>Lorem ipsum dolor
1322 :There is not nowiki.
1323 :There is <nowiki>nowiki</nowiki>.
1325 #There is not nowiki.
1326 #There is <nowiki>nowiki</nowiki>.
1328 *There is not nowiki.
1329 *There is <nowiki>nowiki</nowiki>.
1331 <dl><dd>There is not nowiki.</dd>
1332 <dd>There is nowiki.</dd></dl>
1333 <ol><li>There is not nowiki.</li>
1334 <li>There is nowiki.</li></ol>
1335 <ul><li>There is not nowiki.</li>
1336 <li>There is nowiki.</li></ul>
1341 Entities inside <nowiki>
1343 <nowiki><</nowiki>
1350 Entities inside template parameters
1356 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1360 Properly escape nowiki when combined with other wiki markup
1364 <p>* </nowiki> tag</p>
1366 <nowiki>* </nowiki></nowiki> tag
1373 Comments and Indent-Pre
1375 <!-- comment 1 --> asdf
1377 <!-- comment 1 --> asdf
1380 <!-- comment 1 --> asdf
1381 <!-- comment 2 -->xyz
1383 <!-- comment 1 --> asdf
1384 <!-- comment 2 --> xyz
1440 asdf<!-- comment 1 -->jkl
1450 <!-- foo --> b <!-- bar -->
1464 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1470 Comment semantics and delimiters
1472 <!-- --><!----><!-----><!------>
1478 Comment semantics and delimiters, redux
1480 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1481 -- foo -- funky huh? ... -->
1487 Comment semantics and delimiters: directors cut
1489 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1490 everything starting with < followed by !-- until the first -- and > we see,
1491 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1499 Comment semantics: nesting
1501 <!--<!-- no, we're not going to do anything fancy here -->-->
1508 Comment semantics: unclosed comment at end
1510 <!--This comment will run out to the end of the document
1515 # Bug 58184: document parsoid's behaviour
1517 Suppress comment closing tag in lenient browsers
1519 parsoid=wt2html,html2html
1521 <!-- Browsers--!> think this is closed -->
1525 <!-- Browsers--¡> think this is closed -->
1529 Comment in template title
1538 Comment on its own line post-expand
1550 Comment on its own line post-expand with non-significant whitespace
1562 Multiple comments should still parse as SOL-transparent
1564 parsoid=wt2html,wt2wt
1567 <!--c2--><!--c3--><!--c4-->*b
1578 ### paragraph wrapping tests
1593 Block tag on one line (<div>)
1609 Block tag on one line (<blockquote>)
1611 a <blockquote>foo</blockquote>
1615 a <blockquote>foo</blockquote>
1627 Block tag on both lines (<div>)
1644 Block tag on both lines (<blockquote>)
1646 a <blockquote>foo</blockquote>
1648 b <blockquote>foo</blockquote>
1650 a <blockquote>foo</blockquote>
1651 b <blockquote>foo</blockquote>
1665 Multiple lines without block tags
1689 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1690 # So, we have a separate section for Parsoid. We don't want
1691 # to mimic this stripping behavior in Parsoid. It affects
1692 # editing experience and also requires us to maintain additional
1695 Empty lines between lines with block tags
1733 <div data-parsoid='{"stx":"html"}'></div>
1736 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1739 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1741 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1744 <div data-parsoid='{"stx":"html"}'>e</div>
1747 ## PHP parser emits output which is broken
1748 ## XXX The parsoid output doesn't match the tidy output.
1750 Unclosed HTML p-tags should be handled properly
1758 <p>foo</div></p>
1762 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1767 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1768 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1771 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1775 a [[Category:A1]] [[Category:A2]]
1780 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1784 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1790 <link href="Category:A1"/><p>a</p>
1794 ### Preformatted text
1803 And a [[Main Page|link]]
1809 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1814 Tabs don't trigger preformatted text
1818 This is preformatted text.
1824 <pre>This is preformatted text.
1830 Ident preformatting with inline content
1841 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1858 Regression with preformatted in <center>
1872 Bug 52763: Preformatted in <blockquote>
1878 indented cell (no pre-wrapping!)
1888 <p> indented cell (no pre-wrapping!)
1896 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1913 Bug 15491: <ins>/<del> in blockquote
1916 Foo <del>bar</del> <ins>baz</ins> quux
1920 <p>Foo <del>bar</del> <ins>baz</ins> quux
1926 # Note that the p-wrapping is newline sensitive, which could be
1927 # considered a bug: tidy will wrap only the 'Foo' in the example
1928 # below in a <p> tag. (see comment 23-25 of bug #6200)
1930 Bug 15491: <ins>/<del> in blockquote (2)
1932 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1935 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1941 <del>bar</del> <ins>baz</ins> quux</blockquote>
1945 <pre> with attributes (bug 3202)
1947 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1949 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1954 <pre> with width attribute (bug 3202)
1956 <pre width="8">Narrow screen goodies</pre>
1958 <pre width="8">Narrow screen goodies</pre>
1963 <pre> with forbidden attribute (bug 3202)
1965 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1967 <pre width="8">Narrow screen goodies</pre>
1972 Entities inside <pre>
1981 <pre> with forbidden attribute values (bug 3202)
1983 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1985 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1990 <nowiki> inside <pre> (bug 13238)
1998 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2006 <pre><nowiki>Foo</nowiki></pre>
2011 <nowiki> and <pre> preference (first one wins)
2042 </pre> inside nowiki
2044 <nowiki></pre></nowiki>
2050 # Parsoid doesn't strip empty tags, like Tidy does.
2052 Empty pre; pre inside other HTML tags (bug 54946)
2054 parsoid=wt2html,wt2wt
2085 HTML pre followed by indent-pre
2100 <p><pre>foo</pre></p>
2102 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2106 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2114 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2124 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2136 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2157 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2161 {{echo| foo}}{{echo| bar}}
2166 {{echo|<!--cmt--> foo}}
2168 <!--cmt-->{{echo| foo}}
2170 {{echo|{{echo| }}bar}}
2188 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2225 Things that look like <pre> tags aren't treated as such
2227 Barack Obama <President> of the United States
2228 <President></President>
2230 <p>Barack Obama <President> of the United States
2231 <President></President>
2235 ## PHP parser discards the "<pre " string
2237 Handle broken pre-like tags (bug 64025)
2241 {{echo|<pre <pre>x</pre>}}
2243 <table><pre </table>
2246 <table><pre></pre></table>
2249 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2258 Parsoid: handle pre with space after attribute
2262 <pre style="width:50%;" >{{echo|foo}}</pre>
2264 <pre style="width:50%;">{{echo|foo}}</pre>
2267 # TODO / maybe: fix wt2wt for this
2269 Parsoid: Don't paragraph-wrap fosterable content
2295 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2323 #--------------------------------------------------------------------
2324 # Transclusion parameter whitespace stripping tests
2325 # Behavior is different for positional and named parameters
2326 #--------------------------------------------------------------------
2328 Templates: Strip leading and trailing whitespace from named-param values
2332 {{echo|1= {{echo|b}} }}
2345 <ul><li> d</li></ul>
2350 Templates: Don't strip whitespace from positional-param values
2354 {{echo|{{echo|b}} }}
2386 <ul><li> f</li></ul>
2394 Templates: Handle empty comment-and-ws-only lines correctly
2397 <!--should be ignored-->
2398 <!--should be ignored as well-->
2407 Templates: Handle comments in the target
2410 <!-- should be ignored -->
2413 {{echo<!-- should be ignored -->
2416 {{echo<!-- should be ignored -->|foo}}
2418 {{<!-- should be ignored -->echo|foo}}
2420 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2422 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2424 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2426 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2430 Templates: Handle comments in parameter names (bug 67657)
2433 <!-- should be ignored -->
2437 <!-- should be ignored -->
2440 {{echo|1<!-- should be ignored --> = foo}}
2442 {{echo|<!-- should be ignored -->1 = foo}}
2444 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2446 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2448 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2450 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2454 Templates: Other wikitext in parameter names (bug 67657)
2458 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2464 #--------------------------------------------------------------------
2465 # Transclusion parameter escaping tests
2466 #--------------------------------------------------------------------
2468 Templates: Parsoid parameter escaping test 1
2472 {{echo|[foo]|{{echo|[bar]}}}}
2474 <p about="#mwt1" typeof="mw:Transclusion"
2475 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2479 Parsoid: Pipes in external links in template parameter
2483 {{echo|[{{echo|http://example.com}} link]}}
2485 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
2489 Parsoid: pipe in transclusion parameter
2493 {{echo|http://foo.com/a|b}}
2495 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2496 typeof="mw:Transclusion"
2497 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2501 Parsoid: Pipe in external link target and content in template parameter
2503 parsoid=html2wt,wt2wt
2505 {{echo|[http://foo.com/a|b a|b]}}
2507 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2508 typeof="mw:Transclusion"
2509 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2510 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2514 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2518 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2520 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2524 Templates: Don't escape already nowiki-escaped text in template parameters
2526 parsoid=html2wt,wt2wt
2528 {{echo|foo<nowiki>|</nowiki>bar}}
2529 {{echo|<nowiki><div></nowiki>}}
2530 {{echo|<nowiki></nowiki>}}
2532 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
2533 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
2534 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
2540 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2542 parsoid=html2wt,wt2wt
2544 {{echo|{{echo|1=bar}}}}
2546 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
2551 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2557 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2562 Templates: Preserve blank parameter names
2569 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2573 ### Parsoid-centric tests for testing RT edge cases for pre
2577 1a. Indent-Pre and Comments
2590 1b. Indent-Pre and Comments
2603 1c. Indent-Pre and Comments
2616 1d. Indent-Pre and Comments
2617 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2630 2a. Indent-Pre and tables
2651 2b. Indent-Pre and tables
2667 2c. Indent-Pre and tables (bug 42252)
2684 2d. Indent-Pre and tables
2701 <tbody><tr><td> b</td></tr>
2706 2e. Indent-Pre and table-line syntax
2719 2f. Indent-pre started by table-line syntax
2738 3a. Indent-Pre and block tags (single-line html)
2742 c <blockquote> foo </blockquote>
2747 c <blockquote> foo </blockquote>
2748 <pre><span> foo </span>
2751 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2752 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2753 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2754 <pre><span> foo </span>
2771 3b. Indent-Pre and block tags (multi-line html)
2776 <pre>a <span>foo</span>
2781 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2782 b <div data-parsoid='{"stx":"html"}'> foo </div>
2792 3c. Indent-Pre and block tags (pre-content on separate line)
2856 4. Indent-Pre and extension tags
2862 a <ul class="gallery mw-gallery-traditional">
2863 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2864 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
2865 <div class="gallerytext">
2872 <ul class="gallery mw-gallery-traditional">
2873 <li class="gallerybox" style="width: 155px">
2874 <div style="width: 155px">
2875 <div class="thumb" style="width: 150px;">
2876 <div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div>
2878 <div class="gallerytext"></div>
2885 Table wikitext syntax outside wiki-tables
2888 ! not a table heading
2891 | class="foo bar" | baz
2898 ! not a table heading
2901 | class="foo bar" | baz
2910 Render paragraphs when indent-pre is suppressed in blocklevels
2927 4. Multiple spaces at start-of-line
2945 ## NOTE: the leading white-space chars on empty line are significant
2947 5a. White-space in indent-pre
2959 ## NOTE: the leading white-space chars on empty line are significant
2961 5b. White-space in indent-pre
2980 5c. White-space in indent-pre
2993 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3016 7a. Indent-pre and category links
3018 parsoid=wt2html,wt2wt
3020 [[Category:foo]] <!-- No pre-wrapping -->
3021 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3023 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3024 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3028 7b. Indent-pre and category links
3030 parsoid=wt2html,wt2wt
3033 [[Category:foo]] {{echo|b}}
3036 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
3037 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3041 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3045 HTML-pre: 1. embedded newlines
3079 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3081 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3085 <pre data-parsoid='{"stx":"html"}'>
3090 <pre data-parsoid='{"stx":"html"}'>
3098 HTML-pre: big spaces
3135 <pre data-parsoid='{"stx":"html"}'>
3154 HTML-pre: 2: indented text
3167 HTML-pre: 3: other wikitext
3188 ### Definition lists
3195 <dl><dt> name </dt>
3196 <dd> Definition</dd></dl>
3201 Definition list for indentation only
3205 <dl><dd> Indented text</dd></dl>
3210 Definition list with no space
3215 <dd>Definition</dd></dl>
3220 Definition list with URL link
3222 ; http://example.com/ : definition
3224 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3225 <dd> definition</dd></dl>
3230 Definition list with bracketed URL link
3232 ;[http://www.example.com/ Example]:Something about it
3234 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3235 <dd>Something about it</dd></dl>
3240 Definition list with wikilink containing colon
3242 ; [[Help:FAQ]]: The least-read page on Wikipedia
3244 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
3245 <dd> The least-read page on Wikipedia</dd></dl>
3249 # At Brion's and JeLuF's insistence... :)
3251 Definition list with news link containing colon
3253 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3255 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3256 <dd> This isn't even a real newsgroup!</dd></dl>
3259 <dl><dt> <a rel="mw:ExtLink" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
3263 Malformed definition list with colon
3265 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3267 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
3272 Definition lists: colon in external link text
3274 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3276 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3277 <dd> OK, I made that up</dd></dl>
3282 Definition lists: colon in HTML attribute
3284 ;<b style="display: inline">bold</b>
3286 <dl><dt><b style="display: inline">bold</b></dt></dl>
3291 Definition lists: self-closed tag
3293 ;one<br/>two : two-line fun
3295 <dl><dt>one<br />two </dt>
3296 <dd> two-line fun</dd></dl>
3301 Bug 11748: Literal closing tags
3305 <dd>test test test test test</dd>
3307 <dd>test test test test test</dd>
3312 <dd>test test test test test</dd>
3314 <dd>test test test test test</dd>
3320 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3323 ; term : description
3328 <dl><dt> term </dt>
3329 <dd> description</dd></dl>
3330 <ul><li> unordered</li></ul>
3337 Definition list with empty definition and following paragraph
3349 Nested definition lists using html syntax
3358 Definition Lists: No nesting: Multiple dd's
3371 Definition Lists: Indentation: Regular
3379 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3384 Definition Lists: Indentation: Missing 1st level
3390 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3395 Definition Lists: Indentation: Multi-level indent
3399 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3404 Definition Lists: Hacky use to indent tables
3411 should be left alone
3413 <dl><dd><dl><dd><table>
3418 </td></tr></table></dd></dl></dd></dl>
3420 should be left alone
3425 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3433 should be left alone
3436 <dl><dd><dl><dd><table><tr>
3439 </tr></table><!-- bar --></dd></dl></dd></dl>
3441 should be left alone</p>
3445 Definition Lists: Hacky use to indent tables, with comment before table
3451 <dl><dd><dl><dd><!-- foo --><table><tr>
3453 </tr></table></dd></dl></dd></dl>
3458 Definition Lists: Hacky use to indent tables (WS-insensitive)
3467 <dd> <table><tr><td>a</td></tr></table> </dd>
3470 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3471 ## as an empty dt item. It also ignores all but the last ";" when followed
3472 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3473 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3476 ## Ex: ";;t2 ::d2" is transformed into:
3488 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3489 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3500 ## All Parsoid only definition list tests have this difference.
3502 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3503 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3506 Table / list interaction: indented table with lists in table contents
3521 <ul><li> b</li></ul>
3525 <ul><li> d</li></ul>
3526 </td></tr></table></dd></dl>
3531 Table / list interaction: lists nested in tables nested in indented lists
3554 </td></tr></table></dd></dl>
3561 Definition Lists: Nesting: Multi-level (Parsoid only)
3591 Definition Lists: Nesting: Test 2 (Parsoid only)
3611 Definition Lists: Nesting: Test 3 (Parsoid only)
3639 Definition Lists: Nesting: Test 4
3644 <dl><dd><dl><dd><dl><dt>t3</dt>
3645 <dd>d3</dd></dl></dd></dl></dd></dl>
3650 ## The Parsoid team believes the following three test exposes a
3651 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3652 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3653 ## It also exposes a "misfeature" in tidy, which doesn't like
3654 ## <dl> tags with a single <dt> child; it converts the <dt> into
3655 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3657 Definition Lists: Mixed Lists: Test 1
3663 <dl><dd><dl><dt><ul><li> foo</li>
3664 <li> bar</li></ul></dt></dl>
3665 <dl><dt> baz</dt></dl></dd></dl>
3700 Definition Lists: Mixed Lists: Test 2
3705 <ul><li><dl><dd> d1</dd>
3706 <dd> d2</dd></dl></li></ul>
3712 Definition Lists: Mixed Lists: Test 3
3717 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3718 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3724 Definition Lists: Mixed Lists: Test 4
3729 <ul><li><dl><dt>d1 </dt>
3732 <dd>d4</dd></dl></li></ul>
3738 Definition Lists: Mixed Lists: Test 5
3744 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3750 Definition Lists: Mixed Lists: Test 6
3755 <ol><li><ul><li><dl><dd>d1
3756 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3762 Definition Lists: Mixed Lists: Test 7
3767 <dl><dd><ul><li> d1</li>
3768 <li> d2</li></ul></dd></dl>
3774 Definition Lists: Mixed Lists: Test 8
3779 <dl><dd><ul><li> d1</li></ul>
3780 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3786 Definition Lists: Mixed Lists: Test 9
3790 <ul><li><dl><dt>foo </dt>
3791 <dd>bar</dd></dl></li></ul>
3797 Definition Lists: Mixed Lists: Test 10
3801 <ul><li><ol><li><dl><dt>foo </dt>
3802 <dd>bar</dd></dl></li></ol></li></ul>
3806 # The Parsoid team disagrees with the PHP parser's seemingly-random
3807 # rules regarding dd/dt on the next two tests. Parsoid is more
3808 # consistent, and recognizes the shared nesting and keeps the
3809 # still-open tags around until the nesting is complete.
3810 # (And tidy again converts <dt> to <dd> before 'bar'.)
3813 Definition Lists: Mixed Lists: Test 11
3818 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3819 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3820 <dl><dt>boo </dt>
3821 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3876 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3877 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3881 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3882 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3891 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3893 Definition Lists: Weird Ones: Test 1
3895 *#;*::;; foo : bar (who uses this?)
3897 <ul><li><ol><li><dl><dt> foo </dt>
3898 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
3917 <dt>bar (who uses this?)</dt>
3949 <dt> foo<span typeof="mw:Placeholder"> </span></dt>
3950 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3962 Definition Lists: colons occurring in tags
3976 <dt><span>a:b</span></dt>
3977 <dt><div>a:b</div></dt>
3980 <dt><i>a:b</i></dt></dl>
3985 Definition Lists: colons and tables 1
3997 </td></tr></table></dd></dl>
4001 </td></tr></table></dd></dl>
4005 # Parsoid's output (as documented below) differs from php's in this case.
4006 # This is probably a bug. If we fixup parsoid to match php's output, the
4007 # above test should pass and the below test case can be removed. It is
4008 # unclear which output is more desirable.
4011 Definition Lists: colons and tables 2
4023 </td></tr></table></dd>
4027 </td></tr></table></dd></dl>
4035 External links: non-bracketed
4037 Non-bracketed: http://example.com
4039 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4043 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4045 External links: numbered
4047 Numbered: [http://example.com]
4048 Numbered: [http://example.net]
4049 Numbered: [http://example.com]
4051 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4052 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4053 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4056 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4057 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4058 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4062 External links: specified text
4064 Specified text: [http://example.com link]
4066 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4071 External links: trail
4073 Linktrails should not work for external links: [http://example.com link]s
4075 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4080 External links: dollar sign in URL
4082 http://example.com/1$2345
4084 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4088 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4090 External links: dollar sign in URL (autonumber)
4092 [http://example.com/1$2345]
4094 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4097 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4101 External links: open square bracket forbidden in URL (bug 4377)
4103 parsoid=wt2html,wt2wt,html2html
4105 http://example.com/1[2345
4107 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4110 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4114 External links: open square bracket forbidden in URL (named) (bug 4377)
4116 parsoid=wt2html,html2html
4118 [http://example.com/1[2345]
4120 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4123 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4126 # parsoid adds a space before the link name
4128 External links: open square bracket forbidden in URL (named) (bug 4377)
4131 [http://example.com/1 [2345]
4133 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4138 External links: nowiki in URL link text (bug 6230)
4140 [http://example.com/ <nowiki>''example site''</nowiki>]
4142 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4147 External links: newline forbidden in text (bug 6230 regression check)
4149 [http://example.com/ first
4152 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4158 External links: Pipe char between url and text
4160 [http://example.com | link]
4162 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4167 External links: protocol-relative URL in brackets
4169 [//example.com/ Test]
4171 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4175 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4177 External links: protocol-relative URL in brackets without text
4181 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4184 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4188 External links: protocol-relative URL in free text is left alone
4192 <p>//example.com/Foo
4197 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4199 foo//example.com/Foo
4201 <p>foo//example.com/Foo
4206 External links: with no contents
4208 [http://en.wikipedia.org/wiki/Foo]
4210 [[wikipedia:Foo|Bar]]
4212 [[wikipedia:Foo|<span>Bar</span>]]
4214 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4215 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4216 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4219 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4220 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4221 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4225 External links: Free with trailing punctuation
4235 http://example.com/url_with_(brackets)
4236 (http://example.com/url_without_brackets)
4237 http://example.com/url_with_entity
4238 http://example.com/url_with_entity 
4239 http://example.com/url_with_entity 
4240 http://example.com/url_with_entity<
4241 http://example.com/url_with_entity<
4242 http://example.com/url_with_entity<
4244 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4245 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4246 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4247 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4248 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4249 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4250 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4251 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4252 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4253 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4254 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4255 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4256 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4257 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4258 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4259 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4262 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4263 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4264 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4265 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4266 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4267 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4268 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4269 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4270 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4271 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4272 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4273 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4274 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4275 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4276 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4277 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4281 External links: No preceding word characters allowed (bug 65278)
4283 NOPEhttp://example.com
4284 N0http://example.com
4285 ok:http://example.com
4286 ok-http://example.com
4288 <p>NOPEhttp://example.com
4289 N0http://example.com
4290 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4291 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4298 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4300 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4305 External image from https
4307 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4309 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4314 External image (when not allowed)
4316 wgAllowExternalImages=0
4318 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4320 <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>
4325 Link to non-http image, no img tag
4327 Link to non-http image, no img tag: ftp://example.com/test.jpg
4329 <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>
4334 External links: terminating separator
4336 Terminating separator: http://example.com/thing,
4338 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4343 External links: intervening separator
4345 Intervening separator: http://example.com/1,2,3
4347 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4352 External links: old bug with URL in query
4354 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4356 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4361 External links: old URL-in-URL bug, mixed protocols
4363 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4365 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4370 External links: URL in text
4372 URL in text: [http://example.com http://example.com]
4374 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4379 External links: Clickable images
4381 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4383 <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>
4386 <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>
4390 External links: raw ampersand
4392 Old & use: http://x&y
4394 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4399 External links: encoded ampersand
4401 Old & use: http://x&y
4403 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4406 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4410 External links: encoded equals (bug 6102)
4412 http://example.com/?foo=bar
4414 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4417 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4421 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4422 ## does it number them. As discussed in bug 53505, we can identify
4423 ## autonumbered links via CSS.
4427 External links: [raw ampersand]
4429 Old & use: [http://x&y]
4431 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4434 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4437 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4438 # mode will return the [raw ampersand] wikitext
4440 External links: [encoded ampersand]
4442 parsoid=wt2html,wt2wt,html2html
4444 Old & use: [http://x&y]
4446 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4449 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4453 External links: [raw equals]
4455 [http://example.com/?foo=bar]
4457 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4460 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4463 # note that parsoid html is identical to [raw equals] case; so html2wt
4464 # mode will return the [raw equals] wikitext
4466 External links: [encoded equals] (bug 6102)
4468 parsoid=wt2html,wt2wt,html2html
4470 [http://example.com/?foo=bar]
4472 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4475 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4478 # xxx parsoid strips the IDN character, so the round-trip tests will
4479 # obviously fail and are disabled. --cscott
4481 External links: [IDN ignored character reference in hostname; strip it right off]
4483 parsoid=wt2html,wt2wt,html2html
4485 [http://e‌xample.com/]
4487 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4490 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4493 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4494 # Where an external link could easily circumvent the sanitization of the text of
4495 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4496 # test demands a higher standard. That's a bit strange.
4500 # http://example.com -> [http://example.com|http://example.com]
4501 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4503 # The first example is sanitized, but the second is not. Any security benefits
4504 # from this production are trivial to circumvent. Either remove this test and
4505 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4506 # the test accordingly.
4510 # xxx parsoid strips the IDN character, so the round-trip tests will
4511 # obviously fail and are disabled. --cscott
4513 External links: IDN ignored character reference in hostname; strip it right off
4515 parsoid=wt2html,html2html
4517 http://e‌xample.com/
4519 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4522 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4526 External links: www.jpeg.org (bug 554)
4530 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4534 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4536 External links: URL within URL (original bug 2)
4538 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4540 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4543 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4547 BUG 361: URL inside bracketed URL
4549 [http://www.example.com/foo http://www.example.com/bar]
4551 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4556 BUG 361: URL within URL, not bracketed
4558 http://www.example.com/foo?=http://www.example.com/bar
4560 <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>
4565 BUG 289: ">"-token in URL-tail
4567 http://www.example.com/<hello>
4569 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4574 BUG 289: literal ">"-token in URL-tail
4576 http://www.example.com/<b>html</b>
4578 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4581 <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>
4585 BUG 289: ">"-token in bracketed URL
4587 [http://www.example.com/<hello> stuff]
4589 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4594 BUG 289: literal ">"-token in bracketed URL
4596 [http://www.example.com/<b>html</b> stuff]
4598 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4603 BUG 289: literal double quote at end of URL
4605 http://www.example.com/"hello"
4607 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4612 BUG 289: literal double quote in bracketed URL
4614 [http://www.example.com/"hello" stuff]
4616 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4621 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4623 [http://www.example.com test]
4625 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4630 External links: link text with spaces
4632 [http://www.example.com a b c]
4633 [http://www.example.com ''a'' ''b'']
4635 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4636 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4641 External links: wiki links within external link (Bug 3695)
4643 [http://example.com [[wikilink]] embedded in ext link]
4645 <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>
4648 <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>
4652 BUG 787: Links with one slash after the url protocol are invalid
4656 [http:/example.com title]
4658 <p>http:/example.com
4659 </p><p>[http:/example.com title]
4664 Bracketed external links with template-generated invalid target
4666 [{{echo|http:/example.com}} title]
4668 <p>[http:/example.com title]
4673 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4675 ''[http://example.com text'']
4676 [http://example.com '''text]'''
4677 ''Something [http://example.com in italic'']
4678 ''Something [http://example.com mixed''''', even bold]'''
4679 '''''Now [http://example.com both''''']
4681 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4682 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4683 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4684 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4685 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4691 Bug 4781: %26 in URL
4693 http://www.example.com/?title=AT%26T
4695 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4698 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4701 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
4702 # % is actually legal in HTML5. Any change in output would need testing though.
4704 Bug 4781, 5267: %25 in URL
4706 http://www.example.com/?title=100%25_Bran
4708 <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>
4711 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4715 Bug 4781, 5267: %28, %29 in URL
4717 http://www.example.com/?title=Ben-Hur_%281959_film%29
4719 <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>
4722 <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>
4727 Bug 4781: %26 in autonumber URL
4729 [http://www.example.com/?title=AT%26T]
4731 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4734 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4738 Bug 4781, 5267: %26 in autonumber URL
4740 [http://www.example.com/?title=100%25_Bran]
4742 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4745 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4749 Bug 4781, 5267: %28, %29 in autonumber URL
4751 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4753 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4756 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4761 Bug 4781: %26 in bracketed URL
4763 [http://www.example.com/?title=AT%26T link]
4765 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4768 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4772 Bug 4781, 5267: %25 in bracketed URL
4774 [http://www.example.com/?title=100%25_Bran link]
4776 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4781 Bug 4781, 5267: %28, %29 in bracketed URL
4783 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4785 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4788 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4792 External link containing a period in the anchor. (bug 63947)
4794 [//foo.org/bar#baz. bang]
4796 [//foo.org/bar. bang]
4798 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4799 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4802 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4803 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4807 External link containing a single quote. (bug 63947)
4811 [//foo.org/bar'baz bang]
4813 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4814 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4817 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4818 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4823 External link containing a period in the anchor. (bug 63947)
4825 [//foo.org/bar#baz. bang]
4827 [//foo.org/bar. bang]
4829 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4830 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4833 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4834 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4838 External link containing a single quote. (bug 63947)
4842 [//foo.org/bar'baz bang]
4844 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4845 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4848 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4849 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4854 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4856 Some [http://example.com/ pretty ''italics'' and stuff]!
4858 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4863 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4865 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4867 <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>
4872 External link containing double-single-quotes with no space separating the url from text in italics
4874 [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]].]
4876 <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>
4879 <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>
4881 <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>
4885 External link with comments in link text
4887 [http://www.google.com Google <!-- comment -->]
4889 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4894 URL-encoding in URL functions (single parameter)
4896 {{localurl:Some page|amp=&}}
4898 <p>/index.php?title=Some_page&amp=&
4903 URL-encoding in URL functions (multiple parameters)
4905 {{localurl:Some page|q=?&=&}}
4907 <p>/index.php?title=Some_page&q=?&amp=&
4914 http://example.com/index.php?foozoid%5B%5D=bar
4916 http://example.com/index.php?foozoid[]=bar
4918 <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>
4919 </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>
4922 <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>
4924 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4928 IPv6 urls (bug 21261)
4932 http://[2404:130:0:1000::187:2]/index.php
4934 <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>
4939 Non-extlinks in brackets
4948 [{{echo|foo}} ''bar'']
4949 [{{echo|foo}}l's] errand
4950 [{{echo|foo}}l's errand]
4952 [url=http://example.com]
4965 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4970 Percent encoding in external links
4972 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4974 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4977 <p><a rel="mw:ExtLink"
4978 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4982 Use url link syntax for links where the content is equal the link target
4986 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4989 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4993 Parenthesis in external links, especially URL links
4997 http://example.com/test)
4999 http://example.com/(test)
5001 http://example.com/((test)
5003 (http://example.com/(test))
5005 (http://example.com/(test)))))
5007 http://example.com/a)b
5009 [http://example.com) foo]
5011 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5012 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5013 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5014 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5015 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5016 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5017 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5018 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5021 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5022 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5023 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5024 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5025 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5026 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5027 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5028 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5032 Parenthesis in external links, w/ transclusion or comment
5034 (http://example.com/{{echo|hi}})
5036 (http://example.com<!-- hi -->)
5038 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5039 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5042 <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>
5044 <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>
5048 Replace invalid link targets when serializing
5052 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
5054 [[MediaWiki:Badtitletext|Manual]]
5064 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5066 Normal text. '''''Bold italic text.''''' Normal text.
5068 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5069 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5074 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5075 # parser strips. The wikitext contains just the first half of the bold
5078 Unclosed and unmatched quotes
5080 '''''Bold italic text '''with bold deactivated''' in between.'''''
5082 '''''Bold italic text ''with italic deactivated'' in between.'''''
5086 ..spanning two paragraphs (should not work).'''
5088 '''Bold tag left open
5090 ''Italic tag left open
5094 <!-- Unmatching number of opening, closing tags: -->
5095 '''This year''''s election ''should'' beat '''last year''''s.
5097 ''Tom'''s car is bigger than ''Susan'''s.
5099 Plain ''italic'''s plain
5101 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5102 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5103 </p><p><b>Bold text..</b>
5104 </p><p>..spanning two paragraphs (should not work).
5105 </p><p><b>Bold tag left open</b>
5106 </p><p><i>Italic tag left open</i>
5108 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5109 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5110 </p><p>Plain <i>italic'</i>s plain
5113 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5114 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5115 </p><p><b>Bold text..</b>
5116 </p><p>..spanning two paragraphs (should not work).<b></b>
5117 </p><p><b>Bold tag left open</b>
5118 </p><p><i>Italic tag left open</i>
5120 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5121 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5122 </p><p>Plain <i>italic'</i>s plain
5129 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5132 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5133 # is the bare minimum required by the spec, see:
5134 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5135 # Parsoid team replies: empty table tags are legal in HTML5
5137 A table with no data.
5150 A table with stray table end tags on start tag line (wt2html)
5154 {|style="color: red;"|}
5156 {|style="color: red;" |}
5160 {|style="color: red;"|} id="foo"
5164 {|style="color: red;" |} id="foo"
5168 <table style="color: red;"></table>
5170 <table style="color: red;">
5176 <table style="color: red;" id="foo">
5182 <table style="color: red;" id="foo">
5191 A table with no data (take 2)
5199 # A table with nothing but a caption is invalid XHTML, we might want to render
5200 # this as <p>caption</p>
5201 # Parsoid team replies: table with only a caption is legal in HTML5
5203 A table with nothing but a caption
5211 </caption><tr><td></td></tr></table>
5214 <table><caption> caption</caption></table>
5218 A table with caption with default-spaced attributes and a table row
5221 |+ style="color: red;" | caption1
5227 <caption style="color: red;"> caption1
5236 A table with captions with non-default spaced attributes and a table row
5239 |+style="color: red;"|caption2
5240 |+ style="color: red;"| caption3
5246 <caption style="color: red;">caption2
5248 <caption style="color: red;"> caption3
5257 Table td-cell syntax variations
5261 | foo bar foo || baz
5262 | style='color:red;' | baz
5263 | style='color:red;' || baz
5270 <td> foo bar foo </td>
5273 <td style="color:red;"> baz
5275 <td> style='color:red;' </td>
5303 Simple table but with multiple dashes for row wikitext
5321 Multiplication table
5323 {| border="1" cellpadding="2"
5324 |+Multiplication table
5326 ! × !! 1 !! 2 !! 3
5344 <table border="1" cellpadding="2">
5345 <caption>Multiplication table
5392 Accept "||" in table headings
5407 Accept "!!" in table data
5421 <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>
5426 Accept "||" in indented table headings
5436 </th></tr></table></dd></dl>
5441 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5458 Accept "| !" at start of line in tables (ignore !-attribute)
5462 | !style="color:red" | bar
5474 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 +/-
5478 |style='color:red;'|+1
5479 |style='color:blue;'|-1
5491 <td style="color:red;">+1
5493 <td style="color:blue;">-1
5517 |rowspan=2| Cell 2, row 1 (and 2)
5528 <td rowspan="2"> Cell 2, row 1 (and 2)
5546 {| bgcolor=#ABCDEF border=2
5551 |the original table again
5559 <table bgcolor="#ABCDEF" border="2">
5567 <td>the original table again
5573 Invalid attributes in table cell (bug 1830)
5586 # The "|}" to close the table is missing from the input, so parsoid's
5587 # *2wt modes will fail.
5589 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5591 parsoid=wt2html,html2html
5594 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5598 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5599 <td>]" onmouseover="alert(document.cookie)">test
5607 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5610 # FIXME: The php output is broken.
5612 ! and || in td attributes should not be parsed as <th>/<td>
5615 | style="color: red !important;" data-contrived="put this here ||" | foo
5620 <td> style="color: red !important;" data-contrived="put this here </td>
5626 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
5631 Indented table markup mixed with indented pre content (proposed in bug 6200)
5636 Text that should be rendered preformatted
5644 <pre>Text that should be rendered preformatted
5653 1. Template-generated table cell attributes and cell content
5658 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5659 |align=center {{table_attribs}}
5660 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5665 <td style="color:red;">Foo
5667 <td style="color:red;">Foo
5669 <td style="color:red;">Foo
5671 <td align="center" style="color:red;">Foo
5673 <td align="center" style="color:red;">Foo
5679 2. Template-generated table cell attributes and cell content
5682 |{{table_attribs_2}}
5687 <td style="color:red;">Foo
5695 <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>
5696 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
5701 3. Template-generated table cell attributes and cell content
5704 !align=center {{table_header_cells}}
5706 |align=center {{table_cells}}
5711 <th align="center" style="color:red;">Foo</th>
5712 <th style="color:red;"><i>Bar</i></th>
5713 <th style="color:brown;"><i>Foo</i> and Baz
5716 <td align="center" style="color:red;">Foo</td>
5717 <td style="color:red;"><i>Bar</i></td>
5718 <td style="color:brown;"><i>Foo</i> and Baz
5723 <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>
5724 <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>
5729 Table with row followed by newlines and table heading
5747 Table with empty line following the start tag
5764 # FIXME: Preserve the attribute properly (with an empty string as value) in
5765 # the PHP parser. Parsoid implements the behavior below.
5767 Table attributes with empty value
5777 </td></tr></tbody></table>
5782 Wikitext table with a lot of comments
5805 Wikitext table with double-line table cell
5822 Table cell with a single comment
5839 Table-cell after a comment-only-empty-line
5856 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5858 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5864 Build table with {{!}}
5866 {{{!}} class="wikitable"
5869 {{!}}- style="color:red;"
5870 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5873 <table class="wikitable">
5879 <tr style="color:red;">
5881 <td style="color:red;"> second data
5887 Build table with pipe as data
5889 {| class="wikitable"
5892 |- style="color:red;"
5893 | data || style="color:red;" | second data
5895 | style="color:red;" | data with | || style="color:red;" | second data with |
5897 || data with | ||| second data with |
5900 <table class="wikitable">
5906 <tr style="color:red;">
5908 <td style="color:red;"> second data
5911 <td style="color:red;"> data with | </td>
5912 <td style="color:red;"> second data with |
5915 <td> data with | </td>
5916 <td> second data with |
5922 Build table with wikilink
5924 {| class="wikitable"
5925 ! header || second header
5926 |- style="color:red;"
5927 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
5929 | data || second data [[Main Page|link|text with pipe]]
5932 <table class="wikitable">
5937 <tr style="color:red;">
5938 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
5939 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
5943 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
5948 # The expected HTML structure in this test is debatable. The PHP parser does
5949 # not parse this kind of table at all. The main focus for Parsoid is on
5950 # round-tripping, so this output is ok for now. TODO: revisit!
5952 Wikitext table with html-syntax row
5962 <td>foo</td></tr></tbody></table>
5965 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5966 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5967 ## PHP parser, which tidy then compounds by fostering the content
5968 ## entirely out of the table. Parsoid recognizes the table context
5969 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5970 ## depends on PHP's treatment of broken table markup!
5972 Implicit <td> after a |-
5974 parsoid=wt2html,html2html
5994 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5996 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5998 parsoid=wt2html,html2html
6031 <tr><td><pre>a</pre></td></tr>
6032 <tr><td> b</td></tr>
6037 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6038 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6040 Lists should be recognized in an implicit <td> context
6042 parsoid=wt2html,html2html
6069 Parsoid: Round-trip tables directly followed by content (bug 51219)
6071 parsoid=wt2html,wt2wt
6096 Parsoid: Default to a newline after tables in new content (bug 51219)
6101 <tr><td>foo</td></tr></tbody></table> bar
6103 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6108 <nowiki> </nowiki>bar
6116 Parsoid: newline inducing block nodes don't suppress <nowiki>
6128 Parsoid: Row-syntax table headings followed by comment & table cells
6130 parsoid=wt2html,wt2wt
6134 <!-- foo --> || baz || quux
6148 <tbody><tr><th> foo </th><th> bar
6149 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6154 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6157 Parsoid: Recover better from broken table attributes
6177 <p>foo</p></td></tr>
6182 Strip unsupported table tags
6233 Plain link, capitalized
6237 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6242 Plain link, uncapitalized
6246 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6253 [[Main Page|The Main Page]]
6255 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6260 Piped link with comment in link text
6262 [[Main Page|The Main<!--front--> Page]]
6264 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6269 Piped link with multiple pipe characters in link text
6271 [[Main Page||The|Main|Page|]]
6273 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6276 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6284 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6289 Broken link with fragment
6291 [[Zigzagzogzagzig#zug]]
6293 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6298 Special page link with fragment
6300 [[Special:Version#anchor]]
6302 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6307 Nonexistent special page link with fragment
6309 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6311 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6318 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6320 <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>
6327 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6329 <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>!!!
6340 Bug 43661: Piped links with identical prefixes
6342 [[prefixed article|prefixed articles with spaces]]
6344 [[prefixed article|prefixed articlesaoeu]]
6346 [[Main Page|Main Page test]]
6348 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6349 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6350 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6356 Link with HTML entity in suffix / tail
6358 [[Main Page]]", [[Main Page]]a
6360 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6363 <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>
6367 Link with 3 brackets
6376 Link with 4 brackets
6380 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6385 Piped link with 3 brackets
6387 [[[main page|the main page]]]
6389 <p>[[[main page|the main page]]]
6394 Piped link with extlink-like text
6397 [[Main Page|This is a [bar]]]
6399 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6400 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6403 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6404 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6408 Link with multiple pipes
6410 [[Main Page|The|Main|Page]]
6412 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6416 # Note that parsoid does not munge anchor text; all non-space
6417 # characters are valid in HTML5 ids.
6419 Anchor containing a #. (bug 63430)
6421 [[Main Page#And#Link]]
6423 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6426 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6432 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6434 <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>
6439 Link with space in namespace
6441 [[User talk:Foo bar]]
6443 <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>
6448 MemoryAlpha:AlphaTest
6450 This is an article in the MemoryAlpha namespace
6451 (which shadows the memoryalpha interwiki link).
6455 Namespace takes precedence over interwiki link (bug 51680)
6457 [[MemoryAlpha:AlphaTest]]
6459 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6463 # The previous test doesn't work correctly in html2*, due to not recognizing the
6464 # link as an internal one. This one checks for the correct behavior.
6466 Link to namespace preferred over interwiki with correct rel attribute
6468 parsoid=html2wt,html2html
6470 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6472 [[MemoryAlpha:AlphaTest]]
6476 Piped link to namespace
6478 [[Meta:Disclaimers|The disclaimers]]
6480 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6487 [[Usually caused by a typo (oops}]]
6489 <p>[[Usually caused by a typo (oops}]]
6496 Just a test of an article title containing a percent.
6500 Link containing % (not as a hex sequence)
6504 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6507 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6510 # note that the parsoid HTML is identical to the previous test output,
6511 # so the previous test ensures that the html2wt mode will generate the
6512 # "not as a hex sequence" wikitext.
6514 Link containing % as a single hex sequence interpreted to char
6516 parsoid=wt2wt,wt2html,html2html
6520 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6523 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6527 Link containing % as a double hex sequence interpreted to hex sequence
6531 <p>[[7%2525 Solution]]
6535 # note that parsoid does not munge anchor text; all non-space
6536 # characters are valid in HTML5 anchors.
6538 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6539 Example for such a section: == < ==
6541 [[%23%3c]][[%23%3e]]
6543 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6546 <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>
6550 Link containing "<#" and ">#" as a hex sequences
6552 [[%3c%23]][[%3e%23]]
6554 <p>[[%3c%23]][[%3e%23]]
6559 Link containing an equals sign
6561 [[Special:BookSources/isbn=4-00-026157-6]]
6563 <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>
6566 <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>
6572 Just a test of an article title containing a tilde.
6575 # note that links containing signatures, like [[Foo~~~~]], are
6576 # massaged by the pre-save transform (PST) and so the tildes are never
6577 # seen by the parser.
6579 Link containing a tilde
6583 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6586 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6590 Link containing double-single-quotes '' (bug 4598)
6592 [[Lista d''e paise d''o munno]]
6594 <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>
6597 <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>
6601 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6603 Some [[Link|pretty ''italics'' and stuff]]!
6605 <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>!
6608 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6612 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6614 ''Some [[Link|pretty ''italics'' and stuff]]!''
6616 <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>
6621 Link with double quotes in title part (literal) and alternate part (interpreted)
6623 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6627 [[''Pentecoste''|Pentecoste]]
6629 [[''Pentecoste''|''Pentecoste'']]
6631 <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>
6632 </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>
6633 </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>
6634 </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>
6637 <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>
6638 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6639 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6640 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6644 Broken image links with HTML captions (bug 39700)
6646 [[File:Nonexistent|<script></script>]]
6647 [[File:Nonexistent|100x100px|<script></script>]]
6648 [[File:Nonexistent|<]]
6649 [[File:Nonexistent|a<i>b</i>c]]
6651 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6652 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6653 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6654 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6657 <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>
6658 <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>
6659 <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>
6660 <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>
6666 [[http://www.example.com]]
6668 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6671 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6675 Plain link to URL with link text
6677 [[http://www.example.com Link text]]
6679 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6684 Plain link to protocol-relative URL
6686 [[//www.example.com]]
6688 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6691 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6695 Plain link to protocol-relative URL with link text
6697 [[//www.example.com Link text]]
6699 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6704 Plain link to page with question mark in title
6710 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6711 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6716 # I'm fairly sure the expected result here is wrong.
6717 # We want these to be URL links, not pseudo-pages with URLs for titles....
6718 # However the current output is also pretty screwy.
6721 # I'm changing it to match the current output--it arguably makes more
6722 # sense in the light of the test above. Old expected result was:
6723 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6725 # But I think this test is bordering on "garbage in, garbage out" anyway.
6730 Piped link to URL: [[http://www.example.com|an example URL]]
6732 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6735 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6739 BUG 2: [[page|http://url/]] should link to page, not http://url/
6741 [[Main Page|http://url/]]
6743 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6746 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6749 # Parsoid does not mark self-links, by design.
6751 BUG 337: Escaped self-links should be bold
6755 [[Bug462]] [[Bug462]]
6757 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6760 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6762 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6766 Self-link to section should not be bold
6770 [[Main Page#section]]
6772 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6783 Self-link to numeric title
6789 <p><strong class="selflink">0</strong>
6794 Link to numeric-equivalent title
6800 <p><a href="/wiki/00" title="00">00</a>
6805 <nowiki> inside a link
6807 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6809 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6814 Non-breaking spaces in title
6816 [[ Main Page ]]
6818 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6823 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6829 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6834 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6840 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6845 Internal link with en linktrail: no apostrophes (bug 27473)
6851 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6856 Internal link with ca linktrail with apostrophes (bug 27473)
6862 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6867 Internal link with kaa linktrail with apostrophes (bug 27473)
6873 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6878 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6880 [[User:Foo/Test/63636:Bar|Test]]
6882 <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>
6885 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6889 Purely hash wikilink
6891 title=[[User:test/123]]
6895 <p><a href="#a">b</a>
6898 <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>
6902 1. Interaction of linktrail and template encapsulation
6908 <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>
6912 2. Interaction of linktrail and template encapsulation
6916 {{echo|Some [[Fool]]}}s
6918 <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>
6922 3. Interaction of linktrail and template encapsulation
6926 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6928 <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>
6938 Internal link with is link prefix
6942 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6944 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6955 Internal link with is link trail and link prefix
6959 [[mótmælendatrú|xxx]]ar
6961 mótmælenda[[söfnuður]]
6962 mótmælenda[[söfnuður|söfnuðir]]
6963 mótmælenda[[söfnuður|söfnuðir]]xxx
6965 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6966 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6967 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6968 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6969 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6974 Parsoid link trail escaping
6976 parsoid=html2wt,html2html
6978 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6984 Parsoid link prefix escaping
6987 parsoid=html2wt,html2html
6989 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6991 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6995 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7003 [http://wp.org ''foo'']
7005 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7006 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7007 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7008 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7013 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7017 [[Foo|{{echo|a}} b {{echo|c}}]]
7019 <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>
7023 Link with angle bracket after anchor
7027 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7030 <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>
7034 ### Interwiki links (see maintenance/interwiki.sql)
7038 Inline interwiki link
7040 parsoid=wt2html,wt2wt,html2html
7042 [[MeatBall:SoftSecurity]]
7044 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7047 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7051 Inline interwiki link with empty title (bug 2372)
7053 parsoid=wt2html,wt2wt,html2html
7057 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7060 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7064 Interwiki link encoding conversion (bug 1636)
7066 *[[Wikipedia:ro:Olteniţa]]
7067 *[[Wikipedia:ro:Olteniţa]]
7069 <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>
7070 <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>
7074 <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>
7075 <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>
7080 Interwiki link with fragment (bug 2130)
7082 [[MeatBall:SoftSecurity#foo]]
7084 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7088 # Ideally the wikipedia: prefix here should be proto-relative too
7089 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7090 # define the 'en' prefix, and originally the test used 'wikipedia',
7091 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7094 Different interwiki prefixes mapping to the same URL
7102 [[:wikipedia:Foo|Foo]]
7104 [[wikipedia:en:Foo]]
7106 [[:wikipedia:en:Foo]]
7110 <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>
7112 <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>
7114 <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>
7116 <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>
7118 <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>
7120 <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>
7122 <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>
7126 Interwiki links that cannot be represented in wiki syntax
7129 [[meatball:ok#foo|ok with fragment]]
7130 [[meatball:ok_as_well?|ok ending with ? mark]]
7131 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7132 [http://de.wikipedia.org/wiki/#foo is just fragment]
7135 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7136 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7137 <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>
7138 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7139 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7142 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7143 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7144 <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>
7145 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7146 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7150 Interwiki links: trail
7152 [[wikipedia:Foo|Ba]]r
7154 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7157 <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>
7161 Local interwiki link
7163 parsoid=wt2html,wt2wt,html2html
7165 [[local:Template:Foo]]
7167 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7170 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7173 # Parsoid does not mark self-links, by design.
7175 Local interwiki link: self-link to current page
7178 parsoid=wt2html,wt2wt,html2html
7182 <p><strong class="selflink">local:Main Page</strong>
7185 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7189 Local interwiki link: prefix only (bug 64167)
7191 parsoid=wt2html,wt2wt,html2html
7195 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7198 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7202 Local interwiki link: with additional interwiki prefix (bug 61357)
7204 parsoid=wt2html,wt2wt,html2html
7206 [[local:meatball:Hello]]
7208 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7211 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7215 Multiple local interwiki link prefixes
7217 [[local:local:local:local:mi:local:Foo]]
7219 parsoid=wt2html,wt2wt,html2html
7221 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7224 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7228 ### Interlanguage links
7229 ### Language links (so that searching for '### language' matches..)
7235 parsoid=wt2html,wt2wt,html2html
7243 <p>Blah blah blah</p>
7244 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7248 Interlanguage link with spacing
7250 parsoid=wt2html,wt2wt,html2html
7258 <p>Blah blah blah</p>
7259 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7263 Double interlanguage link
7265 parsoid=wt2html,wt2wt,html2html
7274 <p>Blah blah blah</p>
7275 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7276 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7280 Interlanguage link variations
7282 parsoid=wt2html,wt2wt,html2html
7293 <p>Blah blah blah</p>
7294 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7295 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7296 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7297 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7301 Interlanguage link, with prefix links
7311 <p>Blah blah blah</p>
7312 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7316 Double interlanguage link, with prefix links (bug 8897)
7327 <p>Blah blah blah</p>
7328 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7329 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7333 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7341 <p>Blah blah blah</p>
7342 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7346 Parsoid-specific test: Wikilinks with should RT properly
7352 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7357 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7361 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7362 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7364 He&nbsp;llo [[Foo|He&nbsp;llo]]
7366 He&nbsp;llo [[He&nbsp;llo]]
7370 Parsoid: handle constructor well
7376 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7377 </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>
7380 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7382 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7391 # Note that `ko` isn't a known interlanguage prefix
7393 Parsoid: recognize interlanguage links without a target page
7403 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7405 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7408 # Note that `ko` isn't a known interwiki prefix
7410 Parsoid: recognize interwiki links without a target page
7412 parsoid=wt2html,wt2wt,html2html
7418 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7419 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7422 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7423 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7427 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7431 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7434 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7438 Interlanguage link with preceding local interwiki link (bug 68085)
7440 parsoid=wt2html,wt2wt,html2html
7443 [[local:es:Spanish]]
7446 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7450 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7454 Looks like an interlanguage link, but is actually a local interwiki
7456 parsoid=wt2html,wt2wt,html2html
7462 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7466 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7470 ### Redirects, Parsoid-only
7473 1. Simple redirect to page
7477 #REDIRECT [[Main Page]]
7479 <link rel="mw:PageProp/redirect" href="./Main_Page">
7482 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
7484 2. Other redirect variants
7486 parsoid=wt2html,wt2wt
7488 #REDIRECT [[Main_Page]]
7489 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7491 <link rel="mw:PageProp/redirect" href="./Main_Page"><link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
7497 parsoid=wt2html,wt2wt
7502 <li>REDIRECT [[]]</li></ol>
7506 Optional colon in #REDIRECT
7508 # the colon is archaic syntax. we support it for wt2html, but we
7509 # don't care that it roundtrips back to the modern syntax.
7510 parsoid=wt2html,html2html
7512 #REDIRECT:[[Main Page]]
7514 <link rel="mw:PageProp/redirect" href="./Main_Page">
7518 Whitespace in #REDIRECT with optional colon
7520 # the colon and gratuitous whitespace is archaic syntax. we support
7521 # it for wt2html, but we don't care that it roundtrips back to the
7522 # modern syntax (without extra whitespace)
7523 parsoid=wt2html,html2html
7530 <link rel="mw:PageProp/redirect" href="./Main_Page">
7534 Piped link in #REDIRECT
7536 # content after piped link is ignored. we support this syntax,
7537 # but don't care that the piped link is lost when we roundtrip this.
7540 #REDIRECT [[Main Page|bar]]
7542 <link rel="mw:PageProp/redirect" href="./Main_Page">
7546 Redirect to category
7550 #REDIRECT [[Category:Foo]]
7552 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7556 Redirect to category with URL encoding
7560 #REDIRECT [[Category%3AFoo]]
7562 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7566 Redirect to category page
7568 parsoid=wt2html,html2html
7570 #REDIRECT [[:Category:Foo]]
7572 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7576 Redirect to image page (1)
7580 #REDIRECT [[File:Wiki.png]]
7582 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7586 Redirect to image page (2)
7590 #REDIRECT [[Image:Wiki.png]]
7592 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7596 Redirect to language
7600 #REDIRECT [[en:File:Wiki.png]]
7602 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7606 Redirect to interwiki
7610 #REDIRECT [[meatball:File:Wiki.png]]
7612 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7616 Non-English #REDIRECT
7621 #TILVÍSUN [[Main Page]]
7623 <link rel="mw:PageProp/redirect" href="./Main_Page">
7631 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7651 Broken br tag sanitization
7659 # TODO: Fix html2html mode (bug 51055)!
7660 # This </br> handling was added as part of bug 50831; but it
7661 # differs from how PHP+tidy handles this. We should investigate
7664 Parsoid: Broken br tag recognition
7680 Incorrecly removing closing slashes from correctly formed XHTML
7682 <br style="clear:both;" />
7684 <p><br style="clear:both;" />
7689 Failing to transform badly formed HTML into correct XHTML
7691 <br style="clear: left;">
7692 <br style="clear: right;">
7693 <br style="clear: both;">
7695 <p><br style="clear: left;" />
7696 <br style="clear: right;" />
7697 <br style="clear: both;" />
7701 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7702 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7704 Handling html with a div self-closing tag
7713 <p><div title />
7717 <p><div title=bar />
7718 <div title=bar/>
7720 <div title="bar/"></div>
7724 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7725 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7726 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7727 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7728 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7729 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7733 Handling html with a br self-closing tag
7742 <p><br title="title" />
7743 <br title="title" />
7760 Horizontal ruler (should it add that extra space?)
7775 Horizontal ruler -- 4+ dashes render hr
7784 Horizontal ruler -- eats additional dashes on the same line
7793 Horizontal ruler -- does not collapse dashes on consecutive lines
7804 Horizontal ruler -- <4 dashes render as plain text
7813 Horizontal ruler -- Supports content following dashes on same line
7825 ### Block-level elements
7834 <ul><li>Common list</li>
7836 <li>item 3</li></ul>
7847 <ol><li>Numbered list</li>
7849 <li> item 3</li></ol>
7863 ***#Number on level 4
7865 **#Number on level 3
7866 **#Number on level 3
7870 #** Level 3, but ordered
7873 <ol><li> with numbers</li></ol>
7874 <ul><li> and bullets</li></ul>
7875 <ol><li> and numbers</li></ol></li>
7877 <ul><li>bullet level 2
7878 <ul><li>bullet level 3
7879 <ol><li>Number on level 4</li></ol></li></ul></li>
7881 <ol><li>Number on level 3</li>
7882 <li>Number on level 3</li></ol></li></ul>
7883 <ol><li>number level 2</li></ol></li>
7885 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7886 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7897 <ul><li>bar</li></ul></li></ul>
7907 <ul><li><ul><li>foo</li></ul></li>
7913 Nested lists 3 (first element empty)
7919 <ul><li>bar</li></ul></li></ul>
7924 Nested lists 4 (first element empty)
7929 <ul><li><ul><li></li></ul></li>
7935 Nested lists 5 (both elements empty)
7940 <ul><li><ul><li></li></ul></li>
7946 Nested lists 6 (both elements empty)
7952 <ul><li></li></ul></li></ul>
7957 Nested lists 7 (skip initial nesting levels)
7961 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7966 Nested lists 8 (multiple nesting transitions)
7974 <ul><li><ul><li> bar</li></ul></li>
7975 <li> baz</li></ul></li>
7981 1. Lists with start-of-line-transparent tokens before bullets: Comments
7994 2. Lists with start-of-line-transparent tokens before bullets: Template close
7999 <ul><li>foo bar</li>
8005 List items are not parsed correctly following a <pre> block (bug 785)
8011 <ul><li> <pre>foo</pre></li>
8012 <li> <pre>bar</pre></li>
8018 List items from template
8029 * notSOL{{inner list}}
8032 <ul><li> item 1</li>
8033 <li> item 2</li></ul>
8034 <ul><li> item 0</li>
8036 <li> item 2</li></ul>
8037 <ul><li> item 0</li>
8040 <li> item 2</li></ul>
8045 List interrupted by empty line or heading
8053 <ul><li> foo</li></ul>
8054 <ul><li><ul><li> bar</li></ul></li></ul>
8055 <h2><a href="#A_heading" class="mw-headline-anchor" 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>
8056 <ul><li> Another list item</li></ul>
8061 Multiple list tags generated by templates
8082 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8085 <!--This line will NOT split the list-->
8087 <!--This line will NOT split the list either-->
8089 <!--foo--> <!----> <!--This line NOT split the list either-->
8100 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8103 <!--This line will NOT split the list-->
8105 <!--This line will NOT split the list either-->
8107 <!--foo--> <!----> <!--This line NOT split the list
8120 (The PHP parser relies on Tidy for the hack)
8122 parsoid=wt2html,wt2wt
8126 * {{echo|<li>templated li-hack}}
8127 * <!--foo--> <li> unsupported li-hack with preceding comments
8130 <li><li>not a li-hack
8137 <li>templated li-hack</li>
8138 <li>unsupported li-hack with preceding comments</li>
8141 <li>not a li-hack</li>
8146 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8173 Parsoid: Test of whitespace serialization with Templated bullets
8180 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8184 # ------------------------------------------------------------------------
8185 # The next set of tests are about Parsoid's ability to handle badly nested
8186 # tags (parse, minimize scope of fixup, and roundtrip back)
8187 # ------------------------------------------------------------------------
8190 Unbalanced closing block tags break a list
8191 (php parser relies on Tidy to fix up)
8209 # Parsoid fails this test, but it might be tricky to support properly.
8212 Unbalanced closing non-block tags don't break a list
8213 (php parser relies on Tidy to fix up)
8220 <li><span>a</span></li>
8221 <li><span>b</span></li>
8235 Unclosed formatting tags that straddle lists are closed and reopened
8236 (php parser relies on Tidy to fix up)
8238 parsoid=wt2html,wt2wt,html2html
8248 <ol><li> <s> a</s></li>
8249 <li><s> b </s></li></ol>
8252 # Parsoid fails this test, but it might be tricky to support properly.
8255 List embedded in a non-block tag
8256 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
8263 <li><small>foo</small></li>
8273 # This is a bug in the PHP parser + tidy combination.
8274 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8275 # and then fostered out of the table by tidy.)
8276 # We believe the Parsoid output to be correct.
8278 Table with missing opening <tr> tag
8280 parsoid=wt2html,wt2wt
8305 # Note that the current date is hard-coded as
8306 # 1970-01-01T00:02:03Z (a Thursday)
8307 # when running parser tests. The timezone is also fixed to GMT, so
8308 # local date will be identical to current date.
8311 Magic Word: {{CURRENTDAY}}
8320 Magic Word: {{CURRENTDAY2}}
8329 Magic Word: {{CURRENTDAYNAME}}
8338 Magic Word: {{CURRENTDOW}}
8347 Magic Word: {{CURRENTMONTH}}
8356 Magic Word: {{CURRENTMONTH1}}
8365 Magic Word: {{CURRENTMONTHABBREV}}
8367 {{CURRENTMONTHABBREV}}
8374 Magic Word: {{CURRENTMONTHNAME}}
8376 {{CURRENTMONTHNAME}}
8383 Magic Word: {{CURRENTMONTHNAMEGEN}}
8385 {{CURRENTMONTHNAMEGEN}}
8392 Magic Word: {{CURRENTTIME}}
8401 Magic Word: {{CURRENTHOUR}}
8410 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8419 Magic Word: {{CURRENTYEAR}}
8428 Magic Word: {{CURRENTTIMESTAMP}}
8430 {{CURRENTTIMESTAMP}}
8437 Magic Words LOCAL (UTC)
8441 * {{LOCALMONTHNAME}}
8442 * {{LOCALMONTHNAMEGEN}}
8443 * {{LOCALMONTHABBREV}}
8452 * {{LOCALTIMESTAMP}}
8467 <li> 19700101000203</li></ul>
8472 Magic Word: {{FULLPAGENAME}}
8474 title=[[User:Ævar Arnfjörð Bjarmason]]
8478 <p>User:Ævar Arnfjörð Bjarmason
8483 Magic Word: {{FULLPAGENAMEE}}
8485 title=[[User:Ævar Arnfjörð Bjarmason]]
8489 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8494 Magic Word: {{TALKSPACE}}
8496 title=[[User:Ævar Arnfjörð Bjarmason]]
8505 Magic Word: {{TALKSPACE}}, same namespace
8507 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8516 Magic Word: {{TALKSPACE}}, main namespace
8518 title=[[Parser Test]]
8527 Magic Word: {{TALKSPACEE}}
8529 title=[[User:Ævar Arnfjörð Bjarmason]]
8538 Magic Word: {{SUBJECTSPACE}}
8540 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8549 Magic Word: {{SUBJECTSPACE}}, same namespace
8551 title=[[User:Ævar Arnfjörð Bjarmason]]
8560 Magic Word: {{SUBJECTSPACE}}, main namespace
8562 title=[[Parser Test]]
8570 Magic Word: {{SUBJECTSPACEE}}
8572 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8581 Magic Word: {{NAMESPACE}}
8583 title=[[User:Ævar Arnfjörð Bjarmason]]
8592 Magic Word: {{NAMESPACEE}}
8594 title=[[User:Ævar Arnfjörð Bjarmason]]
8603 Magic Word: {{NAMESPACENUMBER}}
8605 title=[[User:Ævar Arnfjörð Bjarmason]]
8614 Magic Word: {{SUBPAGENAME}}
8616 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8625 Magic Word: {{SUBPAGENAMEE}}
8627 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8636 Magic Word: {{ROOTPAGENAME}}
8638 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8642 <p>Ævar Arnfjörð Bjarmason
8647 Magic Word: {{ROOTPAGENAMEE}}
8649 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8653 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8658 Magic Word: {{BASEPAGENAME}}
8660 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8664 <p>Ævar Arnfjörð Bjarmason
8669 Magic Word: {{BASEPAGENAMEE}}
8671 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8675 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8680 Magic Word: {{TALKPAGENAME}}
8682 title=[[User:Ævar Arnfjörð Bjarmason]]
8686 <p>User talk:Ævar Arnfjörð Bjarmason
8691 Magic Word: {{TALKPAGENAMEE}}
8693 title=[[User:Ævar Arnfjörð Bjarmason]]
8697 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8702 Magic Word: {{SUBJECTPAGENAME}}
8704 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8708 <p>User:Ævar Arnfjörð Bjarmason
8713 Magic Word: {{SUBJECTPAGENAMEE}}
8715 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8717 {{SUBJECTPAGENAMEE}}
8719 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8724 Magic Word: {{NUMBEROFFILES}}
8733 Magic Word: {{PAGENAME}}
8735 title=[[User:Ævar Arnfjörð Bjarmason]]
8739 <p>Ævar Arnfjörð Bjarmason
8744 Magic Word: {{PAGENAME}} with metacharacters
8746 title=[['foo & bar = baz']]
8750 <p><i>'foo & bar = baz'</i>
8753 <p><i>'foo & bar = baz'</i></p>
8757 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8759 title=[[*RFC 1234 http://example.com/]]
8763 <p>*RFC 1234 http://example.com/
8766 <p>*RFC 1234 http://example.com/</p>
8770 Magic Word: {{PAGENAMEE}}
8772 title=[[User:Ævar Arnfjörð Bjarmason]]
8776 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8781 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8783 title=[[*RFC 1234 http://example.com/]]
8787 <p>*RFC_1234_http://example.com/
8790 <p>*RFC_1234_http://example.com/</p>
8794 Magic Word: {{REVISIONID}}
8803 Magic Word: {{SCRIPTPATH}}
8812 Magic Word: {{STYLEPATH}}
8821 Magic Word: {{SERVER}}
8825 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8830 Magic Word: {{SERVERNAME}}
8839 Magic Word: {{SITENAME}}
8848 Case-sensitive magic words, when cased differently, should just be template transclusions
8855 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8856 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8857 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8858 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8863 Case-insensitive magic words should still work with weird casing.
8873 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8877 # From plwiki:PLOS_ONE
8879 Parsoid: Page property magic word with magic word contents
8881 {{DISPLAYTITLE:''{{PAGENAME}}''}}
8883 <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>"}]]}'/>
8887 Parsoid: Template-generated DISPLAYTITLE
8889 {{{{echo|DISPLAYTITLE}}:Foo}}
8891 <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}}]}'/>
8895 Namespace 1 {{ns:1}}
8904 Namespace 1 {{ns:01}}
8913 Namespace 0 {{ns:0}} (bug 4783)
8921 Namespace 0 {{ns:00}} (bug 4783)
8929 Namespace -1 {{ns:-1}}
8938 Namespace User {{ns:User}}
8947 Namespace User talk {{ns:User_talk}}
8956 Namespace User talk {{ns:uSeR tAlK}}
8965 Namespace File {{ns:File}}
8974 Namespace File {{ns:Image}}
8983 Namespace (lang=de) Benutzer {{ns:User}}
8994 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9000 <p>Benutzer Diskussion
9008 {{urlencode:hi world?!}}
9009 {{urlencode:hi world?!|WIKI}}
9010 {{urlencode:hi world?!|PATH}}
9011 {{urlencode:hi world?!|QUERY}}
9021 Magic Word: prioritize type info over data-parsoid
9025 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9031 Magic Word: serialize on separate line (parsoid)
9033 parsoid=wt2wt,html2wt
9039 foo<meta property="mw:PageProp/notoc"/>bar
9043 Magic Word: rt non-english wikis
9050 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9057 Magic links: internal link to RFC (bug 479)
9061 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9066 Magic links: RFC (bug 479)
9070 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9075 Magic links: RFC (bug 65278)
9077 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9079 <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.
9084 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9086 RFC      822
9090 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9097 Magic links: ISBN (bug 1937)
9101 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9106 Magic links: ISBN (bug 65278)
9108 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9110 <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.
9113 <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>
9117 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9119 ISBN      978 0 316 09811 3
9125 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9134 Magic links: PMID incorrectly converts space to underscore
9138 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9143 Magic links: PMID (bug 65278)
9145 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9147 <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.
9152 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9154 PMID      1234
9158 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9169 Nonexistent template
9171 {{thistemplatedoesnotexist}}
9173 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9178 Template with invalid target containing tags
9180 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9182 <p>{{a<b>b</b>|foo|a=b|a = b}}
9187 Template with invalid target containing unclosed tag
9189 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9191 <p>{{a<b>|foo|a=b|a = b}}</b>
9196 Template with invalid target containing wikilink
9200 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9203 <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>
9207 Template with just whitespace in it, bug #68421
9211 <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>
9217 This is a test template
9225 <p>This is a test template
9230 Template with explicit namespace
9234 <p>This is a test template
9242 This is a test template with parameter {{{param}}}
9248 {{paramtest|param=foo}}
9250 <p>This is a test template with parameter foo
9255 Template:paramtestnum
9261 Template unnamed parameter
9263 {{paramtestnum|Main Page|the main page}}
9265 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9270 Template:templatesimple
9276 Template:templateredirect
9278 #redirect [[Template:templatesimple]]
9282 Template:templateasargtestnum
9288 Template:templateasargtest
9290 {{template{{{templ}}}}}
9294 Template:templateasargtest2
9300 Template with template name as unnamed argument
9302 {{templateasargtestnum|templatesimple}}
9309 Template with template name as argument
9311 {{templateasargtest|templ=simple}}
9318 Template with template name as argument (2)
9320 {{templateasargtest2|templ=templatesimple}}
9327 Template:templateasargtestdefault
9329 {{{{{templ|templatesimple}}}}}
9339 Template with default value
9341 {{templateasargtestdefault}}
9348 Template with default value (value set)
9350 {{templateasargtestdefault|templ=templa}}
9359 {{templateredirect}}
9366 Template with argument in separate line
9368 {{ templateasargtest |
9376 Template with complex template as argument
9379 param ={{ templateasargtest |
9382 <p>This is a test template with parameter (test)
9387 Template with thumb image (with link in description)
9389 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9391 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>
9394 <p>This is a test template with parameter</p>
9395 <div class="thumb tright">
9396 <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>
9397 <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>
9401 <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>
9405 Template:complextemplate
9407 {{{1}}} {{paramtest|
9408 param ={{{param}}}}}
9412 Template with complex arguments
9415 param ={{ templateasargtest |
9416 templ = simple }}|[[Template:complextemplate|link]]}}
9418 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9423 BUG 553: link with two variables in a piped link
9426 |[[{{{1}}}|{{{2}}}]]
9431 <td>[[{{{1}}}|{{{2}}}]]
9437 Magic variable as template parameter
9439 {{paramtest|param={{SITENAME}}}}
9441 <p>This is a test template with parameter MediaWiki
9448 [[{{{param}}}|link]]
9452 Template parameter as link source
9454 {{linktest|param=Main Page}}
9456 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9463 including another template, {{paramtest|param={{{arg}}}}}
9467 Template passing argument to another template
9469 {{paramtest2|arg='hmm'}}
9471 <p>including another template, This is a test template with parameter 'hmm'
9482 Template as link source
9486 [[{{linktest2}}|Main Page]]
9488 [[{{linktest2}}]]Page
9490 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9491 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9492 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9510 Template infinite loop
9514 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9519 Template from main namespace
9538 BUG 529: Template with table, not included at beginning of line
9557 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9577 BUG 41: Template parameters shown as broken links
9586 Template with targets containing wikilinks
9590 {{[[{{echo|foo}}]]}}
9592 {{{{echo|[[foo}}]]}}
9594 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9595 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9603 ''None'' of '''this''' should be
9605 but rather passed unmodified
9612 # hmm, fix this or just deprecate msgnw and document its behavior?
9616 {{msgnw:MSGNW test}}
9618 <p>''None'' of '''this''' should be
9620  but rather passed unmodified
9621 {{test}}
9631 {{int:youhavenewmessages|lots of money|not!}}
9633 <p>You have lots of money (not!).
9640 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9644 <includeonly> and <noinclude> being included
9655 <onlyinclude>Foo</onlyinclude>bar
9659 <onlyinclude> being included
9671 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9675 <onlyinclude> and <includeonly> being included
9684 <includeonly> and <noinclude> on a page
9686 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9693 Un-closed <noinclude>
9700 <onlyinclude> on a page
9702 <onlyinclude>Foo</onlyinclude>bar
9709 Un-closed <onlyinclude>
9716 Self-closed noinclude, includeonly, onlyinclude tags
9727 Unbalanced includeonly and noinclude tags
9731 |b</noinclude></noinclude>
9732 |c</noinclude></includeonly>
9733 |d</includeonly></includeonly>
9742 <td>c</includeonly>
9744 <td>d</includeonly></includeonly>
9750 Template:Includeonly section
9753 ==Includeonly section==
9759 Bug 6563: Edit link generation for section shown by <includeonly>
9761 {{includeonly section}}
9763 <h2><a href="#Includeonly_section" class="mw-headline-anchor" 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>
9764 <h2><a href="#Section_T-1" class="mw-headline-anchor" 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>
9768 # Uses same input as the contents of [[Template:Includeonly section]]
9770 Bug 6563: Section extraction for section shown by <includeonly>
9775 ==Includeonly section==
9783 Bug 6563: Edit link generation for section suppressed by <includeonly>
9786 ==Includeonly section==
9790 <h2><a href="#Section_1" class="mw-headline-anchor" 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>
9795 Bug 6563: Section extraction for section suppressed by <includeonly>
9800 ==Includeonly section==
9808 Un-closed <includeonly>
9815 Includes and comments at SOL
9817 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9824 <includeonly>can have stuff</includeonly>=== here ===
9827 <h2><a href="#hu" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="hu">hu</span></h2>
9832 <h3><a href="#here" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="here">here</span></h3>
9835 <!-- 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>
9837 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9839 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
9842 <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>
9846 # TODO: test with DOM fragment reuse!
9848 Parsoid: DOM fragment reuse
9850 parsoid=wt2wt,wt2html
9852 a{{echo|b<table></table>c}}d
9864 <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>
9866 <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">
9867 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
9868 </span><p about="#mwt2">cd</p>
9870 <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">
9872 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
9874 </span><p about="#mwt3">b</p>
9878 Parsoid: Merge double tds (bug 50603)
9887 <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>
9892 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9902 <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}}]}'>
9904 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9910 ### <includeonly> and <noinclude> in attributes
9913 0. includeonly around the entire attribute
9915 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9917 <p><span id="v2">bar</span>
9922 1. includeonly in html attr key
9924 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9926 <p><span id="foo">bar</span>
9931 2. includeonly in html attr value
9933 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9934 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9936 <p><span id="v1">bar</span>
9937 <span id="v1">bar</span>
9942 3. includeonly in part of an attr value
9944 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9946 <p><span style="color:red;">bar</span>
9951 4. includeonly in table attributes
9975 ### Token Stream Patcher tests
9977 ### These tests won't always pass wt2wt and other modes because
9978 ### on serialization, the table will be output on a new line.
9979 ### For now, we are blacklisting them, and using this to test selser.
9983 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9985 parsoid=wt2html,wt2wt
9987 {{echo|}}{| width = '100%'
9991 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
9992 <tbody><tr><td>foo</td></tr>
9997 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9999 parsoid=wt2html,wt2wt
10001 <includeonly>a</includeonly>{| {{{b}}}
10005 <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}}}":""}}'>
10006 <tbody><tr><td>c</td></tr>
10012 ### Testing parsing of templates where a template arg
10013 ### has the same name as the template itself.
10019 {{{quote|{{{1}}}}}}
10023 Templates: Template Name/Arg clash: 1. Use of positional param
10032 Templates: Template Name/Arg clash: 2. Use of named param
10034 {{quote|quote=foo}}
10041 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10050 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10054 Templates: 1. Simple use
10063 Templates: 2. Inside a block tag
10065 <div>{{echo|Foo}}</div>
10066 <blockquote>{{echo|Foo}}</blockquote>
10069 <blockquote>Foo</blockquote>
10079 Templates: P-wrapping: 1a. Templates on consecutive lines
10090 Templates: P-wrapping: 1b. Templates on consecutive lines
10104 Templates: P-wrapping: 1c. Templates on consecutive lines
10107 {{echo|bar}} <div>baz</div>
10120 Templates: P-wrapping: 1d. Template preceded by comment-only line
10129 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10133 Templates: Inline Text: 1. Multiple template uses
10135 {{echo|Foo}}bar{{echo|baz}}
10142 Templates: Inline Text: 2. Back-to-back template uses
10144 {{echo|Foo}}{{echo|bar}}
10151 Templates: Block Tags: 1. Multiple template uses
10153 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10155 <div>Foo</div><div>bar</div><div>baz</div>
10160 Templates: Block Tags: 2. Back-to-back template uses
10162 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10164 <div>Foo</div><div>bar</div>
10168 # This is an edge case relating to paragraph wrapping.
10170 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10175 <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
10180 Templates: Links: 1. Simple example
10182 {{echo|[[Foo|bar]]}}
10184 <p><a href="/wiki/Foo" title="Foo">bar</a>
10189 Templates: Links: 2. Generation of link href
10191 [[{{echo|Foo}}|bar]]
10193 <p><a href="/wiki/Foo" title="Foo">bar</a>
10198 Templates: Links: 3. Generation of part of a link href
10200 [[Fo{{echo|o}}|bar]]
10202 [[Foo{{echo|bar}}]]
10204 [[Foo{{echo|bar}}baz]]
10206 [[Foo{{echo|bar}}|bar]]
10208 [[:Foo{{echo|bar}}]]
10210 [[:Foo{{echo|bar}}|bar]]
10212 <p><a href="/wiki/Foo" title="Foo">bar</a>
10213 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10214 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10215 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10216 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10217 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10222 Templates: Links: 4. Multiple templates generating link href
10224 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10226 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10231 Templates: Links: 5. Generation of link text
10233 [[Foo|{{echo|bar}}]]
10235 <p><a href="/wiki/Foo" title="Foo">bar</a>
10240 Templates: Links: 5. Nested templates (only outermost template should be marked)
10242 {{echo|[[{{echo|Foo}}|bar]]}}
10244 <p><a href="/wiki/Foo" title="Foo">bar</a>
10249 Templates: HTML Tag: 1. Generation of HTML attr. key
10251 <div {{echo|style}}="color:red;">foo</div>
10253 <div style="color:red;">foo</div>
10258 Templates: HTML Tag: 2. Generation of HTML attr. value
10260 <div style={{echo|'color:red;'}}>foo</div>
10262 <div style="color:red;">foo</div>
10267 Templates: HTML Tag: 3. Generation of HTML attr key and value
10269 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10271 <div style="color:red;">foo</div>
10276 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10278 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10280 <div title="This is a long title with just one piece templated">foo</div>
10285 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10287 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10289 <div title="This is a long title with just one piece templated">foo</div>
10294 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10296 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10298 <div title="This is a long title with just one piece templated">foo</div>
10302 # SSS FIXME: While it is great we added support for all this,
10303 # do we want to make this part of the spec? Maybe we want to
10304 # deprecate this kind of usage in the future?
10306 Templates: HTML Tag: 7. Generation of partial attribute key string
10308 <div st{{echo|yle}}="color:red;">foo</div>
10310 <div style="color:red;">foo</div>
10315 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10317 <div {{echo|1=id="v1"}}>bar</div>
10319 <div id="v1">bar</div>
10324 Templates: HTML Tag: 9. Multiple template-generated attributes
10326 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10328 <div id="v1" title="foo">bar</div>
10333 Templates: Support for templates generating attributes and content
10335 {| {{mixed_attr_content_template}}
10340 <table style="color:red;" title="T48811">
10350 <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|}"]}'>
10359 Templates: HTML Tables: 1. Generating start of a HTML table
10361 {{echo|<table><tr><td>foo</td>}}</tr></table>
10363 <table><tr><td>foo</td></tr></table>
10368 Templates: HTML Tables: 2a. Generating middle of a HTML table
10370 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10372 <table><tr><td>foo</td></tr></table>
10377 Templates: HTML Tables: 2b. Generating middle of a HTML table
10379 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10381 <table><tr><td>foo</td></tr></table>
10386 Templates: HTML Tables: 3. Generating end of a HTML table
10388 <table><tr>{{echo|<td>foo</td></tr></table>}}
10390 <table><tr><td>foo</td></tr></table>
10395 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10397 {{echo|<table>}}<tr><td>foo</td></tr></table>
10399 <table><tr><td>foo</td></tr></table>
10404 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10406 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10408 <table><tr><td>foo</td></tr></table>
10413 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10415 <table><tr>{{echo|<td>}}foo</td></tr></table>
10417 <table><tr><td>foo</td></tr></table>
10422 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10424 <table><tr><td>foo{{echo|</td>}}</tr></table>
10426 <table><tr><td>foo</td></tr></table>
10431 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10433 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10435 <table><tr><td>foo</td></tr></table>
10440 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10442 <table><tr><td>foo</td></tr>{{echo|</table>}}
10444 <table><tr><td>foo</td></tr></table>
10449 Templates: HTML Tables: 5. Proper fostering of categories from inside
10451 parsoid=wt2html,wt2wt
10453 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10454 <!--Two categories (Bug 50330)-->
10455 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10457 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10458 <!--Two categories (Bug 50330)-->
10459 <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>
10463 Templates: Wiki Tables: 1a. Fostering of entire template content
10471 <tr><td></td></tr></table>
10483 Templates: Wiki Tables: 1b. Fostering of entire template content
10496 <tr><td></td></tr></table>
10510 Templates: Wiki Tables: 2. Fostering of partial template content
10520 <tr><td></td></tr></table>
10533 Templates: Wiki Tables: 3. td-content via multiple templates
10536 {{echo|{{pipe}}a}}{{echo|b}}
10547 Templates: Wiki Tables: 4. Templated tags, no content
10553 <tr><td></td></tr></table>
10558 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10572 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10586 Templates: Lists: Multi-line list-items via templates
10588 *{{echo|a {{nonexistent|
10590 *{{echo|b {{nonexistent|
10593 <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>
10594 <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>
10599 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10601 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10603 <p><i>ab</i>c<i>d</i>e
10608 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10609 (PHP parser generates misnested html)
10611 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10613 <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>
10617 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10618 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10620 parsoid=wt2html,wt2wt
10622 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10624 <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>
10625 <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>
10626 <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>
10630 Templates: Ugly nesting: 4. Divs opened/closed across templates
10632 a<div>b{{echo|c</div>d}}e
10643 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10649 |{{echo|foo</table>}}
10653 <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|}"]}'>
10657 <td>foo</td></tr></tbody></table><span about="#mwt1">
10658 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10663 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10673 <td>1. {{echo|foo </table>}}</td>
10675 <td>2. {{echo|baz </table>}}</td>
10688 <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>"]}'>
10693 <td>1. foo </td></tr></tbody></table></td>
10695 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10696 </span><span about="#mwt2">
10697 </span><span about="#mwt2">
10698 </span><span about="#mwt2">abc</span><span about="#mwt2">
10699 </span><span about="#mwt2">
10700 </span><span about="#mwt2">
10701 </span><span about="#mwt2">
10702 </span><span about="#mwt2">
10703 </span><span about="#mwt2">
10704 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10705 </span><span about="#mwt2">
10710 Templates: Ugly templates: 3. newline-only template parameter
10719 # This looks like a bug: a single newline triggers p/br for some reason.
10721 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10730 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10731 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10733 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10739 <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
10740 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10744 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10745 # that are "identical" and generate nesting cycles in the algorithm
10747 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10749 {{echo|<table><tr><td><table>}}
10753 <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"}'>
10754 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10755 </table></td></tr></tbody></table>
10759 Parser Functions: 1. Simple example
10768 Parser Functions: 2. Nested use (only outermost should be marked up)
10777 ### Pre-save transform tests
10780 pre-save transform: subst:
10786 This is a test template
10790 pre-save transform: normal template
10800 pre-save transform: nonexistent template
10804 {{thistemplatedoesnotexist}}
10806 {{thistemplatedoesnotexist}}
10811 pre-save transform: subst magic variables
10820 # This is bug 89, which I fixed. -- wtm
10822 pre-save transform: subst: templates with parameters
10826 {{subst:paramtest|param="something else"}}
10828 This is a test template with parameter "something else"
10832 Template:nowikitest
10834 <nowiki>'''not wiki'''</nowiki>
10838 pre-save transform: nowiki in subst (bug 1188)
10842 {{subst:nowikitest}}
10844 <nowiki>'''not wiki'''</nowiki>
10849 Template:commenttest
10851 This template has <!-- a comment --> in it.
10855 pre-save transform: comment in subst (bug 1936)
10859 {{subst:commenttest}}
10861 This template has <!-- a comment --> in it.
10865 pre-save transform: unclosed tag
10869 <nowiki>'''not wiki'''
10871 <nowiki>'''not wiki'''
10875 pre-save transform: mixed tag case
10879 <NOwiki>'''not wiki'''</noWIKI>
10881 <NOwiki>'''not wiki'''</noWIKI>
10885 pre-save transform: unclosed comment in <nowiki>
10889 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10891 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10894 # Leading @ in this template definition works around a limitation
10895 # in parsoid's parserTests which otherwise strips the <span> from the
10896 # result (confusing it for a template wrapper)
10900 @<span onmouseover="alert('crap')">Oh no</span>
10904 (confirming safety of fix for subst bug 1936)
10906 {{Template:dangerous}}
10908 <p>@<span>Oh no</span>
10913 pre-save transform: comment containing gallery (bug 5024)
10917 <!-- <gallery>data</gallery> -->
10919 <!-- <gallery>data</gallery> -->
10923 pre-save transform: comment containing extension
10927 <!-- <tag>data</tag> -->
10929 <!-- <tag>data</tag> -->
10933 pre-save transform: comment containing nowiki
10937 <!-- <nowiki>data</nowiki> -->
10939 <!-- <nowiki>data</nowiki> -->
10943 pre-save transform: <noinclude> in subst (bug 3298)
10953 pre-save transform: <onlyinclude> in subst (bug 3298)
10957 {{subst:Includes2}}
10965 {{<includeonly>subst:</includeonly>Includes}}
10969 Template:SafeSubstTest
10971 {{<includeonly>safesubst:</includeonly>Includes}}
10975 bug 22297: safesubst: works during PST
10979 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10985 bug 22297: safesubst: works during normal parse
10994 subst: does not work during normal parse
10998 <p>{{subst:Includes}}
11003 pre-save transform: context links ("pipe trick")
11007 [[Article (context)|]]
11010 [[Bar:Article (context)|]]
11011 [[:Bar:Article (context)|]]
11013 [[|Article (context)]]
11017 [[Article (context)|Article]]
11018 [[Bar:Article|Article]]
11019 [[:Bar:Article|Article]]
11020 [[Bar:Article (context)|Article]]
11021 [[:Bar:Article (context)|Article]]
11023 [[Article (context)]]
11024 [[Bar:X (Y) Z|X (Y) Z]]
11025 [[:Bar:X (Y) Z|X (Y) Z]]
11029 pre-save transform: context links ("pipe trick") with interwiki prefix
11033 [[interwiki:Article|]]
11034 [[:interwiki:Article|]]
11035 [[interwiki:Bar:Article|]]
11036 [[:interwiki:Bar:Article|]]
11038 [[interwiki:Article|Article]]
11039 [[:interwiki:Article|Article]]
11040 [[interwiki:Bar:Article|Bar:Article]]
11041 [[:interwiki:Bar:Article|Bar:Article]]
11045 pre-save transform: context links ("pipe trick") with parens in title
11047 pst title=[[Somearticle (context)]]
11051 [[Article (context)|Article]]
11055 pre-save transform: context links ("pipe trick") with comma in title
11057 pst title=[[Someplace, Somewhere]]
11060 [[Otherplace, Elsewhere|]]
11061 [[Otherplace, Elsewhere, Anywhere|]]
11063 [[Otherplace, Somewhere|Otherplace]]
11064 [[Otherplace, Elsewhere|Otherplace]]
11065 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11069 pre-save transform: context links ("pipe trick") with parens and comma
11071 pst title=[[Someplace (IGNORED), Somewhere]]
11074 [[Otherplace (place), Elsewhere|]]
11076 [[Otherplace, Somewhere|Otherplace]]
11077 [[Otherplace (place), Elsewhere|Otherplace]]
11081 pre-save transform: context links ("pipe trick") with comma and parens
11083 pst title=[[Who, me? (context)]]
11086 [[Me, Myself, and I (1937 song)|]]
11088 [[Yes, you. (context)|Yes, you.]]
11089 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11093 pre-save transform: context links ("pipe trick") with namespace
11095 pst title=[[Ns:Somearticle]]
11099 [[Ns:Article|Article]]
11103 pre-save transform: context links ("pipe trick") with namespace and parens
11105 pst title=[[Ns:Somearticle (context)]]
11109 [[Ns:Article (context)|Article]]
11113 pre-save transform: context links ("pipe trick") with namespace and comma
11115 pst title=[[Ns:Somearticle, Context, Whatever]]
11119 [[Ns:Article, Context, Whatever|Article]]
11123 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11125 pst title=[[Ns:Somearticle, Context (context)]]
11129 [[Ns:Article (context)|Article]]
11133 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11135 pst title=[[Ns:Somearticle (IGNORED), Context]]
11139 [[Ns:Article, Context|Article]]
11143 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11147 [[Article(context)|]]
11148 [[Bar:Article(context)|]]
11149 [[:Bar:Article(context)|]]
11150 [[|Article(context)]]
11154 [[Article(context)|Article]]
11155 [[Bar:Article(context)|Article]]
11156 [[:Bar:Article(context)|Article]]
11157 [[Article(context)]]
11158 [[Bar:X(Y)Z|X(Y)Z]]
11159 [[:Bar:X(Y)Z|X(Y)Z]]
11163 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11167 [[Article (context)|]]
11168 [[Bar:Article (context)|]]
11169 [[:Bar:Article (context)|]]
11170 [[|Article (context)]]
11174 [[Article (context)|Article]]
11175 [[Bar:Article (context)|Article]]
11176 [[:Bar:Article (context)|Article]]
11177 [[Article (context)]]
11178 [[Bar:X (Y) Z|X (Y) Z]]
11179 [[:Bar:X (Y) Z|X (Y) Z]]
11183 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11187 [[Article(context)|]]
11188 [[Bar:Article(context)|]]
11189 [[:Bar:Article(context)|]]
11190 [[|Article(context)]]
11194 [[Article(context)|Article]]
11195 [[Bar:Article(context)|Article]]
11196 [[:Bar:Article(context)|Article]]
11197 [[Article(context)]]
11198 [[Bar:X(Y)Z|X(Y)Z]]
11199 [[:Bar:X(Y)Z|X(Y)Z]]
11203 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11207 [[Article (context), context|]]
11208 [[Article (context),context|]]
11209 [[Bar:Article (context), context|]]
11210 [[Bar:Article (context),context|]]
11211 [[:Bar:Article (context), context|]]
11212 [[:Bar:Article (context),context|]]
11214 [[Article (context), context|Article]]
11215 [[Article (context),context|Article]]
11216 [[Bar:Article (context), context|Article]]
11217 [[Bar:Article (context),context|Article]]
11218 [[:Bar:Article (context), context|Article]]
11219 [[:Bar:Article (context),context|Article]]
11223 pre-save transform: trim trailing empty lines
11227 Empty lines are trimmed
11233 Empty lines are trimmed
11237 pre-save transform: Signature expansion
11242 * <noinclude>~~~</noinclude>
11243 * <includeonly>~~~</includeonly>
11244 * <onlyinclude>~~~</onlyinclude>
11246 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11247 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11248 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11249 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11254 pre-save transform: Signature expansion in nowiki tags (bug 93)
11260 <nowiki>~~~~</nowiki>
11262 <includeonly><nowiki>~~~~</nowiki></includeonly>
11264 <noinclude><nowiki>~~~~</nowiki></noinclude>
11266 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11268 {{subst:Foo}} shall be converted to FOO
11270 As well as inside noinclude/onlyinclude
11271 <noinclude>{{subst:Foo}}</noinclude>
11272 <onlyinclude>{{subst:Foo}}</onlyinclude>
11274 But not inside includeonly
11275 <includeonly>{{subst:Foo}}</includeonly>
11279 <nowiki>~~~~</nowiki>
11281 <includeonly><nowiki>~~~~</nowiki></includeonly>
11283 <noinclude><nowiki>~~~~</nowiki></noinclude>
11285 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11287 FOO shall be converted to FOO
11289 As well as inside noinclude/onlyinclude
11290 <noinclude>FOO</noinclude>
11291 <onlyinclude>FOO</onlyinclude>
11293 But not inside includeonly
11294 <includeonly>{{subst:Foo}}</includeonly>
11298 Parsoid: Recognize nowiki with trailing space in tags
11302 <nowiki ><div>[[foo]]</nowiki >
11310 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11317 Parsoid: Recognize nowiki with odd capitalization
11321 <noWikI ><div>[[foo]]</Nowiki >
11323 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11328 Parsoid: Escape nowiki with trailing space in tags
11332 <p><nowiki > foo </nowiki ></p>
11333 <p>a<nowiki />b</p>
11334 <p>c<nowiki/ >d</p>
11336 <nowiki > foo </nowiki >
11344 Parsoid: Escape weird noWikI capitalizations
11348 <p><noWikI > foo </NoWikI ></p>
11350 <noWikI > foo </NoWikI >
11354 ### Message transform tests
11357 message transform: magic variables
11367 message transform: should not transform wiki markup
11377 message transform: <noinclude> in transcluded template (bug 4926)
11387 message transform: <onlyinclude> in transcluded template (bug 4926)
11397 {{#special:}} page name, known
11401 {{#special:Recentchanges}}
11403 Special:RecentChanges
11407 {{#special:}} page name with subpage, known
11411 {{#special:Recentchanges/param}}
11413 Special:RecentChanges/param
11417 {{#special:}} page name, unknown
11421 {{#special:foobar nonexistent}}
11423 Special:Foobar nonexistent
11427 {{#speciale:}} page name, known
11431 {{#speciale:Recentchanges}}
11433 Special:RecentChanges
11437 {{#speciale:}} page name with subpage, known
11441 {{#speciale:Recentchanges/param}}
11443 Special:RecentChanges/param
11447 {{#speciale:}} page name, unknown
11451 {{#speciale:foobar nonexistent}}
11453 Special:Foobar_nonexistent
11459 ### For Parsoid-specific tests, see
11460 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11465 parsoid=wt2html,wt2wt,html2html
11467 [[Image:foobar.jpg]]
11469 <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>
11472 <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>
11476 Simple image (using File: namespace, now canonical)
11478 [[File:Foobar.jpg]]
11480 <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>
11483 <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>
11487 Right-aligned image
11489 [[File:Foobar.jpg|right]]
11491 <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>
11494 <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>
11500 [[File:Foobar.jpg|right|Caption text]]
11502 <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>
11505 <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>
11509 Image with caption, bug 53312 #1
11511 [[File:Foobar.jpg|right|Caption page stuff]]
11513 <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>
11516 <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>
11520 Image with caption, bug 53312 #2
11522 [[File:Foobar.jpg|right|Caption page=]]
11524 <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>
11527 <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>
11531 Image with caption, bug 53312 #3
11533 [[File:Foobar.jpg|right|Caption page=stuff]]
11535 <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>
11538 <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>
11542 Allow empty links in image captions (Bug 60753)
11546 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11551 <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>
11554 <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>
11556 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11557 </figcaption></figure>
11561 Titles in unlinked images (T23454)
11563 [[File:Foobar.jpg|link=|stuff]]
11565 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
11570 Link with empty target
11579 Image with link trail
11581 Linktrails should not work for images: [[File:Foobar.jpg]]s
11583 <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
11586 <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>
11590 Image with empty attribute
11592 parsoid=wt2html,wt2wt,html2html
11594 [[File:Foobar.jpg|right||Caption text]]
11596 <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>
11599 <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>
11603 1. Block image with individual attributes from templates
11605 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11607 <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>
11610 <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>
11614 2. Block Image with individual attributes from templates
11616 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11618 <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>
11621 <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>
11625 3. Inline image with individual attributes from templates
11627 [[File:Foobar.jpg|{{echo|50px}}]]
11629 <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>
11632 <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>
11635 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11636 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11638 Image with multiple attributes from the same template
11640 [[File:Foobar.jpg|{{image_attribs}}]]
11642 <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>
11645 <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>
11649 Image with link tails
11653 123[[File:Foobar.jpg]]456
11654 123[[File:Foobar.jpg|right]]456
11655 123[[File:Foobar.jpg|thumb]]456
11657 <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
11659 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
11660 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
11663 <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>
11665 <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>
11667 <div class="thumb tright">
11668 <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>
11669 <div class="thumbcaption">
11670 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11676 <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>
11677 <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>
11678 <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>
11682 Image with multiple captions -- only last one is accepted
11684 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11686 <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>
11689 <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>
11693 Image with multiple widths -- use last
11695 [[File:Foobar.jpg|200px|300px|caption]]
11697 <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>
11700 <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>
11704 Image with multiple alignments -- use first (bug 48664)
11708 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11710 [[File:Foobar.jpg|middle|text-top|caption]]
11712 <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>
11713 <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>
11716 <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>
11717 <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>
11721 Image with width attribute at different positions
11723 [[File:Foobar.jpg|200px|right|Caption]]
11724 [[File:Foobar.jpg|right|200px|Caption]]
11725 [[File:Foobar.jpg|right|Caption|200px]]
11727 <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>
11728 <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>
11729 <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>
11732 <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>
11733 <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>
11734 <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>
11737 # a sad bit of backward-compatibility
11739 Image with size specified with pxpx (bug 13500, 51628)
11741 parsoid=wt2html,wt2wt,html2html
11743 [[File:Foobar.jpg|20pxpx]]
11744 [[File:Foobar.jpg|200x20pxpx]]
11746 <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>
11747 <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>
11750 <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>
11754 Image with link parameter, wiki target
11756 [[File:Foobar.jpg|link=Main Page]]
11758 <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>
11761 <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>
11764 # parsoid bug 49293 (part 1)
11766 Image with link parameter, URL target
11768 [[File:Foobar.jpg|link=http://example.com/]]
11770 <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>
11773 <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>
11776 # parsoid bug 49293 (part 2)
11778 Image with link parameter, protocol-less URL target
11780 [[File:Foobar.jpg|link=//example.com/]]
11782 <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>
11785 <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>
11789 Image with link parameter, wgExternalLinkTarget
11791 [[Image:foobar.jpg|link=http://example.com/]]
11793 wgExternalLinkTarget='foobar'
11795 <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>
11800 Image with link parameter, wgNoFollowLinks set to false
11802 [[Image:foobar.jpg|link=http://example.com/]]
11804 wgNoFollowLinks=false
11806 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11811 Image with link parameter, wgNoFollowDomainExceptions
11813 [[Image:foobar.jpg|link=http://example.com/]]
11815 wgNoFollowDomainExceptions='example.com'
11817 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11822 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11824 [[Image:foobar.jpg|link=http://example.com/|Title]]
11826 wgExternalLinkTarget='foobar'
11828 <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>
11833 Image with empty link parameter
11835 [[File:Foobar.jpg|link=]]
11837 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11840 <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>
11844 Image with link parameter (wiki target) and unnamed parameter
11846 [[File:Foobar.jpg|link=Main_Page|Title]]
11848 <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>
11851 <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>
11855 Image with link parameter (URL target) and unnamed parameter
11857 [[File:Foobar.jpg|link=http://example.com/|Title]]
11859 <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>
11862 <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>
11866 Thumbnail image with link parameter
11869 parsoid=wt2html,wt2wt,html2html
11871 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11873 <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>
11876 <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>
11880 Manually-specified thumbnail image
11884 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11886 <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>
11889 <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>
11893 Manually-specified thumbnail image with explicit link to wiki page
11896 parsoid=wt2html,wt2wt,html2html
11898 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11900 <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>
11903 <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>
11907 Manually-specified thumbnail image with explicit link to url
11910 parsoid=wt2html,wt2wt,html2html
11912 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11914 <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>
11917 <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>
11921 Manually-specified thumbnail image with explicit no link
11924 parsoid=wt2html,wt2wt,html2html
11926 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11928 <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>
11931 <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>
11935 Manually-specified thumbnail image with explicit link and alt text
11938 parsoid=wt2html,wt2wt,html2html
11940 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11942 <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>
11945 <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>
11949 Image with frame and link
11951 parsoid=wt2html,wt2wt,html2html
11953 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11955 <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>
11958 <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>
11962 Image with frame and link and explicit alt
11964 parsoid=wt2html,wt2wt,html2html
11966 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11968 <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>
11971 <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>
11975 Image with wiki markup in implicit alt
11977 parsoid=wt2html,wt2wt,html2html
11979 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11981 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11983 <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>
11984 </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>
11987 <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>
11988 <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>
11991 ###################
11992 # Conflicting image format options.
11993 # First option specified should 'win'.
11994 # All three cases in each test should be identical.
11997 Image with 'frameless' first.
11999 parsoid=wt2html,wt2wt,html2html
12001 [[File:Foobar.jpg|frameless|caption]]
12003 [[File:Foobar.jpg|frameless|frame|caption]]
12005 [[File:Foobar.jpg|frameless|thumb|caption]]
12007 <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>
12008 </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>
12009 </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>
12012 <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>
12013 <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>
12014 <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>
12018 Image with 'frame' first.
12020 parsoid=wt2html,wt2wt,html2html
12022 [[File:Foobar.jpg|frame|caption]]
12023 [[File:Foobar.jpg|frame|frameless|caption]]
12024 [[File:Foobar.jpg|frame|thumb|caption]]
12026 <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>
12027 <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>
12028 <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>
12031 <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>
12032 <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>
12033 <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>
12037 Image with 'thumb' first.
12039 parsoid=wt2html,wt2wt,html2html
12041 [[File:Foobar.jpg|thumb|caption]]
12042 [[File:Foobar.jpg|thumb|frameless|caption]]
12043 [[File:Foobar.jpg|thumb|frame|caption]]
12045 <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>
12046 <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>
12047 <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>
12050 <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>
12051 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12052 <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>
12055 ###################
12057 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12058 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12059 # Foobar has actual size of 1941x220
12060 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12061 # a scalable format.
12062 # 2. Framed images always ignore size options; always render at default size.
12063 # 3. "Unspecified format" and border are the only types which can be
12067 Image: "unspecified format" and border enlarge
12069 parsoid=wt2html,wt2wt,html2html
12071 [[File:Foobar.jpg|2000px]]
12073 [[File:Foobar.jpg|border|2000px]]
12075 <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>
12076 </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>
12079 <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>
12080 <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>
12084 Image: "unspecified format" and border reduce
12086 parsoid=wt2html,wt2wt,html2html
12088 [[File:Foobar.jpg|1000px]]
12090 [[File:Foobar.jpg|border|1000px]]
12092 <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>
12093 </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>
12096 <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>
12097 <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>
12101 Image: thumbs reduce
12103 parsoid=wt2html,wt2wt,html2html
12105 [[File:Foobar.jpg|thumb|50px]]
12107 <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>
12110 <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>
12114 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12116 parsoid=wt2html,wt2wt,html2html
12118 [[File:Foobar.jpg|thumb|2000px]]
12120 [[File:Foobar.svg|thumb|2000px]]
12122 <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>
12123 <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>
12126 <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>
12127 <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>
12131 Image: frameless can reduce in size
12133 parsoid=wt2html,wt2wt,html2html
12135 [[File:Foobar.jpg|frameless|50px]]
12137 <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>
12140 <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>
12144 Image: bitmap frameless can't be enlarged past original size, but vector can
12146 parsoid=wt2html,wt2wt,html2html
12148 [[File:Foobar.jpg|frameless|2000px]]
12150 [[File:Foobar.svg|frameless|2000px]]
12152 <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>
12153 </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>
12156 <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>
12157 <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>
12161 Image: framed images are always unscaled.
12163 parsoid=wt2html,wt2wt,html2html
12165 [[File:Foobar.jpg|frame]]
12167 [[File:Foobar.jpg|frame|50px]]
12169 [[File:Foobar.jpg|frame|50x50px]]
12171 [[File:Foobar.jpg|frame|2000px]]
12173 <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>
12174 <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>
12175 <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>
12176 <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>
12179 <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>
12180 <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>
12181 <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>
12182 <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>
12185 ###################
12188 Link to image page- image page normally doesn't exists, hence edit link
12189 Add test with existing image page
12190 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12194 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12199 bug 18784 Link to non-existent image page with caption should use caption as link text
12201 [[:Image:test|caption]]
12203 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12208 Frameless image caption with a free URL
12210 [[File:Foobar.jpg|http://example.com]]
12212 <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>
12215 <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>
12219 Thumbnail image caption with a free URL
12223 [[File:Foobar.jpg|thumb|http://example.com]]
12225 <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>
12228 <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>
12232 Thumbnail image caption with a free URL and explicit alt
12235 parsoid=wt2html,wt2wt,html2html
12237 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12239 <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>
12242 <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>
12246 SVG thumbnails with no language set
12249 [[File:Foobar.svg|thumb|caption]]
12251 <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>
12254 <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>
12258 SVG thumbnails with language de
12260 parsoid=wt2html,wt2wt,html2html
12262 [[File:Foobar.svg|thumb|caption|lang=de]]
12264 <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>
12267 <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>
12271 SVG thumbnails with invalid language code
12273 parsoid=wt2html,wt2wt,html2html
12275 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12277 <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>
12280 <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>
12284 BUG 1887: A ISBN with a thumbnail
12286 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12288 <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>
12291 <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>
12295 BUG 1887: A RFC with a thumbnail
12297 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12299 <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>
12302 <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>
12306 BUG 1887: A mailto link with a thumbnail
12308 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
12310 <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>
12313 <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>
12316 # Pending resolution to bug 368
12318 BUG 648: Frameless image caption with a link
12320 [[File:Foobar.jpg|text with a [[link]] in it]]
12322 <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>
12325 <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>
12329 BUG 648: Frameless image caption with a link (suffix)
12331 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12333 <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>
12336 <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>
12340 BUG 648: Frameless image caption with an interwiki link
12342 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12344 <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>
12347 <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>
12351 BUG 648: Frameless image caption with a piped interwiki link
12353 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12355 <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>
12358 <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>
12362 Escape HTML special chars in image alt text
12364 [[File:Foobar.jpg|& < > "]]
12366 <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>
12369 <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>
12373 BUG 499: Alt text should have Ӓ, not &1234;
12375 [[File:Foobar.jpg|♀]]
12377 <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>
12380 <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>
12384 Broken image caption with link
12386 parsoid=wt2html,wt2wt,html2html
12388 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12390 <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.
12393 <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>
12397 Image caption containing another image
12399 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12401 <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>
12404 <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>
12408 Image: caption containing a newline
12410 [[File:Foobar.jpg|This
12413 <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>
12416 <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>
12420 Image: caption containing leading space
12421 (The leading space should not trigger nowiki escaping in wt2wt mode)
12423 [[File:Foobar.jpg|thumb| bar]]
12425 <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>
12428 <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>
12432 Image: caption containing a table
12434 parsoid=wt2html,wt2wt,html2html
12436 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12442 and some more text.]]
12444 <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>
12447 <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
12450 <tr><th>Foo </th><th>Bar</th></tr>
12453 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12457 Bug 3090: External links other than http: in image captions
12459 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12461 <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>
12464 <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>
12470 parsoid=wt2html,wt2wt,html2html
12472 [[Image:foobar.jpg|a|class=b]]
12474 <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>
12477 <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>
12481 Localized image handling (1).
12483 parsoid=wt2html,wt2wt,html2html
12486 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12488 <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>
12491 <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>
12495 Localized image handling (2).
12498 parsoid=wt2html,wt2wt,html2html
12501 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12503 <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>
12506 <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>
12510 "border", "frameless" and "class" attributes on an image.
12513 parsoid=wt2html,wt2wt,html2html
12515 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12517 <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>
12520 <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>
12523 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12525 Invalid image attributes (bug 62500)
12528 parsoid=wt2html,wt2wt,html2html
12530 [[File:Foobar.jpg|thumb|float|left|caption]]
12532 [[File:Foobar.jpg|thumb|righ|caption]]
12534 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12536 <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>
12537 <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>
12538 <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>
12541 <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>
12542 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12543 <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>
12549 #REDIRECT [[File:Barfoo.jpg]]
12552 # FIXME: Parsoid should run this test -- but we'd need to teach the
12553 # mockAPI about the redirected Barfoo.jpg image.
12557 [[Image:Barfoo.jpg]]
12559 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12564 Missing image with uploads disabled
12568 [[File:Foobaz.jpg]]
12570 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12573 <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>
12576 # Parsoid-specific testing for images
12577 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12578 # Currently imperfect due to a flaw in the Parsoid testrunner
12580 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12584 Parsoid-specific image handling - simple image with size and middle alignment
12586 [[File:Foobar.jpg|middle|50px]]
12588 <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>
12592 Parsoid-specific image handling - simple image with size, middle alignment,
12593 non-standard namespace alias
12595 parsoid=wt2wt,wt2html,html2html
12597 [[Image:Foobar.jpg|middle|50px]]
12599 <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>
12603 Parsoid-specific image handling - simple image with size and middle alignment
12606 [[File:Foobar.jpg|50px|middle]]
12608 <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>
12612 Parsoid-specific image handling - simple image with size and middle alignment
12613 and non-standard namespace name
12615 parsoid=wt2html,wt2wt,html2html
12617 [[Image:Foobar.jpg|50px|middle]]
12619 <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>
12623 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12625 [[File:Foobar.jpg|500x10px|baseline|caption]]
12627 <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>
12631 Parsoid-specific image handling - simple image with border and size spec
12633 [[File:Foobar.jpg|50px|border|caption]]
12635 <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>
12639 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12641 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12643 <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>
12647 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12650 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12652 <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>
12656 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12658 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12660 <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>
12664 Parsoid-specific image handling - thumbnail with specific size, halign,
12665 valign, and caption (existing content)
12667 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12669 <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>
12673 Parsoid-specific image handling - framed image with specific size and caption
12676 parsoid=wt2html,wt2wt,html2html
12678 [[File:Foobar.jpg|frame|500x50px|caption]]
12680 <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>
12684 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12687 parsoid=wt2html,wt2wt,html2html
12689 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12691 <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>
12695 Parsoid-specific image handling - frameless image with specific size, border, and caption
12697 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12699 <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>
12703 Parsoid-specific image handling - simple image with a formatted caption
12705 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12707 <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>
12711 Parsoid-specific image handling - caption with a template in it
12713 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12715 <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>
12719 Parsoid-specific image handling - caption with unbalanced tags in it
12721 parsoid=wt2html,wt2wt,html2html
12724 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12728 <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>
12733 Parsoid-specific image handling - empty caption (1)
12735 parsoid=wt2html,wt2wt
12737 [[File:Foobar.jpg|thumb|]]
12739 <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>
12742 # empty captions don't get serialized unless we're in the "round trip" case
12744 Parsoid-specific image handling - empty caption (2)
12748 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12749 <a href="File:Foobar.jpg">
12750 <img resource="./File:Foobar.jpg"
12751 src="//example.com/images/3/3a/Foobar.jpg"
12752 height="25" width="220"/>
12754 <figcaption></figcaption>
12757 [[File:Foobar.jpg|thumb]]
12761 Parsoid-specific image handling - whitespace caption
12763 [[File:Foobar.jpg|thumb| ]]
12765 <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>
12769 Parsoid-specific image handling - lang option
12772 [[File:Foobar.svg|lang=de|caption]]
12776 <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>
12785 Subpage test/subpage
12793 subpage title=[[Subpage test]]
12797 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12802 Subpage noslash link
12804 subpage title=[[Subpage test]]
12808 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12813 Subpage test/1/2/subpage
12819 Relative subpage noslash link
12821 parsoid=wt2wt,wt2html,html2html
12822 subpage title=[[Subpage test/1/2/3/4]]
12828 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
12829 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
12832 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
12833 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12837 Parsoid: dot-slash prefixed wikilinks
12847 </p><p>[[././baz/]]
12852 </p><p>[[././baz/]]
12857 Render invalid page names as plain text (bug 51090)
12870 [[{{echo|./../foo}}|bar]]
12871 [[{{echo|foo/.}}|bar]]
12872 [[{{echo|foo/..}}|bar]]
12873 [[{{echo|foo~~~~bar}}]]
12874 [[{{echo|foo>bar}}]]
12875 [[{{echo|foo././bar}}]]
12876 [[{{echo|foo{bar}}]]
12877 [[{{echo|foo}bar}}]]
12878 [[{{echo|foo[bar}}]]
12879 [[{{echo|foo]bar}}]]
12880 [[{{echo|foo<bar}}]]
12882 <p>[[./../foo|bar]]
12892 </p><p>[[./../foo|bar]]
12905 <p>[[./../foo|bar]]
12916 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
12917 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
12918 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
12919 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
12920 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
12921 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
12922 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
12923 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
12924 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
12925 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
12926 [[<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>
12934 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12939 BUG 561: {{/Subpage}}
12941 subpage title=[[Page]]
12945 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12953 Category:MediaWiki User's Guide
12961 [[:Category:MediaWiki User's Guide]]
12963 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12972 [[Category:MediaWiki User's Guide]]
12974 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12978 PAGESINCATEGORY invalid title fatal (r33546 fix)
12980 {{PAGESINCATEGORY:<bogus>}}
12987 Category with different sort key
12991 [[Category:MediaWiki User's Guide|Foo]]
12993 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12997 Category with identical sort key
13001 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13003 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13007 Category with empty sort key
13012 [[Category:MediaWiki User's Guide|]]
13014 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13018 Category with empty sort key and parentheses
13023 [[Category:Foo (bar)|]]
13025 [[Category:Foo (bar)|Foo]]
13029 Category with link tail
13034 123[[Category:Foo]]456
13036 123[[Category:Foo]]456
13040 Category with template
13045 [[Category:{{echo|Foo}}]]
13047 [[Category:{{echo|Foo}}]]
13051 Category with template in sort key
13056 [[Category:Foo|{{echo|Bar}}]]
13058 [[Category:Foo|{{echo|Bar}}]]
13062 Category with template in sort key and title
13067 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13069 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13073 Category / paragraph interactions
13075 Foo [[Category:Baz]] Bar
13077 Foo [[Category:Baz]]
13085 [[Category:Baz]] Bar
13098 {{echo|[[Category:Baz]]}}
13113 Parsoid: Serialize link to category page with colon escape
13119 [[:Category:Foo|Bar]]
13122 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13123 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13128 Parsoid: Link prefix/suffixes aren't applied to category links
13130 parsoid=wt2html,wt2wt,html2html
13135 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
13139 Parsoid: Serialize link to file page with colon escape
13145 [[:File:Foo.png|Bar]]
13148 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
13149 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
13154 Parsoid: Serialize a genuine category link without colon escape
13159 [[Category:Foo|Bar]]
13161 <link rel="mw:PageProp/Category" href="Category:Foo">
13162 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
13166 Normalize hrefs properly before testing for invalid link targets (bug 70894)
13170 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
13172 [[Category:Toxine bactérienne]]
13176 Parsoid: Defaultsort
13178 {{DEFAULTSORT:Foo}}
13180 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
13184 Parsoid: Defaultsort (template-generated)
13186 {{{{echo|DEFAULTSORT}}:Foo}}
13188 <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}}]}'/>
13192 ### Inter-language links
13195 Interlanguage links
13203 es:Alimento fr:Nourriture zh:食品
13205 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
13206 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
13207 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
13211 Duplicate interlanguage links (bug 24502)
13222 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
13223 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
13224 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
13225 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
13232 Basic section headings
13239 ===Smaller headline===
13242 <h2><a href="#Headline_1" class="mw-headline-anchor" 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>
13245 <h2><a href="#Headline_2" class="mw-headline-anchor" 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>
13248 <h3><a href="#Smaller_headline" class="mw-headline-anchor" 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>
13254 Section headings with TOC
13257 === Subheadline 1 ===
13258 ===== Skipping a level =====
13259 ====== Skipping a level ======
13263 ===Another headline===
13265 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13267 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
13269 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
13271 <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>
13273 <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>
13280 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
13282 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
13288 <h2><a href="#Headline_1" class="mw-headline-anchor" 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>
13289 <h3><a href="#Subheadline_1" class="mw-headline-anchor" 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>
13290 <h5><a href="#Skipping_a_level" class="mw-headline-anchor" 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>
13291 <h6><a href="#Skipping_a_level_2" class="mw-headline-anchor" 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>
13292 <h2><a href="#Headline_2" class="mw-headline-anchor" 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>
13295 <h3><a href="#Another_headline" class="mw-headline-anchor" 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>
13300 TOC anchors don't collide
13308 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13310 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
13311 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
13312 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
13313 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
13317 <h2><a href="#Headline_2" class="mw-headline-anchor" 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>
13318 <h2><a href="#Headline" class="mw-headline-anchor" 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>
13319 <h2><a href="#Headline_2_2" class="mw-headline-anchor" 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>
13320 <h2><a href="#Headline_3" class="mw-headline-anchor" 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>
13324 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13326 Handling of sections up to level 6 and beyond
13329 == Level 2 Heading==
13330 === Level 3 Heading===
13331 ==== Level 4 Heading====
13332 ===== Level 5 Heading=====
13333 ====== Level 6 Heading======
13334 ======= Level 7 Heading=======
13335 ======== Level 8 Heading========
13336 ========= Level 9 Heading=========
13337 ========== Level 10 Heading==========
13339 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13341 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13343 <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>
13345 <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>
13347 <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>
13349 <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>
13351 <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>
13352 <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>
13353 <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>
13354 <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>
13355 <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>
13369 <h1><a href="#Level_1_Heading" class="mw-headline-anchor" 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>
13370 <h2><a href="#Level_2_Heading" class="mw-headline-anchor" 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>
13371 <h3><a href="#Level_3_Heading" class="mw-headline-anchor" 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>
13372 <h4><a href="#Level_4_Heading" class="mw-headline-anchor" 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>
13373 <h5><a href="#Level_5_Heading" class="mw-headline-anchor" 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>
13374 <h6><a href="#Level_6_Heading" class="mw-headline-anchor" 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>
13375 <h6><a href="#.3D_Level_7_Heading.3D" class="mw-headline-anchor" 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>
13376 <h6><a href="#.3D.3D_Level_8_Heading.3D.3D" class="mw-headline-anchor" 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>
13377 <h6><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D" class="mw-headline-anchor" 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>
13378 <h6><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D" class="mw-headline-anchor" 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>
13383 TOC regression (bug 9764)
13387 ==== title 1.1.1 ====
13392 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13394 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13396 <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>
13398 <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>
13401 <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>
13404 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13406 <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>
13412 <h2><a href="#title_1" class="mw-headline-anchor" 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>
13413 <h3><a href="#title_1.1" class="mw-headline-anchor" 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>
13414 <h4><a href="#title_1.1.1" class="mw-headline-anchor" 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>
13415 <h3><a href="#title_1.2" class="mw-headline-anchor" 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>
13416 <h2><a href="#title_2" class="mw-headline-anchor" 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>
13417 <h3><a href="#title_2.1" class="mw-headline-anchor" 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>
13422 TOC with wgMaxTocLevel=3 (bug 6204)
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></li>
13438 <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>
13441 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13443 <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>
13449 <h2><a href="#title_1" class="mw-headline-anchor" 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>
13450 <h3><a href="#title_1.1" class="mw-headline-anchor" 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>
13451 <h4><a href="#title_1.1.1" class="mw-headline-anchor" 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>
13452 <h3><a href="#title_1.2" class="mw-headline-anchor" 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>
13453 <h2><a href="#title_2" class="mw-headline-anchor" 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>
13454 <h3><a href="#title_2.1" class="mw-headline-anchor" 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>
13459 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13465 ====Section 1.1.1====
13466 ====Section 1.1.1.1====
13469 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13471 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13473 <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>
13476 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13480 <h2><a href="#Section_1" class="mw-headline-anchor" 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>
13481 <h3><a href="#Section_1.1" class="mw-headline-anchor" 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>
13482 <h4><a href="#Section_1.1.1" class="mw-headline-anchor" 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>
13483 <h4><a href="#Section_1.1.1.1" class="mw-headline-anchor" 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>
13484 <h2><a href="#Section_2" class="mw-headline-anchor" 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>
13490 Resolving duplicate section names
13495 <h2><a href="#Foo_bar" class="mw-headline-anchor" 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>
13496 <h2><a href="#Foo_bar_2" class="mw-headline-anchor" 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>
13501 Resolving duplicate section names with differing case (bug 10721)
13506 <h2><a href="#Foo_bar" class="mw-headline-anchor" 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>
13507 <h2><a href="#Foo_Bar_2" class="mw-headline-anchor" 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>
13519 Template with sections, __NOTOC__
13526 <h2><a href="#Section_0" class="mw-headline-anchor" 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>
13527 <h3><a href="#Section_1" class="mw-headline-anchor" 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>
13528 <h2><a href="#Section_2" class="mw-headline-anchor" 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>
13529 <h2><a href="#Section_4" class="mw-headline-anchor" 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>
13534 __NOEDITSECTION__ keyword
13540 <h2><a href="#Section_1" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Section_1">Section 1</span></h2>
13541 <h2><a href="#Section_2" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Section_2">Section 2</span></h2>
13546 Link inside a section heading
13548 ==Section with a [[Main Page|link]] in it==
13550 <h2><a href="#Section_with_a_link_in_it" class="mw-headline-anchor" 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>
13555 TOC regression (bug 12077)
13562 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13564 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13566 <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>
13569 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13573 <h2><a href="#title_1" class="mw-headline-anchor" 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>
13574 <h3><a href="#title_1.1" class="mw-headline-anchor" 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>
13575 <h2><a href="#title_2" class="mw-headline-anchor" 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>
13580 BUG 1219 URL next to image (good)
13582 http://example.com [[File:Foobar.jpg]]
13584 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13587 <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>
13591 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13594 The line above must have a trailing space!
13597 But just in case it doesn't...
13599 <h1><a href="#.3D" class="mw-headline-anchor" 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>
13600 <p>The line above must have a trailing space!
13602 <h1><a href="#.3D_2" class="mw-headline-anchor" 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>
13603 <p>But just in case it doesn't...
13608 Header with special characters (bug 25462)
13610 The tooltips shall not show entities to the user (ie. be double escaped)
13627 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13629 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13631 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13632 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13633 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13634 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13635 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13639 <h2><a href="#text_.3E_text" class="mw-headline-anchor" 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>
13642 <h2><a href="#text_.3C_text" class="mw-headline-anchor" 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>
13645 <h2><a href="#text_.26_text" class="mw-headline-anchor" 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>
13648 <h2><a href="#text_.27_text" class="mw-headline-anchor" 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>
13651 <h2><a href="#text_.22_text" class="mw-headline-anchor" 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>
13657 Header with space, plus and underscore as entity
13659 Id should not contain + for spaces
13661 == Space between Text ==
13664 == Space-Entity between Text ==
13667 == Plus+between+Text ==
13670 == Plus-Entity+between+Text ==
13673 == Underscore_between_Text ==
13676 == Underscore-Entity_between_Text ==
13679 [[#Space between Text]]
13680 [[#Space-Entity between Text]]
13681 [[#Plus+between+Text]]
13682 [[#Plus-Entity+between+Text]]
13683 [[#Underscore_between_Text]]
13684 [[#Underscore-Entity_between_Text]]
13686 <p>Id should not contain + for spaces
13688 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13690 <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>
13691 <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>
13692 <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>
13693 <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>
13694 <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>
13695 <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>
13699 <h2><a href="#Space_between_Text" class="mw-headline-anchor" 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>
13702 <h2><a href="#Space-Entity_between_Text" class="mw-headline-anchor" 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>
13705 <h2><a href="#Plus.2Bbetween.2BText" class="mw-headline-anchor" 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>
13708 <h2><a href="#Plus-Entity.2Bbetween.2BText" class="mw-headline-anchor" 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>
13711 <h2><a href="#Underscore_between_Text" class="mw-headline-anchor" 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>
13714 <h2><a href="#Underscore-Entity_between_Text" class="mw-headline-anchor" 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>
13716 </p><p><a href="#Space_between_Text">#Space between Text</a>
13717 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13718 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13719 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13720 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13721 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13726 Headers with excess '=' characters
13727 (Are similar tests necessary beyond the 1st level?)
13731 =''italic'' heading==
13732 ==''italic'' heading=
13734 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13736 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13737 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13738 <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>
13739 <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>
13743 <h1><a href="#foo.3D" class="mw-headline-anchor" 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>
13744 <h1><a href="#.3Dfoo" class="mw-headline-anchor" 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>
13745 <h1><a href="#italic_heading.3D" class="mw-headline-anchor" 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>
13746 <h1><a href="#.3Ditalic_heading" class="mw-headline-anchor" 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>
13751 HTML headers vs TOC (bug 23393)
13752 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13764 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13766 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13768 <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>
13769 <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>
13772 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13774 <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>
13775 <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>
13781 <h1><a href="#Header_1" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Header_1">Header 1</span></h1>
13782 <h2><a href="#Header_1.1" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13783 <h2><a href="#Header_1.2" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13784 <h1><a href="#Header_2" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Header_2">Header 2</span></h1>
13785 <h2><a href="#Header_2.1" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13786 <h2><a href="#Header_2.2" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13791 Single-line or multiline-comments can follow headings
13793 parsoid=wt2html,wt2wt
13801 <h2><a href="#foo" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="foo">foo</span></h2>
13802 <h2><a href="#bar" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="bar">bar</span></h2>
13803 <h2><a href="#baz" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="baz">baz</span></h2>
13808 BUG 1219 URL next to image (broken)
13810 http://example.com[[File:Foobar.jpg]]
13812 <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>
13815 <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>
13819 Bug 1186 news: in the middle of text
13821 http://en.wikinews.org/wiki/Wikinews:Workplace
13823 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13829 Namespaced link must have a title
13838 Namespaced link must have a title (bad fragment version)
13840 [[Project:#fragment]]
13842 <p>[[Project:#fragment]]
13848 ### HTML tags and HTML attributes
13852 div with no attributes
13854 <div>HTML rocks</div>
13856 <div>HTML rocks</div>
13861 div with double-quoted attribute
13863 <div id="rock">HTML rocks</div>
13865 <div id="rock">HTML rocks</div>
13870 div with single-quoted attribute
13872 <div id='rock'>HTML rocks</div>
13874 <div id="rock">HTML rocks</div>
13879 div with unquoted attribute
13881 <div id=rock>HTML rocks</div>
13883 <div id="rock">HTML rocks</div>
13888 div with illegal double attributes
13890 <div id="a" id="b">HTML rocks</div>
13892 <div id="b">HTML rocks</div>
13896 # FIXME: produce empty string instead of "class" in the PHP parser, following
13899 div with empty attribute value, space before equals
13903 <div class =>HTML rocks</div>
13905 <div class="">HTML rocks</div>
13910 div with multiple empty attribute values
13914 <div id= title=>HTML rocks</div>
13916 <div id="" title="">HTML rocks</div>
13921 table with multiple empty attribute values
13929 <table title="" id="">
13930 <tbody><tr><td> hi</td></tr>
13935 div with braces in attribute value
13937 <div title="{}">Foo</div>
13939 <div title="{}">Foo</div>
13942 <div title="{}">Foo</div>
13945 # This it very inconsistent in the PHP parser: it returns
13946 # class="class" if there is a space between the name and the equal sign (see
13947 # 'div with empty attribute value, space before equals'), but strips the
13948 # attribute completely if the space is missing. We hope that not much content
13949 # depends on this, so are implementing the behavior below in Parsoid for
13950 # consistencies' sake.
13951 # FIXME: fix this behavior in the PHP parser?
13953 div with empty attribute value, no space before equals
13955 parsoid=wt2html,html2html
13957 <div class=>HTML rocks</div>
13959 <div>HTML rocks</div>
13962 <div class="">HTML rocks</div>
13966 HTML multiple attributes correction
13968 <p class="error" class="awesome">Awesome!</p>
13970 <p class="awesome">Awesome!</p>
13975 Table multiple attributes correction
13978 !+ class="error" class="awesome"| status
13983 <th class="awesome"> status
13991 <DIV ID="x">HTML ROCKS</DIV>
13993 <div id="x">HTML ROCKS</div>
13998 Non-ASCII pseudo-tags are rendered as text
14007 Pseudo-tag with URL 'name' renders as url link
14009 <http://example.com/>
14011 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14016 text with amp in the middle of nowhere
14020 <p>Remember AT&T?
14025 text with character entity: eacute
14027 I always thought é was a cute letter.
14029 <p>I always thought é was a cute letter.
14032 <p>I always thought é was a cute letter.</p>
14036 text with entity-escaped character entity-like string: eacute
14038 I always thought &eacute; was a cute letter.
14040 <p>I always thought &eacute; was a cute letter.
14045 text with undefined character entity: xacute
14047 I always thought &xacute; was a cute letter.
14049 <p>I always thought &xacute; was a cute letter.
14053 # TODO: generalize to PHP parser?
14059 <data value="5">five</data>
14060 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14061 <mark>This highlighted text</mark>
14063 <p><data value="5">five</data>
14064 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14065 <mark>This highlighted text</mark></p>
14069 HTML tag with leading space is parsed as text
14073 <p>< div>foo< /div>
14078 ### Nesting tests (see bug 41545, 50604, 51081)
14081 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14082 # Note that html2wt is considerably more difficult if we use <b> in
14083 # the test case, instead of <big>
14085 Ensure that HTML adoption agency algorithm is properly implemented.
14087 <big>X<big>Y</big>Z</big>
14089 <p><big>X<big>Y</big>Z</big>
14093 # This was bug 41545 in the PHP parser.
14094 # Note that tidy doesn't handle this correctly.
14098 <kbd>X<kbd>Y</kbd>Z</kbd>
14100 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14104 # The following cases were bug 51081 in the PHP parser.
14105 # Note that there are some other nestable tags (b, i, etc) which are
14106 # not covered; see bug 51081 for discussion.
14108 # Note that tidy doesn't handle this correctly.
14112 <em>X<em>Y</em>Z</em>
14114 <p><em>X<em>Y</em>Z</em>
14118 # Note that tidy doesn't handle this correctly.
14120 Nesting of <strong>
14122 <strong>X<strong>Y</strong>Z</strong>
14124 <p><strong>X<strong>Y</strong>Z</strong>
14133 <p><q>X<q>Y</q>Z</q></p>
14136 # Note that tidy doesn't handle this correctly.
14140 <ruby>X<ruby>Y</ruby>Z</ruby>
14142 <p><ruby>X<ruby>Y</ruby>Z</ruby>
14146 # Note that tidy doesn't handle this correctly.
14150 <bdo>X<bdo>Y</bdo>Z</bdo>
14152 <p><bdo>X<bdo>Y</bdo>Z</bdo>
14164 [[Media:Foobar.jpg]]
14166 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
14171 Media link with text
14173 [[Media:Foobar.jpg|A neat file to look at]]
14175 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
14179 # FIXME: this is still bad HTML tag nesting
14181 Media link with nasty text
14182 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
14184 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
14186 <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>
14189 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a></p>
14193 Media link to nonexistent file (bug 1702)
14195 [[Media:No such.jpg]]
14197 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
14202 Image link to nonexistent file (bug 1850 - good)
14204 [[File:No_such.jpg]]
14206 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
14209 <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>
14213 :Image link to nonexistent file (bug 1850 - bad)
14215 [[:Image:No such.jpg]]
14217 <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>
14220 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
14226 Character reference normalization in link text (bug 1938)
14228 [[Main Page|this&that]]
14230 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14237 Test for unicode normalization
14239 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14243 (bug 19451) Links should refer to the normalized form.
14251 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14252 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14253 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14254 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14255 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14260 Empty attribute crash test (bug 2067)
14262 <font color="">foo</font>
14264 <p><font color="">foo</font>
14269 Empty attribute crash test single-quotes (bug 2067)
14271 <font color=''>foo</font>
14273 <p><font color="">foo</font>
14278 Attribute test: equals, then nothing
14280 <font color=>foo</font>
14282 <p><font>foo</font>
14287 Attribute test: unquoted value
14289 <font color=x>foo</font>
14291 <p><font color="x">foo</font>
14296 Attribute test: unquoted but illegal value (hash)
14298 <font color=#x>foo</font>
14300 <p><font color="#x">foo</font>
14305 Attribute test: no value
14307 <font color>foo</font>
14309 <p><font color="color">foo</font>
14314 Bug 2095: link with three closing brackets
14318 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14321 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14325 Bug 2095: link with pipe and three closing brackets
14327 [[Main Page|link]]]
14329 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14332 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14336 Bug 2095: link with pipe and three closing brackets, version 2
14338 [[Main Page|[http://example.com/]]]
14340 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14343 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14352 Template:Dangerous attribute
14354 " onmouseover="alert(document.cookie)
14358 Template:Dangerous style attribute
14360 border-size: expression(alert(document.cookie))
14366 <div style="float: right; {{{1}}}">Magic div</div>
14370 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14372 <div title="{{test}}"></div>
14374 <div title="This is a test template"></div>
14378 # Parsoid has enough context to handle this case
14380 Bug 2304: HTML attribute safety (dangerous template; 2309)
14382 <div title="{{dangerous attribute}}"></div>
14384 <div title=""></div>
14387 <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>
14391 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14393 <div style="{{dangerous style attribute}}"></div>
14395 <div style="/* insecure input */"></div>
14400 Bug 2304: HTML attribute safety (safe parameter; 2309)
14402 {{div style|width: 200px}}
14404 <div style="float: right; width: 200px">Magic div</div>
14409 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14411 {{div style|width: expression(alert(document.cookie))}}
14413 <div style="/* insecure input */">Magic div</div>
14418 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14420 {{div style|"><script>alert(document.cookie)</script>}}
14422 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14427 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14429 {{div style|" ><script>alert(document.cookie)</script>}}
14431 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14436 Bug 2304: HTML attribute safety (link)
14438 <div title="[[Main Page]]"></div>
14440 <div title="[[Main Page]]"></div>
14445 Bug 2304: HTML attribute safety (italics)
14447 <div title="''foobar''"></div>
14449 <div title="''foobar''"></div>
14454 Bug 2304: HTML attribute safety (bold)
14456 <div title="'''foobar'''"></div>
14458 <div title="'''foobar'''"></div>
14464 Bug 2304: HTML attribute safety (ISBN)
14466 <div title="ISBN 1234567890"></div>
14468 <div title="ISBN 1234567890"></div>
14473 Bug 2304: HTML attribute safety (RFC)
14475 <div title="RFC 1234"></div>
14477 <div title="RFC 1234"></div>
14482 Bug 2304: HTML attribute safety (PMID)
14484 <div title="PMID 1234567890"></div>
14486 <div title="PMID 1234567890"></div>
14491 Bug 2304: HTML attribute safety (web link)
14493 <div title="http://example.com/"></div>
14495 <div title="http://example.com/"></div>
14500 Bug 2304: HTML attribute safety (named web link)
14502 <div title="[http://example.com/ link]"></div>
14504 <div title="[http://example.com/ link]"></div>
14509 Bug 3244: HTML attribute safety (extension; safe)
14511 <div style="<nowiki>background:blue</nowiki>"></div>
14513 <div style="background:blue"></div>
14518 Bug 3244: HTML attribute safety (extension; unsafe)
14520 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14522 <div style="/* insecure input */"></div>
14526 # More MSIE fun discovered by Tom Gilder
14529 MSIE CSS safety test: spurious slash
14531 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14533 <div style="/* insecure input */">evil</div>
14538 MSIE CSS safety test: hex code
14540 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14542 <div style="/* insecure input */">evil</div>
14547 MSIE CSS safety test: comment in url
14549 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14551 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14556 MSIE CSS safety test: comment in expression
14558 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14560 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14565 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14567 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14569 <p style="/* invalid control char */">A</p>
14574 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14576 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14577 <div style="top:EXPRESSION(alert())">B</div>
14579 <p style="/* insecure input */">A</p>
14580 <div style="/* insecure input */">B</div>
14585 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14587 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14588 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14590 <div style="/* insecure input */">A</div>
14591 <p style="/* insecure input */">B</p>
14596 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14598 <div style="background-image:url⁽javascript:alert())">A</div>
14599 <div style="background-image:url₍javascript:alert())">B</div>
14600 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14602 <div style="/* insecure input */">A</div>
14603 <div style="/* insecure input */">B</div>
14604 <p style="/* insecure input */">C</p>
14612 title="data:text/html,<img src=1 onerror=alert(1)>"
14613 style="-o-link:attr(title);-o-link-source:current">X</div>
14615 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14620 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14622 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14623 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14624 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14625 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14626 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14627 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14628 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14630 <p style="/* insecure input */">A</p>
14631 <p style="/* insecure input */">B</p>
14632 <p style="/* insecure input */">C</p>
14633 <p style="/* insecure input */">D</p>
14634 <p style="/* insecure input */">E</p>
14635 <p style="/* insecure input */">F</p>
14636 <p style="/* insecure input */">G</p>
14641 Table attribute legitimate extension
14644 !+ style="<nowiki>color:blue</nowiki>"| status
14649 <th style="color:blue"> status
14655 Table attribute safety
14658 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14663 <th style="/* insecure input */"> status
14669 CSS line continuation 1
14671 <div style="background-image: u\ rl(test.jpg);"></div>
14673 <div style="/* insecure input */"></div>
14678 CSS line continuation 2
14680 <div style="background-image: u\ rl(test.jpg); "></div>
14682 <div style="/* insecure input */"></div>
14693 Expansion of multi-line templates in attribute values (bug 6255)
14695 <div style="background: {{identity|#00FF00}}">-</div>
14697 <div style="background: #00FF00">-</div>
14703 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14705 <div style="background:
14708 <div style="background: #00FF00">-</div>
14711 <div style="background:
14716 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14718 <div style="background: #00FF00">-</div>
14720 <div style="background: #00FF00">-</div>
14725 evil <math>-wiki-tags without Extension:Math enabled
14727 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14729 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14733 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14736 Parser hook: empty input
14749 Parser hook: empty input using terminated empty elements
14762 Parser hook: empty input using terminated empty elements (space before)
14775 Parser hook: basic input
14789 Parser hook: case insensitive
14803 Parser hook: case insensitive, redux
14816 Parser hook: nested tags
14820 <tag><tag></tag></tag>
14831 Parser hook: basic arguments
14833 <tag width=200 height = "100" depth = '50' square></tag>
14841 'square' => 'square',
14848 Parser hook: argument containing a forward slash (bug 5344)
14850 <tag filename='/tmp/bla'></tag>
14855 'filename' => '/tmp/bla',
14862 Parser hook: empty input using terminated empty elements (bug 2374)
14875 # </tag> should be output literally since there is no matching tag that begins it
14877 Parser hook: basic arguments using terminated empty elements (bug 2374)
14879 <tag width=200 height = "100" depth = '50' square/>
14889 'square' => 'square',
14898 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14902 Parser hook: static parser hook not inside a comment
14904 <statictag>hello, world</statictag>
14905 <statictag action=flush/>
14913 Parser hook: static parser hook inside a comment
14915 <!-- <statictag>hello, world</statictag> -->
14916 <statictag action=flush/>
14922 # Nested template calls; this case was broken by Parser.php rev 1.506,
14926 Template:One-parameter
14928 (My parameter is: {{{1}}})
14932 Template:Map-one-parameter
14934 {{{{{1}}}|{{{2}}}}}
14938 Nested template calls
14940 {{Map-one-parameter|One-parameter|param}}
14942 <p>(My parameter is: param)
14951 # HTML+Tidy effectively strips out the empty tags completely
14952 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
14953 # which Tidy would have done for the PHP parser had there been content inside it.
14955 Sanitizer: Closing of open tags
14957 <s></s><table></table>
14959 <s></s><table></table>
14962 <p><s></s></p><table></table>
14966 Sanitizer: Closing of open but not closed tags
14975 Sanitizer: Closing of closed but not open tags
14984 Sanitizer: Closing of closed but not open table tags
14986 Table not started</td></tr></table>
14988 <p>Table not started</td></tr></table>
14993 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14995 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14997 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15001 # In HTML5, the restrictions are that id must contain at least one character,
15002 # and must not contain any space characters.
15004 Sanitizer: Validating the contents of the id attribute (bug 4515)
15008 <br id="" /><br id="a space" />
15013 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15015 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15019 <br id="foo" /><br id="foo" />
15021 Something need to be done. foo-2 ?
15025 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15028 <meta itemprop="hello" content="world">
15029 <meta http-equiv="refresh" content="5">
15030 <meta itemprop="hello" http-equiv="refresh" content="5">
15031 <link itemprop="hello" href="{{SERVER}}">
15032 <link rel="stylesheet" href="{{SERVER}}">
15033 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15036 <div itemscope="itemscope">
15037 <p> <meta itemprop="hello" content="world" />
15038 <meta http-equiv="refresh" content="5">
15039 <meta itemprop="hello" content="5" />
15041 <link itemprop="hello" href="http://example.org" />
15042 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15043 <link itemprop="hello" href="http://example.org" />
15049 Language converter: output gets cut off unexpectedly (bug 5757)
15053 this bit is safe: }-
15055 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15057 then we get cut off here: }-
15059 all additional text is vanished
15061 <p>this bit is safe: }-
15062 </p><p>but if we add a conversion instance: xxx
15063 </p><p>then we get cut off here: }-
15064 </p><p>all additional text is vanished
15069 Self closed html pairs (bug 5487)
15072 <center><font id="bug" />Centered text</center>
15073 <div><font id="bug2" />In div text</div>
15075 <center><font id="bug" />Centered text</center>
15076 <div><font id="bug2" />In div text</div>
15085 Punctuation: nbsp before exclamation
15089 <p>C'est grave !
15094 Punctuation: CSS !important (bug 11874)
15096 <div style="width:50% !important">important</div>
15098 <div style="width:50% !important">important</div>
15103 Punctuation: CSS ! important (bug 11874; with space after)
15105 <div style="width:50% ! important">important</div>
15107 <div style="width:50% ! important">important</div>
15112 HTML bullet list, closed tags (bug 5497)
15125 <ul data-parsoid='{"stx":"html"}'>
15126 <li data-parsoid='{"stx":"html"}'>One</li>
15127 <li data-parsoid='{"stx":"html"}'>Two</li>
15133 HTML bullet list, unclosed tags (bug 5497)
15145 <ul data-parsoid='{"stx":"html"}'>
15146 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15147 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15153 HTML ordered list, closed tags (bug 5497)
15166 <ol data-parsoid='{"stx":"html"}'>
15167 <li data-parsoid='{"stx":"html"}'>One</li>
15168 <li data-parsoid='{"stx":"html"}'>Two</li>
15174 HTML ordered list, unclosed tags (bug 5497)
15187 <ol 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 nested bullet list, closed tags (bug 5497)
15220 HTML nested bullet list, open tags (bug 5497)
15257 HTML nested ordered list, closed tags (bug 5497)
15282 HTML nested ordered list, open tags (bug 5497)
15319 HTML ordered list item with parameters oddity
15321 <ol><li id="fragment">One</li>
15324 <ol><li id="fragment">One</li>
15329 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15331 bug 5918: autonumbering
15333 [http://first/] [http://second] [ftp://ftp]
15337 [mailto:enclosed@mail.tld With target]
15339 [mailto:enclosed@mail.tld]
15341 mailto:inline@mail.tld
15343 <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>
15344 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15345 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15346 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15347 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15350 <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>
15351 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15352 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15353 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15354 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15359 # Security and HTML correctness
15360 # From Nick Jenkins' fuzz testing
15364 Fuzz testing: Parser13
15379 Fuzz testing: Parser14
15384 <h2><a href="#onmouseover.3D" class="mw-headline-anchor" 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>
15385 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15387 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15393 <h2><a href="#onmouseover.3D" class="mw-headline-anchor" 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>
15395 <div id="toc" class="toc">
15396 <div id="toctitle">
15400 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15406 Fuzz testing: Parser14-table
15411 <h2><a href="#a" class="mw-headline-anchor" 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>
15412 <table style="__TOC__">
15417 <h2><a href="#a" class="mw-headline-anchor" 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>
15418 <table style="__TOC__">
15425 # Known to produce bogus xml (extra </td>)
15427 Fuzz testing: Parser16
15456 Fuzz testing: Parser21
15459 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15464 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15474 Fuzz testing: Parser22
15476 http://===r:::https://b
15480 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15488 # Known to produce bad XML for now
15490 Fuzz testing: Parser24
15497 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15498 <br style="onmouseover='alert(document.cookie);' " />
15500 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15505 <u class="|">}}}} >
15506 <br style="onmouseover='alert(document.cookie);'" />
15508 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15517 # Note: the current result listed for this is not what the original one was,
15518 # but the original bug was JavaScript injection, which is fixed in any case.
15519 # It's not clear that the original result listed was any more correct than the
15520 # current one. Original result:
15523 # <li class="||">
15524 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15526 Fuzz testing: Parser25 (bug 6055)
15532 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15534 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15539 Fuzz testing: URL adjacent extension (with space, clean)
15541 http://example.com <nowiki>junk</nowiki>
15543 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15546 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
15550 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15552 http://example.com<nowiki>junk</nowiki>
15554 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15557 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
15561 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15563 http://example.com<pre>junk</pre>
15565 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15568 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15573 <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>
15577 Fuzz testing: image with bogus manual thumbnail
15579 [[Image:foobar.jpg|thumbnail= ]]
15581 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15584 <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>
15588 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15590 <pre dir=" "></pre>
15592 <pre dir=" "></pre>
15597 Parsing optional HTML elements (Bug 6171)
15602 <td> Some tabular data</td>
15603 <td> More tabular data ...
15604 <td> And yet som tabular data</td>
15610 <td> Some tabular data</td>
15611 <td> More tabular data ...
15612 </td><td> And yet som tabular data</td>
15619 Correct handling of <td>, <tr> (Bug 6171)
15624 <td> Some tabular data</td>
15625 <td> More tabular data ...</td>
15626 <td> And yet som tabular data</td>
15632 <td> Some tabular data</td>
15633 <td> More tabular data ...</td>
15634 <td> And yet som tabular data</td>
15642 Parsing crashing regression (fr:JavaScript)
15646 <p></body></x>
15651 Inline wiki vs wiki block nesting
15657 <p><b>Bold paragraph</b>
15658 </p><p>New wiki paragraph
15662 # FIXME: The current php output is documented
15663 # and desired output is the parsoid target.
15665 Inline HTML vs wiki block nesting
15671 <p><b>Bold paragraph
15672 </p><p>New wiki paragraph</b>
15675 <p><b>Bold paragraph</b>
15676 </p><p>New wiki paragraph
15680 # Original result was this:
15681 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
15683 # While that might be marginally more intuitive, maybe, the six-apostrophe
15684 # construct is clearly pathological and the result stated here (which is what
15685 # the parser actually does) is about as reasonable as anything.
15687 Mixing markup for italics and bold
15690 '''bold''''''bold''bolditalics'''''
15692 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
15700 Article for special page transclusion test
15704 Special page transclusion
15707 {{Special:Prefixindex/Xyzzyx}}
15709 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15714 Special page transclusion twice (bug 5021)
15717 {{Special:Prefixindex/Xyzzyx}}
15718 {{Special:Prefixindex/Xyzzyx}}
15720 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15721 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
15726 Transclusion of default MediaWiki message
15728 {{MediaWiki:Mainpage}}
15735 Transclusion of nonexistent MediaWiki message
15737 {{MediaWiki:Mainpagexxx}}
15739 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
15744 Transclusion of MediaWiki message with underscore
15746 {{MediaWiki:history_short}}
15753 Transclusion of MediaWiki message with space
15755 {{MediaWiki:history short}}
15762 Invalid header with following text
15772 Section extraction test (section 0)
15792 Section extraction test (section 1)
15814 Section extraction test (section 2)
15835 Section extraction test (section 3)
15855 Section extraction test (section 4)
15879 Section extraction test (section 5)
15899 Section extraction test (section 6)
15920 Section extraction test (section 7)
15940 Section extraction test (section 8)
15960 Section extraction test (section 9)
15981 Section extraction test (section 10)
16001 Section extraction test (nonexistent section 11)
16020 Section extraction test with bogus heading (section 1)
16025 ==bogus== not a legal section
16029 ==bogus== not a legal section
16033 Section extraction test with bogus heading (section 2)
16038 ==bogus== not a legal section
16045 Section extraction test with comment after heading (section 1)
16057 Section extraction test with comment after heading (section 2)
16069 Section extraction test with bogus <nowiki> heading (section 1)
16074 ==bogus== <nowiki>not a legal section</nowiki>
16078 ==bogus== <nowiki>not a legal section</nowiki>
16082 Section extraction test with bogus <nowiki> heading (section 2)
16087 ==bogus== <nowiki>not a legal section</nowiki>
16094 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16095 # instead of respecting commented sections
16097 Section extraction prefixed by comment (section 1)
16108 Section extraction prefixed by comment (section 2)
16119 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16120 # instead of respecting HTML-style headings
16122 Section extraction, mixed wiki and html (section 1)
16138 Section extraction, mixed wiki and html (section 2)
16154 # Formerly testing for bug 3342
16156 Section extraction, heading surrounded by <noinclude>
16160 <noinclude>==unmarked==</noinclude>
16166 # Test behavior of bug 19910
16168 Sectiion with all-equals
16173 The line above must have a trailing space
16176 But just in case it doesn't...
16180 But just in case it doesn't...
16184 Section replacement test (section 0)
16215 Section replacement test (section 1)
16244 Section replacement test (section 2)
16274 Section replacement test (section 3)
16305 Section replacement test (section 4)
16332 Section replacement test (section 5)
16363 Section replacement test (section 6)
16393 Section replacement test (section 7)
16424 Section replacement test (section 8)
16455 Section replacement test (section 9)
16484 Section replacement test (section 10)
16514 Section replacement test with initial whitespace (bug 13728)
16518 Preformatted initial line
16522 Preformatted initial line
16529 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16541 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16554 Section extraction, <pre> around bogus header (bug 10309)
16571 Section replacement, <pre> around bogus header (bug 10309)
16573 noxml replace=2,"xxx"
16594 Handling of 
 in URLs
16598 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16601 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16603 a</a></li></ul></li></ul>
16607 Handling of %0A in URLs
16611 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16614 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16618 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16620 5 quotes, code coverage +1 line
16627 <p><b><i></i></b></p>
16630 # same html as previous, but wikitext adjusted to match parsoid html2wt
16631 # note that wt2html and html2html will put the <i> before the <b>
16633 5 quotes, code coverage +1 line w/ nowiki (1)
16635 parsoid=wt2wt,html2wt
16637 '''''<nowiki/>'''''
16642 <p><b><i></i></b></p>
16645 # same as previous, just swapping the <i> and <b>
16647 5 quotes, code coverage +1 line w/ nowiki (2)
16649 '''''<nowiki/>'''''
16654 <p><i><b></b></i></p>
16658 Special:Search page linking.
16662 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16667 {{!}} is a magic word
16669 {{!}} is a magic word there and {{!}} is still a magic word here
16671 <p>| is a magic word there and | is still a magic word here
16674 <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>
16680 title=[[Parser test]]
16685 * {{FULLPAGENAMEE}}
16687 * {{BASEPAGENAMEE}}
16691 * {{ROOTPAGENAMEE}}
16693 * {{TALKPAGENAMEE}}
16694 * {{SUBJECTPAGENAME}}
16695 * {{SUBJECTPAGENAMEE}}
16698 * {{NAMESPACENUMBER}}
16702 * {{SUBJECTSPACEE}}
16703 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
16705 <ul><li> Parser test</li>
16706 <li> Parser_test</li>
16707 <li> Parser test</li>
16708 <li> Parser_test</li>
16709 <li> Parser test</li>
16710 <li> Parser_test</li>
16711 <li> Parser test</li>
16712 <li> Parser_test</li>
16713 <li> Parser test</li>
16714 <li> Parser_test</li>
16715 <li> Talk:Parser test</li>
16716 <li> Talk:Parser_test</li>
16717 <li> Parser test</li>
16718 <li> Parser_test</li>
16726 <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>
16729 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
16739 image4 |300px| centre
16740 image5.svg| http://///////
16745 <ul class="gallery mw-gallery-traditional">
16746 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16747 <div class="thumb" style="height: 150px;">Image1.png</div>
16748 <div class="gallerytext">
16751 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16752 <div class="thumb" style="height: 150px;">Image2.gif</div>
16753 <div class="gallerytext">
16758 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16759 <div class="thumb" style="height: 150px;">Image3</div>
16760 <div class="gallerytext">
16763 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16764 <div class="thumb" style="height: 150px;">Image4</div>
16765 <div class="gallerytext">
16770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16771 <div class="thumb" style="height: 150px;">Image5.svg</div>
16772 <div class="gallerytext">
16773 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16777 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16778 <div class="thumb" style="height: 150px;">* image6</div>
16779 <div class="gallerytext">
16787 Gallery (with options)
16789 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16790 File:Nonexistent.jpg|caption
16791 File:Nonexistent.jpg
16792 image:foobar.jpg|some '''caption''' [[Main Page]]
16794 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16797 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16798 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16799 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16800 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16801 <div class="gallerytext">
16806 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16807 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
16808 <div class="gallerytext">
16811 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16812 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
16813 <div class="gallerytext">
16814 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16818 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16819 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
16820 <div class="gallerytext">
16823 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16824 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
16825 <div class="gallerytext">
16835 Gallery with link that has fragment
16838 image:foobar.jpg|link=Main_Page
16839 image:foobar.jpg|link=Main_Page#section
16840 image:foobar.jpg|link=Main Page#section|caption
16843 <ul class="gallery mw-gallery-traditional">
16844 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16845 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16846 <div class="gallerytext">
16849 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16850 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16851 <div class="gallerytext">
16854 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16855 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16856 <div class="gallerytext">
16866 Gallery with wikitext inside caption
16869 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16870 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16873 <ul class="gallery mw-gallery-traditional">
16874 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16875 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16876 <div class="gallerytext">
16877 <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>
16881 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16882 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16883 <div class="gallerytext">
16884 <p>This is a test template
16893 gallery (with showfilename option)
16895 <gallery showfilename>
16896 File:Nonexistent.jpg|caption
16897 File:Nonexistent.jpg
16898 image:foobar.jpg|some '''caption''' [[Main Page]]
16902 <ul class="gallery mw-gallery-traditional">
16903 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16904 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16905 <div class="gallerytext">
16906 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16911 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16912 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16913 <div class="gallerytext">
16914 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
16918 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16919 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16920 <div class="gallerytext">
16921 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16922 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16926 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16927 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16928 <div class="gallerytext">
16929 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16938 Gallery (with namespace-less filenames)
16941 File:Nonexistent.jpg
16947 <ul class="gallery mw-gallery-traditional">
16948 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16949 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16950 <div class="gallerytext">
16953 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16954 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
16955 <div class="gallerytext">
16958 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16959 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16960 <div class="gallerytext">
16963 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16964 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
16965 <div class="gallerytext">
16973 HTML Hex character encoding (spells the word "JavaScript")
16975 parsoid=wt2html,wt2wt,html2html
16977 JavaScript
16979 <p>JavaScript
16984 <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>
16988 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16992 <p>&#xsee;&#XSEE;
16995 <p>&#xsee;&#XSEE;</p>
16999 HTML Hex character encoding mixed case
17001 parsoid=wt2html,wt2wt,html2html
17010 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17014 __FORCETOC__ override
17026 ISBN 978-0-1234-56 789
17028 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17031 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17033 <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>
17037 ISBN followed by 5 spaces
17048 ISBN ISBN 1234567890
17050 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17053 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17063 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17064 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17065 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17068 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17069 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17070 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17074 ISBN with empty prefix (parsoid test)
17078 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17081 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17085 Bug 22905: <abbr> followed by ISBN followed by </a>
17087 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17089 <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>
17092 <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>
17100 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17105 Double RFC with a wiki link
17109 <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>
17118 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17121 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17125 Centre-aligned image
17127 [[Image:foobar.jpg|centre]]
17129 <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>
17136 [[Image:foobar.jpg|none]]
17138 <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>
17143 Width + Height sized image (using px) (height is ignored)
17145 [[Image:foobar.jpg|640x480px]]
17147 <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>
17152 Width-sized image (using px, no following whitespace)
17154 [[Image:foobar.jpg|640px]]
17156 <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>
17161 Width-sized image (using px, with following whitespace - test regression from r39467)
17163 [[Image:foobar.jpg|640px ]]
17165 <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>
17170 Width-sized image (using px, with preceding whitespace - test regression from r39467)
17172 [[Image:foobar.jpg| 640px]]
17174 <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>
17179 Image with page parameter
17183 [[File:LoremIpsum.djvu|page=2]]
17185 <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>
17188 <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>
17192 Another italics / bold test
17200 # FIXME: The php output seems broken. It's interleaving some open/close tags.
17206 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
17209 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
17214 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
17216 Images with the "|" character in the comment
17218 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
17220 <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>
17223 <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>
17227 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
17229 <html><script>alert(1);</script></html>
17231 <p><html><script>alert(1);</script></html>
17236 HTML with raw HTML ($wgRawHtml==true)
17240 <html><script>alert(1);</script></html>
17242 <p><script>alert(1);</script>
17247 Parents of subpages, one level up
17249 subpage title=[[Subpage test/L1/L2/L3]]
17253 <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>
17259 Parents of subpages, one level up, not named
17261 subpage title=[[Subpage test/L1/L2/L3]]
17265 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
17272 Parents of subpages, two levels up
17274 subpage title=[[Subpage test/L1/L2/L3]]
17280 <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
17281 </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>
17286 Parents of subpages, two levels up, without trailing slash or name.
17288 subpage title=[[Subpage test/L1/L2/L3]]
17297 Parents of subpages, two levels up, with lots of extra trailing slashes.
17299 subpage title=[[Subpage test/L1/L2/L3]]
17303 <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>
17308 Subpage test/L1/L2/L3Sibling
17314 Transclusion of a sibling page (one level up)
17316 subpage title=[[Subpage test/L1/L2/L3]]
17325 Transclusion of a child page
17327 subpage title=[[Subpage test/L1/L2]]
17336 Non-transclusion because of too many up levels
17338 subpage title=[[Subpage test/L1/L2/L3]]
17340 {{../../../../More than parent}}
17342 <p>{{../../../../More than parent}}
17347 Definition list code coverage
17353 <dl><dt> title  </dt>
17355 <dt> title </dt>
17361 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17362 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17363 <dt>title</dt><dd> def</dd></dl>
17367 Don't fall for the self-closing div
17369 <div>hello world</div/>
17371 <div>hello world</div>
17380 <p>[[:Template:Msg]]
17389 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17393 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17395 Always escape literal '>' in output, not just after '<'
17409 <p>This is a test template
17410 This is a test template
17422 Inclusion of !userCanEdit() content
17426 <h2><a href="#header" class="mw-headline-anchor" 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>
17432 Out-of-order TOC heading levels
17441 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17443 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17445 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17446 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17449 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17451 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17452 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17458 <h2><a href="#2" class="mw-headline-anchor" 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>
17459 <h6><a href="#6" class="mw-headline-anchor" 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>
17460 <h3><a href="#3" class="mw-headline-anchor" 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>
17461 <h1><a href="#1" class="mw-headline-anchor" 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>
17462 <h5><a href="#5" class="mw-headline-anchor" 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>
17463 <h2><a href="#2_2" class="mw-headline-anchor" 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>
17469 ISBN with a dummy number
17479 ISBN with space-delimited number
17483 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17489 ISBN with multiple spaces, no number
17508 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17509 </p><p>ISBN 12345678901
17515 ISBN with trailing year (bug 8110)
17517 ISBN 1-234-56789-0 - 2006
17519 ISBN 1 234 56789 0 - 2006
17521 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17522 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17530 {{anchorencode:foo bar©#%n}}
17532 <p>foo_bar.C2.A9.23.25n
17537 anchorencode trims spaces
17539 {{anchorencode: __pretty__please__}}
17546 anchorencode deals with links
17548 {{anchorencode: [[hello|world]] [[hi]]}}
17555 anchorencode deals with templates
17557 {{anchorencode: {{Foo}} }}
17564 anchorencode encodes like the TOC generator: (bug 18431)
17566 === _ +:.3A%3A&&]] ===
17567 {{anchorencode: _ +:.3A%3A&&]] }}
17570 <h3><a href="#.2B:.3A.253A.26.26.5D.5D" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17571 <p>.2B:.3A.253A.26.26.5D.5D
17576 Bug 6200: blockquotes and paragraph formatting
17597 Bug 8293: Use of center tag ruins paragraph formatting
17618 Parsing of overlapping (improperly nested) inline html tags
17620 <span><s>x</span></s>
17622 <p><span><s>x</span></s></span>
17625 <p><span><s>x</s></span>
17630 ### Language variants related tests
17633 Self-link in language variants
17635 title=[[Dunav]] language=sr
17637 Both [[Dunav]] and [[Дунав]] are names for this river.
17639 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17650 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17652 title=[[Duna]] language=sr
17654 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17656 <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.
17661 Link to a section of a variant of this title shouldn't be parsed as self-link
17663 title=[[Duna]] language=sr
17665 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17667 <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.
17672 Link to pages in language variants
17676 Main Page can be written as [[Маин Паге]]
17678 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
17684 Multiple links to pages in language variants
17688 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
17690 <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>.
17696 Simple template in language variants
17702 <p>This is a test template
17708 Template with explicit namespace in language variants
17714 <p>This is a test template
17720 Basic test for template parameter in language variants
17724 {{парамтест|param=foo}}
17726 <p>This is a test template with parameter foo
17732 Simple category in language variants
17736 [[Category:МедиаWики Усер'с Гуиде]]
17738 <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>
17755 Don't convert blue categorylinks to another variant (bug 33210)
17759 [[A]][[Category:分类]]
17761 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17766 Stripping -{}- tags (language variants)
17770 Latin proverb: -{Ne nuntium necare}-
17772 <p>Latin proverb: Ne nuntium necare
17778 Prevent conversion with -{}- tags (language variants)
17780 language=sr variant=sr-ec
17782 Latinski: -{Ne nuntium necare}-
17784 <p>Латински: Ne nuntium necare
17790 Prevent conversion of text with -{}- tags (language variants)
17792 language=sr variant=sr-ec
17794 Latinski: -{Ne nuntium necare}-
17796 <p>Латински: Ne nuntium necare
17802 Prevent conversion of links with -{}- tags (language variants)
17804 language=sr variant=sr-ec
17808 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17814 -{}- tags within headlines (within html for parserConvert())
17816 language=sr variant=sr-ec
17820 <h2><a href="#-.7BNaslov.7D-" class="mw-headline-anchor" 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>
17826 Explicit definition of language variant alternatives
17828 language=zh variant=zh-tw
17830 -{zh:China;zh-tw:Taiwan}-, not China
17832 <p>Taiwan, not China
17838 Conversion around HTML tags
17840 language=sr variant=sr-ec
17842 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17843 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17846 <span title="ЛаCтин">ски</span>
17852 Explicit session-wise language variant mapping (A flag and - flag)
17854 language=zh variant=zh-tw
17856 Taiwan is not China.
17857 But -{A|zh:China;zh-tw:Taiwan}- is China,
17858 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17859 and -{China}- is China.
17861 <p>Taiwan is not China.
17862 But Taiwan is Taiwan,
17863 (This should be stripped!)
17864 and China is China.
17869 Explicit session-wise language variant mapping (H flag for hide)
17871 language=zh variant=zh-tw
17873 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17876 <p>(This should be stripped!)
17882 Adding explicit conversion rule for title (T flag)
17884 language=zh variant=zh-tw showtitle
17886 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17889 <p>Should be stripped!
17894 Testing that changing the language variant here in the tests actually works
17896 language=zh variant=zh showtitle
17898 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17901 <p>Should be stripped!
17906 Recursive conversion of alt and title attrs shouldn't clear converter state
17908 language=zh variant=zh-cn showtitle
17910 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17911 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17915 Should be stripped<span title="Exclamation">!</span>
17920 Bug 24072: more test on conversion rule for title
17922 language=zh variant=zh-tw showtitle
17924 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17925 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17928 <p>This should be stripped!
17929 This won't take interferes with the title rule.
17934 Partly disable title conversion if variant == main language code
17936 language=zh variant=zh title=[[ZH]] showtitle
17938 -{T|zh-cn:CN;zh-tw:TW}-
17946 Partly disable title conversion if variant == main language code, more
17948 language=zh variant=zh title=[[ZH]] showtitle
17958 Raw output of variant escape tags (R flag)
17960 language=zh variant=zh-tw
17962 Raw: -{R|zh:China;zh-tw:Taiwan}-
17964 <p>Raw: zh:China;zh-tw:Taiwan
17969 Nested using of manual convert syntax
17971 language=zh variant=zh-hk
17973 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17975 <p>Nested: Hello Hong Kong!
17980 Proper conversion of text in external links
17982 language=sr variant=sr-ec
17984 http://www.google.com
17985 gopher://www.google.com
17986 [http://www.google.com http://www.google.com]
17987 [gopher://www.google.com gopher://www.google.com]
17988 [https://www.google.com irc://www.google.com]
17989 [ftp://www.google.com www.google.com/ftp://dir]
17990 [//www.google.com www.google.com]
17992 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17993 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17994 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17995 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17996 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17997 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17998 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18003 Do not convert roman numbers to language variants
18005 language=sr variant=sr-ec
18009 <p>Фридрих IV је цар.
18014 Unclosed language converter markup "-{"
18025 Don't convert raw rule "-{R|=>}-" to "=>"
18036 Don't break link parsing if language converter markup is in the caption.
18038 language=sr variant=sr-ec
18040 [[Main Page|-{R|main page}-]]
18042 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18046 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18048 Don't break image parsing if language converter markup is in the caption.
18052 [[File:Foobar.jpg|-{R|caption}-]]
18054 <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>
18058 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18060 Don't break list handling if language converter markup is in the item.
18062 language=zh variant=zh-cn
18064 ;-{zh-cn:AAA;zh-tw:BBB}-
18066 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
18073 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18075 Don't break table handling if language converter markup is in the cell.
18077 language=sr variant=sr-ec
18100 Bug 529: Uncovered bullet
18109 # Plain MediaWiki does not remove empty lists, but tidy actually does.
18110 # Templates in Wikipedia rely on this behavior, as tidy has always been
18111 # enabled there. These tests are normally run *without* tidy, so specify the
18112 # full output here.
18113 # To test realistic parsing behavior, apply a tidy-like transformation to both
18114 # the expected output and your parser's output.
18116 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
18118 ******* Foo {{bullet}}
18120 <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>
18126 Bug 529: Uncovered table already at line-start
18149 Bug 529: Uncovered bullet in parser function result
18151 * Foo {{lc:{{bullet}} }}
18159 Bug 5678: Double-parsed template argument
18161 {{lc:{{{1}}}|hello}}
18168 Bug 5678: Double-parsed template invocation
18170 {{lc:{{paramtest {{!}} param = hello }} }}
18172 <p>{{paramtest | param = hello }}
18177 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
18180 title=[[Main Page]]
18182 {{PRVNÍVELKÉ:ěščř}}
18183 {{prvnívelké:ěščř}}
18203 Morwen/13: Unclosed link followed by heading
18210 <h2><a href="#heading" class="mw-headline-anchor" 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>
18215 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
18222 <h1><a href="#heading" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="heading">heading</span></h1>
18227 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
18234 <h2><a href="#heading" class="mw-headline-anchor" 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>
18249 Paragraphs inside divs (no extra line breaks)
18261 Paragraphs inside divs (extra line break on open)
18276 Paragraphs inside divs (extra line break on close)
18291 Paragraphs inside divs (extra line break on open and close)
18308 Nesting tags, paragraphs on lines which begin with <div>
18310 <div></div><strong>A
18313 <p><strong>A</strong></p>
18314 <p><strong>B</strong></p>
18322 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18324 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18326 <blockquote>Line one
18328 Line two</blockquote>
18330 <blockquote>Line one
18331 Line two</blockquote>
18335 <p>Line one Line two</p>
18340 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18345 Line two</blockquote>
18350 Line two</blockquote>
18355 Line two</blockquote>
18359 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18361 <blockquote>Line one
18366 <blockquote>Line one
18379 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18401 Paragraphs inside blockquotes/divs (no extra line breaks)
18403 <blockquote><div>Line one
18405 Line two</div></blockquote>
18407 <blockquote><div>Line one
18408 Line two</div></blockquote>
18413 Paragraphs inside blockquotes/divs (extra line break on open)
18418 Line two</div></blockquote>
18423 Line two</div></blockquote>
18428 Paragraphs inside blockquotes/divs (extra line break on close)
18430 <blockquote><div>Line one
18433 </div></blockquote>
18435 <blockquote><div>Line one
18438 </div></blockquote>
18443 Paragraphs inside blockquotes/divs (extra line break on open and close)
18449 </div></blockquote>
18455 </div></blockquote>
18460 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18462 wgLinkHolderBatchSize=0
18468 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18469 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18470 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18475 Free external link invading image caption
18477 [[Image:Foobar.jpg|thumb|http://x|hello]]
18479 <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>
18484 Bug 15196: localised external link numbers
18488 [http://en.wikipedia.org/]
18490 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18493 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18497 Multibyte character in padleft
18499 {{padleft:-Hello|7|Æ}}
18506 Multibyte character in padright
18508 {{padright:Hello-|7|Æ}}
18515 formatdate parser function
18517 {{#formatdate:2009-03-24}}
18519 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18524 formatdate parser function, with default format
18526 {{#formatdate:2009-03-24|mdy}}
18528 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18533 Spacing of numbers in formatted dates
18535 {{#formatdate:January 15}}
18537 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18542 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
18544 language=nl title=[[MediaWiki:Common.css]]
18546 {{#formatdate:2009-03-24|dmy}}
18548 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18561 Edit comment with link
18565 I like the [[Main Page]] a lot
18567 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18571 Edit comment with link and link text
18575 I like the [[Main Page|best pages]] a lot
18577 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18581 Edit comment with link and link text with suffix
18585 I like the [[Main Page|best page]]s a lot
18587 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18591 Edit comment with section link (non-local, eg in history list)
18593 comment title=[[Main Page]]
18595 /* External links */ removed bogus entries
18597 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18601 Edit comment with section link and text before it (non-local, eg in history list)
18603 comment title=[[Main Page]]
18605 pre-comment text /* External links */ removed bogus entries
18607 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>
18611 Edit comment with section link (local, eg in diff view)
18613 comment local title=[[Main Page]]
18615 /* External links */ removed bogus entries
18617 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18621 Edit comment with subpage link (bug 14080)
18625 title=[[Subpage test]]
18627 Poked at a [[/subpage]] here...
18629 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18633 Edit comment with subpage link and link text (bug 14080)
18637 title=[[Subpage test]]
18639 Poked at a [[/subpage|neat little page]] here...
18641 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18645 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18648 title=[[Subpage test]]
18650 Poked at a [[/subpage]] here...
18652 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18656 Edit comment with bare anchor link (local, as on diff)
18660 title=[[Main Page]]
18664 <a href="#section">#section</a>
18668 Edit comment with bare anchor link (non-local, as on history)
18671 title=[[Main Page]]
18675 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
18679 Anchor starting with underscore
18683 <p><a href="#_ref">One</a>
18688 Id starting with underscore
18690 <div id="_ref"></div>
18692 <div id="_ref"></div>
18697 Space normalisation on autocomment (bug 22784)
18700 title=[[Main Page]]
18702 /* __hello__world__ */
18704 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
18708 percent-encoding and + signs in comments (Bug 26410)
18712 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
18714 <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>
18717 # Parsoid doesn't support this yet: see bug 73581
18718 # but it *should* omit the 'src' attribute if the image is bad.
18719 # PHP side of tests was disabled in
18720 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
18721 # because of issues in the PHP parserTests infrastructure
18722 # (but the output below is indeed what the PHP side emits)
18724 Bad images - basic functionality
18727 !! DISABLED/html/php
18729 <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>
18733 Bad images - bug 16039: text after bad image disappears
18738 !! DISABLED/html/php
18744 <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>
18749 Verify that displaytitle works (bug #22501) no displaytitle
18753 wgAllowDisplayTitle=true
18754 wgRestrictDisplayTitle=false
18756 this is not the the title
18759 <p>this is not the the title
18764 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
18769 wgAllowDisplayTitle=true
18770 wgRestrictDisplayTitle=false
18772 this is not the the title
18773 {{DISPLAYTITLE:whatever}}
18776 <p>this is not the the title
18781 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18786 wgAllowDisplayTitle=true
18787 wgRestrictDisplayTitle=true
18789 this is not the the title
18790 {{DISPLAYTITLE:whatever}}
18793 <p>this is not the the title
18798 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18803 wgAllowDisplayTitle=true
18804 wgRestrictDisplayTitle=true
18806 this is not the the title
18807 {{DISPLAYTITLE:screen}}
18810 <p>this is not the the title
18815 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18820 wgAllowDisplayTitle=false
18822 this is not the the title
18823 {{DISPLAYTITLE:screen}}
18826 <p>this is not the the title
18827 <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>
18832 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18837 wgAllowDisplayTitle=false
18839 this is not the the title
18842 <p>this is not the the title
18847 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18852 wgAllowDisplayTitle=true
18853 wgRestrictDisplayTitle=true
18855 this is not the the title
18856 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18858 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18859 <p>this is not the the title
18864 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18869 wgAllowDisplayTitle=true
18870 wgRestrictDisplayTitle=true
18872 this is not the the title
18873 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18875 <span style="color: red;">s</span>creen
18876 <p>this is not the the title
18881 preload: check <noinclude> and <includeonly>
18885 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18891 preload: check <onlyinclude>
18895 Goodbye <onlyinclude>Hello world</onlyinclude>
18901 preload: can pass tags through if we want to
18905 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18907 <includeonly>Hello world</includeonly>
18911 preload: check that it doesn't try to do tricks
18915 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18917 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18921 Play a bit with r67090 and bug 3158
18923 <div style="width:50% !important"> </div>
18924 <div style="width:50% !important"> </div>
18925 <div style="width:50% !important"> </div>
18926 <div style="border : solid;"> </div>
18928 <div style="width:50% !important"> </div>
18929 <div style="width:50% !important"> </div>
18930 <div style="width:50% !important"> </div>
18931 <div style="border : solid;"> </div>
18934 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18935 <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>
18936 <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>
18937 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
18942 HTML5 data attributes
18944 <span data-foo="bar">Baz</span>
18945 <p data-abc-def_hij="">Quuz</p>
18947 <p><span data-foo="bar">Baz</span>
18949 <p data-abc-def_hij="">Quuz</p>
18954 percent-encoding and + signs in internal links (Bug 26410)
18956 [[User:+%]] [[Page+title%]]
18957 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18958 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
18959 [[%33%45]] [[%33%45+]]
18961 <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>
18962 <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>
18963 <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>
18964 <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>
18967 <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>
18971 Special characters in embedded file links (bug 27679)
18973 [[File:Contains & ampersand.jpg]]
18974 [[File:Does not exist.jpg|Title with & ampersand]]
18976 <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>
18977 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18980 <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>
18981 <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>
18985 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18987 Text's been normalized?
18989 <p>Text's been normalized?
18994 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18996 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18998 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
19003 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
19005 [http://www.example.org/ ideograms]
19007 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
19012 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
19014 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
19016 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
19040 Bug 31098 Template which includes system messages which includes the template
19044 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19045 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19050 Bug31490 Turkish: ucfirst 'blah'
19061 Bug31490 Turkish: ucfirst 'ix'
19072 Bug31490 Turkish: lcfirst 'BLAH'
19083 Bug31490 Turkish: ucfırst (with a dotless i)
19089 <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>
19094 Bug31490 ucfırst (with a dotless i) with English language
19100 <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>
19105 Bug 26375: TOC with italics
19107 title=[[Main Page]]
19110 == ''Lost'' episodes ==
19112 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19114 <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>
19118 <h2><a href="#Lost_episodes" class="mw-headline-anchor" 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>
19123 Bug 26375: TOC with bold
19125 title=[[Main Page]]
19128 == '''should be bold''' then normal text ==
19130 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19132 <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>
19136 <h2><a href="#should_be_bold_then_normal_text" class="mw-headline-anchor" 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>
19141 Bug 33845: Headings become cursive in TOC when they contain an image
19143 title=[[Main Page]]
19146 == Image [[Image:foobar.jpg]] ==
19148 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19150 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
19154 <h2><a href="#Image" class="mw-headline-anchor" 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>
19159 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
19161 title=[[Main Page]]
19164 == <blockquote>Quote</blockquote> ==
19166 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19168 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19172 <h2><a href="#Quote" class="mw-headline-anchor" 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>
19175 <div id="toc" class="toc">
19176 <div id="toctitle">
19180 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19183 <h2><a href="#Quote" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Quote"></span></h2>
19185 <p><span class="mw-headline" id="Quote">Quote</span></p>
19187 <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>
19191 Unclosed tags in TOC
19193 title=[[Main Page]]
19197 <small>Hanc marginis exiguitas non caperet.</small>
19200 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19202 <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>
19206 <h2><a href="#Proof:_2_.3C_3" class="mw-headline-anchor" 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>
19207 <p><small>Hanc marginis exiguitas non caperet.</small>
19213 Multiple tags in TOC
19216 == <i>Foo</i> <b>Bar</b> ==
19218 == <i>Foo</i> <blockquote>Bar</blockquote> ==
19220 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19222 <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>
19223 <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>
19227 <h2><a href="#Foo_Bar" class="mw-headline-anchor" 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>
19228 <h2><a href="#Foo_Bar_2" class="mw-headline-anchor" 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>
19231 <div id="toc" class="toc">
19232 <div id="toctitle">
19236 <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>
19237 <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>
19240 <h2><a href="#Foo_Bar" class="mw-headline-anchor" 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>
19241 <h2><a href="#Foo_Bar_2" class="mw-headline-anchor" title="Link to this section">§</a><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
19243 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
19245 <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>
19249 Tags with parameters in TOC
19252 == <sup class="in-h2">Hello</sup> ==
19254 == <sup class="a > b">Evilbye</sup> ==
19256 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19258 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19259 <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>
19263 <h2><a href="#Hello" class="mw-headline-anchor" 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>
19264 <h2><a href="#b.22.3EEvilbye" class="mw-headline-anchor" 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>
19269 span tags with directionality in TOC
19272 == <span dir="ltr">C++</span> ==
19274 == <span dir="rtl">זבנג!</span> ==
19276 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19278 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19280 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19282 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19284 <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>
19285 <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>
19286 <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>
19287 <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>
19288 <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>
19292 <h2><a href="#C.2B.2B" class="mw-headline-anchor" 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>
19293 <h2><a href="#.D7.96.D7.91.D7.A0.D7.92.21" class="mw-headline-anchor" 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>
19294 <h2><a href="#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC" class="mw-headline-anchor" 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>
19295 <h2><a href="#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC" class="mw-headline-anchor" 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>
19296 <h2><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC" class="mw-headline-anchor" 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>
19301 Bug 72884: bdi element in ToC
19304 == <bdi>test</bdi> ==
19306 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19308 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19312 <h2><a href="#test" class="mw-headline-anchor" 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>
19319 == {{int:headline_sample}} ==
19323 Bug 32057: Title needed when expanding <h> nodes.
19325 title=[[Main Page]]
19329 <h2><a href="#Headline_text" class="mw-headline-anchor" 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>
19334 Strip marker in urlencode
19336 {{urlencode:x<nowiki/>y}}
19337 {{urlencode:x<nowiki/>y|wiki}}
19338 {{urlencode:x<nowiki/>y|path}}
19365 Strip marker in formatNum
19367 {{formatnum:1<nowiki/>2}}
19368 {{formatnum:1<nowiki/>2|R}}
19376 Check noCommafy in formatNum
19380 {{formatnum:123456.78}}
19381 {{formatnum:123456.78|NOSEP}}
19389 Wrong option for formatNum (bug 56199)
19391 {{formatnum:1,234.56|Random}}
19392 {{formatnum:1,234.56|EVERYTHING}}
19393 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19402 Strip marker in grammar
19406 {{grammar:elative|foo<nowiki/>bar}}
19413 Strip marker in padleft
19415 {{padleft:|2|x<nowiki/>y}}
19422 Strip marker in padright
19424 {{padright:|2|x<nowiki/>y}}
19431 Strip marker in anchorencode
19433 {{anchorencode:x<nowiki/>y}}
19440 nowiki inside link inside heading (bug 18295)
19442 ==[[foo|x<nowiki>y</nowiki>z]]==
19444 <h2><a href="#xyz" class="mw-headline-anchor" 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>
19449 new support for bdi element (bug 31817)
19451 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19453 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19458 Ignore pipe between table row attributes
19462 |- id=foo | style='color: red'
19470 <tr id="foo" style="color: red">
19477 Gallery override link with WikiLink (bug 34852)
19480 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19483 <ul class="gallery mw-gallery-traditional">
19484 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19485 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19486 <div class="gallerytext">
19496 Gallery override link with absolute external link (bug 34852)
19499 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19502 <ul class="gallery mw-gallery-traditional">
19503 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19504 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19505 <div class="gallerytext">
19515 Gallery override link with malicious javascript (bug 34852)
19518 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19521 <ul class="gallery mw-gallery-traditional">
19522 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19523 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19524 <div class="gallerytext">
19534 Gallery with invalid title as link (bug 43964)
19537 File:foobar.jpg|link=<
19540 <ul class="gallery mw-gallery-traditional">
19541 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19542 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
19543 <div class="gallerytext">
19551 Language parser function
19560 Padleft and padright as substr
19562 {{padleft:|3|abcde}}
19563 {{padright:|3|abcde}}
19571 Special parser function
19573 {{#special:RandomPage}}
19574 {{#special:BaDtItLe}}
19575 {{#special:Foobar}}
19584 Bug 34939 - Case insensitive link parsing ([HttP://])
19586 [HttP://MediaWiki.Org/]
19588 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
19591 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
19595 Bug 34939 - Case insensitive link parsing ([HttP:// title])
19597 [HttP://MediaWiki.Org/ MediaWiki]
19599 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
19604 Bug 34939 - Case insensitive link parsing (HttP://)
19606 HttP://MediaWiki.Org/
19608 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
19611 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
19629 <h2><a href="#Section_1" class="mw-headline-anchor" 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>
19630 <h2><a href="#Section_2" class="mw-headline-anchor" 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>
19631 <h2><a href="#Section_3" class="mw-headline-anchor" 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>
19632 <h2><a href="#Section_4" class="mw-headline-anchor" 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>
19633 <h2><a href="#Section_5" class="mw-headline-anchor" 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>
19639 ### Parsoid-specific tests
19640 ### Parsoid-PHP parser incompatibilities
19643 1. SOL-sensitive wikitext tokens as template-args
19645 parsoid=wt2html,wt2wt
19651 <span about="#mwt1" typeof="mw:Transclusion">
19652 </span><ul about="#mwt1"><li>a</li>
19654 <span about="#mwt2" typeof="mw:Transclusion">
19655 </span><ol about="#mwt2"><li>a</li>
19657 <span about="#mwt3" typeof="mw:Transclusion">
19658 </span><dl about="#mwt3"><dd>a</dd>
19662 #### -----------------------------------------------------------------
19663 #### Parsoid-specific functionality tests
19664 #### -----------------------------------------------------------------
19666 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
19667 # We know wt2wt will fail, but we expect selser to pass.
19668 # Due to the nature of our testing, wt2wt and selser tests will enter the
19669 # blacklist and we'll catch selser regressions based on changes to the
19670 # blacklist entries for selser tests.
19672 1. Bad treebuilder fixup of formatting elt is cleaned up
19674 parsoid=wt2html,wt2wt
19679 [[Image:Foobar.jpg|right|Test]]
19686 <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>
19693 2. Bad treebuilder fixup of formatting elt is cleaned up
19695 parsoid=wt2html,wt2wt
19697 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
19699 <small>[[Image:Foobar.jpg|right|300px]]</small>
19702 <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>
19704 <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>
19707 #### ----------------------------------------------------------------
19708 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
19709 #### tags. Parsoid's output for these tags differs from that of the
19711 #### ----------------------------------------------------------------
19714 Ref: 1. ref-location should be replaced with an index span
19719 B <ref name="x">foo</ref>
19723 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
19724 B <span about="#mwt4" class="reference" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2">[2]</a></span>
19725 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>
19726 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19727 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
19728 <li id="cite_note-x-2"><span rel="mw:referencedBy"><a href="#cite_ref-x_2-0">↑</a></span> foo</li>
19729 <li id="cite_note-y-3"><span rel="mw:referencedBy"><a href="#cite_ref-y_3-0">↑</a></span></li>
19734 Ref: 2. ref-tags with identical names should all get the same index
19738 A <ref name="x">foo</ref>
19742 <p>A <span about="#mwt2" class="reference" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19743 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>
19744 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19745 <li id="cite_note-x-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-x_1-0">1.0</a> <a href="#cite_ref-x_1-1">1.1</a></span> foo</li>
19750 Ref: 3. spaces in ref-names should be ignored
19754 A <ref name="x">foo</ref>
19755 B <ref name=" x " />
19759 <p>A <span about="#mwt2" class="reference" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1">[1]</a></span>
19760 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>
19761 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>
19762 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19763 <li id="cite_note-x-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-x_1-0">1.0</a> <a href="#cite_ref-x_1-1">1.1</a> <a href="#cite_ref-x_1-2">1.2</a></span> foo</li>
19767 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
19769 Ref: 4. 'constructor' should be accepted as a valid ref-name
19773 A <ref name="constructor">foo</ref>
19776 <p>A <span about="#mwt2" class="reference" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1">[1]</a></span></p>
19777 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19778 <li id="cite_note-constructor-1"><span rel="mw:referencedBy"><a href="#cite_ref-constructor_1-0">↑</a></span> foo</li>
19783 Ref: 5. body should accept generic wikitext
19788 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
19793 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"This is a <b data-parsoid='{\"dsr\":[19,40,3,3]}'><a rel=\"mw:WikiLink\" href=\"./Bolded_link\" title=\"Bolded link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bolded_link\"},\"sa\":{\"href\":\"bolded link\"},\"dsr\":[22,37,2,2]}'>bolded link</a></b> and this is a <span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,76,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"transclusion\"}},\"i\":0}}]}'>transclusion</span>\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19795 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19796 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> This is a <b><a rel="mw:WikiLink" href="./Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
19802 Ref: 6. indent-pres should not be output in ref-body
19814 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo\n bar\n baz\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19816 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19817 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19825 Ref: 7. No p-wrapping in ref-body
19844 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo\n\nbar\n\n\nbaz\n\n\n\nbooz\n"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19846 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19847 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo
19862 Ref: 8. transclusion wikitext has lower precedence
19866 A <ref> foo {{echo|</ref> B C}}
19870 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo <span typeof=\"mw:Nowiki\" data-parsoid='{\"src\":\"{{\",\"dsr\":[12,14,0,0]}'>{{</span>echo|"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
19871 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19872 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <span typeof="mw:Nowiki">{{</span>echo|</li>
19877 Ref: 9. unclosed comments should not leak out of ref-body
19881 A <ref> foo <!--</ref> B C
19884 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo <!---->"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19885 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19886 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <!----></li>
19891 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19895 A <ref> <b> foo </ref> B C
19899 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"<b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[8,16,3,0]}'> foo </b>"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B C</p>
19902 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
19903 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></li>
19908 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19916 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B
19917 C <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> D</p>
19918 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19919 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
19920 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
19925 Ref: 12. ref-tags act as trailing newline migration barrier
19929 <!--the newline at the end of this line moves out of the p-tag-->a
19931 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19937 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19940 <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>
19941 <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>
19944 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19945 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span></li>
19946 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span></li>
19951 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19960 <p><span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> A
19961 <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar\n"},"attrs":{}}'><a href="#cite_note-2">[2]</a></span> B</p>
19962 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19963 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
19964 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
19969 Ref: 14. A nested ref-tag should be emitted as plain text
19973 <ref>foo <ref>bar</ref> baz</ref>
19977 <p><span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo &lt;ref>bar&lt;/ref> baz"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
19979 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
19980 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <ref>bar</ref> baz</li>
19985 Ref: 15. ref-tags with identical names should get identical indexes
19989 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19990 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19994 <p>A1 <span about="#mwt3" class="reference" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span> A2 <span about="#mwt4" class="reference" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1">[1]</a></span>
19995 B1 <span about="#mwt7" class="reference" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span> B2 <span about="#mwt8" class="reference" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
19997 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-a_1-0">1.0</a> <a href="#cite_ref-a_1-1">1.1</a></span> foo</li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy">↑ <a href="#cite_ref-b_2-0">2.0</a> <a href="#cite_ref-b_2-1">2.1</a></span> bar</li>
20001 ## We don't bother wt2wt-ing non-standard whitespace
20003 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
20011 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20013 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20014 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
20018 Ref: 17. Generate valid HTML5 id/about attributes
20022 <ref name="a b">foo</ref>
20026 <p><span class="reference" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1">[1]</a></span>
20029 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20030 <li id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b_1-0">↑</a></span> foo</li>
20034 Ref: 18. T58916: Extension attributes should be parsed as plain text
20038 <ref name="{{echo|a}}">foo</ref>
20042 <p><span class="reference" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1">[1]</a></span>
20045 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20046 <li id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><span rel="mw:referencedBy"><a href="#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0">↑</a></span> foo</li>
20050 Ref: 19. ref-tags with identical name encodings should get identical indexes
20054 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
20058 <p>1 <span about="#mwt3" class="reference" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a & b"}}'><a href="#cite_note-a_.26_b-1">[1]</a></span> 2 <span about="#mwt4" class="reference" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="#cite_note-a_.26_b-1">[1]</a></span>
20060 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-a_.26_b_1-0">1.0</a> <a href="#cite_ref-a_.26_b_1-1">1.1</a></span> foo</li>
20065 References: 1. references tag without any refs should be handled properly
20071 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
20075 References: 2. references tag with group only outputs references from that group
20079 A <ref group="a">foo</ref>
20080 B <ref group="b">bar</ref>
20083 <references group="a" />
20085 <references group="b" />
20087 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
20088 B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"b"}}'><a href="#cite_note-2">[b 1]</a></span>
20089 C <span class="reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"baz"},"attrs":{}}'><a href="#cite_note-3">[1]</a></span></p>
20091 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
20093 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> baz</li>
20095 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"b"}}'>
20096 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
20101 References: 3. ref list should be cleared after processing references
20113 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20115 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
20118 <p>B <span about="#mwt6" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20120 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
20125 References: 4. only referenced group should be cleared after processing references
20129 A <ref group="a">afoo</ref>
20132 <references group="a" />
20138 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"afoo"},"attrs":{"group":"a"}}'><a href="#cite_note-1">[a 1]</a></span>
20139 B <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bfoo"},"attrs":{}}'><a href="#cite_note-2">[1]</a></span></p>
20141 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> afoo</li>
20144 <p>C <span about="#mwt8" class="reference" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"cfoo"},"attrs":{}}'><a href="#cite_note-3">[2]</a></span></p>
20146 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bfoo</li><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> cfoo</li>
20151 References: 5. ref tags in references should be processed while ignoring all other content
20156 B <ref name="b">bar</ref>
20159 <ref name="a">foo</ref>
20160 This should just get lost.
20163 <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>
20164 B <span about="#mwt4" class="reference" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2">[2]</a></span></p>
20167 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"a\">foo</ref>\nThis should just get lost.","html":"\n<span about=\"#mwt8\" class=\"reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref name=\\\"a\\\">foo&lt;/ref>\",\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"#cite_note-a-1\">[1]</a></span>\n"},"attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_1-0">↑</a></span> foo</li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0">↑</a></span> bar</li>
20172 References: 6. <references /> from a transclusion
20176 <ref>Foo</ref> {{echo|<references />}}
20178 <p><span about="#mwt3" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p> <ol class="references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> Foo</li></ol>
20182 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
20186 A <ref>foo bar for a</ref>
20187 B <ref group="X" name="b" />
20191 <references group="X">
20192 <ref name="b">foo</ref>
20195 <p>A <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo bar for a"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
20196 B <span about="#mwt4" class="reference" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="#cite_note-b-2">[X 1]</a></span></p>
20198 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo bar for a</li></ol>
20200 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","html":"\n<span about=\"#mwt10\" class=\"reference\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"src\":\"&lt;ref name=\\\"b\\\">foo&lt;/ref>\",\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\">[X 1]</a></span>\n"},"attrs":{"group":"X"}}'><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0">↑</a></span> foo</li></ol>
20204 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
20208 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
20211 <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>
20212 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</li></ol>
20215 # This test only works in wt2html now as the <references /> are always generated
20216 # unless selser is active. Once T72722 is fixed, we should add a changes test
20217 # here to ensure that unrelated changes don't add the new <references /> in
20220 References: 9. Generate missing references list at the end
20225 B <ref group="inexistent">bar</ref>
20227 <p>A <span class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span> B <span class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"inexistent"}}'><a href="#cite_note-2">[inexistent 1]</a></span></</p>
20228 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20229 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li>
20231 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
20232 <li id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> bar</li>
20237 Entities in ref name
20241 <ref name="test & me">hi</ref>
20244 <p><span about="#mwt2" class="reference" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"hi"},"attrs":{"name":"test &amp; me"}}'><a href="#cite_note-test_.26_me-1">[1]</a></span></p>
20245 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
20246 <li id="cite_note-test_.26_me-1"><span rel="mw:referencedBy"><a href="#cite_ref-test_.26_me_1-0">↑</a></span> hi</li>
20250 # This test is wt2html only because we're permitting the serializer to produce
20251 # dirty diffs, normalizing the unclosed references to the self-closed version.
20253 Generate references for unclosed references tag
20261 <p>a<span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
20264 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20265 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> foo</li></ol>
20269 New reference serializes on its own line
20271 parsoid=wt2wt,html2wt
20276 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20279 #--------- Test stripping of empty nodes in template content ----------
20281 Empty LI and TR nodes should be stripped from template content
20286 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
20290 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
20303 Empty LI and TR nodes should not be stripped from top-level content
20330 Empty TR nodes should not be stripped if they have any attributes set
20332 {{EmptyTRWithHTMLAttrTest}}
20334 <table typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
20335 <tr align="center"></tr>
20336 <tr><td>foo</td></tr>
20337 <tr align="center"></tr>
20338 <tr><td>bar</td></tr>
20342 #### ----------------------------------------------------------------
20343 #### The following section of tests are primarily to test
20344 #### wikitext escaping capabilities of Parsoid. Given that
20345 #### escaping can be done any number of ways, the wikitext (input)
20346 #### is always adjusted to reflect how Parsoid adds nowiki
20349 #### We are marking several tests as parsoid-only since the
20350 #### HTML in the result section is different from what the
20351 #### PHP parser generates for it.
20352 #### ----------------------------------------------------------------
20355 #### --------------- Headings ---------------
20357 #### 1. Nested inside html <h1>=foo=</h1>
20358 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
20359 #### 3. Nested inside html with wikitext split by html tags
20360 #### 4. No escape needed
20361 #### 5. Empty headings <h1></h1>
20362 #### 6. Heading chars in SOL context
20363 #### ----------------------------------------
20365 Headings: 0. Unnested
20369 <nowiki>=foo=</nowiki>
20371 <nowiki> =foo= </nowiki>
20373 <nowiki>=foo=</nowiki>
20375 =foo''a''<nowiki>=</nowiki>
20377 <p><span typeof="mw:Nowiki">=foo=</span></p>
20379 <p><span typeof="mw:Nowiki"> =foo= </span>
20381 <span typeof="mw:Nowiki">=foo=</span></p>
20383 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20386 # New headings and existing headings are handled differently
20388 Headings: 1. Nested inside html
20396 <h1 data-parsoid=''>=foo=</h1>
20397 <h2 data-parsoid=''>=foo=</h2>
20398 <h3 data-parsoid=''>=foo=</h3>
20399 <h4 data-parsoid=''>=foo=</h4>
20400 <h5 data-parsoid=''>=foo=</h5>
20401 <h6 data-parsoid=''>=foo=</h6>
20409 =<nowiki>=foo=</nowiki>=
20410 ==<nowiki>=foo=</nowiki>==
20411 ===<nowiki>=foo=</nowiki>===
20412 ====<nowiki>=foo=</nowiki>====
20413 =====<nowiki>=foo=</nowiki>=====
20414 ======<nowiki>=foo=</nowiki>======
20419 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20428 <nowiki>*</nowiki>bar
20434 <nowiki>=bar=</nowiki>
20438 Headings: 3. Nested inside html with wikitext split by html tags
20440 parsoid=html2wt,wt2wt
20442 = ='''bold'''<nowiki>foo=</nowiki> =
20444 <h1>=<b>bold</b>foo=</h1>
20448 Headings: 4a. No escaping needed (testing just h1 and h2)
20473 <h1><i>=</i>foo=</h1>
20477 Headings: 4b. No escaping needed (inside p-tags)
20492 Headings: 5. Empty headings
20504 =====<nowiki/>=====
20506 ======<nowiki/>======
20517 Headings: 6a. Heading chars in SOL context (with trailing spaces)
20521 <nowiki>=a=</nowiki>
20523 <nowiki>=a=</nowiki>
20525 <nowiki>=a=</nowiki>
20527 <nowiki>=a=</nowiki>
20536 Headings: 6b. Heading chars in SOL context (with trailing newlines)
20564 Headings: 6c. Heading chars in SOL context (leading newline break)
20569 <nowiki>=b=</nowiki>
20576 Headings: 6d. Heading chars in SOL context (with interspersed comments)
20580 <!--c0--><nowiki>=a=</nowiki>
20582 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
20584 <p><!--c0-->=a=</p>
20585 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
20589 Headings: 6d. Heading chars in SOL context (No escaping needed)
20599 Headings: 7. Insert a newline between new content and headings
20605 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
20606 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
20616 #### --------------- Lists ---------------
20617 #### 0. Outside nests (*foo, etc.)
20618 #### 1. Nested inside html <ul><li>*foo</li></ul>
20619 #### 2. Inside definition lists
20620 #### 3. Only bullets at start should be escaped
20621 #### 4. No escapes needed
20622 #### 5. No unnecessary escapes
20623 #### 6. Escape bullets in SOL position
20624 #### 7. Escape bullets in a multi-line context
20625 #### ----------------------------------------
20628 Lists: 0. Outside nests
20630 <nowiki>*</nowiki>foo
20632 <nowiki>#</nowiki>foo
20634 <nowiki>;Foo:</nowiki>bar
20643 Lists: 1. Nested inside html
20645 *<nowiki>*foo</nowiki>
20647 *<nowiki>#foo</nowiki>
20649 *<nowiki>:foo</nowiki>
20651 *<nowiki>;foo</nowiki>
20653 #<nowiki>*foo</nowiki>
20655 #<nowiki>#foo</nowiki>
20657 #<nowiki>:foo</nowiki>
20659 #<nowiki>;foo</nowiki>
20661 <ul><li>*foo</li></ul>
20662 <ul><li>#foo</li></ul>
20663 <ul><li>:foo</li></ul>
20664 <ul><li>;foo</li></ul>
20665 <ol><li>*foo</li></ol>
20666 <ol><li>#foo</li></ol>
20667 <ol><li>:foo</li></ol>
20668 <ol><li>;foo</li></ol>
20673 Lists: 2. Inside definition lists
20675 ;<nowiki>;foo</nowiki>
20677 ;<nowiki>:foo</nowiki>
20679 ;<nowiki>:foo</nowiki>
20682 :<nowiki>:foo</nowiki>
20684 <dl><dt>;foo</dt></dl>
20685 <dl><dt>:foo</dt></dl>
20688 <dl><dd>:foo</dd></dl>
20693 Lists: 3. Only bullets at start of text should be escaped
20695 *<nowiki>*foo*bar</nowiki>
20697 *<nowiki>*foo</nowiki>''it''*bar
20699 <ul><li>*foo*bar</li></ul>
20700 <ul><li>*foo<i>it</i>*bar</li></ul>
20705 Lists: 4. No escapes needed
20726 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
20730 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
20736 Lists: 5. No unnecessary escapes
20738 * bar <span><nowiki>[[foo]]</nowiki></span>
20740 * =bar <span><nowiki>[[foo]]</nowiki></span>
20742 * [[bar <span><nowiki>[[foo]]</nowiki></span>
20744 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
20746 * =bar <span>foo]]</span>=
20752 <ul><li> bar <span>[[foo]]</span></li></ul>
20753 <ul><li> =bar <span>[[foo]]</span></li></ul>
20754 <ul><li> [[bar <span>[[foo]]</span></li></ul>
20755 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
20756 <ul><li> =bar <span>foo]]</span>=</li></ul>
20757 <ul><li> <s></s>: a</li></ul>
20758 <ul><li> <i>* foo</i></li></ul>
20763 Lists: 6. Escape bullets in SOL position
20767 <p><!--cmt-->*foo</p>
20769 <!--cmt--><nowiki>*</nowiki>foo
20773 Lists: 7. Escape bullets in a multi-line context
20776 <nowiki>*</nowiki>b
20784 Lists: 8. Escape colons only if not present in tags
20788 <dl><dt>a:b<i>c:d</i></dt></dl>
20790 ; <nowiki>a:b</nowiki>''c:d''
20793 #### --------------- HRs ---------------
20794 #### 1. Single line
20795 #### -----------------------------------
20798 HRs: 1. Single line
20800 ----<nowiki>----</nowiki>
20812 #### --------------- Tables ---------------
20813 #### 1a. Simple example
20814 #### 1b. No escaping needed (!foo)
20815 #### 1c. No escaping needed (|foo)
20816 #### 1d. No escaping needed (|}foo)
20818 #### 2a. Nested in td (<td>foo|bar</td>)
20819 #### 2b. Nested in td (<td>foo||bar</td>)
20820 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
20822 #### 3a. Nested in th (<th>foo!bar</th>)
20823 #### 3b. Nested in th (<th>foo!!bar</th>)
20824 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
20828 #### 4c. No escaping needed
20829 #### --------------------------------------
20832 Tables: 1a. Simple example
20843 Tables: 1b. No escaping needed
20852 Tables: 1c. No escaping needed
20861 Tables: 1d. No escaping needed
20870 Tables: 2a. Nested in td
20875 <td>foo|bar</td></tr>
20876 <tr><td>x<div>a|b</div></td>
20880 |<nowiki>foo|bar</nowiki>
20882 |x<div><nowiki>a|b</nowiki></div>
20898 Tables: 2b. Nested in td
20904 <td>a<i>b||c</i></td>
20905 <td>a<i><div>b||c</div></i></td>
20906 </tr></tbody></table>
20909 |<nowiki>foo||bar</nowiki>
20910 |a''<nowiki>b||c</nowiki>''
20911 |a''<div><nowiki>b||c</nowiki></div>''
20920 <td>a<i><div>b||c</div></i>
20926 Tables: 2c. Nested in td -- no escaping needed
20942 Tables: 3a. Nested in th
20958 Tables: 3b. Nested in th
20963 <tr><th>foo!!bar</th>
20964 <th><i>foo|bar</i></th>
20965 <th><i>foo!!bar</i></th>
20966 <th><i><span>foo!!bar</span></i></th>
20967 </tr></tbody></table>
20970 !<nowiki>foo!!bar</nowiki>
20971 !''<nowiki>foo|bar</nowiki>''
20972 !''<nowiki>foo!!bar</nowiki>''
20973 !''<span><nowiki>foo!!bar</nowiki></span>''
20982 <th><i>foo!!bar</i>
20984 <th><i><span>foo!!bar</span></i>
20990 Tables: 3c. Nested in th
20995 <tr><th>foo||bar</th>
20996 <th><span typeof="mw:Nowiki">foo||bar</span></th>
20997 </tr></tbody></table>
21000 !<nowiki>foo||bar</nowiki>
21001 !<nowiki>foo||bar</nowiki>
21014 Tables: 4a. Escape -
21033 |<nowiki>-bar</nowiki>
21038 Tables: 4b. Escape +
21057 |<nowiki>+bar</nowiki>
21062 Tables: 4c. No escaping needed
21105 <tr><td>foo-bar</td><td>foo+bar</td></tr>
21106 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
21112 <div>a|b</div></td>
21117 Tables: 4d. No escaping needed
21127 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
21136 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
21137 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
21138 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
21143 Tables: Digest broken attributes on table and tr tag
21159 #### --------------- Links ----------------
21160 #### 1. Quote marks in link text
21161 #### 2. Wikilinks: Escapes needed
21162 #### 3. Wikilinks: No escapes needed
21163 #### 4. Extlinks: Escapes needed
21164 #### 5. Extlinks: No escapes needed
21165 #### --------------------------------------
21167 Links 1. WikiLinks: No escapes needed
21171 [[Foo|x [Foobar] x]]
21173 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
21174 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
21175 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
21178 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
21179 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
21180 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
21184 Links 2. WikiLinks: Escapes needed
21188 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
21189 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
21190 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
21191 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
21192 <a href="Foo" rel="mw:WikiLink">|Bar</a>
21193 <a href="Foo" rel="mw:WikiLink">]]bar</a>
21194 <a href="Foo" rel="mw:WikiLink">[[bar</a>
21195 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
21196 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
21197 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
21199 [[Foo|<nowiki>Foobar]</nowiki>]]
21200 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
21201 [[Foo|<nowiki>[[Bar]]</nowiki>]]
21202 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
21203 [[Foo|<nowiki>|Bar</nowiki>]]
21204 [[Foo|<nowiki>]]bar</nowiki>]]
21205 [[Foo|<nowiki>[[bar</nowiki>]]
21206 [[Foo|<nowiki>x [[ y</nowiki>]]
21207 [[Foo|<nowiki>x ]] y</nowiki>]]
21208 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
21210 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
21211 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
21212 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
21213 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
21214 <a href="/wiki/Foo" title="Foo">|Bar</a>
21215 <a href="/wiki/Foo" title="Foo">]]bar</a>
21216 <a href="/wiki/Foo" title="Foo">[[bar</a>
21217 <a href="/wiki/Foo" title="Foo">x [[ y</a>
21218 <a href="/wiki/Foo" title="Foo">x ]] y</a>
21219 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
21224 Links 3. WikiLinks: No escapes needed
21229 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
21230 <a href="/wiki/Foo" title="Foo">foo|bar</a>
21233 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
21234 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
21238 Links 4. ExtLinks: Escapes needed
21242 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
21243 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
21244 <p>[http://google.com]</p>
21245 <p>[http://google.com google]</p>
21247 [http://google.com <nowiki>[google]</nowiki>]
21248 [http://google.com <nowiki>google]</nowiki>]
21250 <nowiki>[http://google.com]</nowiki>
21252 <nowiki>[http://google.com google]</nowiki>
21255 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
21256 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
21257 </p><p>[http://google.com]
21258 </p><p>[http://google.com google]
21263 Links 5. ExtLinks: No escapes needed
21265 [http://google.com [google]
21267 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
21270 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
21274 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
21276 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
21277 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
21278 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
21279 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
21280 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
21281 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
21282 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21283 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
21284 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21285 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
21286 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
21287 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
21288 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
21291 x<nowiki/>http://example.com<nowiki/>y
21292 http://example.com<nowiki/>?x
21293 http://example.com<nowiki/>&x
21294 http://example.com<nowiki/>'x
21295 http://example.com<nowiki/>,x
21296 http://example.com<nowiki/>.x
21297 http://example.com<nowiki/>;x
21298 http://example.com<nowiki/>:x
21299 http://example.com<nowiki/>;x
21300 http://example.com<nowiki/>!x
21301 http://example.com<nowiki/>=x
21302 http://example.com<nowiki/>(x)
21303 http://example.com(x<nowiki/>)
21307 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21310 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
21312 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
21313 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
21314 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
21315 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
21316 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
21322 "http://example.com"
21323 (http://example.com)
21324 (http://example.com) foo
21325 http://example.com,
21326 http://example.com, foo
21329 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
21331 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
21332 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
21333 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
21334 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
21335 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
21340 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21342 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
21343 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
21345 http://example.com.,;:!?\
21346 -http://example.com:
21348 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
21349 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
21354 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
21356 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
21357 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
21358 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
21362 X<nowiki/>RFC 123<nowiki/>y
21366 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
21368 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
21369 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
21370 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
21377 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
21378 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
21379 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
21384 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
21386 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
21387 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21388 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21392 X<nowiki/>PMID 123<nowiki/>y
21396 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
21398 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
21399 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
21400 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
21407 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
21408 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
21409 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
21414 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
21416 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
21417 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
21418 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
21421 ISBN 1234567890<nowiki/>1
21422 ISBN 1234567890<nowiki/>x
21423 a<nowiki/>ISBN 1234567890<nowiki/>b
21427 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21429 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21433 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
21438 Links 14. Protect link-like plain text. (Parsoid bug T78425)
21442 <p>this is not a link: http://example.com
21445 this is not a link: <nowiki>http://example.com</nowiki>
21449 Links 15. Link trails can't become link prefixes.
21453 [[Söfnuður]]-[[00]]
21455 <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>
21458 <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>
21461 #### --------------- Quotes ---------------
21462 #### 1. Quotes inside <b> and <i>
21463 #### 2. Link fragments separated by <i> and <b> tags
21464 #### 3. Link fragments inside <i> and <b>
21465 #### 4. No escaping needed
21466 #### --------------------------------------
21468 1a. Quotes inside <b> and <i>
21470 parsoid=html2wt,wt2wt
21473 ''<nowiki>''foo''</nowiki>''
21474 ''<nowiki>'''foo'''</nowiki>''
21476 '''<nowiki/>'foo''''
21477 '''<nowiki>''foo''</nowiki>'''
21478 '''<nowiki>'''foo'''</nowiki>'''
21479 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21480 '''foo'''<nowiki/>'s
21486 '''foo'''<nowiki/>'
21487 ''''foo'''<nowiki/>'
21488 ''fools'<span> errand</span>''
21489 ''<span>fool</span>'s errand''
21490 '<nowiki/>''foo'' bar '''baz''
21491 a|!*#-:;+-~[]{}b'''x''
21500 <b>foo'<i>bar'</i>baz</b>
21509 <i>fools'<span> errand</span></i>
21510 <i><span>fool</span>'s errand</i>
21511 '<i>foo</i> bar '<i>baz</i>
21512 a|!*#-:;+-~[]{}b'<i>x</i>
21517 1b. Quotes inside <b> and <i> with other tags on same line
21519 parsoid=html2wt,wt2wt
21521 '''a'' foo ''[[bar]]''
21522 ''a''' foo ''[[bar]]''
21523 ''a''' foo '''{{echo|[[bar]]}}'''
21524 [[foo]] x'''[[bar]]''
21525 '''foo'' <ref>test</ref>
21526 '''foo'' <div title="name">test</div>
21527 '''foo'' and <br> bar
21530 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21531 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
21532 <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>
21533 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
21534 '<i>foo</i> <span class="reference" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"test"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
21535 '<i>foo</i> <div title="name">test</div>
21536 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
21537 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
21538 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> test</li>
21543 2. Link fragments separated by <i> and <b> tags
21545 [[''foo''<nowiki>hello]]</nowiki>
21547 [['''foo'''<nowiki>hello]]</nowiki>
21549 <p>[[<i>foo</i>hello]]
21550 </p><p>[[<b>foo</b>hello]]
21554 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
21555 # this is one of the shortcomings of this format
21557 3. Link fragments inside <i> and <b>
21559 ''[[foo''<nowiki>]]</nowiki>
21561 '''[[foo'''<nowiki>]]</nowiki>
21564 </p><p><b>[[foo</b>]]
21569 4. No escaping needed
21571 '<span>''bar''</span>'
21572 '<span>'''bar'''</span>'
21575 <p>'<span><i>bar</i></span>'
21576 '<span><b>bar</b></span>'
21581 #### ----------- Paragraphs ---------------
21582 #### 1. No unnecessary escapes
21583 #### --------------------------------------
21586 1. No unnecessary escapes
21588 bar <span><nowiki>[[foo]]</nowiki></span>
21590 =bar <span><nowiki>[[foo]]</nowiki></span>
21592 [[bar <span><nowiki>[[foo]]</nowiki></span>
21594 ]]bar <span><nowiki>[[foo]]</nowiki></span>
21596 =bar <span>foo]]</span><nowiki>=</nowiki>
21598 <p>bar <span>[[foo]]</span>
21599 </p><p>=bar <span>[[foo]]</span>
21600 </p><p>[[bar <span>[[foo]]</span>
21601 </p><p>]]bar <span>[[foo]]</span>
21602 </p><p>=bar <span>foo]]</span>=
21606 #### ----------------------- PRE --------------------------
21607 #### 1. Leading whitespace in SOL context should be escaped
21608 #### ------------------------------------------------------
21610 1. Leading whitespace in SOL context should be escaped
21614 <nowiki> </nowiki>a
21616 <nowiki> </nowiki> a
21618 <nowiki> </nowiki>a(tab)
21620 <nowiki> </nowiki> a
21622 <nowiki> </nowiki> a
21625 <nowiki> </nowiki>b
21628 <nowiki> </nowiki>b
21631 <nowiki> </nowiki> b
21637 <p><!--cmt--> a</p>
21647 2. Leading whitespace in non-indent-pre contexts should not be escaped
21655 <p>foo <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"<i data-parsoid='{\"dsr\":[9,14,2,2]}'>a</i>\n b"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span></p>
21656 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
21657 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <i>a</i> b</li>
21662 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
21681 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
21685 [[File:Foobar.jpg|thumb|caption]]
21688 <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>
21692 5. Nowiki escaping should account for indent-pres
21701 #### --------------- Behavior Switches --------------------
21703 1. Valid behavior switches should be escaped
21710 <nowiki>__TOC__</nowiki>
21711 ''<nowiki>__TOC__</nowiki>''
21715 2. Invalid behavior switches should not be escaped
21726 #### --------------- HTML tags ---------------
21729 #### 3. multi-line html tag
21730 #### 4. extension tags
21731 #### -----------------------------------------
21737 <a href="http://google.com">google</a>
21739 <a href="http://google.com">google</a>
21745 <nowiki><div>foo</div>
21746 <div style="color:red">foo</div></nowiki>
21748 <p><div>foo</div>
21749 <div style="color:red">foo</div>
21754 3. multi-line html tag
21769 <nowiki><ref>foo</ref></nowiki>
21771 <nowiki><ref>bar</nowiki>
21773 baz<nowiki></ref></nowiki>
21775 <p><ref>foo</ref>
21776 </p><p><ref>bar
21777 </p><p>baz</ref>
21781 #### --------------- Others ---------------
21785 <nowiki>foo</nowiki>
21787 <p><nowiki>foo</nowiki>
21791 ## The quote-char in the input is necessary for triggering the bug
21793 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
21795 parsoid=wt2wt,html2wt
21804 Tag-like HTML structures are passed through as text
21826 </p><p>1<d e>f
21831 # This was a bug in the PHP parser (see bug 17663 and its dups,
21832 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
21834 Tag names followed by punctuation should not be recognized as tags
21838 <p><s.ome> text
21843 HTML tag with necessary entities in attributes
21845 <span title="&amp;">foo</span>
21847 <p><span title="&amp;">foo</span>
21852 HTML tag with 'unnecessary' entity encoding in attributes
21854 <span title="&">foo</span>
21856 <p><span title="&">foo</span>
21861 HTML tag with broken attribute value quoting
21863 <span title="Hello world>Foo</span>
21865 <p><span>Foo</span>
21868 <p><span title="Hello world">Foo</span>
21873 Parsoid-only: HTML tag with broken attribute value quoting
21877 <span title="Hello world>Foo</span>
21879 <p><span title="Hello world">Foo</span>
21884 Table with broken attribute value quoting
21887 | title="Hello world|Foo
21898 <td title="Hello world">Foo
21904 Table with broken attribute value quoting on consecutive lines
21907 | title="Hello world|Foo
21908 | style="color:red|Bar
21921 <td title="Hello world">Foo
21922 </td><td style="color: red">Bar
21923 </td></tr></tbody></table>
21928 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21938 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
21948 Accept empty td cell attribute
21951 | align="center" | foo || |
21956 <td align="center"> foo </td>
21963 Non-empty attributes in th-cells
21966 ! Foo !! style="color: red" | Bar
21972 <th style="color: red"> Bar
21978 Accept empty attributes in th-cells
21993 Empty table rows go away
22014 ### Parsoid-centric tests for testing RTing of inter-element separators
22015 ### Edge cases not tested by existing parser tests and specific to
22016 ### Parsoid-specific serialization strategies.
22020 RT-ed inter-element separators should be valid separators
22032 # Parsoid-only since PHP parser relies on Tidy for correct output
22034 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
22048 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
22049 <p>bar</p></small></td></tr>
22053 <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>
22058 Empty TD followed by TD with tpl-generated attribute
22063 |{{echo|style='color:red'}}|foo
22077 Indented table with an empty td
22095 ## We have some newline diffs RT-ing this edge case
22096 ## and it is not important enough -- we seem to be emitting
22097 ## at most 2 newlines after a </tr> and this is unrelated to
22098 ## the issue from T85627 that this is testing.
22100 Indented table with blank lines in between (T85627)
22119 Indented block & table
22133 <div data-parsoid='{"stx":"html"}'>foo</div>
22135 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
22140 Indent and comment before table row
22155 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
22156 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
22160 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
22162 Empty TR followed by a template-generated TR
22168 {{echo|<tr><td>foo</td></tr>}}
22174 <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}}]}'>
22179 ## PHP and parsoid output differ for this, and since this is primarily
22180 ## for testing Parsoid's serializer, marking this Parsoid only
22182 Empty TR followed by mixed-ws-comment line should RT correctly
22198 <!--c--> </tr><!--d-->
22204 Multi-line image caption generated by templates with/without trailing newlines
22206 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
22207 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
22209 <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>
22210 <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>
22214 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
22218 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
22220 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
22222 <includeonly>foo</includeonly>
22230 ## PHP emits broken html for this, and since this is primarily
22231 ## a Parsoid serializer test, marking this Parsoid only
22233 Improperly nested inline or quotes tags with whitespace in between
22237 <span> <s>x</span> </s>
22240 <p><span> <s>x</s></span><s> </s>
22241 <b> <i>x</i></b><i> </i>
22246 Encapsulate protected attributes from wt
22250 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
22252 <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>
22256 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
22257 ## Having nested or stray pre tags results in the attempt to add duplicates,
22258 ## causing an assertion fail. This test tries to prevent that situation.
22260 Ensure ParagraphWrapper can deal with stray closing pre tags
22270 1. Ensure fostered text content is wrapped in element nodes
22274 <table>hi</table><table>ho</table>
22283 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
22285 parsoid=wt2html,wt2wt
22294 <tbody><tr><td> a</td></tr>
22299 Encapsulation properly handles null DSR information from foster box
22301 parsoid=wt2html,wt2wt
22303 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
22305 <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>
22309 1. Encapsulate foster-parented transclusion content
22311 parsoid=wt2wt,wt2html
22313 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
22315 <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>
22325 2. Encapsulate foster-parented transclusion content
22327 parsoid=wt2wt,wt2html
22329 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
22331 <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>
22342 3. Encapsulate foster-parented transclusion content
22344 parsoid=wt2wt,wt2html
22346 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22348 <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>"]}">
22361 4. Encapsulate foster-parented transclusion content
22363 parsoid=wt2wt,wt2html
22365 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22367 <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>"]}">
22380 5. Encapsulate foster-parented transclusion content
22382 parsoid=wt2wt,wt2html
22384 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
22386 <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>
22401 6. Encapsulate foster-parented transclusion content
22403 parsoid=wt2wt,wt2html
22405 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
22407 <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>
22423 7. Encapsulate foster-parented transclusion content
22425 parsoid=wt2wt,wt2html
22427 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
22429 <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>
22440 8. Encapsulate foster-parented transclusion content
22442 parsoid=wt2wt,wt2html
22445 }}{|{{echo|style='color:red'}}
22450 <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>
22460 9. Encapsulate foster-parented transclusion content
22462 parsoid=wt2wt,wt2html
22464 <table>{{echo|hi</table>hello}}
22466 <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>
22470 Table in fosterable position
22472 parsoid=wt2html,wt2wt
22481 <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">
22483 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22489 # Parsoid only for bug 64747
22491 Properly encapsulate empty-content transclusions in fosterable positions
22499 <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":["","","",""]}]]}'>
22505 Support <object> element with .data attribute
22509 <object data="test.swf"></object>
22511 <object data="test.swf"></object>
22515 Don't block XML namespace declaration
22517 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
22519 <p><span>MediaWiki</span>
22522 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
22525 # -----------------------------------------------------------------
22526 # The following section of tests are primarily to spec requirements
22527 # around serialization of new/edited content.
22529 # All these tests are marked Parsoid html2wt and html2html only
22530 # ----------------------------------------------------------------
22532 # 'mi' is a localinterwiki prefix as well as a language
22534 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
22538 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
22544 New wiki links (href variations)
22548 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22549 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
22550 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
22551 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
22556 [[Toxine bactérienne]]
22560 New wiki links (content string variations)
22564 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
22565 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
22566 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
22570 [[Foo_bar|./Foo_bar]]
22574 New category links (href variations)
22578 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
22579 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
22580 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
22582 [[Category:Toxine bactérienne]]
22583 [[Category:Toxine bactérienne]]
22584 [[Category:Toxine bactérienne]]
22588 New sol transparent links don't need indent-pre nowiki protection
22593 <link rel="mw:PageProp/redirect" href="./Main_Page">
22594 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
22595 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
22597 #WEITERLEITUNG [[Main Page]]
22598 <!-- this is good --> [[Category:Good]]
22599 <!-- this is great --> [[Kategorie:Great]]
22603 New interlanguage links (href variations)
22607 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
22608 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
22609 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
22611 [[es:Toxine bactérienne]]
22612 [[es:Toxine_bactérienne]]
22613 [[es:Toxine_bactérienne]]
22617 Image: Modifying size of an image (1)
22620 "modes": ["wt2wt"],
22622 ["img[height]", "attr", "height", "22"],
22623 ["img[width]", "attr", "width", "200"]
22627 [[Image:Foobar.jpg|230x230px]]
22629 [[Image:Foobar.jpg|200x200px]]
22633 Image: Modifying size of an image (2)
22636 "modes": ["wt2wt"],
22638 ["img[height]", "attr", "height", "100"],
22639 ["img[width]", "attr", "width", "500"]
22643 [[Image:Foobar.jpg|230x230px]]
22645 [[Image:Foobar.jpg|500x500px]]
22648 # Change in size is ignored so long as class='mw-default-size'
22650 Image: Modifying size of an image (3)
22653 "modes": ["wt2wt"],
22655 ["figure[class]", "removeClass", "mw-default-size"],
22656 ["figure img", "attr", "height", "19"],
22657 ["figure img", "attr", "width", "170"]
22661 [[Image:Foobar.jpg|thumb]]
22663 [[Image:Foobar.jpg|thumb|170x170px]]
22667 Image: Modifying alignment of an image (bug 48665)
22670 "modes": ["wt2wt"],
22672 ["figure[class]", "removeClass", "mw-halign-right"],
22673 ["figure[class]", "addClass", "mw-halign-left"]
22677 [[Image:Foobar.jpg|thumb|caption|right]]
22679 [[Image:Foobar.jpg|thumb|caption|left]]
22683 Image: Modifying mw-default-size of an frameless image (bug 62805)
22686 "modes": ["wt2wt"],
22688 ["figure.mw-default-size", "removeClass", "mw-default-size"]
22692 [[Image:Foobar.jpg|frameless|right]]
22694 [[Image:Foobar.jpg|frameless|right|220x220px]]
22698 Image: Modifying valign of an image (bug 49221)
22701 "modes": ["wt2wt"],
22703 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
22704 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
22708 [[File:Foobar.jpg|20px|middle]]
22710 [[File:Foobar.jpg|20px|text-top]]
22714 Image: Modifying alt attribute of an image (bug 56400)
22717 "modes": ["wt2wt"],
22719 ["img[alt]", "attr", "alt", "some alternate edited text"]
22723 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
22725 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
22729 Image: Modifying caption of an image
22732 "modes": ["wt2wt"],
22734 ["figcaption", "text", "new caption"]
22738 [[Image:Foobar.jpg|thumb|original caption]]
22740 [[Image:Foobar.jpg|thumb|new caption]]
22744 Image: empty alt attribute (bug 48924)
22748 [[File:Foobar.jpg|thumb|alt=|bar]]
22750 <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>
22754 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
22759 #<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>
22761 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
22765 Image: Block level image should have \n before and after
22768 [[File:Foobar.jpg|right|thumb|150x150px]]
22772 <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>
22777 Image: New block level image should have \n before and after (existing content)
22780 [[File:Foobar.jpg|right|thumb|150x150px]]
22784 <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>
22789 Image: upright option (parsoid)
22793 [[File:Foobar.jpg|thumb|upright|caption]]
22794 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
22795 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
22797 <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>
22798 <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>
22799 <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>
22803 Image: upright option is ignored on inline and frame images (parsoid)
22807 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
22809 <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>
22813 Image: from basic HTML (1)
22817 <span typeof="mw:Image">
22818 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22821 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22825 Image: from basic HTML (2)
22829 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
22831 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
22835 Image: from basic HTML (3)
22839 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
22841 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
22845 Image: from basic HTML (4)
22849 <img src="File:Foobar.jpg">
22851 [[File:Foobar.jpg|link=]]
22855 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
22860 <li><p>foo</p></li>
22867 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
22871 <ul> <li>foo</li></ul>
22877 Don't strip leading whitespace when handling indent-pre suppressing tags
22882 <tr><td> indented row</td></tr>
22885 <b>This is very bold of you!</b>
22888 indented cell (no pre-wrapping!)
22898 '''This is very bold of you!'''
22902 indented cell (no pre-wrapping!)
22910 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
22915 <nowiki> </nowiki><span>bar</span>
22918 <nowiki> </nowiki></span>bar2
22921 <nowiki> </nowiki><span>bar</span>
22924 <nowiki> </nowiki><span>foo</span>
22942 Lists: Add space after bullets
22949 <li><span> baz</span></li>
22954 * <span> baz</span>
22958 Lists: Dont insert newlines in a serialized list item.
22962 <ul><li>a<br>b</li><li>c</li></ul>
22969 Headings: Add space before/after == (Bug 51744)
22976 <h2><span> baz</span></h2>
22984 == <span> baz</span> ==
22988 Headings: Force metas to serialize before/after
22992 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
22993 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
22995 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
23003 <!--foo--> [[Category:A3]]
23008 Parsoid: Serialize positional parameters with = in them as named parameter
23012 <p about="#mwt1" typeof="mw:Transclusion"
23013 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
23015 <p about="#mwt1" typeof="mw:Transclusion"
23016 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
23018 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23019 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23020 <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>
23024 {{echo|1 = f=oo|2 = bar}}
23026 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23027 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23028 {{echo|<nowiki>f=oo</nowiki>|bar}}
23032 Parsoid: Serialize positional parameters with = in extlink as named parameter
23036 <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>
23038 {{echo|1 = http://stuff?is=ok}}
23042 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
23046 <div>a<p>b</p></div>
23067 Substrings resembling wikitext in hrefs should not get nowiki escapes
23071 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
23076 #-----------------------------
23077 # I/B quote minimization tests
23078 #-----------------------------
23081 1. I/B quote minimization: wikitext-only tags should be combined
23085 <p><i>A</i><i>B</i></p>
23086 <p><b>A</b><b>B</b></p>
23087 <p><i>A</i><b><i>B</i></b></p>
23088 <p><b>A</b><i><b>B</b></i></p>
23089 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
23090 <p><i><b>A</b></i><i><b>B</b></i></p>
23091 <p><i><b>A</b></i><b><i>B</i></b></p>
23092 <p><b><i>A</i></b><i><b>B</b></i></p>
23112 2. I/B quote minimization: wikitext and html tags should not be combined
23116 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
23117 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
23121 ''A''<nowiki/>'''<i>B</i>'''
23125 3. I/B quote minimization: templated content stops minimization
23129 <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>
23130 <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>
23132 ''A''{{echo|''B''}}
23134 ''A''{{echo|'''''B'''''}}
23138 4. I/B quote minimization: new content should be mimimized with adjacent old content
23142 <p><i>A</i><i>B</i></p>
23143 <p><b>A</b><b>B</b></p>
23144 <p><i>A</i><b><i>B</i></b></p>
23154 5a. Merge adjacent quote nodes if they've been edited
23157 "modes": ["wt2wt"],
23159 ["p", "contents", "remove", ":contains('b')"]
23169 5b. Merge adjacent quote nodes if they've been edited
23172 "modes": ["wt2wt"],
23178 ''a''<span id="x">b</span>''c''
23183 #------------------------------------
23184 # End of I/B quote minimization tests
23185 #------------------------------------
23188 Bug 54262: New entities
23194 <span typeof="mw:Entity"> </span>
23197 ## Note that there is no wikitext output for 'unknownproperty' ##
23198 ## Unknown magic words are silently dropped ##
23205 <meta property='mw:PageProp/toc' />
23206 <meta property='mw:PageProp/notoc' />
23207 <meta property='mw:PageProp/forcetoc' />
23208 <meta property='mw:PageProp/index' />
23209 <meta property='mw:PageProp/noindex' />
23210 <meta property='mw:PageProp/nogallery' />
23211 <meta property='mw:PageProp/noeditsection' />
23212 <meta property='mw:PageProp/notitleconvert' />
23213 <meta property='mw:PageProp/nocontentconvert' />
23214 <meta property='mw:PageProp/unknownproperty' />
23224 __NOCONTENTCONVERT__
23228 Consecutive <pre>s should not get merged
23230 parsoid=html2wt,html2html
23232 <pre>a</pre><pre>b</pre>
23260 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
23264 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
23266 [[Special:BookSources/1234567890|ISBN 1234567895]]
23270 Edited RFC links not serializable as RFC links should serialize as extlinks
23274 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
23276 [//tools.ietf.org/html/rfc123 New RFC]
23280 Edited PMID links not serializable as PMID links should serialize as extlinks
23284 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
23286 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
23290 WTS of autolinks with trailing/surrounding context
23294 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
23295 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
23296 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
23297 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
23298 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
23299 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
23301 http://cscott.net<nowiki/>'''foo'''
23303 http://cscott.net<b>foo</b>
23305 '''http://cscott.net<nowiki/>'''
23307 '''http://cscott.net '''
23309 '''http://cscott.net<nowiki/>x'''
23311 http://cscott.net<nowiki/>x
23315 WTS of autolinks with nowikis (round-trip)
23317 x<nowiki/>http://cscott.net<nowiki/>x
23319 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
23322 # this is the "easy" test because it leaves in place all the
23323 # data-parsoid information indicating this is an autolink
23325 WTS of autolinks with escapes (editing)
23328 "modes": ["wt2wt"],
23330 [ "meta", "remove" ]
23334 x<nowiki/>http://cscott.net<nowiki/>x
23336 x<nowiki/>http://cscott.net<nowiki/>x
23340 Edited Redirect link should emit a non-piped wikitext link
23344 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
23350 T75121: Infer extension name from typeOf if data-mw is not present
23354 <div typeOf="mw:Extension/foo"></div>
23359 # -----------------------------------------------------------------
23360 # End of section for Parsoid-only html2wt tests for serialization
23362 # -----------------------------------------------------------------
23369 Try for 100% code coverage