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 formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # comment run through Linker::formatComment() instead of main parser
30 # local format section links in edit comment text as local links
31 # notoc disable table of contents
32 # thumbsize=NNN set the default thumb size to NNNpx for this test
34 # You can also set the following parser properties via test options:
35 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
36 # wgLinkHolderBatchSize, wgRawHtml
38 # For testing purposes, temporary articles can created:
39 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
40 # where '/' denotes a newline.
42 # This is the standard article assumed to exist.
73 MediaWiki:bad image list
75 * [[File:Bad.jpg]] except [[Nasty page]]
103 Template:echo_with_span
109 Template:echo_with_div
121 Template:table_attribs
124 |</noinclude>style="color: red"| Foo
130 {{table_attribs}} || Bar || Baz
134 Template:image_attribs
137 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
171 This is a simple paragraph.
173 <p>This is a simple paragraph.
178 Paragraphs with extra newline spacing
201 Paragraphs with newline spacing with comment lines in between
209 <!--foo--><!--More than 1 comment, still stripped-->
213 <!--foo--> <!----> <!-- bar -->
274 Paragraphs with newline spacing with non-empty white-space lines in between
301 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
309 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
348 Extra newlines: More paragraphs with indented comment
363 Extra newlines followed by heading
378 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
379 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
382 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
387 Extra newlines between heading and content are swallowed
395 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
396 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
403 http://fr.wikipedia.org/wiki/🍺
404 <!-- EasterEgg we love beer, better be able be able to link to it -->
406 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
410 # Note that the html+tidy output removes the spaces after the <li>,
411 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
412 # This is an issue for all tests with lists. We intentionally do
413 # *not* add html+tidy clauses for these, as we don't want to
414 # document/test the broken behavior. (Parsoid matches the non-tidy
415 # output in these cases.)
424 <li> Item 2</li></ul>
432 * plain''italic''plain
433 * plain''italic''plain''italic''plain
434 * plain'''bold'''plain
435 * plain'''bold'''plain'''bold'''plain
436 * plain''italic''plain'''bold'''plain
437 * plain'''bold'''plain''italic''plain
438 * plain''italic'''bold-italic'''italic''plain
439 * plain'''bold''bold-italic''bold'''plain
440 * plain'''''bold-italic'''italic''plain
441 * plain'''''bold-italic''bold'''plain
442 * plain''italic'''bold-italic'''''plain
443 * plain'''bold''bold-italic'''''plain
444 * plain l'''italic''plain
445 * plain l''''bold''' plain
448 <li> plain<i>italic</i>plain</li>
449 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
450 <li> plain<b>bold</b>plain</li>
451 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
452 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
453 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
454 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
455 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
456 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
457 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
458 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
459 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
460 <li> plain l'<i>italic</i>plain</li>
461 <li> plain l'<b>bold</b> plain</li></ul>
465 # this example taken from the [[simple:Moon]] article (bug 47326)
467 Italics and possessives (1)
469 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
471 <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
475 # this example taken from [[en:Flaming Pie]] (bug 49926)
477 Italics and possessives (2)
479 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
481 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
485 # this example taken from [[en:Dictionary]] (bug 49926)
487 Italics and possessives (3)
489 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''.
491 <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>.
497 ### 2-quote opening sequence tests
500 Italics and bold: 2-quote opening sequence: (2,2)
510 Italics and bold: 2-quote opening sequence: (2,3)
521 # same html as previous, but wikitext adjusted to match parsoid html2wt
523 Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
525 ''<nowiki>foo'</nowiki>''
533 Italics and bold: 2-quote opening sequence: (2,4)
544 # same html as previous, but wikitext adjusted to match parsoid html2wt
546 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
548 ''<nowiki>foo''</nowiki>''
555 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
557 Italics and bold: 2-quote opening sequence: (2,5)
570 # same html as previous, but wikitext adjusted to match parsoid html2wt
572 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
574 ''foo'''''<nowiki/>'''
585 ### 3-quote opening sequence tests
589 Italics and bold: 3-quote opening sequence: (3,2)
599 Italics and bold: 3-quote opening sequence: (3,3)
609 Italics and bold: 3-quote opening sequence: (3,4)
620 # same html as previous, but wikitext adjusted to match parsoid html2wt
622 Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
624 '''<nowiki>foo'</nowiki>'''
631 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
633 Italics and bold: 3-quote opening sequence: (3,5)
646 # same html as previous, but wikitext adjusted to match parsoid html2wt
648 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
650 '''foo'''''<nowiki/>''
661 ### 4-quote opening sequence tests
665 Italics and bold: 4-quote opening sequence: (4,2)
676 # same html as previous, but wikitext adjusted to match parsoid html2wt
678 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
680 <nowiki>''</nowiki>''foo''
688 Italics and bold: 4-quote opening sequence: (4,3)
698 Italics and bold: 4-quote opening sequence: (4,4)
709 # same html as previous, but wikitext adjusted to match parsoid html2wt
711 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
713 ''''<nowiki>foo'</nowiki>'''
720 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
722 Italics and bold: 4-quote opening sequence: (4,5)
731 <p>'<b>foo</b><i></i>
735 # same html as previous, but wikitext adjusted to match parsoid html2wt
737 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
739 ''''foo'''''<nowiki/>''
744 <p>'<b>foo</b><i></i>
750 ### 5-quote opening sequence tests
754 Italics and bold: 5-quote opening sequence: (5,2)
765 # same html as previous, but wikitext adjusted to match parsoid html2wt
766 # skipping wt2html and html2html because it wants to put <i> before <b>
768 Italics and bold: 5-quote opening sequence: (5,2+3)
770 parsoid=wt2wt,html2wt
779 Italics and bold: 5-quote opening sequence: (5,3)
790 # same html as previous, but wikitext adjusted to match parsoid html2wt
792 Italics and bold: 5-quote opening sequence: (5,3+2)
802 Italics and bold: 5-quote opening sequence: (5,4)
808 <p><i><b>foo'</b></i>
813 # same html as previous, but wikitext adjusted to match parsoid html2wt
815 Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
817 '''''<nowiki>foo'</nowiki>'''''
819 <p><i><b>foo'</b></i>
825 Italics and bold: 5-quote opening sequence: (5,5)
834 ### multiple quote sequences in a line
837 Italics and bold: multiple quote sequences: (2,4,2)
843 <p><i>foo'<b>bar</b></i>
848 # same html as previous, but wikitext adjusted to match parsoid html2wt
850 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
852 ''<nowiki>foo'</nowiki>'''bar'''''
854 <p><i>foo'<b>bar</b></i>
860 Italics and bold: multiple quote sequences: (2,4,3)
866 <p><i>foo'<b>bar</b></i>
871 # same html as previous, but wikitext adjusted to match parsoid html2wt
873 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
875 ''<nowiki>foo'</nowiki>'''bar'''''
877 <p><i>foo'<b>bar</b></i>
883 Italics and bold: multiple quote sequences: (2,4,4)
889 <p><i>foo'<b>bar'</b></i>
894 # same html as previous, but wikitext adjusted to match parsoid html2wt
896 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
898 ''<nowiki>foo'</nowiki>'''<nowiki>bar'</nowiki>'''''
900 <p><i>foo'<b>bar'</b></i>
905 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
907 Italics and bold: multiple quote sequences: (3,4,2)
916 <p><b>foo'</b>bar<i></i>
920 # same html as previous, but wikitext adjusted to match parsoid html2wt
922 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
926 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
931 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
936 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
938 Italics and bold: multiple quote sequences: (3,4,3)
947 <p><b>foo'</b>bar<b></b>
951 # same html as previous, but wikitext adjusted to match parsoid html2wt
953 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
955 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
960 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
965 ### other quote tests
968 Italics and bold: other quote tests: (2,3,5)
970 ''this is about '''foo's family'''''
972 <p><i>this is about <b>foo's family</b></i>
978 Italics and bold: other quote tests: (2,(3,3),2)
980 ''this is about '''foo's''' family''
982 <p><i>this is about <b>foo's</b> family</i>
988 Italics and bold: other quote tests: (3,2,3,2)
992 '''this is about ''foo'''s family''
994 <p><b>this is about <i>foo</i></b><i>s family</i>
999 # same html as previous, but wikitext adjusted to match parsoid html2wt
1000 # add 'parsoid' option to use 'parsoid' normalization of the placeholder
1002 Italics and bold: other quote tests: (3,2,3+2+2,2)
1006 '''this is about ''foo'''''<nowiki/>''s family''
1008 <p><b>this is about <i>foo</i></b><i>s family</i>
1014 Italics and bold: other quote tests: (3,2,3,3)
1017 '''this is about ''foo'''s family'''
1019 <p>'<i>this is about </i>foo<b>s family</b>
1025 Italics and bold: other quote tests: (3,(2,2),3)
1027 '''this is about ''foo's'' family'''
1029 <p><b>this is about <i>foo's</i> family</b>
1035 Italicized possessive
1037 The ''[[Main Page]]'''s talk page.
1039 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1044 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1045 (Requires tidy for PHP parser output to be fixed up)
1047 parsoid=wt2html,wt2wt
1064 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1065 <td><i>a</i></td><td><i>b</i></td></tr>
1074 Non-html5 tags should be accepted
1076 <center>''foo''</center>
1078 <font>''foo''</font>
1079 <strike>''foo''</strike>
1082 <center><i>foo</i></center>
1083 <p><big><i>foo</i></big>
1084 <font><i>foo</i></font>
1085 <strike><i>foo</i></strike>
1091 <wbr> is valid wikitext (bug 52468)
1099 # <strike> is HTML4, <s> is HTML4/5.
1101 <s> or <strike> for strikethrough
1103 <strike>strike</strike>
1107 <p><strike>strike</strike>
1115 Text-level semantic html elements in wikitext
1118 <strong>text</strong>
1134 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1141 <strong>text</strong>
1157 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1165 # test cases taken from
1166 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1168 Ruby markup (W3C-style)
1170 ; Mono-ruby for individual base characters
1171 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1173 : <ruby>今日<rt>きょう</rt></ruby>
1175 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1177 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1179 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1181 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1182 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1183 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1186 <dl><dt> Mono-ruby for individual base characters</dt>
1187 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1188 <dt> Group ruby</dt>
1189 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1190 <dt> Jukugo ruby</dt>
1191 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1192 <dt> Inline ruby</dt>
1193 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1194 <dt> Double-sided ruby</dt>
1195 <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>
1197 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1198 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1199 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1204 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1206 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1208 <b→> doesn't work! </b→>
1210 <bä> doesn't work! </bä>
1212 <boo> works fine </boo>
1214 <s.foo>s.foo</s.foo>
1218 <p><b→> doesn't work! </b→>
1219 </p><p><bä> doesn't work! </bä>
1220 </p><p><boo> works fine </boo>
1221 </p><p><s.foo>s.foo</s.foo>
1222 </p><p><sub-ID#1>
1227 Isolated close tags should be treated as literal text (bug 52760)
1234 </p><p><s.foo>s</s>
1239 ### Special characters
1243 Bare pipe character (bug 52363)
1252 Bare pipe character from a template (bug 52363)
1261 ### <nowiki> test cases
1265 <nowiki> unordered list
1267 <nowiki>* This is not an unordered list item.</nowiki>
1269 <p>* This is not an unordered list item.
1276 <nowiki>Lorem ipsum dolor
1284 <p>Lorem ipsum dolor
1297 :There is not nowiki.
1298 :There is <nowiki>nowiki</nowiki>.
1300 #There is not nowiki.
1301 #There is <nowiki>nowiki</nowiki>.
1303 *There is not nowiki.
1304 *There is <nowiki>nowiki</nowiki>.
1306 <dl><dd>There is not nowiki.</dd>
1307 <dd>There is nowiki.</dd></dl>
1308 <ol><li>There is not nowiki.</li>
1309 <li>There is nowiki.</li></ol>
1310 <ul><li>There is not nowiki.</li>
1311 <li>There is nowiki.</li></ul>
1316 Entities inside <nowiki>
1318 <nowiki><</nowiki>
1325 Entities inside template parameters
1331 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span>
1336 Properly escape nowiki when combined with other wiki markup
1340 <nowiki>* </nowiki></nowiki> tag
1342 <p>* </nowiki> tag</p>
1349 Comments and Indent-Pre
1351 <!-- comment 1 --> asdf
1353 <!-- comment 1 --> asdf
1356 <!-- comment 1 --> asdf
1357 <!-- comment 2 -->xyz
1359 <!-- comment 1 --> asdf
1360 <!-- comment 2 --> xyz
1416 asdf<!-- comment 1 -->jkl
1426 <!-- foo --> b <!-- bar -->
1440 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1446 Comment semantics and delimiters
1448 <!-- --><!----><!-----><!------>
1454 Comment semantics and delimiters, redux
1456 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1457 -- foo -- funky huh? ... -->
1463 Comment semantics and delimiters: directors cut
1465 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1466 everything starting with < followed by !-- until the first -- and > we see,
1467 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1475 Comment semantics: nesting
1477 <!--<!-- no, we're not going to do anything fancy here -->-->
1484 Comment semantics: unclosed comment at end
1486 <!--This comment will run out to the end of the document
1492 Comment in template title
1501 Comment on its own line post-expand
1513 Comment on its own line post-expand with non-significant whitespace
1525 Multiple comments should still parse as SOL-transparent
1527 parsoid=wt2html,wt2wt
1530 <!--c2--><!--c3--><!--c4-->*b
1541 ### paragraph wrapping tests
1556 Block tag on one line (<div>)
1572 Block tag on one line (<blockquote>)
1574 a <blockquote>foo</blockquote>
1578 a <blockquote>foo</blockquote>
1590 Block tag on both lines (<div>)
1607 Block tag on both lines (<blockquote>)
1609 a <blockquote>foo</blockquote>
1611 b <blockquote>foo</blockquote>
1613 a <blockquote>foo</blockquote>
1614 b <blockquote>foo</blockquote>
1628 Multiple lines without block tags
1653 Empty lines between lines with block tags
1692 ## PHP parser emits output which is broken
1693 ## XXX The parsoid output doesn't match the tidy output.
1695 Unclosed HTML p-tags should be handled properly
1703 <p>foo</div></p>
1707 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1713 ### Preformatted text
1722 And a [[Main Page|link]]
1728 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1733 Tabs don't trigger preformatted text
1737 This is preformatted text.
1743 <pre>This is preformatted text.
1749 Ident preformatting with inline content
1760 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1777 Regression with preformatted in <center>
1791 Bug 52763: Preformatted in <blockquote>
1797 indented cell (no pre-wrapping!)
1807 <p> indented cell (no pre-wrapping!)
1815 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
1832 Bug 15491: <ins>/<del> in blockquote
1835 Foo <del>bar</del> <ins>baz</ins> quux
1839 <p>Foo <del>bar</del> <ins>baz</ins> quux
1845 # Note that the p-wrapping is newline sensitive, which could be
1846 # considered a bug: tidy will wrap only the 'Foo' in the example
1847 # below in a <p> tag. (see comment 23-25 of bug #6200)
1849 Bug 15491: <ins>/<del> in blockquote (2)
1851 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1854 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
1860 <del>bar</del> <ins>baz</ins> quux</blockquote>
1864 <pre> with attributes (bug 3202)
1866 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1868 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1873 <pre> with width attribute (bug 3202)
1875 <pre width="8">Narrow screen goodies</pre>
1877 <pre width="8">Narrow screen goodies</pre>
1882 <pre> with forbidden attribute (bug 3202)
1884 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1886 <pre width="8">Narrow screen goodies</pre>
1891 Entities inside <pre>
1900 <pre> with forbidden attribute values (bug 3202)
1902 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1904 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1909 <nowiki> inside <pre> (bug 13238)
1917 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1925 <pre><nowiki>Foo</nowiki></pre>
1930 <nowiki> and <pre> preference (first one wins)
1961 </pre> inside nowiki
1963 <nowiki></pre></nowiki>
1970 Empty pre; pre inside other HTML tags (bug 54946)
1995 HTML pre followed by indent-pre
2010 <p><pre>foo</pre></p>
2012 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2016 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2024 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2034 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2046 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2067 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2071 {{echo| foo}}{{echo| bar}}
2076 {{echo|<!--cmt--> foo}}
2078 <!--cmt-->{{echo| foo}}
2080 {{echo|{{echo| }}bar}}
2098 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2135 Things that look like <pre> tags aren't treated as such
2137 Barack Obama <President> of the United States
2138 <President></President>
2140 <p>Barack Obama <President> of the United States
2141 <President></President>
2145 ## PHP parser discards the "<pre " string
2147 Handle broken pre-like tags (bug 64025)
2151 {{echo|<pre <pre>x</pre>}}
2153 <table><pre </table>
2156 <table><pre></pre></table>
2159 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'><pre </span>
2162 <span><pre </span>
2167 Parsoid: handle pre with space after attribute
2171 <pre style="width:50%;" >{{echo|foo}}</pre>
2173 <pre style="width:50%;">{{echo|foo}}</pre>
2176 # TODO / maybe: fix wt2wt for this
2178 Parsoid: Don't paragraph-wrap fosterable content
2204 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2232 #--------------------------------------------------------------------
2233 # Transclusion parameter whitespace stripping tests
2234 # Behavior is different for positional and named parameters
2235 #--------------------------------------------------------------------
2237 Templates: Strip leading and trailing whitespace from named-param values
2241 {{echo|1= {{echo|b}} }}
2254 <ul><li> d</li></ul>
2259 Templates: Don't strip whitespace from positional-param values
2263 {{echo|{{echo|b}} }}
2295 <ul><li> f</li></ul>
2303 Templates: Handle empty comment-and-ws-only lines correctly
2306 <!--should be ignored-->
2307 <!--should be ignored as well-->
2316 Templates: Handle comments in the target
2319 <!-- should be ignored -->
2322 {{echo<!-- should be ignored -->
2325 {{echo<!-- should be ignored -->|foo}}
2327 {{<!-- should be ignored -->echo|foo}}
2329 <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>
2331 <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>
2333 <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>
2335 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2338 #--------------------------------------------------------------------
2339 # Transclusion parameter escaping tests
2340 #--------------------------------------------------------------------
2342 Templates: Parsoid parameter escaping test 1
2346 {{echo|[foo]|{{echo|[bar]}}}}
2348 <p about="#mwt1" typeof="mw:Transclusion"
2349 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2353 Parsoid: Pipes in external links in template parameter
2357 {{echo|[{{echo|http://example.com}} link]}}
2359 <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>
2363 Parsoid: pipe in transclusion parameter
2367 {{echo|http://foo.com/a|b}}
2369 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2370 typeof="mw:Transclusion"
2371 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>
2375 Parsoid: Pipe in external link target and content in template parameter
2377 parsoid=html2wt,wt2wt
2379 {{echo|[http://foo.com/a|b a|b]}}
2381 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2382 typeof="mw:Transclusion"
2383 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2384 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2388 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2392 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2394 <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>
2398 Templates: Don't escape already nowiki-escaped text in template parameters
2400 parsoid=html2wt,wt2wt
2402 {{echo|foo<nowiki>|</nowiki>bar}}
2403 {{echo|<nowiki><div></nowiki>}}
2404 {{echo|<nowiki></nowiki>}}
2406 <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>
2407 <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>
2408 <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>
2414 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2416 parsoid=html2wt,wt2wt
2418 {{echo|{{echo|1=bar}}}}
2420 <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>
2425 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2431 <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>
2435 ### Parsoid-centric tests for testing RT edge cases for pre
2439 1a. Indent-Pre and Comments
2452 1b. Indent-Pre and Comments
2465 1c. Indent-Pre and Comments
2478 1d. Indent-Pre and Comments
2479 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2492 2a. Indent-Pre and tables
2513 2b. Indent-Pre and tables
2529 2c. Indent-Pre and tables (bug 42252)
2546 2d. Indent-Pre and tables
2572 2e. Indent-Pre and table-line syntax
2585 2f. Indent-pre started by table-line syntax
2604 3a. Indent-Pre and block tags (single-line html)
2608 c <blockquote> foo </blockquote>
2613 c <blockquote> foo </blockquote>
2614 <pre><span> foo </span>
2631 3b. Indent-Pre and block tags (multi-line html)
2636 <pre>a <span>foo</span>
2649 3c. Indent-Pre and block tags (pre-content on separate line)
2713 4. Indent-Pre and extension tags
2719 a <ul class="gallery mw-gallery-traditional">
2720 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2721 <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>
2722 <div class="gallerytext">
2729 <ul class="gallery mw-gallery-traditional">
2730 <li class="gallerybox" style="width: 155px">
2731 <div style="width: 155px">
2732 <div class="thumb" style="width: 150px;">
2733 <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>
2735 <div class="gallerytext"></div>
2742 Table wikitext syntax outside wiki-tables
2745 ! not a table heading
2748 | class="foo bar" | baz
2755 ! not a table heading
2758 | class="foo bar" | baz
2767 Render paragraphs when indent-pre is suppressed in blocklevels
2784 4. Multiple spaces at start-of-line
2802 ## NOTE: the leading white-space chars on empty line are significant
2804 5a. White-space in indent-pre
2816 ## NOTE: the leading white-space chars on empty line are significant
2818 5b. White-space in indent-pre
2837 5c. White-space in indent-pre
2850 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
2873 7a. Indent-pre and category links
2875 parsoid=wt2html,wt2wt
2877 [[Category:foo]] <!-- No pre-wrapping -->
2878 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
2880 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
2881 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span>
2882 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
2886 7b. Indent-pre and category links
2888 parsoid=wt2html,wt2wt
2891 [[Category:foo]] {{echo|b}}
2894 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
2896 <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>
2900 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
2904 HTML-pre: 1. embedded newlines
2938 <pre data-parsoid='{"stx":"html"}'>foo</pre>
2940 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
2944 <pre data-parsoid='{"stx":"html"}'>
2949 <pre data-parsoid='{"stx":"html"}'>
2957 HTML-pre: big spaces
2994 <pre data-parsoid='{"stx":"html"}'>
3013 HTML-pre: 2: indented text
3026 HTML-pre: 3: other wikitext
3047 ### Definition lists
3054 <dl><dt> name </dt>
3055 <dd> Definition</dd></dl>
3060 Definition list for indentation only
3064 <dl><dd> Indented text</dd></dl>
3069 Definition list with no space
3074 <dd>Definition</dd></dl>
3079 Definition list with URL link
3081 ; http://example.com/ : definition
3083 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3084 <dd> definition</dd></dl>
3089 Definition list with bracketed URL link
3091 ;[http://www.example.com/ Example]:Something about it
3093 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3094 <dd>Something about it</dd></dl>
3099 Definition list with wikilink containing colon
3101 ; [[Help:FAQ]]: The least-read page on Wikipedia
3103 <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>
3104 <dd> The least-read page on Wikipedia</dd></dl>
3108 # At Brion's and JeLuF's insistence... :)
3110 Definition list with news link containing colon
3112 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3114 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3115 <dd> This isn't even a real newsgroup!</dd></dl>
3120 Malformed definition list with colon
3122 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3124 <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>
3129 Definition lists: colon in external link text
3131 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3133 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3134 <dd> OK, I made that up</dd></dl>
3139 Definition lists: colon in HTML attribute
3141 ;<b style="display: inline">bold</b>
3143 <dl><dt><b style="display: inline">bold</b></dt></dl>
3148 Definition lists: self-closed tag
3150 ;one<br/>two : two-line fun
3152 <dl><dt>one<br />two </dt>
3153 <dd> two-line fun</dd></dl>
3158 Bug 11748: Literal closing tags
3162 <dd>test test test test test</dd>
3164 <dd>test test test test test</dd>
3169 <dd>test test test test test</dd>
3171 <dd>test test test test test</dd>
3177 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3180 ; term : description
3185 <dl><dt> term </dt>
3186 <dd> description</dd></dl>
3187 <ul><li> unordered</li></ul>
3194 Definition list with empty definition and following paragraph
3206 Nested definition lists using html syntax
3215 Definition Lists: No nesting: Multiple dd's
3228 Definition Lists: Indentation: Regular
3236 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3241 Definition Lists: Indentation: Missing 1st level
3247 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3252 Definition Lists: Indentation: Multi-level indent
3256 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3261 Definition Lists: Hacky use to indent tables
3268 should be left alone
3270 <dl><dd><dl><dd><table>
3275 </td></tr></table></dd></dl></dd></dl>
3277 should be left alone
3282 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3290 should be left alone
3293 <dl><dd><dl><dd><table><tr>
3296 </tr></table><!-- bar --></dd></dl></dd></dl>
3298 should be left alone</p>
3302 Definition Lists: Hacky use to indent tables, with comment before table
3308 <dl><dd><dl><dd><!-- foo --><table><tr>
3310 </tr></table></dd></dl></dd></dl>
3315 Definition Lists: Hacky use to indent tables (WS-insensitive)
3324 <dd> <table><tr><td>a</td></tr></table> </dd>
3327 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3328 ## as an empty dt item. It also ignores all but the last ";" when followed
3329 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3330 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3333 ## Ex: ";;t2 ::d2" is transformed into:
3345 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3346 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3357 ## All Parsoid only definition list tests have this difference.
3359 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3360 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3363 Table / list interaction: indented table with lists in table contents
3378 <ul><li> b</li></ul>
3382 <ul><li> d</li></ul>
3383 </td></tr></table></dd></dl>
3388 Table / list interaction: lists nested in tables nested in indented lists
3411 </td></tr></table></dd></dl>
3418 Definition Lists: Nesting: Multi-level (Parsoid only)
3448 Definition Lists: Nesting: Test 2 (Parsoid only)
3468 Definition Lists: Nesting: Test 3 (Parsoid only)
3496 Definition Lists: Nesting: Test 4
3501 <dl><dd><dl><dd><dl><dt>t3</dt>
3502 <dd>d3</dd></dl></dd></dl></dd></dl>
3507 ## The Parsoid team believes the following three test exposes a
3508 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3509 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3510 ## It also exposes a "misfeature" in tidy, which doesn't like
3511 ## <dl> tags with a single <dt> child; it converts the <dt> into
3512 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3514 Definition Lists: Mixed Lists: Test 1
3520 <dl><dd><dl><dt><ul><li> foo</li>
3521 <li> bar</li></ul></dt></dl>
3522 <dl><dt> baz</dt></dl></dd></dl>
3557 Definition Lists: Mixed Lists: Test 2
3562 <ul><li><dl><dd> d1</dd>
3563 <dd> d2</dd></dl></li></ul>
3569 Definition Lists: Mixed Lists: Test 3
3574 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3575 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3581 Definition Lists: Mixed Lists: Test 4
3586 <ul><li><dl><dt>d1 </dt>
3589 <dd>d4</dd></dl></li></ul>
3595 Definition Lists: Mixed Lists: Test 5
3601 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3607 Definition Lists: Mixed Lists: Test 6
3612 <ol><li><ul><li><dl><dd>d1
3613 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3619 Definition Lists: Mixed Lists: Test 7
3624 <dl><dd><ul><li> d1</li>
3625 <li> d2</li></ul></dd></dl>
3631 Definition Lists: Mixed Lists: Test 8
3636 <dl><dd><ul><li> d1</li></ul>
3637 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3643 Definition Lists: Mixed Lists: Test 9
3647 <ul><li><dl><dt>foo </dt>
3648 <dd>bar</dd></dl></li></ul>
3654 Definition Lists: Mixed Lists: Test 10
3658 <ul><li><ol><li><dl><dt>foo </dt>
3659 <dd>bar</dd></dl></li></ol></li></ul>
3663 # The Parsoid team disagrees with the PHP parser's seemingly-random
3664 # rules regarding dd/dt on the next two tests. Parsoid is more
3665 # consistent, and recognizes the shared nesting and keeps the
3666 # still-open tags around until the nesting is complete.
3667 # (And tidy again converts <dt> to <dd> before 'bar'.)
3670 Definition Lists: Mixed Lists: Test 11
3675 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3676 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3677 <dl><dt>boo </dt>
3678 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3733 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3734 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3738 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3739 <dd data-parsoid='{"stx":"row"}'>baz</dd>
3748 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
3750 Definition Lists: Weird Ones: Test 1
3752 *#;*::;; foo : bar (who uses this?)
3754 <ul><li><ol><li><dl><dt> foo </dt>
3755 <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>
3774 <dt>bar (who uses this?)</dt>
3806 <dt> foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3807 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
3822 External links: non-bracketed
3824 Non-bracketed: http://example.com
3826 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
3830 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3832 External links: numbered
3834 Numbered: [http://example.com]
3835 Numbered: [http://example.net]
3836 Numbered: [http://example.com]
3838 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
3839 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
3840 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
3843 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
3844 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
3845 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
3849 External links: specified text
3851 Specified text: [http://example.com link]
3853 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
3858 External links: trail
3860 Linktrails should not work for external links: [http://example.com link]s
3862 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
3867 External links: dollar sign in URL
3869 http://example.com/1$2345
3871 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
3875 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3877 External links: dollar sign in URL (autonumber)
3879 [http://example.com/1$2345]
3881 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
3884 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
3888 External links: open square bracket forbidden in URL (bug 4377)
3890 parsoid=wt2html,wt2wt,html2html
3892 http://example.com/1[2345
3894 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
3897 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
3901 External links: open square bracket forbidden in URL (named) (bug 4377)
3903 parsoid=wt2html,html2html
3905 [http://example.com/1[2345]
3907 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3910 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
3913 # parsoid adds a space before the link name
3915 External links: open square bracket forbidden in URL (named) (bug 4377)
3918 [http://example.com/1 [2345]
3920 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
3925 External links: nowiki in URL link text (bug 6230)
3927 [http://example.com/ <nowiki>''example site''</nowiki>]
3929 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
3934 External links: newline forbidden in text (bug 6230 regression check)
3936 [http://example.com/ first
3939 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
3945 External links: Pipe char between url and text
3947 [http://example.com | link]
3949 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
3954 External links: protocol-relative URL in brackets
3956 [//example.com/ Test]
3958 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
3962 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
3964 External links: protocol-relative URL in brackets without text
3968 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
3971 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
3975 External links: protocol-relative URL in free text is left alone
3979 <p>//example.com/Foo
3984 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
3986 foo//example.com/Foo
3988 <p>foo//example.com/Foo
3993 External links: with no contents
3995 [http://en.wikipedia.org/wiki/Foo]
3997 [[wikipedia:Foo|Bar]]
3999 [[wikipedia:Foo|<span>Bar</span>]]
4001 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4002 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4003 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4006 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4007 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo">Bar</a></p>
4008 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"><span>Bar</span></a></p>
4014 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4016 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4021 External image from https
4023 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4025 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4030 External image (when not allowed)
4032 wgAllowExternalImages=0
4034 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4036 <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>
4041 Link to non-http image, no img tag
4043 Link to non-http image, no img tag: ftp://example.com/test.jpg
4045 <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>
4050 External links: terminating separator
4052 Terminating separator: http://example.com/thing,
4054 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4059 External links: intervening separator
4061 Intervening separator: http://example.com/1,2,3
4063 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4068 External links: old bug with URL in query
4070 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4072 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4077 External links: old URL-in-URL bug, mixed protocols
4079 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4081 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4086 External links: URL in text
4088 URL in text: [http://example.com http://example.com]
4090 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4095 External links: Clickable images
4097 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4099 <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>
4104 External links: raw ampersand
4106 Old & use: http://x&y
4108 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4113 External links: encoded ampersand
4115 Old & use: http://x&y
4117 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4120 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4124 External links: encoded equals (bug 6102)
4126 http://example.com/?foo=bar
4128 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4131 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4135 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4136 ## does it number them. As discussed in bug 53505, we can identify
4137 ## autonumbered links via CSS.
4141 External links: [raw ampersand]
4143 Old & use: [http://x&y]
4145 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4148 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4151 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4152 # mode will return the [raw ampersand] wikitext
4154 External links: [encoded ampersand]
4156 parsoid=wt2html,wt2wt,html2html
4158 Old & use: [http://x&y]
4160 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4163 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4167 External links: [raw equals]
4169 [http://example.com/?foo=bar]
4171 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4174 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4177 # note that parsoid html is identical to [raw equals] case; so html2wt
4178 # mode will return the [raw equals] wikitext
4180 External links: [encoded equals] (bug 6102)
4182 parsoid=wt2html,wt2wt,html2html
4184 [http://example.com/?foo=bar]
4186 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4189 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4192 # xxx parsoid strips the IDN character, so the round-trip tests will
4193 # obviously fail and are disabled. --cscott
4195 External links: [IDN ignored character reference in hostname; strip it right off]
4197 parsoid=wt2html,wt2wt,html2html
4199 [http://e‌xample.com/]
4201 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4204 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4207 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4208 # Where an external link could easily circumvent the sanitization of the text of
4209 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4210 # test demands a higher standard. That's a bit strange.
4214 # http://example.com -> [http://example.com|http://example.com]
4215 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4217 # The first example is sanitized, but the second is not. Any security benefits
4218 # from this production are trivial to circumvent. Either remove this test and
4219 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4220 # the test accordingly.
4224 # xxx parsoid strips the IDN character, so the round-trip tests will
4225 # obviously fail and are disabled. --cscott
4227 External links: IDN ignored character reference in hostname; strip it right off
4229 parsoid=wt2html,html2html
4231 http://e‌xample.com/
4233 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4236 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4240 External links: www.jpeg.org (bug 554)
4244 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4248 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4250 External links: URL within URL (original bug 2)
4252 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4254 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4257 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4261 BUG 361: URL inside bracketed URL
4263 [http://www.example.com/foo http://www.example.com/bar]
4265 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4270 BUG 361: URL within URL, not bracketed
4272 http://www.example.com/foo?=http://www.example.com/bar
4274 <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>
4279 BUG 289: ">"-token in URL-tail
4281 http://www.example.com/<hello>
4283 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4288 BUG 289: literal ">"-token in URL-tail
4290 http://www.example.com/<b>html</b>
4292 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4297 BUG 289: ">"-token in bracketed URL
4299 [http://www.example.com/<hello> stuff]
4301 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4306 BUG 289: literal ">"-token in bracketed URL
4308 [http://www.example.com/<b>html</b> stuff]
4310 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4315 BUG 289: literal double quote at end of URL
4317 http://www.example.com/"hello"
4319 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4324 BUG 289: literal double quote in bracketed URL
4326 [http://www.example.com/"hello" stuff]
4328 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4333 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4335 [http://www.example.com test]
4337 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4342 External links: link text with spaces
4344 [http://www.example.com a b c]
4345 [http://www.example.com ''a'' ''b'']
4347 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4348 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4353 External links: wiki links within external link (Bug 3695)
4355 [http://example.com [[wikilink]] embedded in ext link]
4357 <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>
4360 <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>
4364 BUG 787: Links with one slash after the url protocol are invalid
4368 [http:/example.com title]
4370 <p>http:/example.com
4371 </p><p>[http:/example.com title]
4376 Bracketed external links with template-generated invalid target
4378 [{{echo|http:/example.com}} title]
4380 <p>[http:/example.com title]
4385 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4387 ''[http://example.com text'']
4388 [http://example.com '''text]'''
4389 ''Something [http://example.com in italic'']
4390 ''Something [http://example.com mixed''''', even bold]'''
4391 '''''Now [http://example.com both''''']
4393 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4394 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4395 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4396 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4397 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4403 Bug 4781: %26 in URL
4405 http://www.example.com/?title=AT%26T
4407 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4410 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4413 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
4414 # % is actually legal in HTML5. Any change in output would need testing though.
4416 Bug 4781, 5267: %25 in URL
4418 http://www.example.com/?title=100%25_Bran
4420 <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>
4423 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4427 Bug 4781, 5267: %28, %29 in URL
4429 http://www.example.com/?title=Ben-Hur_%281959_film%29
4431 <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>
4434 <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>
4439 Bug 4781: %26 in autonumber URL
4441 [http://www.example.com/?title=AT%26T]
4443 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4446 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4450 Bug 4781, 5267: %26 in autonumber URL
4452 [http://www.example.com/?title=100%25_Bran]
4454 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4457 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4461 Bug 4781, 5267: %28, %29 in autonumber URL
4463 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4465 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4468 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4473 Bug 4781: %26 in bracketed URL
4475 [http://www.example.com/?title=AT%26T link]
4477 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4480 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4484 Bug 4781, 5267: %25 in bracketed URL
4486 [http://www.example.com/?title=100%25_Bran link]
4488 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4493 Bug 4781, 5267: %28, %29 in bracketed URL
4495 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4497 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4500 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4504 External link containing a period in the anchor. (bug 63947)
4506 [//foo.org/bar#baz. bang]
4508 [//foo.org/bar. bang]
4510 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4511 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4514 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4515 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4519 External link containing a single quote. (bug 63947)
4523 [//foo.org/bar'baz bang]
4525 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4526 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4529 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4530 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4535 External link containing a period in the anchor. (bug 63947)
4537 [//foo.org/bar#baz. bang]
4539 [//foo.org/bar. bang]
4541 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4542 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4545 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4546 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4550 External link containing a single quote. (bug 63947)
4554 [//foo.org/bar'baz bang]
4556 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4557 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4560 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4561 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4566 External link containing double-single-quotes in text '' (bug 4598 sanity check)
4568 Some [http://example.com/ pretty ''italics'' and stuff]!
4570 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
4575 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
4577 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
4579 <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>
4584 External link containing double-single-quotes with no space separating the url from text in italics
4586 [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]].]
4588 <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>
4591 <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>
4593 <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>
4597 External link with comments in link text
4599 [http://www.google.com Google <!-- comment -->]
4601 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
4606 URL-encoding in URL functions (single parameter)
4608 {{localurl:Some page|amp=&}}
4610 <p>/index.php?title=Some_page&amp=&
4615 URL-encoding in URL functions (multiple parameters)
4617 {{localurl:Some page|q=?&=&}}
4619 <p>/index.php?title=Some_page&q=?&amp=&
4626 http://example.com/index.php?foozoid%5B%5D=bar
4628 http://example.com/index.php?foozoid[]=bar
4630 <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>
4631 </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>
4634 <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>
4636 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
4640 IPv6 urls (bug 21261)
4644 http://[2404:130:0:1000::187:2]/index.php
4646 <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>
4651 Non-extlinks in brackets
4660 [{{echo|foo}} ''bar'']
4661 [{{echo|foo}}l's] errand
4662 [{{echo|foo}}l's errand]
4664 [url=http://example.com]
4677 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
4682 Percent encoding in external links
4684 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
4686 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
4689 <p><a rel="mw:ExtLink"
4690 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
4694 Use url link syntax for links where the content is equal the link target
4698 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4701 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4705 Parenthesis in external links, especially URL links
4709 http://example.com/test)
4711 http://example.com/(test)
4713 http://example.com/((test)
4715 (http://example.com/(test))
4717 (http://example.com/(test)))))
4719 http://example.com/a)b
4721 [http://example.com) foo]
4723 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4724 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
4725 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
4726 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
4727 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
4728 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
4729 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
4730 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
4733 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
4734 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
4735 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
4736 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
4737 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
4738 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
4739 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
4740 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
4744 Parenthesis in external links, w/ transclusion or comment
4746 (http://example.com/{{echo|hi}})
4748 (http://example.com<!-- hi -->)
4750 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
4751 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4754 <p>(<a data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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}}]}\" 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]}\">hi</span>"}]]}' 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}}"}}'>http://example.com/hi</a>)</p>
4756 <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>
4760 Replace invalid link targets when serializing
4764 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
4766 [[MediaWiki:Badtitletext|Manual]]
4776 Normal text. '''Bold text.''' Normal text. ''Italic text.''
4778 Normal text. '''''Bold italic text.''''' Normal text.
4780 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
4781 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
4786 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
4787 # parser strips. The wikitext contains just the first half of the bold
4790 Unclosed and unmatched quotes
4792 '''''Bold italic text '''with bold deactivated''' in between.'''''
4794 '''''Bold italic text ''with italic deactivated'' in between.'''''
4798 ..spanning two paragraphs (should not work).'''
4800 '''Bold tag left open
4802 ''Italic tag left open
4806 <!-- Unmatching number of opening, closing tags: -->
4807 '''This year''''s election ''should'' beat '''last year''''s.
4809 ''Tom'''s car is bigger than ''Susan'''s.
4811 Plain ''italic'''s plain
4813 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4814 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4815 </p><p><b>Bold text..</b>
4816 </p><p>..spanning two paragraphs (should not work).
4817 </p><p><b>Bold tag left open</b>
4818 </p><p><i>Italic tag left open</i>
4820 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4821 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4822 </p><p>Plain <i>italic'</i>s plain
4825 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
4826 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
4827 </p><p><b>Bold text..</b>
4828 </p><p>..spanning two paragraphs (should not work).<b></b>
4829 </p><p><b>Bold tag left open</b>
4830 </p><p><i>Italic tag left open</i>
4832 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
4833 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
4834 </p><p>Plain <i>italic'</i>s plain
4841 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
4844 # This should not produce <table></table> as <table><tr><td></td></tr></table>
4845 # is the bare minimum required by the spec, see:
4846 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
4847 # Parsoid team replies: empty table tags are legal in HTML5
4849 A table with no data.
4862 A table with stray table end tags on start tag line (wt2html)
4866 {|style="color: red;"|}
4868 {|style="color: red;" |}
4872 {|style="color: red;"|} id="foo"
4876 {|style="color: red;" |} id="foo"
4880 <table style="color: red;"></table>
4882 <table style="color: red;">
4888 <table style="color: red;" id="foo">
4894 <table style="color: red;" id="foo">
4903 A table with no data (take 2)
4911 # A table with nothing but a caption is invalid XHTML, we might want to render
4912 # this as <p>caption</p>
4913 # Parsoid team replies: table with only a caption is legal in HTML5
4915 A table with nothing but a caption
4923 </caption><tr><td></td></tr></table>
4926 <table><caption> caption</caption></table>
4930 A table with caption with default-spaced attributes and a table row
4933 |+ style="color: red;" | caption1
4939 <caption style="color: red;"> caption1
4948 A table with captions with non-default spaced attributes and a table row
4951 |+style="color: red;"|caption2
4952 |+ style="color: red;"| caption3
4958 <caption style="color: red;">caption2
4960 <caption style="color: red;"> caption3
4969 Table td-cell syntax variations
4973 | foo bar foo || baz
4974 | style='color:red;' | baz
4975 | style='color:red;' || baz
4982 <td> foo bar foo </td>
4985 <td style="color:red;"> baz
4987 <td> style='color:red;' </td>
5015 Simple table but with multiple dashes for row wikitext
5033 Multiplication table
5035 {| border="1" cellpadding="2"
5036 |+Multiplication table
5038 ! × !! 1 !! 2 !! 3
5056 <table border="1" cellpadding="2">
5057 <caption>Multiplication table
5104 Accept "||" in table headings
5119 Accept "!!" in table data
5132 <table data-parsoid='{}'>
5133 <tbody data-parsoid='{}'><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
5138 Accept "||" in indented table headings
5148 </th></tr></table></dd></dl>
5153 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5170 Accept "| !" at start of line in tables (ignore !-attribute)
5174 | !style="color:red" | bar
5186 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 +/-
5190 |style='color:red;'|+1
5191 |style='color:blue;'|-1
5203 <td style="color:red;">+1
5205 <td style="color:blue;">-1
5229 |rowspan=2| Cell 2, row 1 (and 2)
5240 <td rowspan="2"> Cell 2, row 1 (and 2)
5258 {| bgcolor=#ABCDEF border=2
5263 |the original table again
5271 <table bgcolor="#ABCDEF" border="2">
5279 <td>the original table again
5285 Invalid attributes in table cell (bug 1830)
5299 # The "|}" to close the table is missing from the input, so parsoid's
5300 # *2wt modes will fail.
5302 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5304 parsoid=wt2html,html2html
5307 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5311 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5312 <td>]" onmouseover="alert(document.cookie)">test
5320 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5325 Indented table markup mixed with indented pre content (proposed in bug 6200)
5330 Text that should be rendered preformatted
5338 <pre>Text that should be rendered preformatted
5347 Template-generated table cell attributes and cell content
5356 <td style="color: red"> Foo
5358 <td style="color: red"> Foo
5364 Template-generated table cell attributes and cell content (2)
5367 |align=center {{table_attribs}}
5372 <td align="center" style="color: red"> Foo
5378 Template-generated table cell attributes and cell content (3)
5381 |align=center {{table_cells}}
5386 <td align="center" style="color: red"> Foo </td>
5394 Table with row followed by newlines and table heading
5412 Table with empty line following the start tag
5429 # FIXME: Preserve the attribute properly (with an empty string as value) in
5430 # the PHP parser. Parsoid implements the behavior below.
5432 Table attributes with empty value
5442 </td></tr></tbody></table>
5447 Wikitext table with a lot of comments
5470 Wikitext table with double-line table cell
5487 Table cell with a single comment
5504 Table-cell after a comment-only-empty-line
5521 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
5523 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
5529 Build table with {{!}}
5531 {{{!}} class="wikitable"
5534 {{!}}- style="color:red;"
5535 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
5538 <table class="wikitable">
5544 <tr style="color:red;">
5546 <td style="color:red;"> second data
5551 # The expected HTML structure in this test is debatable. The PHP parser does
5552 # not parse this kind of table at all. The main focus for Parsoid is on
5553 # round-tripping, so this output is ok for now. TODO: revisit!
5555 Wikitext table with html-syntax row
5565 <td>foo</td></tr></tbody></table>
5568 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5569 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5570 ## PHP parser, which tidy then compounds by fostering the content
5571 ## entirely out of the table. Parsoid recognizes the table context
5572 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5573 ## depends on PHP's treatment of broken table markup!
5575 Implicit <td> after a |-
5577 parsoid=wt2html,wt2wt
5597 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5599 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5601 parsoid=wt2html,wt2wt
5634 <tr><td><pre>a</pre></td></tr>
5635 <tr><td> b</td></tr>
5640 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5642 Lists should be recognized in an implicit <td> context
5644 parsoid=wt2html,wt2wt
5671 Parsoid: Round-trip tables directly followed by content (bug 51219)
5673 parsoid=wt2html,wt2wt
5685 <td>foo</td></tr></tbody></table> bar
5689 <td>baz</td></tr></tbody></table><b>quux</b>
5693 Parsoid: Default to a newline after tables in new content (bug 51219)
5700 <nowiki> </nowiki>bar
5707 <tr><td>foo</td></tr></tbody></table> bar
5709 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5713 Parsoid: newline inducing block nodes don't suppress <nowiki>
5725 Parsoid: Row-syntax table headings followed by comment & table cells
5727 parsoid=wt2html,wt2wt
5731 <!-- foo --> || baz || quux
5745 <tbody><tr><th> foo </th><th> bar
5746 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
5751 # PHP throws away the (semi-broken) "foo" class here; Parsoid
5754 Parsoid: Recover better from broken table attributes
5774 <p>foo</p></td></tr>
5779 Strip unsupported table tags
5830 Plain link, capitalized
5834 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5839 Plain link, uncapitalized
5843 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5850 [[Main Page|The Main Page]]
5852 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5857 Piped link with comment in link text
5859 [[Main Page|The Main<!--front--> Page]]
5861 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5866 Piped link with multiple pipe characters in link text
5868 [[Main Page||The|Main|Page|]]
5870 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5873 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
5881 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5886 Broken link with fragment
5888 [[Zigzagzogzagzig#zug]]
5890 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5895 Special page link with fragment
5897 [[Special:Version#anchor]]
5899 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
5904 Nonexistent special page link with fragment
5906 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
5908 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
5915 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
5917 <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>
5924 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
5926 <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>!!!
5937 Bug 43661: Piped links with identical prefixes
5939 [[prefixed article|prefixed articles with spaces]]
5941 [[prefixed article|prefixed articlesaoeu]]
5943 [[Main Page|Main Page test]]
5945 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
5946 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
5947 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
5953 Link with HTML entity in suffix / tail
5955 [[Main Page]]", [[Main Page]]a
5957 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
5962 Link with 3 brackets
5971 Link with 4 brackets
5975 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
5980 Piped link with 3 brackets
5982 [[[main page|the main page]]]
5984 <p>[[[main page|the main page]]]
5989 Piped link with extlink-like text
5992 [[Main Page|This is a [bar]]]
5994 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
5995 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6000 Link with multiple pipes
6002 [[Main Page|The|Main|Page]]
6004 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6008 # Note that parsoid does not munge anchor text; all non-space
6009 # characters are valid in HTML5 ids.
6011 Anchor containing a #. (bug 63430)
6013 [[Main Page#And#Link]]
6015 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6018 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6024 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6026 <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>
6031 Link with space in namespace
6033 [[User talk:Foo bar]]
6035 <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>
6040 MemoryAlpha:AlphaTest
6042 This is an article in the MemoryAlpha namespace
6043 (which shadows the memoryalpha interwiki link).
6047 Namespace takes precedence over interwiki link (bug 51680)
6049 [[MemoryAlpha:AlphaTest]]
6051 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6055 # The previous test doesn't work correctly in html2*, due to not recognizing the
6056 # link as an internal one. This one checks for the correct behavior.
6058 Link to namespace preferred over interwiki with correct rel attribute
6060 parsoid=html2wt,html2html
6062 [[MemoryAlpha:AlphaTest]]
6064 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6069 Piped link to namespace
6071 [[Meta:Disclaimers|The disclaimers]]
6073 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6080 [[Usually caused by a typo (oops}]]
6082 <p>[[Usually caused by a typo (oops}]]
6089 Just a test of an article title containing a percent.
6093 Link containing % (not as a hex sequence)
6097 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6100 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6103 # note that the parsoid HTML is identical to the previous test output,
6104 # so the previous test ensures that the html2wt mode will generate the
6105 # "not as a hex sequence" wikitext.
6107 Link containing % as a single hex sequence interpreted to char
6109 parsoid=wt2wt,wt2html,html2html
6113 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6116 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6120 Link containing % as a double hex sequence interpreted to hex sequence
6124 <p>[[7%2525 Solution]]
6128 # note that parsoid does not munge anchor text; all non-space
6129 # characters are valid in HTML5 anchors.
6131 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6132 Example for such a section: == < ==
6134 [[%23%3c]][[%23%3e]]
6136 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6139 <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>
6143 Link containing "<#" and ">#" as a hex sequences
6145 [[%3c%23]][[%3e%23]]
6147 <p>[[%3c%23]][[%3e%23]]
6152 Link containing an equals sign
6154 [[Special:BookSources/isbn=4-00-026157-6]]
6156 <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>
6159 <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>
6165 Just a test of an article title containing a tilde.
6168 # note that links containing signatures, like [[Foo~~~~]], are
6169 # massaged by the pre-save transform (PST) and so the tildes are never
6170 # seen by the parser.
6172 Link containing a tilde
6176 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6179 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6183 Link containing double-single-quotes '' (bug 4598)
6185 [[Lista d''e paise d''o munno]]
6187 <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>
6190 <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>
6194 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6196 Some [[Link|pretty ''italics'' and stuff]]!
6198 <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>!
6201 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6205 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6207 ''Some [[Link|pretty ''italics'' and stuff]]!''
6209 <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>
6214 Link with double quotes in title part (literal) and alternate part (interpreted)
6216 [[File:Denys Savchenko ''Pentecoste''.jpg]]
6220 [[''Pentecoste''|Pentecoste]]
6222 [[''Pentecoste''|''Pentecoste'']]
6224 <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>
6225 </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>
6226 </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>
6227 </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>
6230 <meta typeof="mw:Placeholder"/>
6231 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6232 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6233 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6237 Broken image links with HTML captions (bug 39700)
6239 [[File:Nonexistent|<script></script>]]
6240 [[File:Nonexistent|100px|<script></script>]]
6241 [[File:Nonexistent|<]]
6242 [[File:Nonexistent|a<i>b</i>c]]
6244 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6245 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6246 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6247 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6254 [[http://www.example.com]]
6256 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6259 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6263 Plain link to URL with link text
6265 [[http://www.example.com Link text]]
6267 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6272 Plain link to protocol-relative URL
6274 [[//www.example.com]]
6276 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6279 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6283 Plain link to protocol-relative URL with link text
6285 [[//www.example.com Link text]]
6287 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6292 Plain link to page with question mark in title
6298 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6299 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6304 # I'm fairly sure the expected result here is wrong.
6305 # We want these to be URL links, not pseudo-pages with URLs for titles....
6306 # However the current output is also pretty screwy.
6309 # I'm changing it to match the current output--it arguably makes more
6310 # sense in the light of the test above. Old expected result was:
6311 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6313 # But I think this test is bordering on "garbage in, garbage out" anyway.
6318 Piped link to URL: [[http://www.example.com|an example URL]]
6320 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6323 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6327 BUG 2: [[page|http://url/]] should link to page, not http://url/
6329 [[Main Page|http://url/]]
6331 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6334 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6337 # Parsoid does not mark self-links, by design.
6339 BUG 337: Escaped self-links should be bold
6343 [[Bug462]] [[Bug462]]
6345 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6348 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6350 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6354 Self-link to section should not be bold
6358 [[Main Page#section]]
6360 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6371 Self-link to numeric title
6377 <p><strong class="selflink">0</strong>
6382 Link to numeric-equivalent title
6388 <p><a href="/wiki/00" title="00">00</a>
6393 <nowiki> inside a link
6395 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6397 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6402 Non-breaking spaces in title
6404 [[ Main Page ]]
6406 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6411 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6417 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6422 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6428 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6433 Internal link with en linktrail: no apostrophes (bug 27473)
6439 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6444 Internal link with ca linktrail with apostrophes (bug 27473)
6450 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6455 Internal link with kaa linktrail with apostrophes (bug 27473)
6461 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6466 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6468 [[User:Foo/Test/63636:Bar|Test]]
6470 <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>
6473 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6477 Purely hash wikilink
6479 title=[[User:test/123]]
6483 <p><a href="#a">b</a>
6486 <p data-parsoid='{}'><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>
6490 1. Interaction of linktrail and template encapsulation
6496 <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>
6500 2. Interaction of linktrail and template encapsulation
6504 {{echo|Some [[Fool]]}}s
6506 <p data-parsoid='{}'><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>
6510 3. Interaction of linktrail and template encapsulation
6514 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6516 <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 data-parsoid="{}">bold and foolish</b></p>
6526 Internal link with is link prefix
6530 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6532 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6543 Internal link with is link trail and link prefix
6547 [[mótmælendatrú|xxx]]ar
6549 mótmælenda[[söfnuður]]
6550 mótmælenda[[söfnuður|söfnuðir]]
6551 mótmælenda[[söfnuður|söfnuðir]]xxx
6553 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6554 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6555 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6556 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6557 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6562 Parsoid link trail escaping
6564 parsoid=html2wt,html2html
6568 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6572 Parsoid link prefix escaping
6575 parsoid=html2wt,html2html
6577 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6579 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6583 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6591 [http://wp.org ''foo'']
6593 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6594 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6595 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6596 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6601 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6605 [[Foo|{{echo|a}} b {{echo|c}}]]
6607 <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>
6611 Link with angle bracket after anchor
6615 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6618 <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>
6622 ### Interwiki links (see maintenance/interwiki.sql)
6626 Inline interwiki link
6628 [[MeatBall:SoftSecurity]]
6630 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6635 Inline interwiki link with empty title (bug 2372)
6639 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6644 Interwiki link encoding conversion (bug 1636)
6646 *[[Wikipedia:ro:Olteniţa]]
6647 *[[Wikipedia:ro:Olteniţa]]
6649 <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>
6650 <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>
6654 <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>
6655 <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>
6660 Interwiki link with fragment (bug 2130)
6662 [[MeatBall:SoftSecurity#foo]]
6664 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6668 # Ideally the wikipedia: prefix here should be proto-relative too
6670 Different interwiki prefixes mapping to the same URL
6678 [[:wikipedia:Foo|Foo]]
6680 [[wikipedia:en:Foo]]
6682 [[:wikipedia:en:Foo]]
6686 <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}'>en:Foo</a></p>
6688 <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}'>Foo</a></p>
6690 <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}'>wikipedia:Foo</a></p>
6692 <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}'>Foo</a></p>
6694 <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}'>wikipedia:en:Foo</a></p>
6696 <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}'>wikipedia:en:Foo</a></p>
6698 <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}'> wikiPEdia :Foo</a></p>
6702 Interwiki links that cannot be represented in wiki syntax
6705 [[meatball:ok#foo|ok with fragment]]
6706 [[meatball:ok_as_well?|ok ending with ? mark]]
6707 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6708 [http://de.wikipedia.org/wiki/#foo is just fragment]
6711 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok">meatball:ok</a>
6712 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo">ok with fragment</a>
6713 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?">ok ending with ? mark</a>
6714 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6715 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6719 Interwiki links: trail
6723 [[wikipedia:Foo|Ba]]r
6725 <p data-parsoid='{}'><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"}'>Bar</a></p>
6729 Local interwiki link
6731 [[local:Template:Foo]]
6733 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
6738 Local interwiki link: self-link to current page
6744 <p><strong class="selflink">local:Main Page</strong>
6749 Local interwiki link: prefix only (bug 64167)
6753 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
6758 Local interwiki link: with additional interwiki prefix (bug 61357)
6760 [[local:meatball:Hello]]
6762 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
6767 ### Interlanguage links
6768 ### Language links (so that searching for '### language' matches..)
6781 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6785 Interlanguage link with spacing
6794 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6798 Double interlanguage link
6808 <link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/Spanish"/>
6809 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6813 Interlanguage link variations
6823 <link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/Spanish" data-parsoid='{"stx":"simple","a":{"href":"//es.wikipedia.org/wiki/Spanish"},"sa":{"href":" es :Spanish"}}'/>
6824 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese" data-parsoid='{"stx":"simple","a":{"href":"//zh.wikipedia.org/wiki/Chinese"},"sa":{"href":" ZH :Chinese"}}'/>
6828 Interlanguage link, with prefix links
6839 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6843 Double interlanguage link, with prefix links (bug 8897)
6855 <link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/Spanish"/>
6856 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6860 "Extra" interlanguage links (bug 32189 / gerrit 111390)
6869 <link rel="mw:PageProp/Language" title="Multilingual" href="//wikisource.org/wiki/Article"/></p>
6873 Parsoid-specific test: Wikilinks with should RT properly
6879 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
6884 Parsoid bug 53221: Wikilinks should be properly entity-escaped
6888 He&nbsp;llo [[Foo|He&nbsp;llo]]
6890 He&nbsp;llo [[He&nbsp;llo]]
6892 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6893 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6897 Parsoid: handle constructor well
6905 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
6907 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
6911 Parsoid: recognize interlanguage links without a target page
6917 <p><link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
6921 Parsoid: recognize interwiki links without a target page
6927 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
6931 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
6937 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
6941 Interlanguage link with preceding local interwiki link (bug 68085)
6944 [[local:es:Spanish]]
6947 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
6952 Looks like an interlanguage link, but is actually a local interwiki
6958 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
6963 ### Redirects, Parsoid-only
6966 1. Simple redirect to page
6970 #REDIRECT [[Main Page]]
6972 <link rel="mw:PageProp/redirect" href="./Main_Page">
6975 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
6977 2. Other redirect variants
6979 parsoid=wt2html,wt2wt
6981 #REDIRECT [[Main_Page]]
6982 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
6984 <link rel="mw:PageProp/redirect" href="./Main_Page">
6985 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
6991 parsoid=wt2html,wt2wt
6996 <li>REDIRECT [[]]</li></ol>
7000 Optional colon in #REDIRECT
7002 # the colon is archaic syntax. we support it for wt2html, but we
7003 # don't care that it roundtrips back to the modern syntax.
7004 parsoid=wt2html,html2html
7006 #REDIRECT:[[Main Page]]
7008 <link rel="mw:PageProp/redirect" href="./Main_Page">
7012 Whitespace in #REDIRECT with optional colon
7014 # the colon and gratuitous whitespace is archaic syntax. we support
7015 # it for wt2html, but we don't care that it roundtrips back to the
7016 # modern syntax (without extra whitespace)
7017 parsoid=wt2html,html2html
7024 <link rel="mw:PageProp/redirect" href="./Main_Page">
7028 Piped link in #REDIRECT
7030 # content after piped link is ignored. we support this syntax,
7031 # but don't care that the piped link is lost when we roundtrip this.
7034 #REDIRECT [[Main Page|bar]]
7036 <link rel="mw:PageProp/redirect" href="./Main_Page">
7040 Redirect to category
7044 #REDIRECT [[Category:Foo]]
7046 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7050 Redirect to category with URL encoding
7054 #REDIRECT [[Category%3AFoo]]
7056 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7060 Redirect to category page
7062 parsoid=wt2html,html2html
7064 #REDIRECT [[:Category:Foo]]
7066 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7070 Redirect to image page (1)
7074 #REDIRECT [[File:Wiki.png]]
7076 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7080 Redirect to image page (2)
7084 #REDIRECT [[Image:Wiki.png]]
7086 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7090 Redirect to language
7094 #REDIRECT [[en:File:Wiki.png]]
7096 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7100 Redirect to interwiki
7104 #REDIRECT [[meatball:File:Wiki.png]]
7106 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7110 Non-English #REDIRECT
7115 #TILVÍSUN [[Main Page]]
7117 <link rel="mw:PageProp/redirect" href="./Main_Page">
7128 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7145 Broken br tag sanitization
7153 # TODO: Fix html2html mode (bug 51055)!
7154 # This </br> handling was added as part of bug 50831; but it
7155 # differs from how PHP+tidy handles this. We should investigate
7158 Parsoid: Broken br tag recognition
7174 Incorrecly removing closing slashes from correctly formed XHTML
7176 <br style="clear:both;" />
7178 <p><br style="clear:both;" />
7183 Failing to transform badly formed HTML into correct XHTML
7185 <br style="clear: left;">
7186 <br style="clear: right;">
7187 <br style="clear: both;">
7189 <p><br style="clear: left;" />
7190 <br style="clear: right;" />
7191 <br style="clear: both;" />
7196 Handling html with a div self-closing tag
7205 <p><div title />
7209 <p><div title=bar />
7210 <div title=bar/>
7212 <div title="bar/"></div>
7218 Handling html with a br self-closing tag
7227 <p><br title="title" />
7228 <br title="title" />
7245 Horizontal ruler (should it add that extra space?)
7259 Horizontal ruler -- 4+ dashes render hr
7268 Horizontal ruler -- eats additional dashes on the same line
7277 Horizontal ruler -- does not collapse dashes on consecutive lines
7288 Horizontal ruler -- <4 dashes render as plain text
7297 Horizontal ruler -- Supports content following dashes on same line
7309 ### Block-level elements
7318 <ul><li>Common list</li>
7320 <li>item 3</li></ul>
7331 <ol><li>Numbered list</li>
7333 <li> item 3</li></ol>
7347 ***#Number on level 4
7349 **#Number on level 3
7350 **#Number on level 3
7354 #** Level 3, but ordered
7357 <ol><li> with numbers</li></ol>
7358 <ul><li> and bullets</li></ul>
7359 <ol><li> and numbers</li></ol></li>
7361 <ul><li>bullet level 2
7362 <ul><li>bullet level 3
7363 <ol><li>Number on level 4</li></ol></li></ul></li>
7365 <ol><li>Number on level 3</li>
7366 <li>Number on level 3</li></ol></li></ul>
7367 <ol><li>number level 2</li></ol></li>
7369 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7370 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7381 <ul><li>bar</li></ul></li></ul>
7391 <ul><li><ul><li>foo</li></ul></li>
7397 Nested lists 3 (first element empty)
7403 <ul><li>bar</li></ul></li></ul>
7408 Nested lists 4 (first element empty)
7413 <ul><li><ul><li></li></ul></li>
7419 Nested lists 5 (both elements empty)
7424 <ul><li><ul><li></li></ul></li>
7430 Nested lists 6 (both elements empty)
7436 <ul><li></li></ul></li></ul>
7441 Nested lists 7 (skip initial nesting levels)
7445 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7450 Nested lists 8 (multiple nesting transitions)
7458 <ul><li><ul><li> bar</li></ul></li>
7459 <li> baz</li></ul></li>
7465 1. Lists with start-of-line-transparent tokens before bullets: Comments
7478 2. Lists with start-of-line-transparent tokens before bullets: Template close
7483 <ul><li>foo bar</li>
7489 List items are not parsed correctly following a <pre> block (bug 785)
7495 <ul><li> <pre>foo</pre></li>
7496 <li> <pre>bar</pre></li>
7502 List items from template
7513 * notSOL{{inner list}}
7516 <ul><li> item 1</li>
7517 <li> item 2</li></ul>
7518 <ul><li> item 0</li>
7520 <li> item 2</li></ul>
7521 <ul><li> item 0</li>
7524 <li> item 2</li></ul>
7529 List interrupted by empty line or heading
7537 <ul><li> foo</li></ul>
7538 <ul><li><ul><li> bar</li></ul></li></ul>
7539 <h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
7540 <ul><li> Another list item</li></ul>
7545 Multiple list tags generated by templates
7566 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7569 <!--This line will NOT split the list-->
7571 <!--This line will NOT split the list either-->
7573 <!--foo--> <!----> <!--This line NOT split the list either-->
7584 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7587 <!--This line will NOT split the list-->
7589 <!--This line will NOT split the list either-->
7591 <!--foo--> <!----> <!--This line NOT split the list
7604 (The PHP parser relies on Tidy for the hack)
7606 parsoid=wt2html,wt2wt
7610 * {{echo|<li>templated li-hack}}
7611 * <!--foo--> <li> unsupported li-hack with preceding comments
7614 <li><li>not a li-hack
7621 <li>templated li-hack</li>
7622 <li>unsupported li-hack with preceding comments</li>
7625 <li>not a li-hack</li>
7630 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7657 Parsoid: Test of whitespace serialization with Templated bullets
7664 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7668 # ------------------------------------------------------------------------
7669 # The next set of tests are about Parsoid's ability to handle badly nested
7670 # tags (parse, minimize scope of fixup, and roundtrip back)
7671 # ------------------------------------------------------------------------
7674 Unbalanced closing block tags break a list
7675 (php parser relies on Tidy to fix up)
7693 # Parsoid fails this test, but it might be tricky to support properly.
7696 Unbalanced closing non-block tags don't break a list
7697 (php parser relies on Tidy to fix up)
7704 <li><span>a</span></li>
7705 <li><span>b</span></li>
7719 Unclosed formatting tags that straddle lists are closed and reopened
7720 (php parser relies on Tidy to fix up)
7738 # Parsoid fails this test, but it might be tricky to support properly.
7741 List embedded in a non-block tag
7742 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
7749 <li><small>foo</small></li>
7759 # This is a bug in the PHP parser + tidy combination.
7760 # (The </tr> tag gets parsed as text and html-escaped by PHP,
7761 # and then fostered out of the table by tidy.)
7762 # We believe the Parsoid output to be correct.
7764 Table with missing opening <tr> tag
7766 parsoid=wt2html,wt2wt
7791 # Note that the current date is hard-coded as
7792 # 1970-01-01T00:02:03Z (a Thursday)
7793 # when running parser tests. The timezone is also fixed to GMT, so
7794 # local date will be identical to current date.
7797 Magic Word: {{CURRENTDAY}}
7806 Magic Word: {{CURRENTDAY2}}
7815 Magic Word: {{CURRENTDAYNAME}}
7824 Magic Word: {{CURRENTDOW}}
7833 Magic Word: {{CURRENTMONTH}}
7842 Magic Word: {{CURRENTMONTH1}}
7851 Magic Word: {{CURRENTMONTHABBREV}}
7853 {{CURRENTMONTHABBREV}}
7860 Magic Word: {{CURRENTMONTHNAME}}
7862 {{CURRENTMONTHNAME}}
7869 Magic Word: {{CURRENTMONTHNAMEGEN}}
7871 {{CURRENTMONTHNAMEGEN}}
7878 Magic Word: {{CURRENTTIME}}
7887 Magic Word: {{CURRENTHOUR}}
7896 Magic Word: {{CURRENTWEEK}} (@bug 4594)
7905 Magic Word: {{CURRENTYEAR}}
7914 Magic Word: {{CURRENTTIMESTAMP}}
7916 {{CURRENTTIMESTAMP}}
7923 Magic Words LOCAL (UTC)
7927 * {{LOCALMONTHNAME}}
7928 * {{LOCALMONTHNAMEGEN}}
7929 * {{LOCALMONTHABBREV}}
7938 * {{LOCALTIMESTAMP}}
7953 <li> 19700101000203</li></ul>
7958 Magic Word: {{FULLPAGENAME}}
7960 title=[[User:Ævar Arnfjörð Bjarmason]]
7964 <p>User:Ævar Arnfjörð Bjarmason
7969 Magic Word: {{FULLPAGENAMEE}}
7971 title=[[User:Ævar Arnfjörð Bjarmason]]
7975 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7980 Magic Word: {{TALKSPACE}}
7982 title=[[User:Ævar Arnfjörð Bjarmason]]
7991 Magic Word: {{TALKSPACE}}, same namespace
7993 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8002 Magic Word: {{TALKSPACE}}, main namespace
8004 title=[[Parser Test]]
8013 Magic Word: {{TALKSPACEE}}
8015 title=[[User:Ævar Arnfjörð Bjarmason]]
8024 Magic Word: {{SUBJECTSPACE}}
8026 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8035 Magic Word: {{SUBJECTSPACE}}, same namespace
8037 title=[[User:Ævar Arnfjörð Bjarmason]]
8046 Magic Word: {{SUBJECTSPACE}}, main namespace
8048 title=[[Parser Test]]
8056 Magic Word: {{SUBJECTSPACEE}}
8058 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8067 Magic Word: {{NAMESPACE}}
8069 title=[[User:Ævar Arnfjörð Bjarmason]]
8078 Magic Word: {{NAMESPACEE}}
8080 title=[[User:Ævar Arnfjörð Bjarmason]]
8089 Magic Word: {{NAMESPACENUMBER}}
8091 title=[[User:Ævar Arnfjörð Bjarmason]]
8100 Magic Word: {{SUBPAGENAME}}
8102 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8111 Magic Word: {{SUBPAGENAMEE}}
8113 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8122 Magic Word: {{ROOTPAGENAME}}
8124 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8128 <p>Ævar Arnfjörð Bjarmason
8133 Magic Word: {{ROOTPAGENAMEE}}
8135 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8139 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8144 Magic Word: {{BASEPAGENAME}}
8146 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8150 <p>Ævar Arnfjörð Bjarmason
8155 Magic Word: {{BASEPAGENAMEE}}
8157 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8161 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8166 Magic Word: {{TALKPAGENAME}}
8168 title=[[User:Ævar Arnfjörð Bjarmason]]
8172 <p>User talk:Ævar Arnfjörð Bjarmason
8177 Magic Word: {{TALKPAGENAMEE}}
8179 title=[[User:Ævar Arnfjörð Bjarmason]]
8183 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8188 Magic Word: {{SUBJECTPAGENAME}}
8190 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8194 <p>User:Ævar Arnfjörð Bjarmason
8199 Magic Word: {{SUBJECTPAGENAMEE}}
8201 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8203 {{SUBJECTPAGENAMEE}}
8205 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8210 Magic Word: {{NUMBEROFFILES}}
8219 Magic Word: {{PAGENAME}}
8221 title=[[User:Ævar Arnfjörð Bjarmason]]
8225 <p>Ævar Arnfjörð Bjarmason
8230 Magic Word: {{PAGENAME}} with metacharacters
8232 title=[['foo & bar = baz']]
8236 <p><i>'foo & bar = baz'</i>
8239 <p><i>'foo & bar = baz'</i></p>
8243 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8245 title=[[*RFC 1234 http://example.com/]]
8249 <p>*RFC 1234 http://example.com/
8252 <p>*RFC 1234 http://example.com/</p>
8256 Magic Word: {{PAGENAMEE}}
8258 title=[[User:Ævar Arnfjörð Bjarmason]]
8262 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8267 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8269 title=[[*RFC 1234 http://example.com/]]
8273 <p>*RFC_1234_http://example.com/
8276 <p>*RFC_1234_http://example.com/</p>
8280 Magic Word: {{REVISIONID}}
8289 Magic Word: {{SCRIPTPATH}}
8298 Magic Word: {{STYLEPATH}}
8307 Magic Word: {{SERVER}}
8311 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8316 Magic Word: {{SERVERNAME}}
8325 Magic Word: {{SITENAME}}
8334 Case-sensitive magic words, when cased differently, should just be template transclusions
8341 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8342 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8343 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8344 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8349 Case-insensitive magic words should still work with weird casing.
8359 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8364 Namespace 1 {{ns:1}}
8373 Namespace 1 {{ns:01}}
8382 Namespace 0 {{ns:0}} (bug 4783)
8390 Namespace 0 {{ns:00}} (bug 4783)
8398 Namespace -1 {{ns:-1}}
8407 Namespace User {{ns:User}}
8416 Namespace User talk {{ns:User_talk}}
8425 Namespace User talk {{ns:uSeR tAlK}}
8434 Namespace File {{ns:File}}
8443 Namespace File {{ns:Image}}
8452 Namespace (lang=de) Benutzer {{ns:User}}
8463 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8469 <p>Benutzer Diskussion
8477 {{urlencode:hi world?!}}
8478 {{urlencode:hi world?!|WIKI}}
8479 {{urlencode:hi world?!|PATH}}
8480 {{urlencode:hi world?!|QUERY}}
8490 Magic Word: prioritize type info over data-parsoid
8496 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8500 Magic Word: serialize on separate line (parsoid)
8502 parsoid=wt2wt,html2wt
8508 foo<meta property="mw:PageProp/notoc"/>bar
8512 Magic Word: rt non-english wikis
8519 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8526 Magic links: internal link to RFC (bug 479)
8530 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8535 Magic links: RFC (bug 479)
8539 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8544 Magic links: ISBN (bug 1937)
8548 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8553 Magic links: PMID incorrectly converts space to underscore
8557 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8566 Nonexistent template
8568 {{thistemplatedoesnotexist}}
8570 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8575 Template with invalid target containing tags
8577 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8579 <p>{{a<b>b</b>|foo|a=b|a = b}}
8584 Template with invalid target containing unclosed tag
8586 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8588 <p>{{a<b>|foo|a=b|a = b}}</b>
8593 Template with invalid target containing wikilink
8597 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8600 <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>
8604 Template with just whitespace in it, bug #68421
8608 <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>
8614 This is a test template
8622 <p>This is a test template
8627 Template with explicit namespace
8631 <p>This is a test template
8639 This is a test template with parameter {{{param}}}
8645 {{paramtest|param=foo}}
8647 <p>This is a test template with parameter foo
8652 Template:paramtestnum
8658 Template unnamed parameter
8660 {{paramtestnum|Main Page|the main page}}
8662 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8667 Template:templatesimple
8673 Template:templateredirect
8675 #redirect [[Template:templatesimple]]
8679 Template:templateasargtestnum
8685 Template:templateasargtest
8687 {{template{{{templ}}}}}
8691 Template:templateasargtest2
8697 Template with template name as unnamed argument
8699 {{templateasargtestnum|templatesimple}}
8706 Template with template name as argument
8708 {{templateasargtest|templ=simple}}
8715 Template with template name as argument (2)
8717 {{templateasargtest2|templ=templatesimple}}
8724 Template:templateasargtestdefault
8726 {{{{{templ|templatesimple}}}}}
8736 Template with default value
8738 {{templateasargtestdefault}}
8745 Template with default value (value set)
8747 {{templateasargtestdefault|templ=templa}}
8756 {{templateredirect}}
8763 Template with argument in separate line
8765 {{ templateasargtest |
8773 Template with complex template as argument
8776 param ={{ templateasargtest |
8779 <p>This is a test template with parameter (test)
8784 Template with thumb image (with link in description)
8787 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8789 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>
8792 <p>This is a test template with parameter</p>
8793 <div class="thumb tright">
8794 <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>
8795 <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>
8801 Template:complextemplate
8803 {{{1}}} {{paramtest|
8804 param ={{{param}}}}}
8808 Template with complex arguments
8811 param ={{ templateasargtest |
8812 templ = simple }}|[[Template:complextemplate|link]]}}
8814 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8819 BUG 553: link with two variables in a piped link
8822 |[[{{{1}}}|{{{2}}}]]
8827 <td>[[{{{1}}}|{{{2}}}]]
8833 Magic variable as template parameter
8835 {{paramtest|param={{SITENAME}}}}
8837 <p>This is a test template with parameter MediaWiki
8844 [[{{{param}}}|link]]
8848 Template parameter as link source
8850 {{linktest|param=Main Page}}
8852 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
8857 Template-generated attribute string (k='v')
8859 <span {{attr_str|id|v1}}>bar</span>
8861 <p><span id="v1">bar</span>
8868 including another template, {{paramtest|param={{{arg}}}}}
8872 Template passing argument to another template
8874 {{paramtest2|arg='hmm'}}
8876 <p>including another template, This is a test template with parameter 'hmm'
8887 Template as link source
8891 [[{{linktest2}}|Main Page]]
8893 [[{{linktest2}}]]Page
8895 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8896 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8897 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
8915 Template infinite loop
8919 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
8924 Template from main namespace
8943 BUG 529: Template with table, not included at beginning of line
8962 BUG 523: Template shouldn't eat newline (or add an extra one before table)
8982 BUG 41: Template parameters shown as broken links
8991 Template with targets containing wikilinks
8995 {{[[{{echo|foo}}]]}}
8997 {{{{echo|[[foo}}]]}}
8999 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9000 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9008 ''None'' of '''this''' should be
9010 but rather passed unmodified
9017 # hmm, fix this or just deprecate msgnw and document its behavior?
9021 {{msgnw:MSGNW test}}
9023 <p>''None'' of '''this''' should be
9025  but rather passed unmodified
9026 {{test}}
9036 {{int:youhavenewmessages|lots of money|not!}}
9038 <p>You have lots of money (not!).
9045 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9049 <includeonly> and <noinclude> being included
9060 <onlyinclude>Foo</onlyinclude>bar
9064 <onlyinclude> being included
9076 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9080 <onlyinclude> and <includeonly> being included
9089 <includeonly> and <noinclude> on a page
9091 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9098 Un-closed <noinclude>
9105 <onlyinclude> on a page
9107 <onlyinclude>Foo</onlyinclude>bar
9114 Un-closed <onlyinclude>
9121 Self-closed noinclude, includeonly, onlyinclude tags
9132 Unbalanced includeonly and noinclude tags
9136 |b</noinclude></noinclude>
9137 |c</noinclude></includeonly>
9138 |d</includeonly></includeonly>
9147 <td>c</includeonly>
9149 <td>d</includeonly></includeonly>
9155 Template:Includeonly section
9158 ==Includeonly section==
9164 Bug 6563: Edit link generation for section shown by <includeonly>
9166 {{includeonly section}}
9168 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
9169 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
9173 # Uses same input as the contents of [[Template:Includeonly section]]
9175 Bug 6563: Section extraction for section shown by <includeonly>
9180 ==Includeonly section==
9188 Bug 6563: Edit link generation for section suppressed by <includeonly>
9191 ==Includeonly section==
9195 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
9200 Bug 6563: Section extraction for section suppressed by <includeonly>
9205 ==Includeonly section==
9213 Un-closed <includeonly>
9220 Includes and comments at SOL
9222 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9229 <includeonly>can have stuff</includeonly>=== here ===
9232 <h2><span class="mw-headline" id="hu">hu</span></h2>
9237 <h3><span class="mw-headline" id="here">here</span></h3>
9240 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment -->
9241 <h2 data-parsoid='{}'> hu </h2>
9243 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9245 <p data-parsoid='{}'>some</p>
9246 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>
9247 <ul data-parsoid='{}'>
9248 <li data-parsoid='{}'> stuff</li>
9250 <li data-parsoid='{}'> here</li></ul>
9252 <h3 data-parsoid='{}'> here </h3>
9255 # TODO: test with DOM fragment reuse!
9257 Parsoid: DOM fragment reuse
9259 parsoid=wt2wt,wt2html
9261 a{{echo|b<table></table>c}}d
9273 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
9274 <table></table>c"}},"i":0}}]}'>b</span>
9275 <table about="#mwt1"></table><span about="#mwt1">c</span>d
9278 <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"]}'>ab</p><span about="#mwt2">
9280 <table about="#mwt2"></table><span about="#mwt2">
9282 <p about="#mwt2">cd</p>
9285 <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}}]}'>a</p><span about="#mwt3">
9288 <table about="#mwt3"></table><span about="#mwt3">
9291 <p about="#mwt3">b</p>
9295 Parsoid: Merge double tds (bug 50603)
9304 <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>
9309 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9319 <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}}]}'>
9321 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9327 ### <includeonly> and <noinclude> in attributes
9330 0. includeonly around the entire attribute
9332 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9334 <p><span id="v2">bar</span>
9339 1. includeonly in html attr key
9341 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9343 <p><span id="foo">bar</span>
9348 2. includeonly in html attr value
9350 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9351 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9353 <p><span id="v1">bar</span>
9354 <span id="v1">bar</span>
9359 3. includeonly in part of an attr value
9361 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9363 <p><span style="color:red;">bar</span>
9368 4. includeonly in table attributes
9392 ### Token Stream Patcher tests
9394 ### These tests won't always pass wt2wt and other modes because
9395 ### on serialization, the table will be output on a new line.
9396 ### For now, we are blacklisting them, and using this to test selser.
9400 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9402 parsoid=wt2html,wt2wt
9404 {{echo|}}{| width = '100%'
9408 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
9409 <table width="100%">
9412 <td>foo</td></tr></tbody></table>
9416 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9418 parsoid=wt2html,wt2wt
9420 <includeonly>a</includeonly>{| {{{b}}}
9424 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid=\"{&quot;dsr&quot;:[31,38,null,null],&quot;src&quot;:&quot;{{{b}}}&quot;}\">{{{b}}}</span>"},{"html":""}]]}' data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}'>
9425 <tbody><tr><td>c</td></tr>
9431 ### Testing parsing of templates where a template arg
9432 ### has the same name as the template itself.
9442 Templates: Template Name/Arg clash: 1. Use of positional param
9451 Templates: Template Name/Arg clash: 2. Use of named param
9460 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9469 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9473 Templates: 1. Simple use
9482 Templates: 2. Inside a block tag
9484 <div>{{echo|Foo}}</div>
9485 <blockquote>{{echo|Foo}}</blockquote>
9488 <blockquote>Foo</blockquote>
9498 Templates: P-wrapping: 1a. Templates on consecutive lines
9509 Templates: P-wrapping: 1b. Templates on consecutive lines
9523 Templates: P-wrapping: 1c. Templates on consecutive lines
9526 {{echo|bar}} <div>baz</div>
9539 Templates: P-wrapping: 1d. Template preceded by comment-only line
9548 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9552 Templates: Inline Text: 1. Multiple template uses
9554 {{echo|Foo}}bar{{echo|baz}}
9561 Templates: Inline Text: 2. Back-to-back template uses
9563 {{echo|Foo}}{{echo|bar}}
9570 Templates: Block Tags: 1. Multiple template uses
9572 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9574 <div>Foo</div><div>bar</div><div>baz</div>
9579 Templates: Block Tags: 2. Back-to-back template uses
9581 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9583 <div>Foo</div><div>bar</div>
9587 # This is an edge case relating to paragraph wrapping.
9589 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
9594 <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
9599 Templates: Links: 1. Simple example
9601 {{echo|[[Foo|bar]]}}
9603 <p><a href="/wiki/Foo" title="Foo">bar</a>
9608 Templates: Links: 2. Generation of link href
9610 [[{{echo|Foo}}|bar]]
9612 <p><a href="/wiki/Foo" title="Foo">bar</a>
9617 Templates: Links: 3. Generation of part of a link href
9619 [[Fo{{echo|o}}|bar]]
9623 [[Foo{{echo|bar}}baz]]
9625 [[Foo{{echo|bar}}|bar]]
9627 [[:Foo{{echo|bar}}]]
9629 [[:Foo{{echo|bar}}|bar]]
9631 <p><a href="/wiki/Foo" title="Foo">bar</a>
9632 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9633 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9634 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9635 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9636 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9641 Templates: Links: 4. Multiple templates generating link href
9643 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9645 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9650 Templates: Links: 5. Generation of link text
9652 [[Foo|{{echo|bar}}]]
9654 <p><a href="/wiki/Foo" title="Foo">bar</a>
9659 Templates: Links: 5. Nested templates (only outermost template should be marked)
9661 {{echo|[[{{echo|Foo}}|bar]]}}
9663 <p><a href="/wiki/Foo" title="Foo">bar</a>
9668 Templates: HTML Tag: 1. Generation of HTML attr. key
9670 <div {{echo|style}}="color:red;">foo</div>
9672 <div style="color:red;">foo</div>
9677 Templates: HTML Tag: 2. Generation of HTML attr. value
9679 <div style={{echo|'color:red;'}}>foo</div>
9681 <div style="color:red;">foo</div>
9686 Templates: HTML Tag: 3. Generation of HTML attr key and value
9688 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9690 <div style="color:red;">foo</div>
9695 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9697 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9699 <div title="This is a long title with just one piece templated">foo</div>
9704 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9706 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9708 <div title="This is a long title with just one piece templated">foo</div>
9713 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9715 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9717 <div title="This is a long title with just one piece templated">foo</div>
9722 Templates: HTML Tag: 7. Generation of partial attribute key string
9724 <div st{{echo|yle}}="color:red;">foo</div>
9726 <div style="color:red;">foo</div>
9731 Templates: HTML Tables: 1. Generating start of a HTML table
9733 {{echo|<table><tr><td>foo</td>}}</tr></table>
9735 <table><tr><td>foo</td></tr></table>
9740 Templates: HTML Tables: 2a. Generating middle of a HTML table
9742 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9744 <table><tr><td>foo</td></tr></table>
9749 Templates: HTML Tables: 2b. Generating middle of a HTML table
9751 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9753 <table><tr><td>foo</td></tr></table>
9758 Templates: HTML Tables: 3. Generating end of a HTML table
9760 <table><tr>{{echo|<td>foo</td></tr></table>}}
9762 <table><tr><td>foo</td></tr></table>
9767 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9769 {{echo|<table>}}<tr><td>foo</td></tr></table>
9771 <table><tr><td>foo</td></tr></table>
9776 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9778 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9780 <table><tr><td>foo</td></tr></table>
9785 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9787 <table><tr>{{echo|<td>}}foo</td></tr></table>
9789 <table><tr><td>foo</td></tr></table>
9794 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9796 <table><tr><td>foo{{echo|</td>}}</tr></table>
9798 <table><tr><td>foo</td></tr></table>
9803 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9805 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9807 <table><tr><td>foo</td></tr></table>
9812 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9814 <table><tr><td>foo</td></tr>{{echo|</table>}}
9816 <table><tr><td>foo</td></tr></table>
9821 Templates: HTML Tables: 5. Proper fostering of categories from inside
9823 parsoid=wt2html,wt2wt
9825 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9826 <!--Two categories (Bug 50330)-->
9827 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9829 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9830 <!--Two categories (Bug 50330)-->
9831 <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>
9835 Templates: Wiki Tables: 1a. Fostering of entire template content
9843 <tr><td></td></tr></table>
9855 Templates: Wiki Tables: 1b. Fostering of entire template content
9868 <tr><td></td></tr></table>
9882 Templates: Wiki Tables: 2. Fostering of partial template content
9892 <tr><td></td></tr></table>
9905 Templates: Wiki Tables: 3. td-content via multiple templates
9908 {{echo|{{pipe}}a}}{{echo|b}}
9919 Templates: Wiki Tables: 4. Templated tags, no content
9925 <tr><td></td></tr></table>
9930 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9944 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9958 Templates: Lists: Multi-line list-items via templates
9960 *{{echo|a {{nonexistent|
9962 *{{echo|b {{nonexistent|
9965 <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>
9966 <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>
9971 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9973 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9975 <p><i>ab</i>c<i>d</i>e
9980 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9981 (PHP parser generates misnested html)
9983 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9985 <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>
9989 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9990 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9992 parsoid=wt2html,wt2wt
9994 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9996 <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>
9997 <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>
9998 <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>
10002 Templates: Ugly nesting: 4. Divs opened/closed across templates
10004 a<div>b{{echo|c</div>d}}e
10015 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10021 |{{echo|foo</table>}}
10025 <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|}"]}'>
10029 <td>foo</td></tr></tbody></table><span about="#mwt1">
10030 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10035 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10045 <td>1. {{echo|foo </table>}}</td>
10047 <td>2. {{echo|baz </table>}}</td>
10060 <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>"]}'>
10065 <td>1. foo </td></tr></tbody></table></td>
10067 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10068 </span><span about="#mwt2">
10069 </span><span about="#mwt2">
10070 </span><span about="#mwt2">abc</span><span about="#mwt2">
10071 </span><span about="#mwt2">
10072 </span><span about="#mwt2">
10073 </span><span about="#mwt2">
10074 </span><span about="#mwt2">
10075 </span><span about="#mwt2">
10076 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10077 </span><span about="#mwt2">
10082 Templates: Ugly templates: 3. newline-only template parameter
10091 # This looks like a bug: a single newline triggers p/br for some reason.
10093 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10102 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10103 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10105 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10111 <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
10112 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10116 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10117 # that are "identical" and generate nesting cycles in the algorithm
10119 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10121 {{echo|<table><tr><td><table>}}
10125 <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"}'>
10126 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10127 </table></td></tr></tbody></table>
10131 Parser Functions: 1. Simple example
10140 Parser Functions: 2. Nested use (only outermost should be marked up)
10149 ### Pre-save transform tests
10152 pre-save transform: subst:
10158 This is a test template
10162 pre-save transform: normal template
10172 pre-save transform: nonexistent template
10176 {{thistemplatedoesnotexist}}
10178 {{thistemplatedoesnotexist}}
10183 pre-save transform: subst magic variables
10192 # This is bug 89, which I fixed. -- wtm
10194 pre-save transform: subst: templates with parameters
10198 {{subst:paramtest|param="something else"}}
10200 This is a test template with parameter "something else"
10204 Template:nowikitest
10206 <nowiki>'''not wiki'''</nowiki>
10210 pre-save transform: nowiki in subst (bug 1188)
10214 {{subst:nowikitest}}
10216 <nowiki>'''not wiki'''</nowiki>
10221 Template:commenttest
10223 This template has <!-- a comment --> in it.
10227 pre-save transform: comment in subst (bug 1936)
10231 {{subst:commenttest}}
10233 This template has <!-- a comment --> in it.
10237 pre-save transform: unclosed tag
10241 <nowiki>'''not wiki'''
10243 <nowiki>'''not wiki'''
10247 pre-save transform: mixed tag case
10251 <NOwiki>'''not wiki'''</noWIKI>
10253 <NOwiki>'''not wiki'''</noWIKI>
10257 pre-save transform: unclosed comment in <nowiki>
10261 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10263 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10266 # Leading @ in this template definition works around a limitation
10267 # in parsoid's parserTests which otherwise strips the <span> from the
10268 # result (confusing it for a template wrapper)
10272 @<span onmouseover="alert('crap')">Oh no</span>
10276 (confirming safety of fix for subst bug 1936)
10278 {{Template:dangerous}}
10280 <p>@<span>Oh no</span>
10285 pre-save transform: comment containing gallery (bug 5024)
10289 <!-- <gallery>data</gallery> -->
10291 <!-- <gallery>data</gallery> -->
10295 pre-save transform: comment containing extension
10299 <!-- <tag>data</tag> -->
10301 <!-- <tag>data</tag> -->
10305 pre-save transform: comment containing nowiki
10309 <!-- <nowiki>data</nowiki> -->
10311 <!-- <nowiki>data</nowiki> -->
10315 pre-save transform: <noinclude> in subst (bug 3298)
10325 pre-save transform: <onlyinclude> in subst (bug 3298)
10329 {{subst:Includes2}}
10337 {{<includeonly>subst:</includeonly>Includes}}
10341 Template:SafeSubstTest
10343 {{<includeonly>safesubst:</includeonly>Includes}}
10347 bug 22297: safesubst: works during PST
10351 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10357 bug 22297: safesubst: works during normal parse
10366 subst: does not work during normal parse
10370 <p>{{subst:Includes}}
10375 pre-save transform: context links ("pipe trick")
10379 [[Article (context)|]]
10382 [[Bar:Article (context)|]]
10383 [[:Bar:Article (context)|]]
10385 [[|Article (context)]]
10389 [[Article (context)|Article]]
10390 [[Bar:Article|Article]]
10391 [[:Bar:Article|Article]]
10392 [[Bar:Article (context)|Article]]
10393 [[:Bar:Article (context)|Article]]
10395 [[Article (context)]]
10396 [[Bar:X (Y) Z|X (Y) Z]]
10397 [[:Bar:X (Y) Z|X (Y) Z]]
10401 pre-save transform: context links ("pipe trick") with interwiki prefix
10405 [[interwiki:Article|]]
10406 [[:interwiki:Article|]]
10407 [[interwiki:Bar:Article|]]
10408 [[:interwiki:Bar:Article|]]
10410 [[interwiki:Article|Article]]
10411 [[:interwiki:Article|Article]]
10412 [[interwiki:Bar:Article|Bar:Article]]
10413 [[:interwiki:Bar:Article|Bar:Article]]
10417 pre-save transform: context links ("pipe trick") with parens in title
10419 pst title=[[Somearticle (context)]]
10423 [[Article (context)|Article]]
10427 pre-save transform: context links ("pipe trick") with comma in title
10429 pst title=[[Someplace, Somewhere]]
10432 [[Otherplace, Elsewhere|]]
10433 [[Otherplace, Elsewhere, Anywhere|]]
10435 [[Otherplace, Somewhere|Otherplace]]
10436 [[Otherplace, Elsewhere|Otherplace]]
10437 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10441 pre-save transform: context links ("pipe trick") with parens and comma
10443 pst title=[[Someplace (IGNORED), Somewhere]]
10446 [[Otherplace (place), Elsewhere|]]
10448 [[Otherplace, Somewhere|Otherplace]]
10449 [[Otherplace (place), Elsewhere|Otherplace]]
10453 pre-save transform: context links ("pipe trick") with comma and parens
10455 pst title=[[Who, me? (context)]]
10458 [[Me, Myself, and I (1937 song)|]]
10460 [[Yes, you. (context)|Yes, you.]]
10461 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10465 pre-save transform: context links ("pipe trick") with namespace
10467 pst title=[[Ns:Somearticle]]
10471 [[Ns:Article|Article]]
10475 pre-save transform: context links ("pipe trick") with namespace and parens
10477 pst title=[[Ns:Somearticle (context)]]
10481 [[Ns:Article (context)|Article]]
10485 pre-save transform: context links ("pipe trick") with namespace and comma
10487 pst title=[[Ns:Somearticle, Context, Whatever]]
10491 [[Ns:Article, Context, Whatever|Article]]
10495 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10497 pst title=[[Ns:Somearticle, Context (context)]]
10501 [[Ns:Article (context)|Article]]
10505 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10507 pst title=[[Ns:Somearticle (IGNORED), Context]]
10511 [[Ns:Article, Context|Article]]
10515 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10519 [[Article(context)|]]
10520 [[Bar:Article(context)|]]
10521 [[:Bar:Article(context)|]]
10522 [[|Article(context)]]
10526 [[Article(context)|Article]]
10527 [[Bar:Article(context)|Article]]
10528 [[:Bar:Article(context)|Article]]
10529 [[Article(context)]]
10530 [[Bar:X(Y)Z|X(Y)Z]]
10531 [[:Bar:X(Y)Z|X(Y)Z]]
10535 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10539 [[Article (context)|]]
10540 [[Bar:Article (context)|]]
10541 [[:Bar:Article (context)|]]
10542 [[|Article (context)]]
10546 [[Article (context)|Article]]
10547 [[Bar:Article (context)|Article]]
10548 [[:Bar:Article (context)|Article]]
10549 [[Article (context)]]
10550 [[Bar:X (Y) Z|X (Y) Z]]
10551 [[:Bar:X (Y) Z|X (Y) Z]]
10555 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
10559 [[Article(context)|]]
10560 [[Bar:Article(context)|]]
10561 [[:Bar:Article(context)|]]
10562 [[|Article(context)]]
10566 [[Article(context)|Article]]
10567 [[Bar:Article(context)|Article]]
10568 [[:Bar:Article(context)|Article]]
10569 [[Article(context)]]
10570 [[Bar:X(Y)Z|X(Y)Z]]
10571 [[:Bar:X(Y)Z|X(Y)Z]]
10575 pre-save transform: context links ("pipe trick") with commas (bug 21660)
10579 [[Article (context), context|]]
10580 [[Article (context),context|]]
10581 [[Bar:Article (context), context|]]
10582 [[Bar:Article (context),context|]]
10583 [[:Bar:Article (context), context|]]
10584 [[:Bar:Article (context),context|]]
10586 [[Article (context), context|Article]]
10587 [[Article (context),context|Article]]
10588 [[Bar:Article (context), context|Article]]
10589 [[Bar:Article (context),context|Article]]
10590 [[:Bar:Article (context), context|Article]]
10591 [[:Bar:Article (context),context|Article]]
10595 pre-save transform: trim trailing empty lines
10599 Empty lines are trimmed
10605 Empty lines are trimmed
10609 pre-save transform: Signature expansion
10614 * <noinclude>~~~</noinclude>
10615 * <includeonly>~~~</includeonly>
10616 * <onlyinclude>~~~</onlyinclude>
10618 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10619 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10620 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10621 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10626 pre-save transform: Signature expansion in nowiki tags (bug 93)
10632 <nowiki>~~~~</nowiki>
10634 <includeonly><nowiki>~~~~</nowiki></includeonly>
10636 <noinclude><nowiki>~~~~</nowiki></noinclude>
10638 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10640 {{subst:Foo}} shall be converted to FOO
10642 As well as inside noinclude/onlyinclude
10643 <noinclude>{{subst:Foo}}</noinclude>
10644 <onlyinclude>{{subst:Foo}}</onlyinclude>
10646 But not inside includeonly
10647 <includeonly>{{subst:Foo}}</includeonly>
10651 <nowiki>~~~~</nowiki>
10653 <includeonly><nowiki>~~~~</nowiki></includeonly>
10655 <noinclude><nowiki>~~~~</nowiki></noinclude>
10657 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10659 FOO shall be converted to FOO
10661 As well as inside noinclude/onlyinclude
10662 <noinclude>FOO</noinclude>
10663 <onlyinclude>FOO</onlyinclude>
10665 But not inside includeonly
10666 <includeonly>{{subst:Foo}}</includeonly>
10670 Parsoid: Recognize nowiki with trailing space in tags
10674 <nowiki ><div>[[foo]]</nowiki >
10682 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10689 Parsoid: Recognize nowiki with odd capitalization
10693 <noWikI ><div>[[foo]]</Nowiki >
10695 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10700 Parsoid: Escape nowiki with trailing space in tags
10704 <nowiki > foo </nowiki >
10710 <p><nowiki > foo </nowiki ></p>
10711 <p>a<nowiki />b</p>
10712 <p>c<nowiki/ >d</p>
10716 Parsoid: Escape weird noWikI capitalizations
10720 <noWikI > foo </NoWikI >
10722 <p><noWikI > foo </NoWikI ></p>
10726 ### Message transform tests
10729 message transform: magic variables
10739 message transform: should not transform wiki markup
10749 message transform: <noinclude> in transcluded template (bug 4926)
10759 message transform: <onlyinclude> in transcluded template (bug 4926)
10769 {{#special:}} page name, known
10773 {{#special:Recentchanges}}
10775 Special:RecentChanges
10779 {{#special:}} page name with subpage, known
10783 {{#special:Recentchanges/param}}
10785 Special:RecentChanges/param
10789 {{#special:}} page name, unknown
10793 {{#special:foobar nonexistent}}
10795 Special:Foobar nonexistent
10799 {{#speciale:}} page name, known
10803 {{#speciale:Recentchanges}}
10805 Special:RecentChanges
10809 {{#speciale:}} page name with subpage, known
10813 {{#speciale:Recentchanges/param}}
10815 Special:RecentChanges/param
10819 {{#speciale:}} page name, unknown
10823 {{#speciale:foobar nonexistent}}
10825 Special:Foobar_nonexistent
10831 ### For Parsoid-specific tests, see
10832 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10837 parsoid=wt2html,wt2wt,html2html
10839 [[Image:foobar.jpg]]
10841 <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>
10844 <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>
10849 Simple image (using File: namespace, now canonical)
10851 [[File:Foobar.jpg]]
10853 <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>
10856 <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>
10861 Right-aligned image
10863 [[File:Foobar.jpg|right]]
10865 <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>
10868 <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>
10874 [[File:Foobar.jpg|right|Caption text]]
10876 <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>
10879 <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>
10883 Image with caption, bug 53312 #1
10885 [[File:Foobar.jpg|right|Caption page stuff]]
10887 <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>
10890 <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>
10894 Image with caption, bug 53312 #2
10896 [[File:Foobar.jpg|right|Caption page=]]
10898 <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>
10901 <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>
10905 Image with caption, bug 53312 #3
10907 [[File:Foobar.jpg|right|Caption page=stuff]]
10909 <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>
10912 <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>
10916 Allow empty links in image captions (Bug 60753)
10920 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10925 <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>
10928 <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"}],"dsr":[0,59,2,2]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"dsr":[2,null,null,null]}'><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 data-parsoid='{"dsr":[null,57,null,null]}'>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"},"dsr":[32,41,2,2]}'>Link1</a>
10930 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"},"dsr":[47,56,2,2]}'>Link2</a>
10931 </figcaption></figure>
10935 Link with empty target
10944 Image with empty attribute
10946 parsoid=wt2html,wt2wt,html2html
10948 [[File:Foobar.jpg|right||Caption text]]
10950 <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>
10953 <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>
10957 1. Block image with individual attributes from templates
10959 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10961 <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>
10964 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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}}]}\" 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]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
10968 2. Block Image with individual attributes from templates
10970 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10972 <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>
10975 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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}}]}\" 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]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" 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}}]}\" 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]}\">137px</span>"}]]}'><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="16" width="137"/></a><figcaption>This is a caption</figcaption></figure>
10979 3. Inline image with individual attributes from templates
10981 [[File:Foobar.jpg|{{echo|50px}}]]
10983 <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>
10986 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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}}]}\" 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]}\">50px</span>"}]]}' data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}'><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>
10989 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10990 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10992 Image with multiple attributes from the same template
10994 [[File:Foobar.jpg|{{image_attribs}}]]
10996 <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>
10999 <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>
11002 # Parsoid's output here is broken (incorrect p-wrapping); see bug 64901.
11004 Image with link tails
11008 123[[File:Foobar.jpg]]456
11009 123[[File:Foobar.jpg|right]]456
11010 123[[File:Foobar.jpg|thumb]]456
11012 <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
11014 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
11015 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
11018 <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>
11020 <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>
11022 <div class="thumb tright">
11023 <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>
11024 <div class="thumbcaption">
11025 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11031 <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>
11032 123<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>456
11033 123<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>456
11037 Image with multiple captions -- only last one is accepted
11039 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11041 <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>
11044 <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>
11048 Image with multiple widths -- use last
11050 [[File:Foobar.jpg|200px|300px|caption]]
11052 <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>
11055 <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>
11059 Image with multiple alignments -- use first (bug 48664)
11063 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11065 [[File:Foobar.jpg|middle|text-top|caption]]
11067 <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>
11068 <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>
11071 <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>
11072 <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>
11076 Image with width attribute at different positions
11078 [[File:Foobar.jpg|200px|right|Caption]]
11079 [[File:Foobar.jpg|right|200px|Caption]]
11080 [[File:Foobar.jpg|right|Caption|200px]]
11082 <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>
11083 <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>
11084 <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>
11087 <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>
11088 <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>
11089 <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>
11092 # a sad bit of backward-compatibility
11094 Image with size specified with pxpx (bug 13500, 51628)
11096 parsoid=wt2html,wt2wt,html2html
11098 [[File:Foobar.jpg|20pxpx]]
11099 [[File:Foobar.jpg|200x20pxpx]]
11101 <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>
11102 <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>
11105 <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>
11109 Image with link parameter, wiki target
11111 [[File:Foobar.jpg|link=Main Page]]
11113 <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>
11116 <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>
11119 # parsoid bug 49293 (part 1)
11121 Image with link parameter, URL target
11123 [[File:Foobar.jpg|link=http://example.com/]]
11125 <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>
11128 <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>
11131 # parsoid bug 49293 (part 2)
11133 Image with link parameter, protocol-less URL target
11135 [[File:Foobar.jpg|link=//example.com/]]
11137 <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>
11140 <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>
11144 Image with link parameter, wgExternalLinkTarget
11146 [[Image:foobar.jpg|link=http://example.com/]]
11148 wgExternalLinkTarget='foobar'
11150 <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>
11155 Image with link parameter, wgNoFollowLinks set to false
11157 [[Image:foobar.jpg|link=http://example.com/]]
11159 wgNoFollowLinks=false
11161 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11166 Image with link parameter, wgNoFollowDomainExceptions
11168 [[Image:foobar.jpg|link=http://example.com/]]
11170 wgNoFollowDomainExceptions='example.com'
11172 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11177 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11179 [[Image:foobar.jpg|link=http://example.com/|Title]]
11181 wgExternalLinkTarget='foobar'
11183 <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>
11188 Image with empty link parameter
11190 [[File:Foobar.jpg|link=]]
11192 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11195 <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>
11199 Image with link parameter (wiki target) and unnamed parameter
11201 [[File:Foobar.jpg|link=Main_Page|Title]]
11203 <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>
11206 <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>
11210 Image with link parameter (URL target) and unnamed parameter
11212 [[File:Foobar.jpg|link=http://example.com/|Title]]
11214 <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>
11217 <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>
11221 Thumbnail image with link parameter
11224 parsoid=wt2html,wt2wt,html2html
11226 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11228 <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>
11231 <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>
11235 Manually-specified thumbnail image
11239 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11241 <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>
11244 <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>
11248 Manually-specified thumbnail image with explicit link to wiki page
11251 parsoid=wt2html,wt2wt,html2html
11253 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11255 <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>
11258 <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>
11262 Manually-specified thumbnail image with explicit link to url
11265 parsoid=wt2html,wt2wt,html2html
11267 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11269 <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>
11272 <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>
11276 Manually-specified thumbnail image with explicit no link
11279 parsoid=wt2html,wt2wt,html2html
11281 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11283 <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>
11286 <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>
11290 Manually-specified thumbnail image with explicit link and alt text
11293 parsoid=wt2html,wt2wt,html2html
11295 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11297 <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>
11300 <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>
11304 Image with frame and link
11306 parsoid=wt2html,wt2wt,html2html
11308 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11310 <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>
11313 <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>
11317 Image with frame and link and explicit alt
11319 parsoid=wt2html,wt2wt,html2html
11321 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11323 <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>
11326 <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>
11330 Image with wiki markup in implicit alt
11332 parsoid=wt2html,wt2wt,html2html
11334 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11336 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11338 <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>
11339 </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>
11342 <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>
11343 <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>
11346 ###################
11347 # Conflicting image format options.
11348 # First option specified should 'win'.
11349 # All three cases in each test should be identical.
11352 Image with 'frameless' first.
11354 parsoid=wt2html,wt2wt,html2html
11356 [[File:Foobar.jpg|frameless|caption]]
11358 [[File:Foobar.jpg|frameless|frame|caption]]
11360 [[File:Foobar.jpg|frameless|thumb|caption]]
11362 <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>
11363 </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>
11364 </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>
11367 <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>
11368 <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>
11369 <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>
11373 Image with 'frame' first.
11375 parsoid=wt2html,wt2wt,html2html
11377 [[File:Foobar.jpg|frame|caption]]
11378 [[File:Foobar.jpg|frame|frameless|caption]]
11379 [[File:Foobar.jpg|frame|thumb|caption]]
11381 <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>
11382 <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>
11383 <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>
11386 <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><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><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>
11390 Image with 'thumb' first.
11392 parsoid=wt2html,wt2wt,html2html
11394 [[File:Foobar.jpg|thumb|caption]]
11395 [[File:Foobar.jpg|thumb|frameless|caption]]
11396 [[File:Foobar.jpg|thumb|frame|caption]]
11398 <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>
11399 <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>
11400 <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>
11403 <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><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><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>
11406 ###################
11408 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11409 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11410 # Foobar has actual size of 1941x220
11411 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11412 # a scalable format.
11413 # 2. Framed images always ignore size options; always render at default size.
11414 # 3. "Unspecified format" and border are the only types which can be
11418 Image: "unspecified format" and border enlarge
11420 parsoid=wt2html,wt2wt,html2html
11422 [[File:Foobar.jpg|2000px]]
11424 [[File:Foobar.jpg|border|2000px]]
11426 <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>
11427 </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>
11430 <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>
11431 <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>
11435 Image: "unspecified format" and border reduce
11437 parsoid=wt2html,wt2wt,html2html
11439 [[File:Foobar.jpg|1000px]]
11441 [[File:Foobar.jpg|border|1000px]]
11443 <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>
11444 </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>
11447 <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>
11448 <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>
11452 Image: thumbs reduce
11454 parsoid=wt2html,wt2wt,html2html
11456 [[File:Foobar.jpg|thumb|50px]]
11458 <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>
11461 <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>
11465 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11467 parsoid=wt2html,wt2wt,html2html
11469 [[File:Foobar.jpg|thumb|2000px]]
11471 [[File:Foobar.svg|thumb|2000px]]
11473 <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>
11474 <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>
11477 <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>
11478 <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>
11482 Image: frameless can reduce in size
11484 parsoid=wt2html,wt2wt,html2html
11486 [[File:Foobar.jpg|frameless|50px]]
11488 <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>
11491 <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>
11495 Image: bitmap frameless can't be enlarged past original size, but vector can
11497 parsoid=wt2html,wt2wt,html2html
11499 [[File:Foobar.jpg|frameless|2000px]]
11501 [[File:Foobar.svg|frameless|2000px]]
11503 <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>
11504 </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>
11507 <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>
11508 <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>
11512 Image: framed images are always unscaled.
11514 parsoid=wt2html,wt2wt,html2html
11516 [[File:Foobar.jpg|frame]]
11518 [[File:Foobar.jpg|frame|50px]]
11520 [[File:Foobar.jpg|frame|50x50px]]
11522 [[File:Foobar.jpg|frame|2000px]]
11524 <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>
11525 <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>
11526 <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>
11527 <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>
11530 <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><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><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><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>
11533 ###################
11536 Link to image page- image page normally doesn't exists, hence edit link
11537 Add test with existing image page
11538 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11542 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
11547 bug 18784 Link to non-existent image page with caption should use caption as link text
11549 [[:Image:test|caption]]
11551 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
11556 Frameless image caption with a free URL
11558 [[File:Foobar.jpg|http://example.com]]
11560 <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>
11563 <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>
11567 Thumbnail image caption with a free URL
11571 [[File:Foobar.jpg|thumb|http://example.com]]
11573 <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>
11576 <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>
11580 Thumbnail image caption with a free URL and explicit alt
11583 parsoid=wt2html,wt2wt,html2html
11585 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11587 <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>
11590 <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>
11594 SVG thumbnails with no language set
11597 [[File:Foobar.svg|thumb|caption]]
11599 <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>
11602 <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>
11606 SVG thumbnails with language de
11608 parsoid=wt2html,wt2wt,html2html
11610 [[File:Foobar.svg|thumb|caption|lang=de]]
11612 <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>
11615 <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>
11619 SVG thumbnails with invalid language code
11621 parsoid=wt2html,wt2wt,html2html
11623 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11625 <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>
11628 <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>
11632 BUG 1887: A ISBN with a thumbnail
11634 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11636 <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>
11639 <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>
11643 BUG 1887: A RFC with a thumbnail
11645 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11647 <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>
11650 <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>
11654 BUG 1887: A mailto link with a thumbnail
11656 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11658 <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>
11661 <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>
11664 # Pending resolution to bug 368
11666 BUG 648: Frameless image caption with a link
11668 [[File:Foobar.jpg|text with a [[link]] in it]]
11670 <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>
11673 <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>
11677 BUG 648: Frameless image caption with a link (suffix)
11679 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11681 <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>
11684 <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>
11688 BUG 648: Frameless image caption with an interwiki link
11690 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11692 <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>
11695 <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>
11699 BUG 648: Frameless image caption with a piped interwiki link
11701 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11703 <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>
11706 <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>
11710 Escape HTML special chars in image alt text
11712 [[File:Foobar.jpg|& < > "]]
11714 <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>
11717 <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>
11721 BUG 499: Alt text should have Ӓ, not &1234;
11723 [[File:Foobar.jpg|♀]]
11725 <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>
11728 <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>
11732 Broken image caption with link
11734 parsoid=wt2html,wt2wt,html2html
11736 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11738 <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.
11741 <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>
11745 Image caption containing another image
11747 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11749 <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>
11752 <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>
11756 Image: caption containing a newline
11758 [[File:Foobar.jpg|This
11761 <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>
11764 <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>
11768 Image: caption containing leading space
11769 (The leading space should not trigger nowiki escaping in wt2wt mode)
11771 [[File:Foobar.jpg|thumb| bar]]
11773 <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>
11776 <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>
11780 Image: caption containing a table
11782 parsoid=wt2html,wt2wt,html2html
11784 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11790 and some more text.]]
11792 <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>
11795 <figure typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
11798 <tr><th>Foo </th><th>Bar</th></tr>
11801 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11805 Bug 3090: External links other than http: in image captions
11807 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11809 <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>
11812 <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>
11818 parsoid=wt2html,wt2wt,html2html
11820 [[Image:foobar.jpg|a|class=b]]
11822 <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>
11825 <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>
11829 Localized image handling (1).
11831 parsoid=wt2html,wt2wt,html2html
11834 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11836 <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>
11839 <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>
11843 Localized image handling (2).
11846 parsoid=wt2html,wt2wt,html2html
11849 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11851 <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>
11854 <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>
11858 "border", "frameless" and "class" attributes on an image.
11861 parsoid=wt2html,wt2wt,html2html
11863 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11865 <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>
11868 <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>
11871 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11873 Invalid image attributes (bug 62500)
11876 parsoid=wt2html,wt2wt,html2html
11878 [[File:Foobar.jpg|thumb|float|left|caption]]
11880 [[File:Foobar.jpg|thumb|righ|caption]]
11882 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11884 <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>
11885 <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>
11886 <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>
11889 <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><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><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>
11895 #REDIRECT [[File:Barfoo.jpg]]
11901 [[Image:Barfoo.jpg]]
11903 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11908 Missing image with uploads disabled
11912 [[Image:Foobaz.jpg]]
11914 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11918 # Parsoid-specific testing for images
11919 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11920 # Currently imperfect due to a flaw in the Parsoid testrunner
11922 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11926 Parsoid-specific image handling - simple image with size and middle alignment
11928 [[File:Foobar.jpg|middle|50px]]
11930 <p><span class="mw-valign-middle" typeof="mw:Image">
11931 <a href="File:Foobar.jpg">
11932 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11939 Parsoid-specific image handling - simple image with size, middle alignment,
11940 non-standard namespace alias
11942 parsoid=wt2wt,wt2html,html2html
11944 [[Image:Foobar.jpg|middle|50px]]
11946 <p><span class="mw-valign-middle" typeof="mw:Image">
11947 <a href="File:Foobar.jpg">
11948 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11955 Parsoid-specific image handling - simple image with size and middle alignment
11958 [[File:Foobar.jpg|50px|middle]]
11960 <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>
11964 Parsoid-specific image handling - simple image with size and middle alignment
11965 and non-standard namespace name
11967 parsoid=wt2html,wt2wt,html2html
11969 [[Image:Foobar.jpg|50px|middle]]
11971 <p><span class="mw-valign-middle" typeof="mw:Image">
11972 <a href="File:Foobar.jpg">
11973 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11980 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11982 [[File:Foobar.jpg|500x10px|baseline|caption]]
11984 <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>
11988 Parsoid-specific image handling - simple image with border and size spec
11990 [[File:Foobar.jpg|50px|border|caption]]
11992 <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>
11996 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11998 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12000 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
12001 <a href="File:Foobar.jpg">
12002 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
12004 <figcaption>caption content</figcaption>
12009 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12012 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12014 <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>
12018 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12020 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12022 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
12023 <a href="File:Foobar.jpg">
12024 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
12026 <figcaption>caption</figcaption>
12031 Parsoid-specific image handling - thumbnail with specific size, halign,
12032 valign, and caption (existing content)
12034 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12036 <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>
12040 Parsoid-specific image handling - framed image with specific size and caption
12043 parsoid=wt2html,wt2wt,html2html
12045 [[File:Foobar.jpg|frame|500x50px|caption]]
12047 <figure typeof="mw:Image/Frame">
12048 <a href="File:Foobar.jpg">
12049 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
12051 <figcaption>caption</figcaption>
12056 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12059 parsoid=wt2html,wt2wt,html2html
12061 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12063 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
12064 <a href="File:Foobar.jpg">
12065 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
12067 <figcaption>caption</figcaption>
12072 Parsoid-specific image handling - frameless image with specific size, border, and caption
12074 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12076 <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>
12080 Parsoid-specific image handling - simple image with a formatted caption
12082 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12084 <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>"}'>
12085 <a href="File:Foobar.jpg">
12086 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
12091 Parsoid-specific image handling - caption with a template in it
12093 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12095 <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>
12099 Parsoid-specific image handling - caption with unbalanced tags in it
12101 parsoid=wt2html,wt2wt,html2html
12104 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12108 <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>
12113 Parsoid-specific image handling - empty caption (1)
12115 parsoid=wt2html,wt2wt
12117 [[File:Foobar.jpg|thumb|]]
12119 <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>
12122 # empty captions don't get serialized unless we're in the "round trip" case
12124 Parsoid-specific image handling - empty caption (2)
12128 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12129 <a href="File:Foobar.jpg">
12130 <img resource="./File:Foobar.jpg"
12131 src="//example.com/images/3/3a/Foobar.jpg"
12132 height="25" width="220"/>
12134 <figcaption></figcaption>
12137 [[File:Foobar.jpg|thumb]]
12141 Parsoid-specific image handling - whitespace caption
12143 [[File:Foobar.jpg|thumb| ]]
12145 <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>
12149 Parsoid-specific image handling - lang option
12152 [[File:Foobar.svg|lang=de|caption]]
12156 <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>
12165 Subpage test/subpage
12173 subpage title=[[Subpage test]]
12177 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12182 Subpage noslash link
12184 subpage title=[[Subpage test]]
12188 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12192 # TODO: make this PHP-parser compatible!
12194 Relative subpage noslash link
12196 parsoid=wt2wt,wt2html,html2html
12197 subpage title=[[Subpage test/1/2/3/4]]
12203 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/" title="Subpage test/1/2/subpage/">subpage</a></p>
12204 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12208 Parsoid: dot-slash prefixed wikilinks
12218 </p><p>[[././baz/]]
12223 </p><p>[[././baz/]]
12228 Render invalid page names as plain text (bug 51090)
12241 [[{{echo|./../foo}}|bar]]
12242 [[{{echo|foo/.}}|bar]]
12243 [[{{echo|foo/..}}|bar]]
12244 [[{{echo|foo~~~~bar}}]]
12245 [[{{echo|foo>bar}}]]
12246 [[{{echo|foo././bar}}]]
12247 [[{{echo|foo{bar}}]]
12248 [[{{echo|foo}bar}}]]
12249 [[{{echo|foo[bar}}]]
12250 [[{{echo|foo]bar}}]]
12251 [[{{echo|foo<bar}}]]
12253 <p>[[./../foo|bar]]
12263 </p><p>[[./../foo|bar]]
12276 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
12277 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]][[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]][[<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>
12285 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12290 BUG 561: {{/Subpage}}
12292 subpage title=[[Page]]
12296 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12304 Category:MediaWiki User's Guide
12312 [[:Category:MediaWiki User's Guide]]
12314 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12323 [[Category:MediaWiki User's Guide]]
12325 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12329 PAGESINCATEGORY invalid title fatal (r33546 fix)
12331 {{PAGESINCATEGORY:<bogus>}}
12338 Category with different sort key
12342 [[Category:MediaWiki User's Guide|Foo]]
12344 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12348 Category with identical sort key
12352 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12354 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12358 Category with empty sort key
12363 [[Category:MediaWiki User's Guide|]]
12365 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12369 Category with empty sort key and parentheses
12374 [[Category:Foo (bar)|]]
12376 [[Category:Foo (bar)|Foo]]
12380 Category with link tail
12385 123[[Category:Foo]]456
12387 123[[Category:Foo]]456
12391 Category with template
12396 [[Category:{{echo|Foo}}]]
12398 [[Category:{{echo|Foo}}]]
12402 Category with template in sort key
12407 [[Category:Foo|{{echo|Bar}}]]
12409 [[Category:Foo|{{echo|Bar}}]]
12413 Category with template in sort key and title
12418 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12420 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12424 Category / paragraph interactions
12426 Foo [[Category:Baz]] Bar
12428 Foo [[Category:Baz]]
12436 [[Category:Baz]] Bar
12449 {{echo|[[Category:Baz]]}}
12464 Parsoid: Serialize link to category page with colon escape
12470 [[:Category:Foo|Bar]]
12473 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12474 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12479 Parsoid: Link prefix/suffixes aren't applied to category links
12481 parsoid=wt2html,wt2wt,html2html
12486 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12490 Parsoid: Serialize link to file page with colon escape
12496 [[:File:Foo.png|Bar]]
12499 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12500 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12505 Parsoid: Serialize a genuine category link without colon escape
12510 [[Category:Foo|Bar]]
12512 <link rel="mw:PageProp/Category" href="Category:Foo">
12513 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12517 Parsoid: Defaultsort
12521 {{DEFAULTSORT:Foo}}
12523 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12527 ### Inter-language links
12530 Interlanguage links
12538 es:Alimento fr:Nourriture zh:食品
12540 <p><link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/Alimento"/>
12541 <link rel="mw:PageProp/Language" href="//fr.wikipedia.org/wiki/Nourriture"/>
12542 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/食品"/></p>
12546 Duplicate interlanguage links (bug 24502)
12557 <p><link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/1"/>
12558 <link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/2"/>
12559 <link rel="mw:PageProp/Language" href="//fr.wikipedia.org/wiki/1"/>
12560 <link rel="mw:PageProp/Language" href="//fr.wikipedia.org/wiki/2"/></p>
12567 Basic section headings
12574 ===Smaller headline===
12577 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12580 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12583 <h3><span class="mw-headline" id="Smaller_headline">Smaller headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12589 Section headings with TOC
12592 === Subheadline 1 ===
12593 ===== Skipping a level =====
12594 ====== Skipping a level ======
12598 ===Another headline===
12600 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12602 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12604 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12606 <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>
12608 <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>
12615 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12617 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12623 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12624 <h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12625 <h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
12626 <h6><span class="mw-headline" id="Skipping_a_level_2">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
12627 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12630 <h3><span class="mw-headline" id="Another_headline">Another headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12634 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12636 Handling of sections up to level 6 and beyond
12639 == Level 2 Heading==
12640 === Level 3 Heading===
12641 ==== Level 4 Heading====
12642 ===== Level 5 Heading=====
12643 ====== Level 6 Heading======
12644 ======= Level 7 Heading=======
12645 ======== Level 8 Heading========
12646 ========= Level 9 Heading=========
12647 ========== Level 10 Heading==========
12649 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12651 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12653 <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>
12655 <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>
12657 <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>
12659 <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>
12661 <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>
12662 <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>
12663 <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>
12664 <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>
12665 <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>
12679 <h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
12680 <h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12681 <h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12682 <h4><span class="mw-headline" id="Level_4_Heading">Level 4 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
12683 <h5><span class="mw-headline" id="Level_5_Heading">Level 5 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
12684 <h6><span class="mw-headline" id="Level_6_Heading">Level 6 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
12685 <h6><span class="mw-headline" id=".3D_Level_7_Heading.3D">= Level 7 Heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
12686 <h6><span class="mw-headline" id=".3D.3D_Level_8_Heading.3D.3D">== Level 8 Heading==</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
12687 <h6><span class="mw-headline" id=".3D.3D.3D_Level_9_Heading.3D.3D.3D">=== Level 9 Heading===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
12688 <h6><span class="mw-headline" id=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D">==== Level 10 Heading====</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
12693 TOC regression (bug 9764)
12697 ==== title 1.1.1 ====
12702 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12704 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12706 <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>
12708 <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>
12711 <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>
12714 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12716 <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>
12722 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12723 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12724 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
12725 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12726 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12727 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12732 TOC with wgMaxTocLevel=3 (bug 6204)
12738 ==== title 1.1.1 ====
12743 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12745 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12747 <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>
12748 <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>
12751 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12753 <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>
12759 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12760 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12761 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
12762 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12763 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12764 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12769 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12775 ====Section 1.1.1====
12776 ====Section 1.1.1.1====
12779 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12781 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12783 <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>
12786 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12790 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12791 <h3><span class="mw-headline" id="Section_1.1">Section 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12792 <h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
12793 <h4><span class="mw-headline" id="Section_1.1.1.1">Section 1.1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 1.1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
12794 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12800 Resolving duplicate section names
12805 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12806 <h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12811 Resolving duplicate section names with differing case (bug 10721)
12816 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12817 <h2><span class="mw-headline" id="Foo_Bar_2">Foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12829 Template with sections, __NOTOC__
12836 <h2><span class="mw-headline" id="Section_0">Section 0</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12837 <h3><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-1" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12838 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12839 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12844 __NOEDITSECTION__ keyword
12850 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12851 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12856 Link inside a section heading
12858 ==Section with a [[Main Page|link]] in it==
12860 <h2><span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12865 TOC regression (bug 12077)
12872 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12874 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12876 <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>
12879 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12883 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12884 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
12885 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12890 BUG 1219 URL next to image (good)
12892 http://example.com [[Image:foobar.jpg]]
12894 <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>
12899 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12902 The line above must have a trailing space!
12905 But just in case it doesn't...
12907 <h1><span class="mw-headline" id=".3D">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
12908 <p>The line above must have a trailing space!
12910 <h1><span class="mw-headline" id=".3D_2">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
12911 <p>But just in case it doesn't...
12916 Header with special characters (bug 25462)
12918 The tooltips shall not show entities to the user (ie. be double escaped)
12935 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12937 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12939 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12940 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12941 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12942 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12943 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12947 <h2><span class="mw-headline" id="text_.3E_text">text > text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: text > text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12950 <h2><span class="mw-headline" id="text_.3C_text">text < text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: text < text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12953 <h2><span class="mw-headline" id="text_.26_text">text & text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: text & text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12956 <h2><span class="mw-headline" id="text_.27_text">text ' text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: text ' text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12959 <h2><span class="mw-headline" id="text_.22_text">text " text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: text " text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12965 Header with space, plus and underscore as entity
12967 Id should not contain + for spaces
12969 == Space between Text ==
12972 == Space-Entity between Text ==
12975 == Plus+between+Text ==
12978 == Plus-Entity+between+Text ==
12981 == Underscore_between_Text ==
12984 == Underscore-Entity_between_Text ==
12987 [[#Space between Text]]
12988 [[#Space-Entity between Text]]
12989 [[#Plus+between+Text]]
12990 [[#Plus-Entity+between+Text]]
12991 [[#Underscore_between_Text]]
12992 [[#Underscore-Entity_between_Text]]
12994 <p>Id should not contain + for spaces
12996 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12998 <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>
12999 <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>
13000 <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>
13001 <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>
13002 <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>
13003 <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>
13007 <h2><span class="mw-headline" id="Space_between_Text">Space between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Space between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13010 <h2><span class="mw-headline" id="Space-Entity_between_Text">Space-Entity between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Space-Entity between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13013 <h2><span class="mw-headline" id="Plus.2Bbetween.2BText">Plus+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Plus+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13016 <h2><span class="mw-headline" id="Plus-Entity.2Bbetween.2BText">Plus-Entity+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Plus-Entity+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13019 <h2><span class="mw-headline" id="Underscore_between_Text">Underscore_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Underscore between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13022 <h2><span class="mw-headline" id="Underscore-Entity_between_Text">Underscore-Entity_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Underscore-Entity_between_Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
13024 </p><p><a href="#Space_between_Text">#Space between Text</a>
13025 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13026 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13027 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13028 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13029 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13034 Headers with excess '=' characters
13035 (Are similar tests necessary beyond the 1st level?)
13039 =''italic'' heading==
13040 ==''italic'' heading=
13042 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13044 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13045 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13046 <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>
13047 <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>
13051 <h1><span class="mw-headline" id="foo.3D">foo=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
13052 <h1><span class="mw-headline" id=".3Dfoo">=foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =foo">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
13053 <h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: italic heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
13054 <h1><span class="mw-headline" id=".3Ditalic_heading">=<i>italic</i> heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: =italic heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
13059 HTML headers vs TOC (bug 23393)
13060 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13072 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13074 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13076 <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>
13077 <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>
13080 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13082 <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>
13083 <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>
13089 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13090 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13091 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13092 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13093 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13094 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13099 Single-line or multiline-comments can follow headings
13101 parsoid=wt2html,wt2wt
13109 <h2><span class="mw-headline" id="foo">foo</span></h2>
13110 <h2><span class="mw-headline" id="bar">bar</span></h2>
13111 <h2><span class="mw-headline" id="baz">baz</span></h2>
13116 BUG 1219 URL next to image (broken)
13118 http://example.com[[Image:foobar.jpg]]
13120 <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>
13125 Bug 1186 news: in the middle of text
13127 http://en.wikinews.org/wiki/Wikinews:Workplace
13129 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13135 Namespaced link must have a title
13144 Namespaced link must have a title (bad fragment version)
13146 [[Project:#fragment]]
13148 <p>[[Project:#fragment]]
13154 ### HTML tags and HTML attributes
13158 div with no attributes
13160 <div>HTML rocks</div>
13162 <div>HTML rocks</div>
13167 div with double-quoted attribute
13169 <div id="rock">HTML rocks</div>
13171 <div id="rock">HTML rocks</div>
13176 div with single-quoted attribute
13178 <div id='rock'>HTML rocks</div>
13180 <div id="rock">HTML rocks</div>
13185 div with unquoted attribute
13187 <div id=rock>HTML rocks</div>
13189 <div id="rock">HTML rocks</div>
13194 div with illegal double attributes
13196 <div id="a" id="b">HTML rocks</div>
13198 <div id="b">HTML rocks</div>
13202 # FIXME: produce empty string instead of "class" in the PHP parser, following
13205 div with empty attribute value, space before equals
13209 <div class =>HTML rocks</div>
13211 <div class="">HTML rocks</div>
13216 div with multiple empty attribute values
13220 <div id= title=>HTML rocks</div>
13222 <div id="" title="">HTML rocks</div>
13227 table with multiple empty attribute values
13235 <table title="" id="">
13236 <tbody><tr><td> hi</td></tr>
13240 # The PHP parser escapes the opening brace to { for some reason, so
13241 # disabled this test for it.
13243 div with braces in attribute value
13247 <div title="{}">Foo</div>
13249 <div title="{}">Foo</div>
13252 # This it very inconsistent in the PHP parser: it returns
13253 # class="class" if there is a space between the name and the equal sign (see
13254 # 'div with empty attribute value, space before equals'), but strips the
13255 # attribute completely if the space is missing. We hope that not much content
13256 # depends on this, so are implementing the behavior below in Parsoid for
13257 # consistencies' sake. Disabled for the PHP parser.
13258 # FIXME: fix this behavior in the PHP parser?
13260 div with empty attribute value, no space before equals
13264 <div class=>HTML rocks</div>
13266 <div class="">HTML rocks</div>
13271 HTML multiple attributes correction
13273 <p class="error" class="awesome">Awesome!</p>
13275 <p class="awesome">Awesome!</p>
13280 Table multiple attributes correction
13283 !+ class="error" class="awesome"| status
13288 <th class="awesome"> status
13296 <DIV ID="x">HTML ROCKS</DIV>
13298 <div id="x">HTML ROCKS</div>
13303 Non-ASCII pseudo-tags are rendered as text
13312 Pseudo-tag with URL 'name' renders as url link
13314 <http://example.com/>
13316 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13321 text with amp in the middle of nowhere
13325 <p>Remember AT&T?
13330 text with character entity: eacute
13332 I always thought é was a cute letter.
13334 <p>I always thought é was a cute letter.
13337 <p>I always thought é was a cute letter.</p>
13341 text with entity-escaped character entity-like string: eacute
13343 I always thought &eacute; was a cute letter.
13345 <p>I always thought &eacute; was a cute letter.
13350 text with undefined character entity: xacute
13352 I always thought &xacute; was a cute letter.
13354 <p>I always thought &xacute; was a cute letter.
13358 # TODO: generalize to PHP parser?
13364 <data value="5">five</data>
13365 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13366 <mark>This highlighted text</mark>
13368 <p><data value="5">five</data>
13369 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13370 <mark>This highlighted text</mark></p>
13374 HTML tag with leading space is parsed as text
13378 <p>< div>foo< /div>
13383 ### Nesting tests (see bug 41545, 50604, 51081)
13386 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13387 # Note that html2wt is considerably more difficult if we use <b> in
13388 # the test case, instead of <big>
13390 Ensure that HTML adoption agency algorithm is properly implemented.
13392 <big>X<big>Y</big>Z</big>
13394 <p><big>X<big>Y</big>Z</big>
13398 # This was bug 41545 in the PHP parser.
13399 # Note that tidy doesn't handle this correctly.
13403 <kbd>X<kbd>Y</kbd>Z</kbd>
13405 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13409 # The following cases were bug 51081 in the PHP parser.
13410 # Note that there are some other nestable tags (b, i, etc) which are
13411 # not covered; see bug 51081 for discussion.
13413 # Note that tidy doesn't handle this correctly.
13417 <em>X<em>Y</em>Z</em>
13419 <p><em>X<em>Y</em>Z</em>
13423 # Note that tidy doesn't handle this correctly.
13425 Nesting of <strong>
13427 <strong>X<strong>Y</strong>Z</strong>
13429 <p><strong>X<strong>Y</strong>Z</strong>
13438 <p><q>X<q>Y</q>Z</q></p>
13441 # Note that tidy doesn't handle this correctly.
13445 <ruby>X<ruby>Y</ruby>Z</ruby>
13447 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13451 # Note that tidy doesn't handle this correctly.
13455 <bdo>X<bdo>Y</bdo>Z</bdo>
13457 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13469 [[Media:Foobar.jpg]]
13471 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13476 Media link with text
13478 [[Media:Foobar.jpg|A neat file to look at]]
13480 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13484 # FIXME: this is still bad HTML tag nesting
13486 Media link with nasty text
13487 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13489 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13491 <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>
13494 <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>
13498 Media link to nonexistent file (bug 1702)
13500 [[Media:No such.jpg]]
13502 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13507 Image link to nonexistent file (bug 1850 - good)
13509 [[Image:No such.jpg]]
13511 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13516 :Image link to nonexistent file (bug 1850 - bad)
13518 [[:Image:No such.jpg]]
13520 <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>
13527 Character reference normalization in link text (bug 1938)
13529 [[Main Page|this&that]]
13531 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
13538 Test for unicode normalization
13540 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
13544 (bug 19451) Links should refer to the normalized form.
13552 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13553 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13554 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13555 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13556 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13561 Empty attribute crash test (bug 2067)
13563 <font color="">foo</font>
13565 <p><font color="">foo</font>
13570 Empty attribute crash test single-quotes (bug 2067)
13572 <font color=''>foo</font>
13574 <p><font color="">foo</font>
13579 Attribute test: equals, then nothing
13581 <font color=>foo</font>
13583 <p><font>foo</font>
13588 Attribute test: unquoted value
13590 <font color=x>foo</font>
13592 <p><font color="x">foo</font>
13597 Attribute test: unquoted but illegal value (hash)
13599 <font color=#x>foo</font>
13601 <p><font color="#x">foo</font>
13606 Attribute test: no value
13608 <font color>foo</font>
13610 <p><font color="color">foo</font>
13615 Bug 2095: link with three closing brackets
13619 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
13622 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
13626 Bug 2095: link with pipe and three closing brackets
13628 [[Main Page|link]]]
13630 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
13633 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
13637 Bug 2095: link with pipe and three closing brackets, version 2
13639 [[Main Page|[http://example.com/]]]
13641 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
13644 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
13653 Template:Dangerous attribute
13655 " onmouseover="alert(document.cookie)
13659 Template:Dangerous style attribute
13661 border-size: expression(alert(document.cookie))
13667 <div style="float: right; {{{1}}}">Magic div</div>
13671 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
13673 <div title="{{test}}"></div>
13675 <div title="This is a test template"></div>
13679 # Parsoid has enough context to handle this case
13681 Bug 2304: HTML attribute safety (dangerous template; 2309)
13683 <div title="{{dangerous attribute}}"></div>
13685 <div title=""></div>
13688 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 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}}]}\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[12,35,null,null]}\">\" onmouseover=\"alert(document.cookie)</span>"}]]}' data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}'></div>
13692 Bug 2304: HTML attribute safety (dangerous style template; 2309)
13694 <div style="{{dangerous style attribute}}"></div>
13696 <div style="/* insecure input */"></div>
13701 Bug 2304: HTML attribute safety (safe parameter; 2309)
13703 {{div style|width: 200px}}
13705 <div style="float: right; width: 200px">Magic div</div>
13710 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
13712 {{div style|width: expression(alert(document.cookie))}}
13714 <div style="/* insecure input */">Magic div</div>
13719 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
13721 {{div style|"><script>alert(document.cookie)</script>}}
13723 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13728 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
13730 {{div style|" ><script>alert(document.cookie)</script>}}
13732 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13737 Bug 2304: HTML attribute safety (link)
13739 <div title="[[Main Page]]"></div>
13741 <div title="[[Main Page]]"></div>
13746 Bug 2304: HTML attribute safety (italics)
13748 <div title="''foobar''"></div>
13750 <div title="''foobar''"></div>
13755 Bug 2304: HTML attribute safety (bold)
13757 <div title="'''foobar'''"></div>
13759 <div title="'''foobar'''"></div>
13765 Bug 2304: HTML attribute safety (ISBN)
13767 <div title="ISBN 1234567890"></div>
13769 <div title="ISBN 1234567890"></div>
13774 Bug 2304: HTML attribute safety (RFC)
13776 <div title="RFC 1234"></div>
13778 <div title="RFC 1234"></div>
13783 Bug 2304: HTML attribute safety (PMID)
13785 <div title="PMID 1234567890"></div>
13787 <div title="PMID 1234567890"></div>
13792 Bug 2304: HTML attribute safety (web link)
13794 <div title="http://example.com/"></div>
13796 <div title="http://example.com/"></div>
13801 Bug 2304: HTML attribute safety (named web link)
13803 <div title="[http://example.com/ link]"></div>
13805 <div title="[http://example.com/ link]"></div>
13810 Bug 3244: HTML attribute safety (extension; safe)
13812 <div style="<nowiki>background:blue</nowiki>"></div>
13814 <div style="background:blue"></div>
13819 Bug 3244: HTML attribute safety (extension; unsafe)
13821 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13823 <div style="/* insecure input */"></div>
13827 # More MSIE fun discovered by Tom Gilder
13830 MSIE CSS safety test: spurious slash
13832 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13834 <div style="/* insecure input */">evil</div>
13839 MSIE CSS safety test: hex code
13841 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
13843 <div style="/* insecure input */">evil</div>
13848 MSIE CSS safety test: comment in url
13850 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
13852 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
13857 MSIE CSS safety test: comment in expression
13859 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
13861 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
13866 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
13868 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
13870 <p style="/* invalid control char */">A</p>
13875 MSIE 6 CSS safety test: Fullwidth (bug 55332)
13877 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
13878 <div style="top:EXPRESSION(alert())">B</div>
13880 <p style="/* insecure input */">A</p>
13881 <div style="/* insecure input */">B</div>
13886 MSIE 6 CSS safety test: IPA extensions (bug 55332)
13888 <div style="background-image:uʀʟ(javascript:alert())">A</div>
13889 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
13891 <div style="/* insecure input */">A</div>
13892 <p style="/* insecure input */">B</p>
13897 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13899 <div style="background-image:url⁽javascript:alert())">A</div>
13900 <div style="background-image:url₍javascript:alert())">B</div>
13901 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13903 <div style="/* insecure input */">A</div>
13904 <div style="/* insecure input */">B</div>
13905 <p style="/* insecure input */">C</p>
13913 title="data:text/html,<img src=1 onerror=alert(1)>"
13914 style="-o-link:attr(title);-o-link-source:current">X</div>
13916 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13921 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13923 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13924 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13925 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13926 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13927 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13928 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13929 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13931 <p style="/* insecure input */">A</p>
13932 <p style="/* insecure input */">B</p>
13933 <p style="/* insecure input */">C</p>
13934 <p style="/* insecure input */">D</p>
13935 <p style="/* insecure input */">E</p>
13936 <p style="/* insecure input */">F</p>
13937 <p style="/* insecure input */">G</p>
13942 Table attribute legitimate extension
13945 !+ style="<nowiki>color:blue</nowiki>"| status
13950 <th style="color:blue"> status
13956 Table attribute safety
13959 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13964 <th style="/* insecure input */"> status
13970 CSS line continuation 1
13972 <div style="background-image: u\ rl(test.jpg);"></div>
13974 <div style="/* insecure input */"></div>
13979 CSS line continuation 2
13981 <div style="background-image: u\ rl(test.jpg); "></div>
13983 <div style="/* insecure input */"></div>
13994 Expansion of multi-line templates in attribute values (bug 6255)
13996 <div style="background: {{identity|#00FF00}}">-</div>
13998 <div style="background: #00FF00">-</div>
14004 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
14006 <div style="background:
14009 <div style="background: #00FF00">-</div>
14014 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
14016 <div style="background: #00FF00">-</div>
14018 <div style="background: #00FF00">-</div>
14023 evil <math>-wiki-tags without Extension:Math enabled
14025 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14027 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14031 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14034 Parser hook: empty input
14047 Parser hook: empty input using terminated empty elements
14060 Parser hook: empty input using terminated empty elements (space before)
14073 Parser hook: basic input
14087 Parser hook: case insensitive
14101 Parser hook: case insensitive, redux
14114 Parser hook: nested tags
14118 <tag><tag></tag></tag>
14129 Parser hook: basic arguments
14131 <tag width=200 height = "100" depth = '50' square></tag>
14139 'square' => 'square',
14146 Parser hook: argument containing a forward slash (bug 5344)
14148 <tag filename='/tmp/bla'></tag>
14153 'filename' => '/tmp/bla',
14160 Parser hook: empty input using terminated empty elements (bug 2374)
14173 # </tag> should be output literally since there is no matching tag that begins it
14175 Parser hook: basic arguments using terminated empty elements (bug 2374)
14177 <tag width=200 height = "100" depth = '50' square/>
14187 'square' => 'square',
14196 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14200 Parser hook: static parser hook not inside a comment
14202 <statictag>hello, world</statictag>
14203 <statictag action=flush/>
14211 Parser hook: static parser hook inside a comment
14213 <!-- <statictag>hello, world</statictag> -->
14214 <statictag action=flush/>
14220 # Nested template calls; this case was broken by Parser.php rev 1.506,
14224 Template:One-parameter
14226 (My parameter is: {{{1}}})
14230 Template:Map-one-parameter
14232 {{{{{1}}}|{{{2}}}}}
14236 Nested template calls
14238 {{Map-one-parameter|One-parameter|param}}
14240 <p>(My parameter is: param)
14249 Sanitizer: Closing of open tags
14251 <s></s><table></table>
14253 <s></s><table></table>
14258 Sanitizer: Closing of open but not closed tags
14267 Sanitizer: Closing of closed but not open tags
14276 Sanitizer: Closing of closed but not open table tags
14278 Table not started</td></tr></table>
14280 <p>Table not started</td></tr></table>
14285 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14287 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14289 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14294 Sanitizer: Validating the contents of the id attribute (bug 4515)
14300 Something, but definitely not <br id="9" />...
14304 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14308 <br id="foo" /><br id="foo" />
14310 Something need to be done. foo-2 ?
14314 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14317 <meta itemprop="hello" content="world">
14318 <meta http-equiv="refresh" content="5">
14319 <meta itemprop="hello" http-equiv="refresh" content="5">
14320 <link itemprop="hello" href="{{SERVER}}">
14321 <link rel="stylesheet" href="{{SERVER}}">
14322 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14325 <div itemscope="itemscope">
14326 <p> <meta itemprop="hello" content="world" />
14327 <meta http-equiv="refresh" content="5">
14328 <meta itemprop="hello" content="5" />
14330 <link itemprop="hello" href="http://example.org" />
14331 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14332 <link itemprop="hello" href="http://example.org" />
14338 Language converter: output gets cut off unexpectedly (bug 5757)
14342 this bit is safe: }-
14344 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14346 then we get cut off here: }-
14348 all additional text is vanished
14350 <p>this bit is safe: }-
14351 </p><p>but if we add a conversion instance: xxx
14352 </p><p>then we get cut off here: }-
14353 </p><p>all additional text is vanished
14358 Self closed html pairs (bug 5487)
14361 <center><font id="bug" />Centered text</center>
14362 <div><font id="bug2" />In div text</div>
14364 <center><font id="bug" />Centered text</center>
14365 <div><font id="bug2" />In div text</div>
14374 Punctuation: nbsp before exclamation
14378 <p>C'est grave !
14383 Punctuation: CSS !important (bug 11874)
14385 <div style="width:50% !important">important</div>
14387 <div style="width:50% !important">important</div>
14392 Punctuation: CSS ! important (bug 11874; with space after)
14394 <div style="width:50% ! important">important</div>
14396 <div style="width:50% ! important">important</div>
14402 HTML bullet list, closed tags (bug 5497)
14417 HTML bullet list, unclosed tags (bug 5497)
14436 HTML ordered list, closed tags (bug 5497)
14451 HTML ordered list, unclosed tags (bug 5497)
14470 HTML nested bullet list, closed tags (bug 5497)
14495 HTML nested bullet list, open tags (bug 5497)
14524 HTML nested ordered list, closed tags (bug 5497)
14549 HTML nested ordered list, open tags (bug 5497)
14578 HTML ordered list item with parameters oddity
14580 <ol><li id="fragment">One</li>
14583 <ol><li id="fragment">One</li>
14588 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
14590 bug 5918: autonumbering
14592 [http://first/] [http://second] [ftp://ftp]
14596 [mailto:enclosed@mail.tld With target]
14598 [mailto:enclosed@mail.tld]
14600 mailto:inline@mail.tld
14602 <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>
14603 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
14604 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
14605 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
14606 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
14609 <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>
14610 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
14611 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
14612 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
14613 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
14618 # Security and HTML correctness
14619 # From Nick Jenkins' fuzz testing
14623 Fuzz testing: Parser13
14638 Fuzz testing: Parser14
14643 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
14644 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14646 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14652 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
14654 <div id="toc" class="toc">
14655 <div id="toctitle">
14659 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14665 Fuzz testing: Parser14-table
14670 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
14671 <table style="__TOC__">
14676 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
14677 <table style="__TOC__">
14684 # Known to produce bogus xml (extra </td>)
14686 Fuzz testing: Parser16
14715 Fuzz testing: Parser21
14718 ! irc://{{ftp://a" onmouseover="alert('hello world');"
14723 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
14733 Fuzz testing: Parser22
14735 http://===r:::https://b
14739 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
14747 # Known to produce bad XML for now
14749 Fuzz testing: Parser24
14756 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
14757 <br style="onmouseover='alert(document.cookie);' " />
14759 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14764 <u class="|">}}}} >
14765 <br style="onmouseover='alert(document.cookie);'" />
14767 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14776 # Note: the current result listed for this is not what the original one was,
14777 # but the original bug was JavaScript injection, which is fixed in any case.
14778 # It's not clear that the original result listed was any more correct than the
14779 # current one. Original result:
14782 # <li class="||">
14783 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14785 Fuzz testing: Parser25 (bug 6055)
14791 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
14793 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14798 Fuzz testing: URL adjacent extension (with space, clean)
14800 http://example.com <nowiki>junk</nowiki>
14802 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
14807 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
14809 http://example.com<nowiki>junk</nowiki>
14811 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
14816 Fuzz testing: URL adjacent extension (no space, dirty; pre)
14818 http://example.com<pre>junk</pre>
14820 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
14823 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
14830 Fuzz testing: image with bogus manual thumbnail
14832 [[Image:foobar.jpg|thumbnail= ]]
14834 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
14837 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
14841 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
14843 <pre dir=" "></pre>
14845 <pre dir=" "></pre>
14850 Parsing optional HTML elements (Bug 6171)
14855 <td> Some tabular data</td>
14856 <td> More tabular data ...
14857 <td> And yet som tabular data</td>
14863 <td> Some tabular data</td>
14864 <td> More tabular data ...
14865 </td><td> And yet som tabular data</td>
14872 Correct handling of <td>, <tr> (Bug 6171)
14877 <td> Some tabular data</td>
14878 <td> More tabular data ...</td>
14879 <td> And yet som tabular data</td>
14885 <td> Some tabular data</td>
14886 <td> More tabular data ...</td>
14887 <td> And yet som tabular data</td>
14895 Parsing crashing regression (fr:JavaScript)
14899 <p></body></x>
14904 Inline wiki vs wiki block nesting
14910 <p><b>Bold paragraph</b>
14911 </p><p>New wiki paragraph
14916 Inline HTML vs wiki block nesting
14924 <p><b>Bold paragraph</b>
14925 </p><p>New wiki paragraph
14929 # Original result was this:
14930 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
14932 # While that might be marginally more intuitive, maybe, the six-apostrophe
14933 # construct is clearly pathological and the result stated here (which is what
14934 # the parser actually does) is about as reasonable as anything.
14936 Mixing markup for italics and bold
14939 '''bold''''''bold''bolditalics'''''
14941 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14949 Article for special page transclusion test
14953 Special page transclusion
14956 {{Special:Prefixindex/Xyzzyx}}
14958 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14963 Special page transclusion twice (bug 5021)
14966 {{Special:Prefixindex/Xyzzyx}}
14967 {{Special:Prefixindex/Xyzzyx}}
14969 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14970 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14975 Transclusion of default MediaWiki message
14977 {{MediaWiki:Mainpage}}
14984 Transclusion of nonexistent MediaWiki message
14986 {{MediaWiki:Mainpagexxx}}
14988 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14993 Transclusion of MediaWiki message with underscore
14995 {{MediaWiki:history_short}}
15002 Transclusion of MediaWiki message with space
15004 {{MediaWiki:history short}}
15011 Invalid header with following text
15021 Section extraction test (section 0)
15041 Section extraction test (section 1)
15063 Section extraction test (section 2)
15084 Section extraction test (section 3)
15104 Section extraction test (section 4)
15128 Section extraction test (section 5)
15148 Section extraction test (section 6)
15169 Section extraction test (section 7)
15189 Section extraction test (section 8)
15209 Section extraction test (section 9)
15230 Section extraction test (section 10)
15250 Section extraction test (nonexistent section 11)
15269 Section extraction test with bogus heading (section 1)
15274 ==bogus== not a legal section
15278 ==bogus== not a legal section
15282 Section extraction test with bogus heading (section 2)
15287 ==bogus== not a legal section
15294 Section extraction test with comment after heading (section 1)
15306 Section extraction test with comment after heading (section 2)
15318 Section extraction test with bogus <nowiki> heading (section 1)
15323 ==bogus== <nowiki>not a legal section</nowiki>
15327 ==bogus== <nowiki>not a legal section</nowiki>
15331 Section extraction test with bogus <nowiki> heading (section 2)
15336 ==bogus== <nowiki>not a legal section</nowiki>
15343 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15344 # instead of respecting commented sections
15346 Section extraction prefixed by comment (section 1)
15357 Section extraction prefixed by comment (section 2)
15368 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15369 # instead of respecting HTML-style headings
15371 Section extraction, mixed wiki and html (section 1)
15387 Section extraction, mixed wiki and html (section 2)
15403 # Formerly testing for bug 3342
15405 Section extraction, heading surrounded by <noinclude>
15409 <noinclude>==unmarked==</noinclude>
15415 # Test behavior of bug 19910
15417 Sectiion with all-equals
15422 The line above must have a trailing space
15425 But just in case it doesn't...
15429 But just in case it doesn't...
15433 Section replacement test (section 0)
15464 Section replacement test (section 1)
15493 Section replacement test (section 2)
15523 Section replacement test (section 3)
15554 Section replacement test (section 4)
15581 Section replacement test (section 5)
15612 Section replacement test (section 6)
15642 Section replacement test (section 7)
15673 Section replacement test (section 8)
15704 Section replacement test (section 9)
15733 Section replacement test (section 10)
15763 Section replacement test with initial whitespace (bug 13728)
15767 Preformatted initial line
15771 Preformatted initial line
15778 Section extraction, heading followed by pre with 20 spaces (bug 6398)
15790 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
15803 Section extraction, <pre> around bogus header (bug 10309)
15820 Section replacement, <pre> around bogus header (bug 10309)
15822 noxml replace=2,"xxx"
15843 Handling of 
 in URLs
15847 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15850 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
15852 a</a></li></ul></li></ul>
15856 Handling of %0A in URLs
15860 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15863 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15867 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
15869 5 quotes, code coverage +1 line
15876 <p><b><i></i></b></p>
15879 # same html as previous, but wikitext adjusted to match parsoid html2wt
15880 # note that wt2html and html2html will put the <i> before the <b>
15882 5 quotes, code coverage +1 line w/ nowiki (1)
15884 parsoid=wt2wt,html2wt
15886 '''''<nowiki/>'''''
15891 <p><b><i></i></b></p>
15894 # same as previous, just swapping the <i> and <b>
15896 5 quotes, code coverage +1 line w/ nowiki (2)
15898 '''''<nowiki/>'''''
15903 <p><i><b></b></i></p>
15907 Special:Search page linking.
15911 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
15918 title=[[Parser test]]
15923 * {{FULLPAGENAMEE}}
15925 * {{BASEPAGENAMEE}}
15929 * {{ROOTPAGENAMEE}}
15931 * {{TALKPAGENAMEE}}
15932 * {{SUBJECTPAGENAME}}
15933 * {{SUBJECTPAGENAMEE}}
15936 * {{NAMESPACENUMBER}}
15940 * {{SUBJECTSPACEE}}
15941 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15943 <ul><li> Parser test</li>
15944 <li> Parser_test</li>
15945 <li> Parser test</li>
15946 <li> Parser_test</li>
15947 <li> Parser test</li>
15948 <li> Parser_test</li>
15949 <li> Parser test</li>
15950 <li> Parser_test</li>
15951 <li> Parser test</li>
15952 <li> Parser_test</li>
15953 <li> Talk:Parser test</li>
15954 <li> Talk:Parser_test</li>
15955 <li> Parser test</li>
15956 <li> Parser_test</li>
15964 <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>
15967 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15977 image4 |300px| centre
15978 image5.svg| http://///////
15983 <ul class="gallery mw-gallery-traditional">
15984 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15985 <div class="thumb" style="height: 150px;">Image1.png</div>
15986 <div class="gallerytext">
15989 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15990 <div class="thumb" style="height: 150px;">Image2.gif</div>
15991 <div class="gallerytext">
15996 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15997 <div class="thumb" style="height: 150px;">Image3</div>
15998 <div class="gallerytext">
16001 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16002 <div class="thumb" style="height: 150px;">Image4</div>
16003 <div class="gallerytext">
16008 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16009 <div class="thumb" style="height: 150px;">Image5.svg</div>
16010 <div class="gallerytext">
16011 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
16015 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16016 <div class="thumb" style="height: 150px;">* image6</div>
16017 <div class="gallerytext">
16025 Gallery (with options)
16027 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16028 File:Nonexistant.jpg|caption
16029 File:Nonexistant.jpg
16030 image:foobar.jpg|some '''caption''' [[Main Page]]
16032 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16035 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16036 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16037 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16038 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16039 <div class="gallerytext">
16044 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16045 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16046 <div class="gallerytext">
16049 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16050 <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>
16051 <div class="gallerytext">
16052 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16056 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16057 <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>
16058 <div class="gallerytext">
16061 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16062 <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>
16063 <div class="gallerytext">
16073 Gallery with link that has fragment
16076 image:foobar.jpg|link=Main_Page
16077 image:foobar.jpg|link=Main_Page#section
16078 image:foobar.jpg|link=Main Page#section|caption
16081 <ul class="gallery mw-gallery-traditional">
16082 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16083 <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>
16084 <div class="gallerytext">
16087 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16088 <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>
16089 <div class="gallerytext">
16092 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16093 <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>
16094 <div class="gallerytext">
16104 Gallery with wikitext inside caption
16107 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16108 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16111 <ul class="gallery mw-gallery-traditional">
16112 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16113 <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>
16114 <div class="gallerytext">
16115 <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>
16119 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16120 <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>
16121 <div class="gallerytext">
16122 <p>This is a test template
16131 gallery (with showfilename option)
16133 <gallery showfilename>
16134 File:Nonexistant.jpg|caption
16135 File:Nonexistant.jpg
16136 image:foobar.jpg|some '''caption''' [[Main Page]]
16140 <ul class="gallery mw-gallery-traditional">
16141 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16142 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16143 <div class="gallerytext">
16144 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16149 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16150 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16151 <div class="gallerytext">
16152 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16156 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16157 <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>
16158 <div class="gallerytext">
16159 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16160 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16164 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16165 <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>
16166 <div class="gallerytext">
16167 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16176 Gallery (with namespace-less filenames)
16179 File:Nonexistant.jpg
16185 <ul class="gallery mw-gallery-traditional">
16186 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16187 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16188 <div class="gallerytext">
16191 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16192 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16193 <div class="gallerytext">
16196 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16197 <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>
16198 <div class="gallerytext">
16201 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16202 <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>
16203 <div class="gallerytext">
16211 HTML Hex character encoding (spells the word "JavaScript")
16213 parsoid=wt2html,wt2wt,html2html
16215 JavaScript
16217 <p>JavaScript
16222 <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>
16226 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16230 <p>&#xsee;&#XSEE;
16233 <p>&#xsee;&#XSEE;</p>
16237 HTML Hex character encoding mixed case
16239 parsoid=wt2html,wt2wt,html2html
16248 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16252 __FORCETOC__ override
16264 ISBN 978-0-1234-56 789
16266 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16269 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16273 ISBN followed by 5 spaces
16284 ISBN ISBN 1234567890
16286 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16295 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16300 ISBN with empty prefix (parsoid test)
16304 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16308 Bug 22905: <abbr> followed by ISBN followed by </a>
16310 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16312 <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>
16321 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16326 Double RFC with a wiki link
16330 <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>
16339 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16342 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16346 Centre-aligned image
16348 [[Image:foobar.jpg|centre]]
16350 <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>
16357 [[Image:foobar.jpg|none]]
16359 <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>
16364 Width + Height sized image (using px) (height is ignored)
16366 [[Image:foobar.jpg|640x480px]]
16368 <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>
16373 Width-sized image (using px, no following whitespace)
16375 [[Image:foobar.jpg|640px]]
16377 <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>
16382 Width-sized image (using px, with following whitespace - test regression from r39467)
16384 [[Image:foobar.jpg|640px ]]
16386 <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>
16391 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16393 [[Image:foobar.jpg| 640px]]
16395 <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>
16400 Image with page parameter
16404 [[File:LoremIpsum.djvu|page=2]]
16406 <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>
16411 Another italics / bold test
16419 # Note the results may be incorrect, as parserTest output included this:
16420 # XML error: Mismatched tag at byte 6120:
16421 # ...<dd> </dt></dl> </dd...
16452 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16454 Images with the "|" character in the comment
16456 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16458 <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>
16461 <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>
16465 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16467 <html><script>alert(1);</script></html>
16469 <p><html><script>alert(1);</script></html>
16474 HTML with raw HTML ($wgRawHtml==true)
16478 <html><script>alert(1);</script></html>
16480 <p><script>alert(1);</script>
16485 Parents of subpages, one level up
16487 subpage title=[[Subpage test/L1/L2/L3]]
16491 <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>
16497 Parents of subpages, one level up, not named
16499 subpage title=[[Subpage test/L1/L2/L3]]
16503 <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>
16510 Parents of subpages, two levels up
16512 subpage title=[[Subpage test/L1/L2/L3]]
16518 <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
16519 </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>
16524 Parents of subpages, two levels up, without trailing slash or name.
16526 subpage title=[[Subpage test/L1/L2/L3]]
16535 Parents of subpages, two levels up, with lots of extra trailing slashes.
16537 subpage title=[[Subpage test/L1/L2/L3]]
16541 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
16546 Subpage test/L1/L2/L3Sibling
16552 Transclusion of a sibling page (one level up)
16554 subpage title=[[Subpage test/L1/L2/L3]]
16563 Transclusion of a child page
16565 subpage title=[[Subpage test/L1/L2]]
16574 Non-transclusion because of too many up levels
16576 subpage title=[[Subpage test/L1/L2/L3]]
16578 {{../../../../More than parent}}
16580 <p>{{../../../../More than parent}}
16585 Definition list code coverage
16591 <dl><dt> title  </dt>
16593 <dt> title </dt>
16601 Don't fall for the self-closing div
16603 <div>hello world</div/>
16605 <div>hello world</div>
16614 <p>[[:Template:Msg]]
16623 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
16627 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
16629 Always escape literal '>' in output, not just after '<'
16643 <p>This is a test template
16644 This is a test template
16656 Inclusion of !userCanEdit() content
16660 <h2><span class="mw-headline" id="header">header</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=MediaWiki:Fake&action=edit&section=T-1" title="MediaWiki:Fake">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16666 Out-of-order TOC heading levels
16675 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16677 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
16679 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
16680 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
16683 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
16685 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
16686 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
16692 <h2><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16693 <h6><span class="mw-headline" id="6">6</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 6">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
16694 <h3><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
16695 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
16696 <h5><span class="mw-headline" id="5">5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 5">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
16697 <h2><span class="mw-headline" id="2_2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16703 ISBN with a dummy number
16713 ISBN with space-delimited number
16717 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
16723 ISBN with multiple spaces, no number
16742 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16743 </p><p>ISBN 12345678901
16749 ISBN with trailing year (bug 8110)
16751 ISBN 1-234-56789-0 - 2006
16753 ISBN 1 234 56789 0 - 2006
16755 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
16756 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
16764 {{anchorencode:foo bar©#%n}}
16766 <p>foo_bar.C2.A9.23.25n
16771 anchorencode trims spaces
16773 {{anchorencode: __pretty__please__}}
16780 anchorencode deals with links
16782 {{anchorencode: [[hello|world]] [[hi]]}}
16789 anchorencode deals with templates
16791 {{anchorencode: {{Foo}} }}
16798 anchorencode encodes like the TOC generator: (bug 18431)
16800 === _ +:.3A%3A&&]] ===
16801 {{anchorencode: _ +:.3A%3A&&]] }}
16804 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
16805 <p>.2B:.3A.253A.26.26.5D.5D
16810 Bug 6200: blockquotes and paragraph formatting
16831 Bug 8293: Use of center tag ruins paragraph formatting
16852 Parsing of overlapping (improperly nested) inline html tags
16854 <span><s>x</span></s>
16856 <p><span><s>x</span></s></span>
16859 <p><span><s>x</s></span>
16864 ### Language variants related tests
16867 Self-link in language variants
16869 title=[[Dunav]] language=sr
16871 Both [[Dunav]] and [[Дунав]] are names for this river.
16873 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
16884 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
16886 title=[[Duna]] language=sr
16888 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
16890 <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.
16895 Link to a section of a variant of this title shouldn't be parsed as self-link
16897 title=[[Duna]] language=sr
16899 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
16901 <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.
16906 Link to pages in language variants
16910 Main Page can be written as [[Маин Паге]]
16912 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
16918 Multiple links to pages in language variants
16922 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
16924 <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>.
16930 Simple template in language variants
16936 <p>This is a test template
16942 Template with explicit namespace in language variants
16948 <p>This is a test template
16954 Basic test for template parameter in language variants
16958 {{парамтест|param=foo}}
16960 <p>This is a test template with parameter foo
16966 Simple category in language variants
16970 [[Category:МедиаWики Усер'с Гуиде]]
16972 <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>
16989 Don't convert blue categorylinks to another variant (bug 33210)
16993 [[A]][[Category:分类]]
16995 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
17000 Stripping -{}- tags (language variants)
17004 Latin proverb: -{Ne nuntium necare}-
17006 <p>Latin proverb: Ne nuntium necare
17012 Prevent conversion with -{}- tags (language variants)
17014 language=sr variant=sr-ec
17016 Latinski: -{Ne nuntium necare}-
17018 <p>Латински: Ne nuntium necare
17024 Prevent conversion of text with -{}- tags (language variants)
17026 language=sr variant=sr-ec
17028 Latinski: -{Ne nuntium necare}-
17030 <p>Латински: Ne nuntium necare
17036 Prevent conversion of links with -{}- tags (language variants)
17038 language=sr variant=sr-ec
17042 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17048 -{}- tags within headlines (within html for parserConvert())
17050 language=sr variant=sr-ec
17054 <h2><span class="mw-headline" id="-.7BNaslov.7D-">Naslov</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Уредите одељак „Naslov“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
17060 Explicit definition of language variant alternatives
17062 language=zh variant=zh-tw
17064 -{zh:China;zh-tw:Taiwan}-, not China
17066 <p>Taiwan, not China
17072 Conversion around HTML tags
17074 language=sr variant=sr-ec
17076 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17077 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17080 <span title="ЛаCтин">ски</span>
17086 Explicit session-wise language variant mapping (A flag and - flag)
17088 language=zh variant=zh-tw
17090 Taiwan is not China.
17091 But -{A|zh:China;zh-tw:Taiwan}- is China,
17092 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17093 and -{China}- is China.
17095 <p>Taiwan is not China.
17096 But Taiwan is Taiwan,
17097 (This should be stripped!)
17098 and China is China.
17103 Explicit session-wise language variant mapping (H flag for hide)
17105 language=zh variant=zh-tw
17107 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17110 <p>(This should be stripped!)
17116 Adding explicit conversion rule for title (T flag)
17118 language=zh variant=zh-tw showtitle
17120 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17123 <p>Should be stripped!
17128 Testing that changing the language variant here in the tests actually works
17130 language=zh variant=zh showtitle
17132 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17135 <p>Should be stripped!
17140 Recursive conversion of alt and title attrs shouldn't clear converter state
17142 language=zh variant=zh-cn showtitle
17144 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17145 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17149 Should be stripped<span title="Exclamation">!</span>
17154 Bug 24072: more test on conversion rule for title
17156 language=zh variant=zh-tw showtitle
17158 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17159 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17162 <p>This should be stripped!
17163 This won't take interferes with the title rule.
17168 Partly disable title conversion if variant == main language code
17170 language=zh variant=zh title=[[ZH]] showtitle
17172 -{T|zh-cn:CN;zh-tw:TW}-
17180 Partly disable title conversion if variant == main language code, more
17182 language=zh variant=zh title=[[ZH]] showtitle
17192 Raw output of variant escape tags (R flag)
17194 language=zh variant=zh-tw
17196 Raw: -{R|zh:China;zh-tw:Taiwan}-
17198 <p>Raw: zh:China;zh-tw:Taiwan
17203 Nested using of manual convert syntax
17205 language=zh variant=zh-hk
17207 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17209 <p>Nested: Hello Hong Kong!
17214 Proper conversion of text in external links
17216 language=sr variant=sr-ec
17218 http://www.google.com
17219 gopher://www.google.com
17220 [http://www.google.com http://www.google.com]
17221 [gopher://www.google.com gopher://www.google.com]
17222 [https://www.google.com irc://www.google.com]
17223 [ftp://www.google.com www.google.com/ftp://dir]
17224 [//www.google.com www.google.com]
17226 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17227 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17228 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17229 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17230 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17231 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17232 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17237 Do not convert roman numbers to language variants
17239 language=sr variant=sr-ec
17243 <p>Фридрих IV је цар.
17248 Unclosed language converter markup "-{"
17259 Don't convert raw rule "-{R|=>}-" to "=>"
17270 Don't break link parsing if language converter markup is in the caption.
17272 language=sr variant=sr-ec
17274 [[Main Page|-{R|main page}-]]
17276 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17280 # This test is currently broken in the PHP parser (bug 52661)
17282 Don't break image parsing if language converter markup is in the caption.
17287 [[File:Foobar.jpg|-{R|caption}-]]
17289 <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>
17293 # This test is currently broken in the PHP parser (bug 52661)
17295 Don't break list handling if language converter markup is in the item.
17297 language=zh variant=zh-cn
17300 ;-{zh-cn:AAA;zh-tw:BBB}-
17307 # This test is currently broken in the PHP parser (bug 52661)
17309 Don't break table handling if language converter markup is in the cell.
17311 language=sr variant=sr-ec
17328 Bug 529: Uncovered bullet
17337 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17338 # Templates in Wikipedia rely on this behavior, as tidy has always been
17339 # enabled there. These tests are normally run *without* tidy, so specify the
17340 # full output here.
17341 # To test realistic parsing behavior, apply a tidy-like transformation to both
17342 # the expected output and your parser's output.
17344 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17346 ******* Foo {{bullet}}
17348 <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>
17354 Bug 529: Uncovered table already at line-start
17377 Bug 529: Uncovered bullet in parser function result
17379 * Foo {{lc:{{bullet}} }}
17387 Bug 5678: Double-parsed template argument
17389 {{lc:{{{1}}}|hello}}
17396 Bug 5678: Double-parsed template invocation
17398 {{lc:{{paramtest {{!}} param = hello }} }}
17400 <p>{{paramtest | param = hello }}
17405 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17408 title=[[Main Page]]
17410 {{PRVNÍVELKÉ:ěščř}}
17411 {{prvnívelké:ěščř}}
17431 Morwen/13: Unclosed link followed by heading
17438 <h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17443 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17450 <h1><span class="mw-headline" id="heading">heading</span></h1>
17455 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17462 <h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17477 Paragraphs inside divs (no extra line breaks)
17489 Paragraphs inside divs (extra line break on open)
17504 Paragraphs inside divs (extra line break on close)
17519 Paragraphs inside divs (extra line break on open and close)
17536 Nesting tags, paragraphs on lines which begin with <div>
17540 <div></div><strong>A
17549 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
17551 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
17553 <blockquote>Line one
17555 Line two</blockquote>
17557 <blockquote>Line one
17558 Line two</blockquote>
17562 <p>Line one Line two</p>
17567 Bug 6200: paragraphs inside blockquotes (extra line break on open)
17572 Line two</blockquote>
17577 Line two</blockquote>
17582 Line two</blockquote>
17586 Bug 6200: paragraphs inside blockquotes (extra line break on close)
17588 <blockquote>Line one
17593 <blockquote>Line one
17606 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
17628 Paragraphs inside blockquotes/divs (no extra line breaks)
17630 <blockquote><div>Line one
17632 Line two</div></blockquote>
17634 <blockquote><div>Line one
17635 Line two</div></blockquote>
17640 Paragraphs inside blockquotes/divs (extra line break on open)
17645 Line two</div></blockquote>
17650 Line two</div></blockquote>
17655 Paragraphs inside blockquotes/divs (extra line break on close)
17657 <blockquote><div>Line one
17660 </div></blockquote>
17662 <blockquote><div>Line one
17665 </div></blockquote>
17670 Paragraphs inside blockquotes/divs (extra line break on open and close)
17676 </div></blockquote>
17682 </div></blockquote>
17687 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
17689 wgLinkHolderBatchSize=0
17695 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
17696 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
17697 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
17702 Free external link invading image caption
17704 [[Image:Foobar.jpg|thumb|http://x|hello]]
17706 <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>
17711 Bug 15196: localised external link numbers
17715 [http://en.wikipedia.org/]
17717 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
17720 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
17724 Multibyte character in padleft
17726 {{padleft:-Hello|7|Æ}}
17733 Multibyte character in padright
17735 {{padright:Hello-|7|Æ}}
17742 formatdate parser function
17744 {{#formatdate:2009-03-24}}
17746 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
17751 formatdate parser function, with default format
17753 {{#formatdate:2009-03-24|mdy}}
17755 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
17760 Spacing of numbers in formatted dates
17762 {{#formatdate:January 15}}
17764 <p><span class="mw-formatted-date" title="01-15">January 15</span>
17769 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
17771 language=nl title=[[MediaWiki:Common.css]]
17773 {{#formatdate:2009-03-24|dmy}}
17775 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
17788 Edit comment with link
17792 I like the [[Main Page]] a lot
17794 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
17798 Edit comment with link and link text
17802 I like the [[Main Page|best pages]] a lot
17804 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17808 Edit comment with link and link text with suffix
17812 I like the [[Main Page|best page]]s a lot
17814 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17818 Edit comment with section link (non-local, eg in history list)
17820 comment title=[[Main Page]]
17822 /* External links */ removed bogus entries
17824 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17828 Edit comment with section link and text before it (non-local, eg in history list)
17830 comment title=[[Main Page]]
17832 pre-comment text /* External links */ removed bogus entries
17834 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>
17838 Edit comment with section link (local, eg in diff view)
17840 comment local title=[[Main Page]]
17842 /* External links */ removed bogus entries
17844 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17848 Edit comment with subpage link (bug 14080)
17852 title=[[Subpage test]]
17854 Poked at a [[/subpage]] here...
17856 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
17860 Edit comment with subpage link and link text (bug 14080)
17864 title=[[Subpage test]]
17866 Poked at a [[/subpage|neat little page]] here...
17868 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
17872 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
17875 title=[[Subpage test]]
17877 Poked at a [[/subpage]] here...
17879 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
17883 Edit comment with bare anchor link (local, as on diff)
17887 title=[[Main Page]]
17891 <a href="#section">#section</a>
17895 Edit comment with bare anchor link (non-local, as on history)
17898 title=[[Main Page]]
17902 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
17906 Anchor starting with underscore
17910 <p><a href="#_ref">One</a>
17915 Id starting with underscore
17917 <div id="_ref"></div>
17919 <div id="_ref"></div>
17924 Space normalisation on autocomment (bug 22784)
17927 title=[[Main Page]]
17929 /* __hello__world__ */
17931 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
17935 percent-encoding and + signs in comments (Bug 26410)
17939 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
17941 <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>
17945 Bad images - basic functionality
17954 Bad images - bug 16039: text after bad image disappears
17968 Verify that displaytitle works (bug #22501) no displaytitle
17972 wgAllowDisplayTitle=true
17973 wgRestrictDisplayTitle=false
17975 this is not the the title
17978 <p>this is not the the title
17983 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
17988 wgAllowDisplayTitle=true
17989 wgRestrictDisplayTitle=false
17991 this is not the the title
17992 {{DISPLAYTITLE:whatever}}
17995 <p>this is not the the title
18000 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
18005 wgAllowDisplayTitle=true
18006 wgRestrictDisplayTitle=true
18008 this is not the the title
18009 {{DISPLAYTITLE:whatever}}
18012 <p>this is not the the title
18017 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
18022 wgAllowDisplayTitle=true
18023 wgRestrictDisplayTitle=true
18025 this is not the the title
18026 {{DISPLAYTITLE:screen}}
18029 <p>this is not the the title
18034 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18039 wgAllowDisplayTitle=false
18041 this is not the the title
18042 {{DISPLAYTITLE:screen}}
18045 <p>this is not the the title
18046 <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>
18051 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18056 wgAllowDisplayTitle=false
18058 this is not the the title
18061 <p>this is not the the title
18066 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18071 wgAllowDisplayTitle=true
18072 wgRestrictDisplayTitle=true
18074 this is not the the title
18075 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18077 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18078 <p>this is not the the title
18083 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18088 wgAllowDisplayTitle=true
18089 wgRestrictDisplayTitle=true
18091 this is not the the title
18092 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18094 <span style="color: red;">s</span>creen
18095 <p>this is not the the title
18100 preload: check <noinclude> and <includeonly>
18104 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18110 preload: check <onlyinclude>
18114 Goodbye <onlyinclude>Hello world</onlyinclude>
18120 preload: can pass tags through if we want to
18124 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18126 <includeonly>Hello world</includeonly>
18130 preload: check that it doesn't try to do tricks
18134 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18136 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18140 Play a bit with r67090 and bug 3158
18144 <div style="width:50% !important"> </div>
18145 <div style="width:50% !important"> </div>
18146 <div style="width:50% !important"> </div>
18147 <div style="border : solid;"> </div>
18149 <div style="width:50% !important"> </div>
18150 <div style="width:50% !important"> </div>
18151 <div style="width:50% !important"> </div>
18152 <div style="border : solid;"> </div>
18157 HTML5 data attributes
18159 <span data-foo="bar">Baz</span>
18160 <p data-abc-def_hij="">Quuz</p>
18162 <p><span data-foo="bar">Baz</span>
18164 <p data-abc-def_hij="">Quuz</p>
18169 percent-encoding and + signs in internal links (Bug 26410)
18171 [[User:+%]] [[Page+title%]]
18172 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18173 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
18174 [[%33%45]] [[%33%45+]]
18176 <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>
18177 <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>
18178 <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>
18179 <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>
18184 Special characters in embedded file links (bug 27679)
18186 [[File:Contains & ampersand.jpg]]
18187 [[File:Does not exist.jpg|Title with & ampersand]]
18189 <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>
18190 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18196 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18198 Text's been normalized?
18200 <p>Text's been normalized?
18205 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18207 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18209 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18214 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18216 [http://www.example.org/ ideograms]
18218 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18223 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18225 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18227 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18251 Bug 31098 Template which includes system messages which includes the template
18255 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18256 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18261 Bug31490 Turkish: ucfirst 'blah'
18272 Bug31490 Turkish: ucfirst 'ix'
18283 Bug31490 Turkish: lcfirst 'BLAH'
18294 Bug31490 Turkish: ucfırst (with a dotless i)
18300 <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>
18305 Bug31490 ucfırst (with a dotless i) with English language
18311 <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>
18316 Bug 26375: TOC with italics
18318 title=[[Main Page]]
18321 == ''Lost'' episodes ==
18323 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18325 <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>
18329 <h2><span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Lost episodes">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18334 Bug 26375: TOC with bold
18336 title=[[Main Page]]
18339 == '''should be bold''' then normal text ==
18341 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18343 <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>
18347 <h2><span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: should be bold then normal text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18352 Bug 33845: Headings become cursive in TOC when they contain an image
18354 title=[[Main Page]]
18357 == Image [[Image:foobar.jpg]] ==
18359 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18361 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18365 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18370 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18372 title=[[Main Page]]
18375 == <blockquote>Quote</blockquote> ==
18377 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18379 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18383 <h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18386 <div id="toc" class="toc">
18387 <div id="toctitle">
18391 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18394 <h2><span class="mw-headline" id="Quote"></span></h2>
18396 <p><span class="mw-headline" id="Quote">Quote</span></p>
18398 <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>
18402 Unclosed tags in TOC
18404 title=[[Main Page]]
18408 <small>Hanc marginis exiguitas non caperet.</small>
18411 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18413 <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>
18417 <h2><span class="mw-headline" id="Proof:_2_.3C_3">Proof: 2 < 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Proof: 2 < 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18418 <p><small>Hanc marginis exiguitas non caperet.</small>
18424 Multiple tags in TOC
18427 == <i>Foo</i> <b>Bar</b> ==
18429 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18431 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18433 <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>
18434 <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>
18438 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18439 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18442 <div id="toc" class="toc">
18443 <div id="toctitle">
18447 <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>
18448 <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>
18451 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18452 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18454 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18456 <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>
18460 Tags with parameters in TOC
18463 == <sup class="in-h2">Hello</sup> ==
18465 == <sup class="a > b">Evilbye</sup> ==
18467 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18469 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
18470 <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>
18474 <h2><span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Hello">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18475 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18480 span tags with directionality in TOC
18483 == <span dir="ltr">C++</span> ==
18485 == <span dir="rtl">זבנג!</span> ==
18487 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
18489 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
18491 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
18493 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18495 <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>
18496 <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>
18497 <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>
18498 <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>
18499 <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>
18503 <h2><span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: C++">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18504 <h2><span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: זבנג!">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18505 <h2><span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18506 <h2><span class="mw-headline" id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: All attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18507 <h2><span class="mw-headline" id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Attributes after dir on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18514 == {{int:headline_sample}} ==
18518 Bug 32057: Title needed when expanding <h> nodes.
18520 title=[[Main Page]]
18524 <h2><span class="mw-headline" id="Headline_text">Headline text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Headline text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18529 Strip marker in urlencode
18531 {{urlencode:x<nowiki/>y}}
18532 {{urlencode:x<nowiki/>y|wiki}}
18533 {{urlencode:x<nowiki/>y|path}}
18560 Strip marker in formatNum
18562 {{formatnum:1<nowiki/>2}}
18563 {{formatnum:1<nowiki/>2|R}}
18571 Check noCommafy in formatNum
18575 {{formatnum:123456.78}}
18576 {{formatnum:123456.78|NOSEP}}
18584 Wrong option for formatNum (bug 56199)
18586 {{formatnum:1,234.56|Random}}
18587 {{formatnum:1,234.56|EVERYTHING}}
18588 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
18597 Strip marker in grammar
18601 {{grammar:elative|foo<nowiki/>bar}}
18608 Strip marker in padleft
18610 {{padleft:|2|x<nowiki/>y}}
18617 Strip marker in padright
18619 {{padright:|2|x<nowiki/>y}}
18626 Strip marker in anchorencode
18628 {{anchorencode:x<nowiki/>y}}
18635 nowiki inside link inside heading (bug 18295)
18637 ==[[foo|x<nowiki>y</nowiki>z]]==
18639 <h2><span class="mw-headline" id="xyz"><a href="/wiki/Foo" title="Foo">xyz</a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: xyz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18644 new support for bdi element (bug 31817)
18646 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18648 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18653 Ignore pipe between table row attributes
18657 |- id=foo | style='color: red'
18665 <tr id="foo" style="color: red">
18672 Gallery override link with WikiLink (bug 34852)
18675 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
18678 <ul class="gallery mw-gallery-traditional">
18679 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18680 <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>
18681 <div class="gallerytext">
18691 Gallery override link with absolute external link (bug 34852)
18694 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
18697 <ul class="gallery mw-gallery-traditional">
18698 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18699 <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>
18700 <div class="gallerytext">
18710 Gallery override link with malicious javascript (bug 34852)
18713 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
18716 <ul class="gallery mw-gallery-traditional">
18717 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18718 <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>
18719 <div class="gallerytext">
18729 Gallery with invalid title as link (bug 43964)
18732 File:foobar.jpg|link=<
18735 <ul class="gallery mw-gallery-traditional">
18736 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18737 <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>
18738 <div class="gallerytext">
18746 Language parser function
18755 Padleft and padright as substr
18757 {{padleft:|3|abcde}}
18758 {{padright:|3|abcde}}
18766 Special parser function
18768 {{#special:RandomPage}}
18769 {{#special:BaDtItLe}}
18770 {{#special:Foobar}}
18779 Bug 34939 - Case insensitive link parsing ([HttP://])
18781 [HttP://MediaWiki.Org/]
18783 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
18786 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
18790 Bug 34939 - Case insensitive link parsing ([HttP:// title])
18792 [HttP://MediaWiki.Org/ MediaWiki]
18794 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
18799 Bug 34939 - Case insensitive link parsing (HttP://)
18801 HttP://MediaWiki.Org/
18803 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
18806 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
18824 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18825 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18826 <h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18827 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18828 <h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
18834 ### Parsoid-specific tests
18835 ### Parsoid-PHP parser incompatibilities
18838 1. SOL-sensitive wikitext tokens as template-args
18840 parsoid=wt2html,wt2wt
18846 <span about="#mwt1" typeof="mw:Transclusion">
18847 </span><ul about="#mwt1"><li>a</li>
18849 <span about="#mwt2" typeof="mw:Transclusion">
18850 </span><ol about="#mwt2"><li>a</li>
18852 <span about="#mwt3" typeof="mw:Transclusion">
18853 </span><dl about="#mwt3"><dd>a</dd>
18857 #### -----------------------------------------------------------------
18858 #### Parsoid-specific functionality tests
18859 #### -----------------------------------------------------------------
18861 # Bug 63642: Formatting elt fixup is cleaned up.
18862 # We know wt2wt will fail, but we expect selser to pass.
18863 # Due to the nature of our testing, wt2wt and selser tests will enter the
18864 # blacklist and we'll catch selser regressions based on changes to the
18865 # blacklist entries for selser tests.
18867 Bad treebuilder fixup of formatting elt is cleaned up
18869 parsoid=wt2html,wt2wt
18874 [[Image:Foobar.jpg|right|Test]]
18880 <p><small></small></p>
18881 <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><small>Test</small></figcaption></figure>
18886 #### ----------------------------------------------------------------
18887 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
18888 #### tags. Parsoid's output for these tags differs from that of the
18890 #### ----------------------------------------------------------------
18893 Ref: 1. ref-location should be replaced with an index span
18898 B <ref name="x">foo</ref>
18901 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span>
18902 B <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}' id="cite_ref-x-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-2">[2]</a></span>
18903 C <span about="#mwt3" class="reference" data-mw='{"name":"ref","attrs":{"name":"y"}}' id="cite_ref-y-3-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-y-3">[3]</a></span></p>
18907 Ref: 2. ref-tags with identical names should all get the same index
18911 A <ref name="x">foo</ref>
18914 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}' id="cite_ref-x-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span>
18915 B <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{"name":"x"}}' id="cite_ref-x-1-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span></p>
18919 Ref: 3. spaces in ref-names should be ignored
18923 A <ref name="x">foo</ref>
18924 B <ref name=" x " />
18927 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"x"}}' id="cite_ref-x-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span>
18928 B <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{"name":"x"}}' id="cite_ref-x-1-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span>
18929 C <span about="#mwt3" class="reference" data-mw='{"name":"ref","attrs":{"name":"x"}}' id="cite_ref-x-1-2" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-x-1">[1]</a></span></p>
18933 Ref: 4. 'constructor' should be accepted as a valid ref-name
18934 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
18938 A <ref name="constructor">foo</ref>
18940 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"constructor"}}' id="cite_ref-constructor-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-constructor-1">[1]</a></span></p>
18944 Ref: 5. body should accept generic wikitext
18949 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
18954 <p>A <span about="#mwt2" class="reference" 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-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"transclusion\"}},\"i\":0}}]}' data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,76,null,null]}'>transclusion</span>\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
18956 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
18957 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> This is a <b><a rel="mw:WikiLink" href="./Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
18963 Ref: 6. indent-pres should not be output in ref-body
18975 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo\n bar\n baz\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
18977 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
18978 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18986 Ref: 7. No p-wrapping in ref-body
19005 <p>A <span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo\n\nbar\n\n\nbaz\n\n\n\nbooz\n"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
19007 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19008 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19023 Ref: 8. transclusion wikitext has lower precedence
19027 A <ref> foo {{echo|</ref> B C}}
19031 <p>A <span class="reference" data-mw="{"name":"ref","body":{"html":"foo <span typeof=\"mw:Nowiki\" data-parsoid='{\"src\":\"{{\",\"dsr\":[12,14,0,0]}'>{{</span>echo|"},"attrs":{}}" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
19032 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
19033 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <span typeof="mw:Nowiki">{{</span>echo|</li>
19038 Ref: 9. unclosed comments should not leak out of ref-body
19042 A <ref> foo <!--</ref> B C
19045 <p>A <span class="reference" data-mw='{"name":"ref","body":{"html":"foo <!---->"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> B C</p>
19046 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19047 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
19052 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19056 A <ref> <b> foo </ref> B C
19060 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"<b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[8,16,3,0]}'> foo </b>"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref> <b> foo </ref>"}'><a href="#cite_note-1">[1]</a></span> B C</p>
19063 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
19064 <li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> <b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></li>
19069 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19076 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>foo</ref>"}'><a href="#cite_note-1">[1]</a></span> B
19077 C <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>bar</ref>"}'><a href="#cite_note-2">[2]</a></span> D</p>
19081 Ref: 12. ref-tags act as trailing newline migration barrier
19085 <!--the newline at the end of this line moves out of the p-tag-->a
19087 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19092 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19095 <p>b<!--the newline at the end of this line stays inside the p-tag--> <span about="#mwt1" class="reference" data-mw='{"name":"ref","attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span>
19096 <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[2]</a></span></p>
19103 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19111 <p><span about="#mwt1" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> A
19112 <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"bar\n"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[2]</a></span> B</p>
19116 Ref: 14. A nested ref-tag should be emitted as plain text
19120 <ref>foo <ref>bar</ref> baz</ref>
19124 <p><span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo &lt;ref>bar&lt;/ref> baz"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>foo <ref>bar</ref> baz</ref>"}'><a href="#cite_note-1">[1]</a></span></p>
19126 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
19127 <li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo <ref>bar</ref> baz</li>
19132 Ref: 15. ref-tags with identical names should get identical indexes
19136 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19137 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19141 <p>A1 <span about="#mwt3" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"name":"a"}}' id="cite_ref-a-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-a-1">[1]</a></span> A2 <span about="#mwt4" class="reference" data-mw='{"name":"ref","attrs":{"name":"a"}}' id="cite_ref-a-1-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-a-1">[1]</a></span>
19142 B1 <span about="#mwt7" class="reference" data-mw='{"name":"ref","attrs":{"name":"b"}}' id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-b-2">[2]</a></span> B2 <span about="#mwt8" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}' id="cite_ref-b-2-1" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-b-2">[2]</a></span></p>
19144 <ol about="#mwt10" class="references" typeof="mw:Extension/references" 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>
19148 ## We don't bother wt2wt-ing non-standard whitespace
19150 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19158 <p>A <span class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
19160 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19161 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19165 References: 1. references tag without any refs should be handled properly
19171 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19175 References: 2. references tag with group only outputs references from that group
19179 A <ref group="a">foo</ref>
19180 B <ref group="b">bar</ref>
19182 <references group="a" />
19184 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{"group":"a"}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[a 1]</a></span>
19185 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"group":"b"}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[b 1]</a></span></p>
19187 <ol about="#mwt6" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li>
19192 References: 3. ref list should be cleared after processing references
19204 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
19206 <ol about="#mwt4" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li>
19209 <p>B <span about="#mwt6" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-2">[1]</a></span></p>
19211 <ol about="#mwt8" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2-0">↑</a></span> bar</li>
19216 References: 4. only referenced group should be cleared after processing references
19220 A <ref group="a">afoo</ref>
19223 <references group="a" />
19229 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"afoo"},"attrs":{"group":"a"}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[a 1]</a></span>
19230 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bfoo"},"attrs":{}}' id="cite_ref-2-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>bfoo</ref>"}'><a href="#cite_note-2">[1]</a></span></p>
19232 <ol about="#mwt6" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> afoo</li>
19235 <p>C <span about="#mwt8" class="reference" data-mw='{"name":"ref","body":{"html":"cfoo"},"attrs":{}}' id="cite_ref-3-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-3">[2]</a></span></p>
19237 <ol about="#mwt10" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2-0">↑</a></span> bfoo</li><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3-0">↑</a></span> cfoo</li>
19242 References: 5. ref tags in references should be processed while ignoring all other content
19247 B <ref name="b">bar</ref>
19250 <ref name="a">foo</ref>
19251 This should just get lost.
19254 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","attrs":{"name":"a"}}' id="cite_ref-a-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref name=\"a\" />"}'><a href="#cite_note-a-1">[1]</a></span>
19255 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","body":{"html":"bar"},"attrs":{"name":"b"}}' id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref name=\"b\">bar</ref>"}'><a href="#cite_note-b-2">[2]</a></span></p>
19258 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-parsoid='{"src":"<references>\n<ref name=\"a\">foo</ref>\nThis should just get lost.\n</references>"}' data-mw='{"name":"references","body":{"extsrc":"<ref name=\"a\">foo</ref>\nThis should just get lost.","html":"\n<span about=\"#mwt8\" class=\"reference\" data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"a\"}}' rel=\"dc:references\" typeof=\"mw:Extension/ref\"><a href=\"#cite_note-a-1\">[1]</a></span>\n"},"attrs":{}}'>
19259 <li about="#cite_note-a-1" id="cite_note-a-1" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-a-1-0">↑</a></span> foo</li>
19260 <li about="#cite_note-b-2" id="cite_note-b-2" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-b-2-0">↑</a></span> bar</li>
19265 References: 6. <references /> from a transclusion
19269 <ref>Foo</ref> {{echo|<references />}}
19271 <span about="#mwt3" class="reference" data-mw='{"name":"ref","body":{"html":"Foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span> <ol class="references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> Foo</li></ol>
19275 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19279 A <ref>foo bar for a</ref>
19280 B <ref group="X" name="b" />
19284 <references group="X">
19285 <ref name="b">foo</ref>
19288 <p>A <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo bar for a"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>foo bar for a</ref>"}'><a href="#cite_note-1" data-parsoid="{}">[1]</a></span>
19289 B <span about="#mwt4" class="reference" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}' id="cite_ref-b-2-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref group=\"X\" name=\"b\" />"}'><a href="#cite_note-b-2" data-parsoid="{}">[X 1]</a></span></p>
19291 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy" data-parsoid="{}"><a href="#cite_ref-1-0" data-parsoid="{}">↑</a></span> foo bar for a</li></ol>
19293 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-parsoid='{"src":"<references group=\"X\">\n<ref name=\"b\">foo</ref>\n</references>","group":"X"}' data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","html":"\n<span about=\"#mwt10\" class=\"reference\" data-mw='{\"name\":\"ref\",\"body\":{\"html\":\"foo\"},\"attrs\":{\"name\":\"b\"}}' rel=\"dc:references\" typeof=\"mw:Extension/ref\"><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" data-parsoid="{}"><span rel="mw:referencedBy" data-parsoid="{}"><a href="#cite_ref-b-2-0" data-parsoid="{}">↑</a></span> foo</li></ol>
19297 Entities in ref name
19301 <ref name="test & me">hi</ref>
19303 <p data-parsoid='{}'><span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"hi"},"attrs":{"name":"test & me"}}' id="cite_ref-test & me-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref name=\"test &amp; me\">hi</ref>"}'><a href="#cite_note-test & me-1" data-parsoid="{}">[1]</a></span></p>
19306 # This test is wt2html only because we're permitting the serializer to produce
19307 # dirty diffs, normalizing the unclosed references to the self-closed version.
19309 Generate references for unclosed references tag
19317 <p data-parsoid='{}'>a<span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"<ref>foo</ref>"}'><a href="#cite_note-1" data-parsoid="{}">[1]</a></span></p>
19320 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
19321 <li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy" data-parsoid="{}"><a href="#cite_ref-1-0" data-parsoid="{}">↑</a></span> foo</li></ol>
19325 New reference serializes on its own line
19327 parsoid=wt2wt,html2wt
19332 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19335 #### ----------------------------------------------------------------
19336 #### The following section of tests are primarily to test
19337 #### wikitext escaping capabilities of Parsoid. Given that
19338 #### escaping can be done any number of ways, the wikitext (input)
19339 #### is always adjusted to reflect how Parsoid adds nowiki
19342 #### We are marking several tests as parsoid-only since the
19343 #### HTML in the result section is different from what the
19344 #### PHP parser generates for it.
19345 #### ----------------------------------------------------------------
19348 #### --------------- Headings ---------------
19350 #### 1. Nested inside html <h1>=foo=</h1>
19351 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19352 #### 3. Nested inside html with wikitext split by html tags
19353 #### 4. No escape needed
19354 #### 5. Empty headings <h1></h1>
19355 #### 6. Heading chars in SOL context
19356 #### ----------------------------------------
19358 Headings: 0. Unnested
19362 <nowiki>=foo=</nowiki>
19364 <nowiki> =foo= </nowiki>
19366 <nowiki>=foo=</nowiki>
19368 =foo''a''<nowiki>=</nowiki>
19370 <p><span typeof="mw:Nowiki">=foo=</span></p>
19372 <p><span typeof="mw:Nowiki"> =foo= </span>
19374 <span typeof="mw:Nowiki">=foo=</span></p>
19376 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
19380 Headings: 1. Nested inside html
19381 (New headings and existing headings are handled differently)
19391 =<nowiki>=foo=</nowiki>=
19392 ==<nowiki>=foo=</nowiki>==
19393 ===<nowiki>=foo=</nowiki>===
19394 ====<nowiki>=foo=</nowiki>====
19395 =====<nowiki>=foo=</nowiki>=====
19396 ======<nowiki>=foo=</nowiki>======
19403 <h1 data-parsoid='{}'>=foo=</h1>
19404 <h2 data-parsoid='{}'>=foo=</h2>
19405 <h3 data-parsoid='{}'>=foo=</h3>
19406 <h4 data-parsoid='{}'>=foo=</h4>
19407 <h5 data-parsoid='{}'>=foo=</h5>
19408 <h6 data-parsoid='{}'>=foo=</h6>
19412 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
19417 <nowiki>*</nowiki>bar
19423 <nowiki>=bar=</nowiki>
19431 Headings: 3. Nested inside html with wikitext split by html tags
19435 = ='''bold'''<nowiki>foo=</nowiki> =
19437 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
19441 Headings: 4a. No escaping needed (testing just h1 and h2)
19459 = <nowiki>=</nowiki> =
19467 <h1><i>=</i>foo=</h1>
19468 <h1><span typeof="mw:Nowiki">=</span></h1>
19472 Headings: 4b. No escaping needed (inside p-tags)
19487 Headings: 5. Empty headings
19499 =====<nowiki/>=====
19501 ======<nowiki/>======
19512 Headings: 6a. Heading chars in SOL context (with trailing spaces)
19516 <nowiki>=a=</nowiki>
19518 <nowiki>=a=</nowiki>
19520 <nowiki>=a=</nowiki>
19522 <nowiki>=a=</nowiki>
19531 Headings: 6b. Heading chars in SOL context (with trailing newlines)
19559 Headings: 6c. Heading chars in SOL context (leading newline break)
19564 <nowiki>=b=</nowiki>
19571 Headings: 6d. Heading chars in SOL context (with interspersed comments)
19575 <!--c0--><nowiki>=a=</nowiki>
19577 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
19579 <p><!--c0-->=a=</p>
19580 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
19584 Headings: 6d. Heading chars in SOL context (No escaping needed)
19593 #### --------------- Lists ---------------
19594 #### 0. Outside nests (*foo, etc.)
19595 #### 1. Nested inside html <ul><li>*foo</li></ul>
19596 #### 2. Inside definition lists
19597 #### 3. Only bullets at start should be escaped
19598 #### 4. No escapes needed
19599 #### 5. No unnecessary escapes
19600 #### 6. Escape bullets in SOL position
19601 #### 7. Escape bullets in a multi-line context
19602 #### ----------------------------------------
19605 Lists: 0. Outside nests
19607 <nowiki>*</nowiki>foo
19609 <nowiki>#</nowiki>foo
19611 <nowiki>;Foo:</nowiki>bar
19620 Lists: 1. Nested inside html
19622 *<nowiki>*foo</nowiki>
19624 *<nowiki>#foo</nowiki>
19626 *<nowiki>:foo</nowiki>
19628 *<nowiki>;foo</nowiki>
19630 #<nowiki>*foo</nowiki>
19632 #<nowiki>#foo</nowiki>
19634 #<nowiki>:foo</nowiki>
19636 #<nowiki>;foo</nowiki>
19638 <ul><li>*foo</li></ul>
19639 <ul><li>#foo</li></ul>
19640 <ul><li>:foo</li></ul>
19641 <ul><li>;foo</li></ul>
19642 <ol><li>*foo</li></ol>
19643 <ol><li>#foo</li></ol>
19644 <ol><li>:foo</li></ol>
19645 <ol><li>;foo</li></ol>
19650 Lists: 2. Inside definition lists
19652 ;<nowiki>;foo</nowiki>
19654 ;<nowiki>:foo</nowiki>
19656 ;<nowiki>:foo</nowiki>
19659 :<nowiki>:foo</nowiki>
19661 <dl><dt>;foo</dt></dl>
19662 <dl><dt>:foo</dt></dl>
19665 <dl><dd>:foo</dd></dl>
19670 Lists: 3. Only bullets at start of text should be escaped
19672 *<nowiki>*foo*bar</nowiki>
19674 *<nowiki>*foo</nowiki>''it''*bar
19676 <ul><li>*foo*bar</li></ul>
19677 <ul><li>*foo<i>it</i>*bar</li></ul>
19682 Lists: 4. No escapes needed
19703 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
19707 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
19713 Lists: 5. No unnecessary escapes
19715 * bar <span><nowiki>[[foo]]</nowiki></span>
19717 *=bar <span><nowiki>[[foo]]</nowiki></span>
19719 *[[bar <span><nowiki>[[foo]]</nowiki></span>
19721 *]]bar <span><nowiki>[[foo]]</nowiki></span>
19723 *=bar <span>foo]]</span>=
19727 <ul><li> bar <span>[[foo]]</span></li></ul>
19728 <ul><li>=bar <span>[[foo]]</span></li></ul>
19729 <ul><li>[[bar <span>[[foo]]</span></li></ul>
19730 <ul><li>]]bar <span>[[foo]]</span></li></ul>
19731 <ul><li>=bar <span>foo]]</span>=</li></ul>
19732 <ul><li> <s></s>: a</li></ul>
19737 Lists: 6. Escape bullets in SOL position
19741 <!--cmt--><nowiki>*foo</nowiki>
19743 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
19747 Lists: 7. Escape bullets in a multi-line context
19750 <nowiki>*</nowiki>b
19757 #### --------------- HRs ---------------
19758 #### 1. Single line
19759 #### -----------------------------------
19762 HRs: 1. Single line
19766 ----<nowiki>----</nowiki>
19770 <hr><span typeof="mw:Nowiki">----</span>
19775 #### --------------- Tables ---------------
19776 #### 1a. Simple example
19777 #### 1b. No escaping needed (!foo)
19778 #### 1c. No escaping needed (|foo)
19779 #### 1d. No escaping needed (|}foo)
19781 #### 2a. Nested in td (<td>foo|bar</td>)
19782 #### 2b. Nested in td (<td>foo||bar</td>)
19783 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
19785 #### 3a. Nested in th (<th>foo!bar</th>)
19786 #### 3b. Nested in th (<th>foo!!bar</th>)
19787 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
19791 #### 4c. No escaping needed
19792 #### --------------------------------------
19795 Tables: 1a. Simple example
19806 Tables: 1b. No escaping needed
19815 Tables: 1c. No escaping needed
19824 Tables: 1d. No escaping needed
19833 Tables: 2a. Nested in td
19838 |<nowiki>foo|bar</nowiki>
19840 |x<div><nowiki>a|b</nowiki></div>
19844 <td>foo|bar</td></tr>
19845 <tr><td>x<div>a|b</div></td>
19850 Tables: 2b. Nested in td
19855 |<nowiki>foo||bar</nowiki>
19856 |''it''<nowiki>foo||bar</nowiki>
19860 <td><span typeof="mw:Nowiki">foo||bar</span></td>
19861 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
19865 Tables: 2c. Nested in td -- no escaping needed
19873 <table><tbody><tr><td>foo!!bar
19874 </td></tr></tbody></table>
19879 Tables: 3a. Nested in th
19887 <table><tbody><tr><th>foo!bar
19888 </th></tr></tbody></table>
19893 Tables: 3b. Nested in th
19898 !<nowiki>foo!!bar</nowiki>
19902 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
19907 Tables: 3c. Nested in th -- no escaping needed
19912 !<nowiki>foo||bar</nowiki>
19916 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
19920 Tables: 4a. Escape -
19927 |<nowiki>-bar</nowiki>
19931 <tr><th>-bar</th></tr>
19933 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
19937 Tables: 4b. Escape +
19944 |<nowiki>+bar</nowiki>
19948 <tr><th>+bar</th></tr>
19950 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
19954 Tables: 4c. No escaping needed
19975 <tr><td>foo-bar</td><td>foo+bar</td></tr>
19976 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
19982 <div>a|b</div></td>
19987 Tables: 4d. No escaping needed
19998 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
19999 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
20000 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
20005 Tables: Digest broken attributes on table and tr tag
20021 #### --------------- Links ----------------
20022 #### 1. Quote marks in link text
20023 #### 2. Wikilinks: Escapes needed
20024 #### 3. Wikilinks: No escapes needed
20025 #### 4. Extlinks: Escapes needed
20026 #### 5. Extlinks: No escapes needed
20027 #### --------------------------------------
20029 Links 1. Quote marks in link text
20033 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20035 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20039 Links 2. WikiLinks: Escapes needed
20044 [[Foo|<nowiki>Foobar]</nowiki>]]
20045 [[Foo|x [Foobar] x]]
20046 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20047 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20048 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20049 [[Foo|<nowiki>|Bar</nowiki>]]
20050 [[Foo|<nowiki>]]bar</nowiki>]]
20051 [[Foo|<nowiki>[[bar</nowiki>]]
20052 [[Foo|<nowiki>x [[ y</nowiki>]]
20053 [[Foo|<nowiki>x ]] y</nowiki>]]
20054 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20056 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20057 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20058 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20059 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20060 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20061 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20062 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20063 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20064 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20065 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20066 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20067 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20071 Links 3. WikiLinks: No escapes needed
20078 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20079 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20083 Links 4. ExtLinks: Escapes needed
20087 [http://google.com <nowiki>[google]</nowiki>]
20088 [http://google.com <nowiki>google]</nowiki>]
20090 <nowiki>[http://google.com]</nowiki>
20092 <nowiki>[http://google.com google]</nowiki>
20095 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20096 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20097 <p>[http://google.com]</p>
20098 <p>[http://google.com google]</p>
20102 Links 5. ExtLinks: No escapes needed
20106 [http://google.com [google]
20108 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20112 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20114 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20115 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20116 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20117 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20118 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20119 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20120 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20121 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20122 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20123 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20124 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20125 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20126 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20129 x<nowiki/>http://example.com<nowiki/>y
20130 http://example.com<nowiki/>?x
20131 http://example.com<nowiki/>&x
20132 http://example.com<nowiki/>'x
20133 http://example.com<nowiki/>,x
20134 http://example.com<nowiki/>.x
20135 http://example.com<nowiki/>;x
20136 http://example.com<nowiki/>:x
20137 http://example.com<nowiki/>;x
20138 http://example.com<nowiki/>!x
20139 http://example.com<nowiki/>=x
20140 http://example.com<nowiki/>(x)
20141 http://example.com(x<nowiki/>)
20145 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20148 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20150 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20151 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20152 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20153 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20154 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20160 "http://example.com"
20161 (http://example.com)
20162 (http://example.com) foo
20163 http://example.com,
20164 http://example.com, foo
20167 ## Parsoid currently fails wt2html on this one!
20169 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20171 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20173 http://example.com.,;:!?
20177 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20179 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20185 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20187 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20188 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20189 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20190 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20200 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20202 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20208 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20210 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20211 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20212 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20213 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20223 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20225 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20226 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20227 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20230 ISBN 1234567890<nowiki/>1
20231 ISBN 1234567890<nowiki/>x
20232 ISBN 1234567890<nowiki/>b
20236 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
20238 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
20243 #### --------------- Quotes ---------------
20244 #### 1. Quotes inside <b> and <i>
20245 #### 2. Link fragments separated by <i> and <b> tags
20246 #### 3. Link fragments inside <i> and <b>
20247 #### 4. No escaping needed
20248 #### --------------------------------------
20250 1. Quotes inside <b> and <i>
20252 parsoid=html2wt,wt2wt
20254 ''<nowiki>'foo'</nowiki>''
20255 ''<nowiki>''foo''</nowiki>''
20256 ''<nowiki>'''foo'''</nowiki>''
20258 '''<nowiki>'foo'</nowiki>'''
20259 '''<nowiki>''foo''</nowiki>'''
20260 '''<nowiki>'''foo'''</nowiki>'''
20261 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
20262 '''foo'''<nowiki/>'s
20265 '<nowiki/>''foo''<nowiki/>'
20267 '''foo'''<nowiki/>'
20268 '<nowiki/>'''foo'''<nowiki/>'
20269 ''fools'<span> errand</span>''
20270 ''<span>fool</span>'s errand''
20279 <b>foo'<i>bar'</i>baz</b>
20287 <i>fools'<span> errand</span></i>
20288 <i><span>fool</span>'s errand</i>
20292 2. Link fragments separated by <i> and <b> tags
20294 [[''foo''<nowiki>hello]]</nowiki>
20296 [['''foo'''<nowiki>hello]]</nowiki>
20298 <p>[[<i>foo</i>hello]]
20299 </p><p>[[<b>foo</b>hello]]
20304 3. Link fragments inside <i> and <b>
20305 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
20306 this is one of the shortcomings of this format)
20308 ''[[foo''<nowiki>]]</nowiki>
20310 '''[[foo'''<nowiki>]]</nowiki>
20313 </p><p><b>[[foo</b>]]
20318 4. No escaping needed
20320 '<span>''bar''</span>'
20321 '<span>'''bar'''</span>'
20323 <p>'<span><i>bar</i></span>'
20324 '<span><b>bar</b></span>'
20328 #### ----------- Paragraphs ---------------
20329 #### 1. No unnecessary escapes
20330 #### --------------------------------------
20333 1. No unnecessary escapes
20335 bar <span><nowiki>[[foo]]</nowiki></span>
20337 =bar <span><nowiki>[[foo]]</nowiki></span>
20339 [[bar <span><nowiki>[[foo]]</nowiki></span>
20341 ]]bar <span><nowiki>[[foo]]</nowiki></span>
20343 =bar <span>foo]]</span><nowiki>=</nowiki>
20345 <p>bar <span>[[foo]]</span>
20346 </p><p>=bar <span>[[foo]]</span>
20347 </p><p>[[bar <span>[[foo]]</span>
20348 </p><p>]]bar <span>[[foo]]</span>
20349 </p><p>=bar <span>foo]]</span>=
20353 #### ----------------------- PRE --------------------------
20354 #### 1. Leading whitespace in SOL context should be escaped
20355 #### ------------------------------------------------------
20357 1. Leading whitespace in SOL context should be escaped
20361 <nowiki> </nowiki>a
20363 <nowiki> </nowiki> a
20365 <nowiki> </nowiki>a(tab)
20367 <nowiki> </nowiki> a
20369 <nowiki> </nowiki> a
20372 <nowiki> </nowiki>b
20375 <nowiki> </nowiki>b
20378 <nowiki> </nowiki> b
20384 <p><!--cmt--> a</p>
20394 2. Leading whitespace in non-indent-pre contexts should not be escaped
20401 <p>foo <span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"<i data-parsoid='{\"dsr\":[9,14,2,2]}'>a</i>\n b"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>
20405 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
20424 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
20428 [[File:Foobar.jpg|thumb|caption]]
20431 <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>
20435 5. Nowiki escaping should account for indent-pres
20444 #### --------------- Behavior Switches --------------------
20446 1. Valid behavior switches should be escaped
20450 <nowiki>__TOC__</nowiki>
20451 ''<nowiki>__TOC__</nowiki>''
20458 2. Invalid behavior switches should not be escaped
20469 #### --------------- HTML tags ---------------
20472 #### 3. multi-line html tag
20473 #### 4. extension tags
20474 #### -----------------------------------------
20480 <a href="http://google.com">google</a>
20482 <a href="http://google.com">google</a>
20488 <nowiki><div>foo</div>
20489 <div style="color:red">foo</div></nowiki>
20491 <p><div>foo</div>
20492 <div style="color:red">foo</div>
20497 3. multi-line html tag
20512 <nowiki><ref>foo</ref></nowiki>
20514 <nowiki><ref>bar</nowiki>
20516 baz<nowiki></ref></nowiki>
20518 <p><ref>foo</ref>
20519 </p><p><ref>bar
20520 </p><p>baz</ref>
20524 #### --------------- Others ---------------
20528 <nowiki>foo</nowiki>
20530 <p><nowiki>foo</nowiki>
20534 ## The quote-char in the input is necessary for triggering the bug
20536 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
20538 parsoid=wt2wt,html2wt
20547 Tag-like HTML structures are passed through as text
20569 </p><p>1<d e>f
20574 # This was a bug in the PHP parser (see bug 17663 and its dups,
20575 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
20577 Tag names followed by punctuation should not be recognized as tags
20581 <p><s.ome> text
20586 HTML tag with necessary entities in attributes
20588 <span title="&amp;">foo</span>
20590 <p><span title="&amp;">foo</span>
20595 HTML tag with 'unnecessary' entity encoding in attributes
20597 <span title="&">foo</span>
20599 <p><span title="&">foo</span>
20604 HTML tag with broken attribute value quoting
20606 <span title="Hello world>Foo</span>
20608 <p><span>Foo</span>
20611 <p><span title="Hello world">Foo</span>
20616 Parsoid-only: HTML tag with broken attribute value quoting
20620 <span title="Hello world>Foo</span>
20622 <p><span title="Hello world">Foo</span>
20627 Table with broken attribute value quoting
20630 | title="Hello world|Foo
20641 <td title="Hello world">Foo
20647 Table with broken attribute value quoting on consecutive lines
20650 | title="Hello world|Foo
20651 | style="color:red|Bar
20664 Parsoid-only: Table with broken attribute value quoting on consecutive lines
20669 | title="Hello world|Foo
20670 | style="color:red|Bar
20675 <td title="Hello world">Foo
20676 </td><td style="color: red">Bar
20677 </td></tr></tbody></table>
20682 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
20692 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
20702 Accept empty td cell attribute
20705 | align="center" | foo || |
20710 <td align="center"> foo </td>
20717 Non-empty attributes in th-cells
20720 ! Foo !! style="color: red" | Bar
20726 <th style="color: red"> Bar
20732 Accept empty attributes in th-cells
20747 Empty table rows go away
20768 ### Parsoid-centric tests for testing RTing of inter-element separators
20769 ### Edge cases not tested by existing parser tests and specific to
20770 ### Parsoid-specific serialization strategies.
20774 RT-ed inter-element separators should be valid separators
20787 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
20788 (Parsoid-only since PHP parser relies on Tidy for correct output)
20804 Empty TD followed by TD with tpl-generated attribute
20809 |{{echo|style='color:red'}}|foo
20823 Indented table with an empty td
20842 Indented block & table
20856 <div data-parsoid='{"stx":"html"}'>foo</div>
20858 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
20863 Indent and comment before table row
20877 <table data-parsoid='{}'>
20878 <!--hi--><tbody data-parsoid='{}'><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
20879 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
20884 Empty TR followed by a template-generated TR
20885 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
20891 {{echo|<tr><td>foo</td></tr>}}
20897 <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}}]}'>
20902 ## PHP and parsoid output differ for this, and since this is primarily
20903 ## for testing Parsoid's serializer, marking this Parsoid only
20905 Empty TR followed by mixed-ws-comment line should RT correctly
20921 <!--c--> </tr><!--d-->
20927 Multi-line image caption generated by templates with/without trailing newlines
20931 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
20932 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
20934 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC</div></div></div>
20935 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC\n\n</div></div></div>
20940 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
20944 <includeonly>foo</includeonly>
20951 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
20953 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
20956 ## PHP emits broken html for this, and since this is primarily
20957 ## a Parsoid serializer test, marking this Parsoid only
20959 Improperly nested inline or quotes tags with whitespace in between
20963 <span> <s>x</span> </s>
20966 <p><span> <s>x</s></span><s> </s>
20967 <b> <i>x</i></b><i> </i>
20972 Encapsulate protected attributes from wt
20976 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
20978 <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>
20982 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
20983 ## Having nested or stray pre tags results in the attempt to add duplicates,
20984 ## causing an assertion fail. This test tries to prevent that situation.
20986 Ensure ParagraphWrapper can deal with stray closing pre tags
20996 1. Ensure fostered text content is wrapped in spans
21000 <table>hi</table><table>ho</table>
21009 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
21011 parsoid=wt2html,wt2wt
21018 <span> || ||</span>
21027 Encapsulation properly handles null DSR information from foster box
21029 parsoid=wt2html,wt2wt
21031 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21033 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
21036 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
21040 <td>bar</td></tr></tbody></table>
21044 1. Encapsulate foster-parented transclusion content
21046 parsoid=wt2wt,wt2html
21048 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21050 <span typeof="mw:Transclusion" data-mw="{"parts":["
21051 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
21053 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
21057 <td>bar</td></tr></tbody></table>
21061 2. Encapsulate foster-parented transclusion content
21063 parsoid=wt2wt,wt2html
21065 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21067 <div typeof="mw:Transclusion" data-mw="{"parts":["
21069 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
21071 <td>bar</td></tr></table>"]}">foo</div>
21075 <td>bar</td></tr></tbody></table>
21079 3. Encapsulate foster-parented transclusion content
21081 parsoid=wt2wt,wt2html
21083 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21085 <div typeof="mw:Transclusion" data-mw="{"parts":["
21088 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
21090 <td>"}},"i":0}},"bar</td></tr></table>"]}">
21095 <td>bar</td></tr></tbody></table>
21099 4. Encapsulate foster-parented transclusion content
21101 parsoid=wt2wt,wt2html
21103 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21105 <div typeof="mw:Transclusion" data-mw="{"parts":["
21108 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
21110 <td>"}},"i":0}},"bar</td></tr></table>"]}">
21115 <td>bar</td></tr></tbody></table>
21119 5. Encapsulate foster-parented transclusion content
21121 parsoid=wt2wt,wt2html
21123 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21125 <span typeof="mw:Transclusion" data-mw="{"parts":["
21130 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
21136 <p>foo</p></div></td></tr></tbody></table>
21140 6. Encapsulate foster-parented transclusion content
21142 parsoid=wt2wt,wt2html
21144 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21146 <span typeof="mw:Transclusion" data-mw="{"parts":["
21151 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
21157 <p>foo</p></div></td></tr></tbody></table>
21162 7. Encapsulate foster-parented transclusion content
21164 parsoid=wt2wt,wt2html
21166 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21168 <p typeof="mw:Transclusion" data-mw="{"parts":["
21169 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
21170 <p>foo</p>"}},"i":0}},"
21171 <td>bar</td></table>"]}">foo</p>
21175 <td>bar</td></tr></tbody></table>
21179 8. Encapsulate foster-parented transclusion content
21181 parsoid=wt2wt,wt2html
21184 }}{|{{echo|style='color:red'}}
21189 <p typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}">a</p><span 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}}}</span>
21193 <td>b</td></tr></tbody></table>
21197 9. Encapsulate foster-parented transclusion content
21199 parsoid=wt2wt,wt2html
21201 <table>{{echo|hi</table>hello}}
21203 <span 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</span>
21204 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
21208 Table in fosterable position
21210 parsoid=wt2html,wt2wt
21219 <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" data-parsoid="{}">
21221 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
21227 # Parsoid only for bug 64747
21229 Properly encapsulate empty-content transclusions in fosterable positions
21237 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"#if:","function":"#if"},"params":{"1":{"wt":"\n<td>foo</td>\n"}},"i":0}},"\n</table>"]}' data-parsoid='{"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]],"src":"<table>\n{{#if:|\n<td>foo</td>\n}}\n</table>"}'>
21243 Support <object> element with .data attribute
21247 <object data="test.swf"></object>
21249 <object data="test.swf"></object>
21252 # -----------------------------------------------------------------
21253 # The following section of tests are primarily to spec requirements
21254 # around serialization of new/edited content.
21256 # All these tests are marked Parsoid html2wt and html2html only
21257 # ----------------------------------------------------------------
21260 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
21267 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Foo">Foo</a></p>
21271 Image: Modifying size of an image (1)
21274 "modes": ["wt2wt"],
21276 ["img[height]", "attr", "height", "22"],
21277 ["img[width]", "attr", "width", "200"]
21281 [[Image:Foobar.jpg|230x230px]]
21283 [[Image:Foobar.jpg|200x200px]]
21287 Image: Modifying size of an image (2)
21290 "modes": ["wt2wt"],
21292 ["img[height]", "attr", "height", "100"],
21293 ["img[width]", "attr", "width", "500"]
21297 [[Image:Foobar.jpg|230x230px]]
21299 [[Image:Foobar.jpg|500x500px]]
21302 # Change in size is ignored so long as class='mw-default-size'
21304 Image: Modifying size of an image (3)
21307 "modes": ["wt2wt"],
21309 ["figure[class]", "removeClass", "mw-default-size"],
21310 ["figure img", "attr", "height", "19"],
21311 ["figure img", "attr", "width", "170"]
21315 [[Image:Foobar.jpg|thumb]]
21317 [[Image:Foobar.jpg|thumb|170x170px]]
21321 Image: Modifying alignment of an image (bug 48665)
21324 "modes": ["wt2wt"],
21326 ["figure[class]", "removeClass", "mw-halign-right"],
21327 ["figure[class]", "addClass", "mw-halign-left"]
21331 [[Image:Foobar.jpg|thumb|caption|right]]
21333 [[Image:Foobar.jpg|thumb|caption|left]]
21337 Image: Modifying mw-default-size of an frameless image (bug 62805)
21340 "modes": ["wt2wt"],
21342 ["figure.mw-default-size", "removeClass", "mw-default-size"]
21346 [[Image:Foobar.jpg|frameless|right]]
21348 [[Image:Foobar.jpg|frameless|right|220x220px]]
21352 Image: Modifying valign of an image (bug 49221)
21355 "modes": ["wt2wt"],
21357 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
21358 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
21362 [[File:Foobar.jpg|20px|middle]]
21364 [[File:Foobar.jpg|20px|text-top]]
21368 Image: Modifying alt attribute of an image (bug 56400)
21371 "modes": ["wt2wt"],
21373 ["img[alt]", "attr", "alt", "some alternate edited text"]
21377 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
21379 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
21383 Image: Modifying caption of an image
21386 "modes": ["wt2wt"],
21388 ["figcaption", "text", "new caption"]
21392 [[Image:Foobar.jpg|thumb|original caption]]
21394 [[Image:Foobar.jpg|thumb|new caption]]
21398 Image: empty alt attribute (bug 48924)
21402 [[File:Foobar.jpg|thumb|alt=|bar]]
21404 <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>
21408 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
21413 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
21415 #<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>
21419 Image: Block level image should have \n before and after
21424 [[File:Foobar.jpg|right|thumb|150x150px]]
21427 <p>123</p><figure typeof="mw:Image/Thumb" class="mw-halign-right"><a href="./File:Foobar.png"><img src="http://192.168.142.128/mw/images/thumb/b/bc/Foobar.png/131px-Foobar.png" width="131" height="150" resource="./File:Foobar.png" data-parsoid='{"a":{"resource":"./File:Foobar.png","width":"131"},"sa":{"resource":"File:Foobar.png","width":"150"}}'></a></figure><p>456</p>
21431 Image: New block level image should have \n before and after (existing
21437 [[File:Foobar.jpg|right|thumb|150x150px]]
21440 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
21441 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"right","ak":"right"},{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"150x150px"}],"dsr":[4,45,2,2]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"dsr":[6,43,null,null]}'><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>
21442 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
21446 Image: upright option (parsoid)
21450 [[File:Foobar.jpg|thumb|upright|caption]]
21451 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
21452 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
21454 <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><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><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>
21458 Image: upright option is ignored on inline and frame images (parsoid)
21462 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
21464 <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>
21468 Image: from basic HTML (1)
21472 <span typeof="mw:Image">
21473 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21476 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21480 Image: from basic HTML (2)
21484 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21486 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21490 Image: from basic HTML (3)
21494 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
21496 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
21500 Image: from basic HTML (4)
21504 <img src="File:Foobar.jpg">
21506 [[File:Foobar.jpg|link=]]
21510 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
21517 <li><p>foo</p></li>
21522 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
21528 <ul> <li>foo</li></ul>
21532 Don't strip leading whitespace when handling indent-pre suppressing tags
21540 '''This is very bold of you!'''
21544 indented cell (no pre-wrapping!)
21551 <tr><td> indented row</td></tr>
21554 <b>This is very bold of you!</b>
21557 indented cell (no pre-wrapping!)
21565 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
21570 <nowiki> </nowiki><span>bar</span>
21573 <nowiki> </nowiki></span>bar2
21576 <nowiki> </nowiki><span>bar</span>
21579 <nowiki> </nowiki><span>foo</span>
21597 Lists: Add space after bullets
21603 * <span> baz</span>
21608 <li><span> baz</span></li>
21613 Lists: Dont insert newlines in a serialized list item.
21620 <ul><li>a<br>b</li><li>c</li></ul>
21624 Headings: Add space before/after == (Bug 51744)
21634 == <span> baz</span> ==
21639 <h2><span> baz</span></h2>
21643 Parsoid: Serialize positional parameters with = in them as named parameter
21649 {{echo|1 = f=oo|2 = bar}}
21651 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21652 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21653 {{echo|<nowiki>f=oo</nowiki>|bar}}
21655 <p about="#mwt1" typeof="mw:Transclusion"
21656 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
21658 <p about="#mwt1" typeof="mw:Transclusion"
21659 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
21661 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21662 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21663 <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>
21667 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
21683 <div>a<p>b</p></div>
21692 Substrings resembling wikitext in hrefs should not get nowiki escapes
21698 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
21701 #-----------------------------
21702 # I/B quote minimization tests
21703 #-----------------------------
21706 1. I/B quote minimization: wikitext-only tags should be combined
21726 <p><i>A</i><i>B</i></p>
21727 <p><b>A</b><b>B</b></p>
21728 <p><i>A</i><b><i>B</i></b></p>
21729 <p><b>A</b><i><b>B</b></i></p>
21730 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
21731 <p><i><b>A</b></i><i><b>B</b></i></p>
21732 <p><i><b>A</b></i><b><i>B</i></b></p>
21733 <p><b><i>A</i></b><i><b>B</b></i></p>
21737 2. I/B quote minimization: wikitext and html tags should not be combined
21743 ''A'''''<i>B</i>'''
21745 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
21746 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
21750 3. I/B quote minimization: templated content stops minimization
21754 ''A''{{echo|''B''}}
21756 ''A''{{echo|'''''B'''''}}
21758 <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>
21759 <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>
21763 4. I/B quote minimization: new content should be mimimized with adjacent old content
21773 <p><i>A</i><i data-parsoid='{}'>B</i></p>
21774 <p><b data-parsoid='{}'>A</b><b>B</b></p>
21775 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
21778 #------------------------------------
21779 # End of I/B quote minimization tests
21780 #------------------------------------
21783 Bug 54262: New entities
21789 <span typeof="mw:Entity"> </span>
21792 ## Note that there is no wikitext output for 'unknownproperty' ##
21793 ## Unknown magic words are silently dropped ##
21808 __NOCONTENTCONVERT__
21810 <meta property='mw:PageProp/toc' />
21811 <meta property='mw:PageProp/notoc' />
21812 <meta property='mw:PageProp/forcetoc' />
21813 <meta property='mw:PageProp/index' />
21814 <meta property='mw:PageProp/noindex' />
21815 <meta property='mw:PageProp/nogallery' />
21816 <meta property='mw:PageProp/noeditsection' />
21817 <meta property='mw:PageProp/notitleconvert' />
21818 <meta property='mw:PageProp/nocontentconvert' />
21819 <meta property='mw:PageProp/unknownproperty' />
21823 Consecutive <pre>s should not get merged
21825 parsoid=html2wt,html2html
21841 <pre>a</pre><pre>b</pre>
21855 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
21859 [[Special:BookSources/1234567890|ISBN 1234567895]]
21861 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
21865 Edited RFC links not serializable as RFC links should serialize as extlinks
21869 [//tools.ietf.org/html/rfc123 New RFC]
21871 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
21875 Edited PMID links not serializable as PMID links should serialize as extlinks
21879 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
21881 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
21885 Edited Redirect link should emit a non-piped wikitext link
21891 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
21894 # -----------------------------------------------------------------
21895 # End of section for Parsoid-only html2wt tests for serialization
21897 # -----------------------------------------------------------------
21904 Try for 100% code coverage