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>
5528 # The expected HTML structure in this test is debatable. The PHP parser does
5529 # not parse this kind of table at all. The main focus for Parsoid is on
5530 # round-tripping, so this output is ok for now. TODO: revisit!
5532 Wikitext table with html-syntax row
5542 <td>foo</td></tr></tbody></table>
5545 ## Note that Parsoid output differs from PHP and PHP+tidy here.
5546 ## The lack of <tr> tags in the PHP output is arguably a bug in the
5547 ## PHP parser, which tidy then compounds by fostering the content
5548 ## entirely out of the table. Parsoid recognizes the table context
5549 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
5550 ## depends on PHP's treatment of broken table markup!
5552 Implicit <td> after a |-
5554 parsoid=wt2html,wt2wt
5574 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
5576 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
5578 parsoid=wt2html,wt2wt
5611 <tr><td><pre>a</pre></td></tr>
5612 <tr><td> b</td></tr>
5617 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
5619 Lists should be recognized in an implicit <td> context
5621 parsoid=wt2html,wt2wt
5648 Parsoid: Round-trip tables directly followed by content (bug 51219)
5650 parsoid=wt2html,wt2wt
5662 <td>foo</td></tr></tbody></table> bar
5666 <td>baz</td></tr></tbody></table><b>quux</b>
5670 Parsoid: Default to a newline after tables in new content (bug 51219)
5677 <nowiki> </nowiki>bar
5684 <tr><td>foo</td></tr></tbody></table> bar
5686 <tr><td>baz</td></tr></tbody></table><b>quux</b>
5690 Parsoid: newline inducing block nodes don't suppress <nowiki>
5702 Parsoid: Row-syntax table headings followed by comment & table cells
5704 parsoid=wt2html,wt2wt
5708 <!-- foo --> || baz || quux
5722 <tbody><tr><th> foo </th><th> bar
5723 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
5728 # PHP throws away the (semi-broken) "foo" class here; Parsoid
5731 Parsoid: Recover better from broken table attributes
5751 <p>foo</p></td></tr>
5756 Strip unsupported table tags
5807 Plain link, capitalized
5811 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5816 Plain link, uncapitalized
5820 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
5827 [[Main Page|The Main Page]]
5829 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5834 Piped link with comment in link text
5836 [[Main Page|The Main<!--front--> Page]]
5838 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
5843 Piped link with multiple pipe characters in link text
5845 [[Main Page||The|Main|Page|]]
5847 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
5850 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
5858 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
5863 Broken link with fragment
5865 [[Zigzagzogzagzig#zug]]
5867 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
5872 Special page link with fragment
5874 [[Special:Version#anchor]]
5876 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
5881 Nonexistent special page link with fragment
5883 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
5885 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
5892 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
5894 <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>
5901 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
5903 <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>!!!
5914 Bug 43661: Piped links with identical prefixes
5916 [[prefixed article|prefixed articles with spaces]]
5918 [[prefixed article|prefixed articlesaoeu]]
5920 [[Main Page|Main Page test]]
5922 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
5923 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
5924 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
5930 Link with HTML entity in suffix / tail
5932 [[Main Page]]", [[Main Page]]a
5934 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
5939 Link with 3 brackets
5948 Link with 4 brackets
5952 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
5957 Piped link with 3 brackets
5959 [[[main page|the main page]]]
5961 <p>[[[main page|the main page]]]
5966 Piped link with extlink-like text
5969 [[Main Page|This is a [bar]]]
5971 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
5972 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
5977 Link with multiple pipes
5979 [[Main Page|The|Main|Page]]
5981 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
5985 # Note that parsoid does not munge anchor text; all non-space
5986 # characters are valid in HTML5 ids.
5988 Anchor containing a #. (bug 63430)
5990 [[Main Page#And#Link]]
5992 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
5995 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6001 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6003 <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>
6008 Link with space in namespace
6010 [[User talk:Foo bar]]
6012 <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>
6017 MemoryAlpha:AlphaTest
6019 This is an article in the MemoryAlpha namespace
6020 (which shadows the memoryalpha interwiki link).
6024 Namespace takes precedence over interwiki link (bug 51680)
6026 [[MemoryAlpha:AlphaTest]]
6028 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6032 # The previous test doesn't work correctly in html2*, due to not recognizing the
6033 # link as an internal one. This one checks for the correct behavior.
6035 Link to namespace preferred over interwiki with correct rel attribute
6037 parsoid=html2wt,html2html
6039 [[MemoryAlpha:AlphaTest]]
6041 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6046 Piped link to namespace
6048 [[Meta:Disclaimers|The disclaimers]]
6050 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6057 [[Usually caused by a typo (oops}]]
6059 <p>[[Usually caused by a typo (oops}]]
6066 Just a test of an article title containing a percent.
6070 Link containing % (not as a hex sequence)
6074 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6077 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6080 # note that the parsoid HTML is identical to the previous test output,
6081 # so the previous test ensures that the html2wt mode will generate the
6082 # "not as a hex sequence" wikitext.
6084 Link containing % as a single hex sequence interpreted to char
6086 parsoid=wt2wt,wt2html,html2html
6090 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6093 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6097 Link containing % as a double hex sequence interpreted to hex sequence
6101 <p>[[7%2525 Solution]]
6105 # note that parsoid does not munge anchor text; all non-space
6106 # characters are valid in HTML5 anchors.
6108 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6109 Example for such a section: == < ==
6111 [[%23%3c]][[%23%3e]]
6113 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6116 <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>
6120 Link containing "<#" and ">#" as a hex sequences
6122 [[%3c%23]][[%3e%23]]
6124 <p>[[%3c%23]][[%3e%23]]
6129 Link containing an equals sign
6131 [[Special:BookSources/isbn=4-00-026157-6]]
6133 <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>
6136 <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>
6142 Just a test of an article title containing a tilde.
6145 # note that links containing signatures, like [[Foo~~~~]], are
6146 # massaged by the pre-save transform (PST) and so the tildes are never
6147 # seen by the parser.
6149 Link containing a tilde
6153 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6156 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6160 Link containing double-single-quotes '' (bug 4598)
6162 [[Lista d''e paise d''o munno]]
6164 <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>
6167 <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>
6171 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6173 Some [[Link|pretty ''italics'' and stuff]]!
6175 <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>!
6178 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6182 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6184 ''Some [[Link|pretty ''italics'' and stuff]]!''
6186 <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>
6191 Link with double quotes in title part (literal) and alternate part (interpreted)
6193 [[File:Denys Savchenko ''Pentecoste''.jpg]]
6197 [[''Pentecoste''|Pentecoste]]
6199 [[''Pentecoste''|''Pentecoste'']]
6201 <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>
6202 </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>
6203 </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>
6204 </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>
6207 <meta typeof="mw:Placeholder"/>
6208 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6209 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6210 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6214 Broken image links with HTML captions (bug 39700)
6216 [[File:Nonexistent|<script></script>]]
6217 [[File:Nonexistent|100px|<script></script>]]
6218 [[File:Nonexistent|<]]
6219 [[File:Nonexistent|a<i>b</i>c]]
6221 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6222 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6223 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6224 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6231 [[http://www.example.com]]
6233 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6236 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6240 Plain link to URL with link text
6242 [[http://www.example.com Link text]]
6244 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6249 Plain link to protocol-relative URL
6251 [[//www.example.com]]
6253 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6256 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6260 Plain link to protocol-relative URL with link text
6262 [[//www.example.com Link text]]
6264 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6269 Plain link to page with question mark in title
6275 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6276 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6281 # I'm fairly sure the expected result here is wrong.
6282 # We want these to be URL links, not pseudo-pages with URLs for titles....
6283 # However the current output is also pretty screwy.
6286 # I'm changing it to match the current output--it arguably makes more
6287 # sense in the light of the test above. Old expected result was:
6288 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6290 # But I think this test is bordering on "garbage in, garbage out" anyway.
6295 Piped link to URL: [[http://www.example.com|an example URL]]
6297 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6300 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6304 BUG 2: [[page|http://url/]] should link to page, not http://url/
6306 [[Main Page|http://url/]]
6308 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6311 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6314 # Parsoid does not mark self-links, by design.
6316 BUG 337: Escaped self-links should be bold
6320 [[Bug462]] [[Bug462]]
6322 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6325 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6327 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6331 Self-link to section should not be bold
6335 [[Main Page#section]]
6337 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
6348 Self-link to numeric title
6354 <p><strong class="selflink">0</strong>
6359 Link to numeric-equivalent title
6365 <p><a href="/wiki/00" title="00">00</a>
6370 <nowiki> inside a link
6372 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
6374 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
6379 Non-breaking spaces in title
6381 [[ Main Page ]]
6383 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
6388 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
6394 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
6399 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
6405 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
6410 Internal link with en linktrail: no apostrophes (bug 27473)
6416 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
6421 Internal link with ca linktrail with apostrophes (bug 27473)
6427 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
6432 Internal link with kaa linktrail with apostrophes (bug 27473)
6438 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
6443 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
6445 [[User:Foo/Test/63636:Bar|Test]]
6447 <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>
6450 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
6454 Purely hash wikilink
6456 title=[[User:test/123]]
6460 <p><a href="#a">b</a>
6463 <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>
6467 1. Interaction of linktrail and template encapsulation
6473 <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>
6477 2. Interaction of linktrail and template encapsulation
6481 {{echo|Some [[Fool]]}}s
6483 <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>
6487 3. Interaction of linktrail and template encapsulation
6491 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
6493 <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>
6503 Internal link with is link prefix
6507 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
6509 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
6520 Internal link with is link trail and link prefix
6524 [[mótmælendatrú|xxx]]ar
6526 mótmælenda[[söfnuður]]
6527 mótmælenda[[söfnuður|söfnuðir]]
6528 mótmælenda[[söfnuður|söfnuðir]]xxx
6530 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
6531 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
6532 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
6533 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
6534 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
6539 Parsoid link trail escaping
6541 parsoid=html2wt,html2html
6545 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
6549 Parsoid link prefix escaping
6552 parsoid=html2wt,html2html
6554 Aðrir mótmælenda<nowiki/>[[söfnuður]]
6556 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
6560 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
6568 [http://wp.org ''foo'']
6570 <p><a href="/wiki/Foo" title="Foo"> bar</a>
6571 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
6572 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
6573 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
6578 Parsoid: Scoped parsing should handle mixed transclusions and plain text
6582 [[Foo|{{echo|a}} b {{echo|c}}]]
6584 <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>
6588 Link with angle bracket after anchor
6592 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
6595 <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>
6599 ### Interwiki links (see maintenance/interwiki.sql)
6603 Inline interwiki link
6605 [[MeatBall:SoftSecurity]]
6607 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
6612 Inline interwiki link with empty title (bug 2372)
6616 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
6621 Interwiki link encoding conversion (bug 1636)
6623 *[[Wikipedia:ro:Olteniţa]]
6624 *[[Wikipedia:ro:Olteniţa]]
6626 <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>
6627 <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>
6631 <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>
6632 <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>
6637 Interwiki link with fragment (bug 2130)
6639 [[MeatBall:SoftSecurity#foo]]
6641 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
6645 # Ideally the wikipedia: prefix here should be proto-relative too
6647 Different interwiki prefixes mapping to the same URL
6655 [[:wikipedia:Foo|Foo]]
6657 [[wikipedia:en:Foo]]
6659 [[:wikipedia:en:Foo]]
6663 <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>
6665 <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>
6667 <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>
6669 <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>
6671 <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>
6673 <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>
6675 <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>
6679 Interwiki links that cannot be represented in wiki syntax
6682 [[meatball:ok#foo|ok with fragment]]
6683 [[meatball:ok_as_well?|ok ending with ? mark]]
6684 [http://de.wikipedia.org/wiki/Foo?action=history has query]
6685 [http://de.wikipedia.org/wiki/#foo is just fragment]
6688 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok">meatball:ok</a>
6689 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo">ok with fragment</a>
6690 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?">ok ending with ? mark</a>
6691 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
6692 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
6696 Interwiki links: trail
6700 [[wikipedia:Foo|Ba]]r
6702 <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>
6706 Local interwiki link
6708 [[local:Template:Foo]]
6710 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
6715 Local interwiki link: self-link to current page
6721 <p><strong class="selflink">local:Main Page</strong>
6726 Local interwiki link: prefix only (bug 64167)
6730 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
6735 Local interwiki link: with additional interwiki prefix (bug 61357)
6737 [[local:meatball:Hello]]
6739 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
6744 ### Interlanguage links
6745 ### Language links (so that searching for '### language' matches..)
6758 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6762 Interlanguage link with spacing
6771 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6775 Double interlanguage link
6785 <link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/Spanish"/>
6786 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6790 Interlanguage link variations
6800 <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"}}'/>
6801 <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"}}'/>
6805 Interlanguage link, with prefix links
6816 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6820 Double interlanguage link, with prefix links (bug 8897)
6832 <link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/Spanish"/>
6833 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/Chinese"/></p>
6837 "Extra" interlanguage links (bug 32189 / gerrit 111390)
6846 <link rel="mw:PageProp/Language" title="Multilingual" href="//wikisource.org/wiki/Article"/></p>
6850 Parsoid-specific test: Wikilinks with should RT properly
6856 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
6861 Parsoid bug 53221: Wikilinks should be properly entity-escaped
6865 He&nbsp;llo [[Foo|He&nbsp;llo]]
6867 He&nbsp;llo [[He&nbsp;llo]]
6869 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6870 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
6874 Parsoid: handle constructor well
6882 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
6884 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
6888 Parsoid: recognize interlanguage links without a target page
6894 <p><link rel="mw:PageProp/Language" href="http://ko.wikipedia.org/wiki/"></p>
6898 Parsoid: recognize interwiki links without a target page
6904 <p><a rel="mw:ExtLink" href="//ko.wikipedia.org/wiki/">ko:</a></p>
6908 Parsoid: Bug #45209, handle interwiki links pointing to the current wiki as plain wiki links
6914 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"en:Foo"}}'>Foo</a></p>
6918 Interlanguage link with preceding local interwiki link (bug 68085)
6921 [[local:es:Spanish]]
6924 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
6929 Looks like an interlanguage link, but is actually a local interwiki
6935 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
6940 ### Redirects, Parsoid-only
6943 1. Simple redirect to page
6947 #REDIRECT [[Main Page]]
6949 <link rel="mw:PageProp/redirect" href="./Main_Page">
6952 # Only wt2html and html2html since "Main_Page" will serialize to "Main Page"
6954 2. Other redirect variants
6956 parsoid=wt2html,wt2wt
6958 #REDIRECT [[Main_Page]]
6959 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
6961 <link rel="mw:PageProp/redirect" href="./Main_Page">
6962 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D">
6968 parsoid=wt2html,wt2wt
6973 <li>REDIRECT [[]]</li></ol>
6977 Optional colon in #REDIRECT
6979 # the colon is archaic syntax. we support it for wt2html, but we
6980 # don't care that it roundtrips back to the modern syntax.
6981 parsoid=wt2html,html2html
6983 #REDIRECT:[[Main Page]]
6985 <link rel="mw:PageProp/redirect" href="./Main_Page">
6989 Whitespace in #REDIRECT with optional colon
6991 # the colon and gratuitous whitespace is archaic syntax. we support
6992 # it for wt2html, but we don't care that it roundtrips back to the
6993 # modern syntax (without extra whitespace)
6994 parsoid=wt2html,html2html
7001 <link rel="mw:PageProp/redirect" href="./Main_Page">
7005 Piped link in #REDIRECT
7007 # content after piped link is ignored. we support this syntax,
7008 # but don't care that the piped link is lost when we roundtrip this.
7011 #REDIRECT [[Main Page|bar]]
7013 <link rel="mw:PageProp/redirect" href="./Main_Page">
7017 Redirect to category
7021 #REDIRECT [[Category:Foo]]
7023 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7027 Redirect to category with URL encoding
7031 #REDIRECT [[Category%3AFoo]]
7033 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7037 Redirect to category page
7039 parsoid=wt2html,html2html
7041 #REDIRECT [[:Category:Foo]]
7043 <p><a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a></p>
7047 Redirect to image page (1)
7051 #REDIRECT [[File:Wiki.png]]
7053 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7057 Redirect to image page (2)
7061 #REDIRECT [[Image:Wiki.png]]
7063 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7067 Redirect to language
7071 #REDIRECT [[en:File:Wiki.png]]
7073 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7077 Redirect to interwiki
7081 #REDIRECT [[meatball:File:Wiki.png]]
7083 <link rel="mw:PageProp/redirect" href="File:Wiki.png">
7087 Non-English #REDIRECT
7092 #TILVÍSUN [[Main Page]]
7094 <link rel="mw:PageProp/redirect" href="./Main_Page">
7105 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7122 Broken br tag sanitization
7130 # TODO: Fix html2html mode (bug 51055)!
7131 # This </br> handling was added as part of bug 50831; but it
7132 # differs from how PHP+tidy handles this. We should investigate
7135 Parsoid: Broken br tag recognition
7151 Incorrecly removing closing slashes from correctly formed XHTML
7153 <br style="clear:both;" />
7155 <p><br style="clear:both;" />
7160 Failing to transform badly formed HTML into correct XHTML
7162 <br style="clear: left;">
7163 <br style="clear: right;">
7164 <br style="clear: both;">
7166 <p><br style="clear: left;" />
7167 <br style="clear: right;" />
7168 <br style="clear: both;" />
7173 Handling html with a div self-closing tag
7182 <p><div title />
7186 <p><div title=bar />
7187 <div title=bar/>
7189 <div title="bar/"></div>
7195 Handling html with a br self-closing tag
7204 <p><br title="title" />
7205 <br title="title" />
7222 Horizontal ruler (should it add that extra space?)
7236 Horizontal ruler -- 4+ dashes render hr
7245 Horizontal ruler -- eats additional dashes on the same line
7254 Horizontal ruler -- does not collapse dashes on consecutive lines
7265 Horizontal ruler -- <4 dashes render as plain text
7274 Horizontal ruler -- Supports content following dashes on same line
7286 ### Block-level elements
7295 <ul><li>Common list</li>
7297 <li>item 3</li></ul>
7308 <ol><li>Numbered list</li>
7310 <li> item 3</li></ol>
7324 ***#Number on level 4
7326 **#Number on level 3
7327 **#Number on level 3
7331 #** Level 3, but ordered
7334 <ol><li> with numbers</li></ol>
7335 <ul><li> and bullets</li></ul>
7336 <ol><li> and numbers</li></ol></li>
7338 <ul><li>bullet level 2
7339 <ul><li>bullet level 3
7340 <ol><li>Number on level 4</li></ol></li></ul></li>
7342 <ol><li>Number on level 3</li>
7343 <li>Number on level 3</li></ol></li></ul>
7344 <ol><li>number level 2</li></ol></li>
7346 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
7347 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
7358 <ul><li>bar</li></ul></li></ul>
7368 <ul><li><ul><li>foo</li></ul></li>
7374 Nested lists 3 (first element empty)
7380 <ul><li>bar</li></ul></li></ul>
7385 Nested lists 4 (first element empty)
7390 <ul><li><ul><li></li></ul></li>
7396 Nested lists 5 (both elements empty)
7401 <ul><li><ul><li></li></ul></li>
7407 Nested lists 6 (both elements empty)
7413 <ul><li></li></ul></li></ul>
7418 Nested lists 7 (skip initial nesting levels)
7422 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
7427 Nested lists 8 (multiple nesting transitions)
7435 <ul><li><ul><li> bar</li></ul></li>
7436 <li> baz</li></ul></li>
7442 1. Lists with start-of-line-transparent tokens before bullets: Comments
7455 2. Lists with start-of-line-transparent tokens before bullets: Template close
7460 <ul><li>foo bar</li>
7466 List items are not parsed correctly following a <pre> block (bug 785)
7472 <ul><li> <pre>foo</pre></li>
7473 <li> <pre>bar</pre></li>
7479 List items from template
7490 * notSOL{{inner list}}
7493 <ul><li> item 1</li>
7494 <li> item 2</li></ul>
7495 <ul><li> item 0</li>
7497 <li> item 2</li></ul>
7498 <ul><li> item 0</li>
7501 <li> item 2</li></ul>
7506 List interrupted by empty line or heading
7514 <ul><li> foo</li></ul>
7515 <ul><li><ul><li> bar</li></ul></li></ul>
7516 <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>
7517 <ul><li> Another list item</li></ul>
7522 Multiple list tags generated by templates
7543 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
7546 <!--This line will NOT split the list-->
7548 <!--This line will NOT split the list either-->
7550 <!--foo--> <!----> <!--This line NOT split the list either-->
7561 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
7564 <!--This line will NOT split the list-->
7566 <!--This line will NOT split the list either-->
7568 <!--foo--> <!----> <!--This line NOT split the list
7581 (The PHP parser relies on Tidy for the hack)
7583 parsoid=wt2html,wt2wt
7587 * {{echo|<li>templated li-hack}}
7588 * <!--foo--> <li> unsupported li-hack with preceding comments
7591 <li><li>not a li-hack
7598 <li>templated li-hack</li>
7599 <li>unsupported li-hack with preceding comments</li>
7602 <li>not a li-hack</li>
7607 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
7634 Parsoid: Test of whitespace serialization with Templated bullets
7641 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
7645 # ------------------------------------------------------------------------
7646 # The next set of tests are about Parsoid's ability to handle badly nested
7647 # tags (parse, minimize scope of fixup, and roundtrip back)
7648 # ------------------------------------------------------------------------
7651 Unbalanced closing block tags break a list
7652 (php parser relies on Tidy to fix up)
7670 # Parsoid fails this test, but it might be tricky to support properly.
7673 Unbalanced closing non-block tags don't break a list
7674 (php parser relies on Tidy to fix up)
7681 <li><span>a</span></li>
7682 <li><span>b</span></li>
7696 Unclosed formatting tags that straddle lists are closed and reopened
7697 (php parser relies on Tidy to fix up)
7715 # Parsoid fails this test, but it might be tricky to support properly.
7718 List embedded in a non-block tag
7719 (Ugly Parsoid output -- worth fixing; PHP parser relies on Tidy)
7726 <li><small>foo</small></li>
7736 # This is a bug in the PHP parser + tidy combination.
7737 # (The </tr> tag gets parsed as text and html-escaped by PHP,
7738 # and then fostered out of the table by tidy.)
7739 # We believe the Parsoid output to be correct.
7741 Table with missing opening <tr> tag
7743 parsoid=wt2html,wt2wt
7768 # Note that the current date is hard-coded as
7769 # 1970-01-01T00:02:03Z (a Thursday)
7770 # when running parser tests. The timezone is also fixed to GMT, so
7771 # local date will be identical to current date.
7774 Magic Word: {{CURRENTDAY}}
7783 Magic Word: {{CURRENTDAY2}}
7792 Magic Word: {{CURRENTDAYNAME}}
7801 Magic Word: {{CURRENTDOW}}
7810 Magic Word: {{CURRENTMONTH}}
7819 Magic Word: {{CURRENTMONTH1}}
7828 Magic Word: {{CURRENTMONTHABBREV}}
7830 {{CURRENTMONTHABBREV}}
7837 Magic Word: {{CURRENTMONTHNAME}}
7839 {{CURRENTMONTHNAME}}
7846 Magic Word: {{CURRENTMONTHNAMEGEN}}
7848 {{CURRENTMONTHNAMEGEN}}
7855 Magic Word: {{CURRENTTIME}}
7864 Magic Word: {{CURRENTHOUR}}
7873 Magic Word: {{CURRENTWEEK}} (@bug 4594)
7882 Magic Word: {{CURRENTYEAR}}
7891 Magic Word: {{CURRENTTIMESTAMP}}
7893 {{CURRENTTIMESTAMP}}
7900 Magic Words LOCAL (UTC)
7904 * {{LOCALMONTHNAME}}
7905 * {{LOCALMONTHNAMEGEN}}
7906 * {{LOCALMONTHABBREV}}
7915 * {{LOCALTIMESTAMP}}
7930 <li> 19700101000203</li></ul>
7935 Magic Word: {{FULLPAGENAME}}
7937 title=[[User:Ævar Arnfjörð Bjarmason]]
7941 <p>User:Ævar Arnfjörð Bjarmason
7946 Magic Word: {{FULLPAGENAMEE}}
7948 title=[[User:Ævar Arnfjörð Bjarmason]]
7952 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
7957 Magic Word: {{TALKSPACE}}
7959 title=[[User:Ævar Arnfjörð Bjarmason]]
7968 Magic Word: {{TALKSPACE}}, same namespace
7970 title=[[User talk:Ævar Arnfjörð Bjarmason]]
7979 Magic Word: {{TALKSPACE}}, main namespace
7981 title=[[Parser Test]]
7990 Magic Word: {{TALKSPACEE}}
7992 title=[[User:Ævar Arnfjörð Bjarmason]]
8001 Magic Word: {{SUBJECTSPACE}}
8003 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8012 Magic Word: {{SUBJECTSPACE}}, same namespace
8014 title=[[User:Ævar Arnfjörð Bjarmason]]
8023 Magic Word: {{SUBJECTSPACE}}, main namespace
8025 title=[[Parser Test]]
8033 Magic Word: {{SUBJECTSPACEE}}
8035 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8044 Magic Word: {{NAMESPACE}}
8046 title=[[User:Ævar Arnfjörð Bjarmason]]
8055 Magic Word: {{NAMESPACEE}}
8057 title=[[User:Ævar Arnfjörð Bjarmason]]
8066 Magic Word: {{NAMESPACENUMBER}}
8068 title=[[User:Ævar Arnfjörð Bjarmason]]
8077 Magic Word: {{SUBPAGENAME}}
8079 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8088 Magic Word: {{SUBPAGENAMEE}}
8090 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8099 Magic Word: {{ROOTPAGENAME}}
8101 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8105 <p>Ævar Arnfjörð Bjarmason
8110 Magic Word: {{ROOTPAGENAMEE}}
8112 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8116 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8121 Magic Word: {{BASEPAGENAME}}
8123 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8127 <p>Ævar Arnfjörð Bjarmason
8132 Magic Word: {{BASEPAGENAMEE}}
8134 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8138 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8143 Magic Word: {{TALKPAGENAME}}
8145 title=[[User:Ævar Arnfjörð Bjarmason]]
8149 <p>User talk:Ævar Arnfjörð Bjarmason
8154 Magic Word: {{TALKPAGENAMEE}}
8156 title=[[User:Ævar Arnfjörð Bjarmason]]
8160 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8165 Magic Word: {{SUBJECTPAGENAME}}
8167 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8171 <p>User:Ævar Arnfjörð Bjarmason
8176 Magic Word: {{SUBJECTPAGENAMEE}}
8178 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8180 {{SUBJECTPAGENAMEE}}
8182 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8187 Magic Word: {{NUMBEROFFILES}}
8196 Magic Word: {{PAGENAME}}
8198 title=[[User:Ævar Arnfjörð Bjarmason]]
8202 <p>Ævar Arnfjörð Bjarmason
8207 Magic Word: {{PAGENAME}} with metacharacters
8209 title=[['foo & bar = baz']]
8213 <p><i>'foo & bar = baz'</i>
8216 <p><i>'foo & bar = baz'</i></p>
8220 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
8222 title=[[*RFC 1234 http://example.com/]]
8226 <p>*RFC 1234 http://example.com/
8229 <p>*RFC 1234 http://example.com/</p>
8233 Magic Word: {{PAGENAMEE}}
8235 title=[[User:Ævar Arnfjörð Bjarmason]]
8239 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8244 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
8246 title=[[*RFC 1234 http://example.com/]]
8250 <p>*RFC_1234_http://example.com/
8253 <p>*RFC_1234_http://example.com/</p>
8257 Magic Word: {{REVISIONID}}
8266 Magic Word: {{SCRIPTPATH}}
8275 Magic Word: {{STYLEPATH}}
8284 Magic Word: {{SERVER}}
8288 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8293 Magic Word: {{SERVERNAME}}
8302 Magic Word: {{SITENAME}}
8311 Case-sensitive magic words, when cased differently, should just be template transclusions
8318 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
8319 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
8320 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
8321 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
8326 Case-insensitive magic words should still work with weird casing.
8336 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
8341 Namespace 1 {{ns:1}}
8350 Namespace 1 {{ns:01}}
8359 Namespace 0 {{ns:0}} (bug 4783)
8367 Namespace 0 {{ns:00}} (bug 4783)
8375 Namespace -1 {{ns:-1}}
8384 Namespace User {{ns:User}}
8393 Namespace User talk {{ns:User_talk}}
8402 Namespace User talk {{ns:uSeR tAlK}}
8411 Namespace File {{ns:File}}
8420 Namespace File {{ns:Image}}
8429 Namespace (lang=de) Benutzer {{ns:User}}
8440 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
8446 <p>Benutzer Diskussion
8454 {{urlencode:hi world?!}}
8455 {{urlencode:hi world?!|WIKI}}
8456 {{urlencode:hi world?!|PATH}}
8457 {{urlencode:hi world?!|QUERY}}
8467 Magic Word: prioritize type info over data-parsoid
8473 <meta property="mw:PageProp/forcetoc" data-parsoid='{"src":"__NOTOC__","magicSrc":"__NOTOC__"}'/>
8477 Magic Word: serialize on separate line (parsoid)
8479 parsoid=wt2wt,html2wt
8485 foo<meta property="mw:PageProp/notoc"/>bar
8489 Magic Word: rt non-english wikis
8496 <meta property="mw:PageProp/noeditsection" data-parsoid='{"src":"__NOEDITSECTION__","magicSrc":"__NOEDITSECTION__"}'/>
8503 Magic links: internal link to RFC (bug 479)
8507 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
8512 Magic links: RFC (bug 479)
8516 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
8521 Magic links: ISBN (bug 1937)
8525 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
8530 Magic links: PMID incorrectly converts space to underscore
8534 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
8543 Nonexistent template
8545 {{thistemplatedoesnotexist}}
8547 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
8552 Template with invalid target containing tags
8554 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8556 <p>{{a<b>b</b>|foo|a=b|a = b}}
8561 Template with invalid target containing unclosed tag
8563 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
8565 <p>{{a<b>|foo|a=b|a = b}}</b>
8570 Template with invalid target containing wikilink
8574 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
8577 <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>
8581 Template with just whitespace in it, bug #68421
8585 <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>
8591 This is a test template
8599 <p>This is a test template
8604 Template with explicit namespace
8608 <p>This is a test template
8616 This is a test template with parameter {{{param}}}
8622 {{paramtest|param=foo}}
8624 <p>This is a test template with parameter foo
8629 Template:paramtestnum
8635 Template unnamed parameter
8637 {{paramtestnum|Main Page|the main page}}
8639 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
8644 Template:templatesimple
8650 Template:templateredirect
8652 #redirect [[Template:templatesimple]]
8656 Template:templateasargtestnum
8662 Template:templateasargtest
8664 {{template{{{templ}}}}}
8668 Template:templateasargtest2
8674 Template with template name as unnamed argument
8676 {{templateasargtestnum|templatesimple}}
8683 Template with template name as argument
8685 {{templateasargtest|templ=simple}}
8692 Template with template name as argument (2)
8694 {{templateasargtest2|templ=templatesimple}}
8701 Template:templateasargtestdefault
8703 {{{{{templ|templatesimple}}}}}
8713 Template with default value
8715 {{templateasargtestdefault}}
8722 Template with default value (value set)
8724 {{templateasargtestdefault|templ=templa}}
8733 {{templateredirect}}
8740 Template with argument in separate line
8742 {{ templateasargtest |
8750 Template with complex template as argument
8753 param ={{ templateasargtest |
8756 <p>This is a test template with parameter (test)
8761 Template with thumb image (with link in description)
8764 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
8766 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>
8769 <p>This is a test template with parameter</p>
8770 <div class="thumb tright">
8771 <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>
8772 <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>
8778 Template:complextemplate
8780 {{{1}}} {{paramtest|
8781 param ={{{param}}}}}
8785 Template with complex arguments
8788 param ={{ templateasargtest |
8789 templ = simple }}|[[Template:complextemplate|link]]}}
8791 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
8796 BUG 553: link with two variables in a piped link
8799 |[[{{{1}}}|{{{2}}}]]
8804 <td>[[{{{1}}}|{{{2}}}]]
8810 Magic variable as template parameter
8812 {{paramtest|param={{SITENAME}}}}
8814 <p>This is a test template with parameter MediaWiki
8821 [[{{{param}}}|link]]
8825 Template parameter as link source
8827 {{linktest|param=Main Page}}
8829 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
8834 Template-generated attribute string (k='v')
8836 <span {{attr_str|id|v1}}>bar</span>
8838 <p><span id="v1">bar</span>
8845 including another template, {{paramtest|param={{{arg}}}}}
8849 Template passing argument to another template
8851 {{paramtest2|arg='hmm'}}
8853 <p>including another template, This is a test template with parameter 'hmm'
8864 Template as link source
8868 [[{{linktest2}}|Main Page]]
8870 [[{{linktest2}}]]Page
8872 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8873 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
8874 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
8892 Template infinite loop
8896 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
8901 Template from main namespace
8920 BUG 529: Template with table, not included at beginning of line
8939 BUG 523: Template shouldn't eat newline (or add an extra one before table)
8959 BUG 41: Template parameters shown as broken links
8968 Template with targets containing wikilinks
8972 {{[[{{echo|foo}}]]}}
8974 {{{{echo|[[foo}}]]}}
8976 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
8977 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
8985 ''None'' of '''this''' should be
8987 but rather passed unmodified
8994 # hmm, fix this or just deprecate msgnw and document its behavior?
8998 {{msgnw:MSGNW test}}
9000 <p>''None'' of '''this''' should be
9002  but rather passed unmodified
9003 {{test}}
9013 {{int:youhavenewmessages|lots of money|not!}}
9015 <p>You have lots of money (not!).
9022 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9026 <includeonly> and <noinclude> being included
9037 <onlyinclude>Foo</onlyinclude>bar
9041 <onlyinclude> being included
9053 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9057 <onlyinclude> and <includeonly> being included
9066 <includeonly> and <noinclude> on a page
9068 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9075 Un-closed <noinclude>
9082 <onlyinclude> on a page
9084 <onlyinclude>Foo</onlyinclude>bar
9091 Un-closed <onlyinclude>
9098 Self-closed noinclude, includeonly, onlyinclude tags
9109 Unbalanced includeonly and noinclude tags
9113 |b</noinclude></noinclude>
9114 |c</noinclude></includeonly>
9115 |d</includeonly></includeonly>
9124 <td>c</includeonly>
9126 <td>d</includeonly></includeonly>
9132 Template:Includeonly section
9135 ==Includeonly section==
9141 Bug 6563: Edit link generation for section shown by <includeonly>
9143 {{includeonly section}}
9145 <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>
9146 <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>
9150 # Uses same input as the contents of [[Template:Includeonly section]]
9152 Bug 6563: Section extraction for section shown by <includeonly>
9157 ==Includeonly section==
9165 Bug 6563: Edit link generation for section suppressed by <includeonly>
9168 ==Includeonly section==
9172 <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>
9177 Bug 6563: Section extraction for section suppressed by <includeonly>
9182 ==Includeonly section==
9190 Un-closed <includeonly>
9197 Includes and comments at SOL
9199 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
9206 <includeonly>can have stuff</includeonly>=== here ===
9209 <h2><span class="mw-headline" id="hu">hu</span></h2>
9214 <h3><span class="mw-headline" id="here">here</span></h3>
9217 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment -->
9218 <h2 data-parsoid='{}'> hu </h2>
9220 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
9222 <p data-parsoid='{}'>some</p>
9223 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>
9224 <ul data-parsoid='{}'>
9225 <li data-parsoid='{}'> stuff</li>
9227 <li data-parsoid='{}'> here</li></ul>
9229 <h3 data-parsoid='{}'> here </h3>
9232 # TODO: test with DOM fragment reuse!
9234 Parsoid: DOM fragment reuse
9236 parsoid=wt2wt,wt2html
9238 a{{echo|b<table></table>c}}d
9250 a<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b
9251 <table></table>c"}},"i":0}}]}'>b</span>
9252 <table about="#mwt1"></table><span about="#mwt1">c</span>d
9255 <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">
9257 <table about="#mwt2"></table><span about="#mwt2">
9259 <p about="#mwt2">cd</p>
9262 <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">
9265 <table about="#mwt3"></table><span about="#mwt3">
9268 <p about="#mwt3">b</p>
9272 Parsoid: Merge double tds (bug 50603)
9281 <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>
9286 Parsoid: Merge double tds in nested transclusion content (bug 50603)
9296 <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}}]}'>
9298 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
9304 ### <includeonly> and <noinclude> in attributes
9307 0. includeonly around the entire attribute
9309 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
9311 <p><span id="v2">bar</span>
9316 1. includeonly in html attr key
9318 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
9320 <p><span id="foo">bar</span>
9325 2. includeonly in html attr value
9327 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
9328 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
9330 <p><span id="v1">bar</span>
9331 <span id="v1">bar</span>
9336 3. includeonly in part of an attr value
9338 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
9340 <p><span style="color:red;">bar</span>
9345 4. includeonly in table attributes
9369 ### Token Stream Patcher tests
9371 ### These tests won't always pass wt2wt and other modes because
9372 ### on serialization, the table will be output on a new line.
9373 ### For now, we are blacklisting them, and using this to test selser.
9377 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
9379 parsoid=wt2html,wt2wt
9381 {{echo|}}{| width = '100%'
9385 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
9386 <table width="100%">
9389 <td>foo</td></tr></tbody></table>
9393 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
9395 parsoid=wt2html,wt2wt
9397 <includeonly>a</includeonly>{| {{{b}}}
9401 <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}}}":""}}'>
9402 <tbody><tr><td>c</td></tr>
9408 ### Testing parsing of templates where a template arg
9409 ### has the same name as the template itself.
9419 Templates: Template Name/Arg clash: 1. Use of positional param
9428 Templates: Template Name/Arg clash: 2. Use of named param
9437 Templates: Template Name/Arg clash: 3. Use of named param with empty input
9446 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
9450 Templates: 1. Simple use
9459 Templates: 2. Inside a block tag
9461 <div>{{echo|Foo}}</div>
9462 <blockquote>{{echo|Foo}}</blockquote>
9465 <blockquote>Foo</blockquote>
9475 Templates: P-wrapping: 1a. Templates on consecutive lines
9486 Templates: P-wrapping: 1b. Templates on consecutive lines
9500 Templates: P-wrapping: 1c. Templates on consecutive lines
9503 {{echo|bar}} <div>baz</div>
9516 Templates: P-wrapping: 1d. Template preceded by comment-only line
9525 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
9529 Templates: Inline Text: 1. Multiple template uses
9531 {{echo|Foo}}bar{{echo|baz}}
9538 Templates: Inline Text: 2. Back-to-back template uses
9540 {{echo|Foo}}{{echo|bar}}
9547 Templates: Block Tags: 1. Multiple template uses
9549 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
9551 <div>Foo</div><div>bar</div><div>baz</div>
9556 Templates: Block Tags: 2. Back-to-back template uses
9558 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
9560 <div>Foo</div><div>bar</div>
9564 # This is an edge case relating to paragraph wrapping.
9566 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
9571 <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
9576 Templates: Links: 1. Simple example
9578 {{echo|[[Foo|bar]]}}
9580 <p><a href="/wiki/Foo" title="Foo">bar</a>
9585 Templates: Links: 2. Generation of link href
9587 [[{{echo|Foo}}|bar]]
9589 <p><a href="/wiki/Foo" title="Foo">bar</a>
9594 Templates: Links: 3. Generation of part of a link href
9596 [[Fo{{echo|o}}|bar]]
9600 [[Foo{{echo|bar}}baz]]
9602 [[Foo{{echo|bar}}|bar]]
9604 [[:Foo{{echo|bar}}]]
9606 [[:Foo{{echo|bar}}|bar]]
9608 <p><a href="/wiki/Foo" title="Foo">bar</a>
9609 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9610 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
9611 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9612 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9613 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
9618 Templates: Links: 4. Multiple templates generating link href
9620 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
9622 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
9627 Templates: Links: 5. Generation of link text
9629 [[Foo|{{echo|bar}}]]
9631 <p><a href="/wiki/Foo" title="Foo">bar</a>
9636 Templates: Links: 5. Nested templates (only outermost template should be marked)
9638 {{echo|[[{{echo|Foo}}|bar]]}}
9640 <p><a href="/wiki/Foo" title="Foo">bar</a>
9645 Templates: HTML Tag: 1. Generation of HTML attr. key
9647 <div {{echo|style}}="color:red;">foo</div>
9649 <div style="color:red;">foo</div>
9654 Templates: HTML Tag: 2. Generation of HTML attr. value
9656 <div style={{echo|'color:red;'}}>foo</div>
9658 <div style="color:red;">foo</div>
9663 Templates: HTML Tag: 3. Generation of HTML attr key and value
9665 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
9667 <div style="color:red;">foo</div>
9672 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
9674 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
9676 <div title="This is a long title with just one piece templated">foo</div>
9681 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
9683 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
9685 <div title="This is a long title with just one piece templated">foo</div>
9690 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
9692 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
9694 <div title="This is a long title with just one piece templated">foo</div>
9699 Templates: HTML Tag: 7. Generation of partial attribute key string
9701 <div st{{echo|yle}}="color:red;">foo</div>
9703 <div style="color:red;">foo</div>
9708 Templates: HTML Tables: 1. Generating start of a HTML table
9710 {{echo|<table><tr><td>foo</td>}}</tr></table>
9712 <table><tr><td>foo</td></tr></table>
9717 Templates: HTML Tables: 2a. Generating middle of a HTML table
9719 <table><tr>{{echo|<td>foo</td>}}</tr></table>
9721 <table><tr><td>foo</td></tr></table>
9726 Templates: HTML Tables: 2b. Generating middle of a HTML table
9728 <table>{{echo|<tr><td>foo</td></tr>}}</table>
9730 <table><tr><td>foo</td></tr></table>
9735 Templates: HTML Tables: 3. Generating end of a HTML table
9737 <table><tr>{{echo|<td>foo</td></tr></table>}}
9739 <table><tr><td>foo</td></tr></table>
9744 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
9746 {{echo|<table>}}<tr><td>foo</td></tr></table>
9748 <table><tr><td>foo</td></tr></table>
9753 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
9755 <table>{{echo|<tr>}}<td>foo</td></tr></table>
9757 <table><tr><td>foo</td></tr></table>
9762 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
9764 <table><tr>{{echo|<td>}}foo</td></tr></table>
9766 <table><tr><td>foo</td></tr></table>
9771 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
9773 <table><tr><td>foo{{echo|</td>}}</tr></table>
9775 <table><tr><td>foo</td></tr></table>
9780 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
9782 <table><tr><td>foo</td>{{echo|</tr>}}</table>
9784 <table><tr><td>foo</td></tr></table>
9789 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
9791 <table><tr><td>foo</td></tr>{{echo|</table>}}
9793 <table><tr><td>foo</td></tr></table>
9798 Templates: HTML Tables: 5. Proper fostering of categories from inside
9800 parsoid=wt2html,wt2wt
9802 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
9803 <!--Two categories (Bug 50330)-->
9804 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
9806 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
9807 <!--Two categories (Bug 50330)-->
9808 <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>
9812 Templates: Wiki Tables: 1a. Fostering of entire template content
9820 <tr><td></td></tr></table>
9832 Templates: Wiki Tables: 1b. Fostering of entire template content
9845 <tr><td></td></tr></table>
9859 Templates: Wiki Tables: 2. Fostering of partial template content
9869 <tr><td></td></tr></table>
9882 Templates: Wiki Tables: 3. td-content via multiple templates
9885 {{echo|{{pipe}}a}}{{echo|b}}
9896 Templates: Wiki Tables: 4. Templated tags, no content
9902 <tr><td></td></tr></table>
9907 Templates: Wiki Tables: 5. Templated tags, regular td-tags
9921 Templates: Wiki Tables: 6. Templated tags, templated td-tags
9935 Templates: Lists: Multi-line list-items via templates
9937 *{{echo|a {{nonexistent|
9939 *{{echo|b {{nonexistent|
9942 <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>
9943 <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>
9948 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
9950 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
9952 <p><i>ab</i>c<i>d</i>e
9957 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
9958 (PHP parser generates misnested html)
9960 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
9962 <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>
9966 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
9967 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
9969 parsoid=wt2html,wt2wt
9971 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
9973 <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>
9974 <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>
9975 <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>
9979 Templates: Ugly nesting: 4. Divs opened/closed across templates
9981 a<div>b{{echo|c</div>d}}e
9992 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
9998 |{{echo|foo</table>}}
10002 <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|}"]}'>
10006 <td>foo</td></tr></tbody></table><span about="#mwt1">
10007 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10012 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10022 <td>1. {{echo|foo </table>}}</td>
10024 <td>2. {{echo|baz </table>}}</td>
10037 <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>"]}'>
10042 <td>1. foo </td></tr></tbody></table></td>
10044 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
10045 </span><span about="#mwt2">
10046 </span><span about="#mwt2">
10047 </span><span about="#mwt2">abc</span><span about="#mwt2">
10048 </span><span about="#mwt2">
10049 </span><span about="#mwt2">
10050 </span><span about="#mwt2">
10051 </span><span about="#mwt2">
10052 </span><span about="#mwt2">
10053 </span><span about="#mwt2">xyz</span><span about="#mwt2">
10054 </span><span about="#mwt2">
10059 Templates: Ugly templates: 3. newline-only template parameter
10068 # This looks like a bug: a single newline triggers p/br for some reason.
10070 Templates: Ugly templates: 4. newline-only template parameter inconsistency
10079 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
10080 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
10082 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
10088 <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
10089 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10093 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
10094 # that are "identical" and generate nesting cycles in the algorithm
10096 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
10098 {{echo|<table><tr><td><table>}}
10102 <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"}'>
10103 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
10104 </table></td></tr></tbody></table>
10108 Parser Functions: 1. Simple example
10117 Parser Functions: 2. Nested use (only outermost should be marked up)
10126 ### Pre-save transform tests
10129 pre-save transform: subst:
10135 This is a test template
10139 pre-save transform: normal template
10149 pre-save transform: nonexistent template
10153 {{thistemplatedoesnotexist}}
10155 {{thistemplatedoesnotexist}}
10160 pre-save transform: subst magic variables
10169 # This is bug 89, which I fixed. -- wtm
10171 pre-save transform: subst: templates with parameters
10175 {{subst:paramtest|param="something else"}}
10177 This is a test template with parameter "something else"
10181 Template:nowikitest
10183 <nowiki>'''not wiki'''</nowiki>
10187 pre-save transform: nowiki in subst (bug 1188)
10191 {{subst:nowikitest}}
10193 <nowiki>'''not wiki'''</nowiki>
10198 Template:commenttest
10200 This template has <!-- a comment --> in it.
10204 pre-save transform: comment in subst (bug 1936)
10208 {{subst:commenttest}}
10210 This template has <!-- a comment --> in it.
10214 pre-save transform: unclosed tag
10218 <nowiki>'''not wiki'''
10220 <nowiki>'''not wiki'''
10224 pre-save transform: mixed tag case
10228 <NOwiki>'''not wiki'''</noWIKI>
10230 <NOwiki>'''not wiki'''</noWIKI>
10234 pre-save transform: unclosed comment in <nowiki>
10238 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10240 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
10243 # Leading @ in this template definition works around a limitation
10244 # in parsoid's parserTests which otherwise strips the <span> from the
10245 # result (confusing it for a template wrapper)
10249 @<span onmouseover="alert('crap')">Oh no</span>
10253 (confirming safety of fix for subst bug 1936)
10255 {{Template:dangerous}}
10257 <p>@<span>Oh no</span>
10262 pre-save transform: comment containing gallery (bug 5024)
10266 <!-- <gallery>data</gallery> -->
10268 <!-- <gallery>data</gallery> -->
10272 pre-save transform: comment containing extension
10276 <!-- <tag>data</tag> -->
10278 <!-- <tag>data</tag> -->
10282 pre-save transform: comment containing nowiki
10286 <!-- <nowiki>data</nowiki> -->
10288 <!-- <nowiki>data</nowiki> -->
10292 pre-save transform: <noinclude> in subst (bug 3298)
10302 pre-save transform: <onlyinclude> in subst (bug 3298)
10306 {{subst:Includes2}}
10314 {{<includeonly>subst:</includeonly>Includes}}
10318 Template:SafeSubstTest
10320 {{<includeonly>safesubst:</includeonly>Includes}}
10324 bug 22297: safesubst: works during PST
10328 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
10334 bug 22297: safesubst: works during normal parse
10343 subst: does not work during normal parse
10347 <p>{{subst:Includes}}
10352 pre-save transform: context links ("pipe trick")
10356 [[Article (context)|]]
10359 [[Bar:Article (context)|]]
10360 [[:Bar:Article (context)|]]
10362 [[|Article (context)]]
10366 [[Article (context)|Article]]
10367 [[Bar:Article|Article]]
10368 [[:Bar:Article|Article]]
10369 [[Bar:Article (context)|Article]]
10370 [[:Bar:Article (context)|Article]]
10372 [[Article (context)]]
10373 [[Bar:X (Y) Z|X (Y) Z]]
10374 [[:Bar:X (Y) Z|X (Y) Z]]
10378 pre-save transform: context links ("pipe trick") with interwiki prefix
10382 [[interwiki:Article|]]
10383 [[:interwiki:Article|]]
10384 [[interwiki:Bar:Article|]]
10385 [[:interwiki:Bar:Article|]]
10387 [[interwiki:Article|Article]]
10388 [[:interwiki:Article|Article]]
10389 [[interwiki:Bar:Article|Bar:Article]]
10390 [[:interwiki:Bar:Article|Bar:Article]]
10394 pre-save transform: context links ("pipe trick") with parens in title
10396 pst title=[[Somearticle (context)]]
10400 [[Article (context)|Article]]
10404 pre-save transform: context links ("pipe trick") with comma in title
10406 pst title=[[Someplace, Somewhere]]
10409 [[Otherplace, Elsewhere|]]
10410 [[Otherplace, Elsewhere, Anywhere|]]
10412 [[Otherplace, Somewhere|Otherplace]]
10413 [[Otherplace, Elsewhere|Otherplace]]
10414 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
10418 pre-save transform: context links ("pipe trick") with parens and comma
10420 pst title=[[Someplace (IGNORED), Somewhere]]
10423 [[Otherplace (place), Elsewhere|]]
10425 [[Otherplace, Somewhere|Otherplace]]
10426 [[Otherplace (place), Elsewhere|Otherplace]]
10430 pre-save transform: context links ("pipe trick") with comma and parens
10432 pst title=[[Who, me? (context)]]
10435 [[Me, Myself, and I (1937 song)|]]
10437 [[Yes, you. (context)|Yes, you.]]
10438 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
10442 pre-save transform: context links ("pipe trick") with namespace
10444 pst title=[[Ns:Somearticle]]
10448 [[Ns:Article|Article]]
10452 pre-save transform: context links ("pipe trick") with namespace and parens
10454 pst title=[[Ns:Somearticle (context)]]
10458 [[Ns:Article (context)|Article]]
10462 pre-save transform: context links ("pipe trick") with namespace and comma
10464 pst title=[[Ns:Somearticle, Context, Whatever]]
10468 [[Ns:Article, Context, Whatever|Article]]
10472 pre-save transform: context links ("pipe trick") with namespace, comma and parens
10474 pst title=[[Ns:Somearticle, Context (context)]]
10478 [[Ns:Article (context)|Article]]
10482 pre-save transform: context links ("pipe trick") with namespace, parens and comma
10484 pst title=[[Ns:Somearticle (IGNORED), Context]]
10488 [[Ns:Article, Context|Article]]
10492 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
10496 [[Article(context)|]]
10497 [[Bar:Article(context)|]]
10498 [[:Bar:Article(context)|]]
10499 [[|Article(context)]]
10503 [[Article(context)|Article]]
10504 [[Bar:Article(context)|Article]]
10505 [[:Bar:Article(context)|Article]]
10506 [[Article(context)]]
10507 [[Bar:X(Y)Z|X(Y)Z]]
10508 [[:Bar:X(Y)Z|X(Y)Z]]
10512 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
10516 [[Article (context)|]]
10517 [[Bar:Article (context)|]]
10518 [[:Bar:Article (context)|]]
10519 [[|Article (context)]]
10523 [[Article (context)|Article]]
10524 [[Bar:Article (context)|Article]]
10525 [[:Bar:Article (context)|Article]]
10526 [[Article (context)]]
10527 [[Bar:X (Y) Z|X (Y) Z]]
10528 [[:Bar:X (Y) Z|X (Y) Z]]
10532 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
10536 [[Article(context)|]]
10537 [[Bar:Article(context)|]]
10538 [[:Bar:Article(context)|]]
10539 [[|Article(context)]]
10543 [[Article(context)|Article]]
10544 [[Bar:Article(context)|Article]]
10545 [[:Bar:Article(context)|Article]]
10546 [[Article(context)]]
10547 [[Bar:X(Y)Z|X(Y)Z]]
10548 [[:Bar:X(Y)Z|X(Y)Z]]
10552 pre-save transform: context links ("pipe trick") with commas (bug 21660)
10556 [[Article (context), context|]]
10557 [[Article (context),context|]]
10558 [[Bar:Article (context), context|]]
10559 [[Bar:Article (context),context|]]
10560 [[:Bar:Article (context), context|]]
10561 [[:Bar:Article (context),context|]]
10563 [[Article (context), context|Article]]
10564 [[Article (context),context|Article]]
10565 [[Bar:Article (context), context|Article]]
10566 [[Bar:Article (context),context|Article]]
10567 [[:Bar:Article (context), context|Article]]
10568 [[:Bar:Article (context),context|Article]]
10572 pre-save transform: trim trailing empty lines
10576 Empty lines are trimmed
10582 Empty lines are trimmed
10586 pre-save transform: Signature expansion
10591 * <noinclude>~~~</noinclude>
10592 * <includeonly>~~~</includeonly>
10593 * <onlyinclude>~~~</onlyinclude>
10595 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
10596 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
10597 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
10598 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
10603 pre-save transform: Signature expansion in nowiki tags (bug 93)
10609 <nowiki>~~~~</nowiki>
10611 <includeonly><nowiki>~~~~</nowiki></includeonly>
10613 <noinclude><nowiki>~~~~</nowiki></noinclude>
10615 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10617 {{subst:Foo}} shall be converted to FOO
10619 As well as inside noinclude/onlyinclude
10620 <noinclude>{{subst:Foo}}</noinclude>
10621 <onlyinclude>{{subst:Foo}}</onlyinclude>
10623 But not inside includeonly
10624 <includeonly>{{subst:Foo}}</includeonly>
10628 <nowiki>~~~~</nowiki>
10630 <includeonly><nowiki>~~~~</nowiki></includeonly>
10632 <noinclude><nowiki>~~~~</nowiki></noinclude>
10634 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
10636 FOO shall be converted to FOO
10638 As well as inside noinclude/onlyinclude
10639 <noinclude>FOO</noinclude>
10640 <onlyinclude>FOO</onlyinclude>
10642 But not inside includeonly
10643 <includeonly>{{subst:Foo}}</includeonly>
10647 Parsoid: Recognize nowiki with trailing space in tags
10651 <nowiki ><div>[[foo]]</nowiki >
10659 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10666 Parsoid: Recognize nowiki with odd capitalization
10670 <noWikI ><div>[[foo]]</Nowiki >
10672 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
10677 Parsoid: Escape nowiki with trailing space in tags
10681 <nowiki > foo </nowiki >
10687 <p><nowiki > foo </nowiki ></p>
10688 <p>a<nowiki />b</p>
10689 <p>c<nowiki/ >d</p>
10693 Parsoid: Escape weird noWikI capitalizations
10697 <noWikI > foo </NoWikI >
10699 <p><noWikI > foo </NoWikI ></p>
10703 ### Message transform tests
10706 message transform: magic variables
10716 message transform: should not transform wiki markup
10726 message transform: <noinclude> in transcluded template (bug 4926)
10736 message transform: <onlyinclude> in transcluded template (bug 4926)
10746 {{#special:}} page name, known
10750 {{#special:Recentchanges}}
10752 Special:RecentChanges
10756 {{#special:}} page name with subpage, known
10760 {{#special:Recentchanges/param}}
10762 Special:RecentChanges/param
10766 {{#special:}} page name, unknown
10770 {{#special:foobar nonexistent}}
10772 Special:Foobar nonexistent
10776 {{#speciale:}} page name, known
10780 {{#speciale:Recentchanges}}
10782 Special:RecentChanges
10786 {{#speciale:}} page name with subpage, known
10790 {{#speciale:Recentchanges/param}}
10792 Special:RecentChanges/param
10796 {{#speciale:}} page name, unknown
10800 {{#speciale:foobar nonexistent}}
10802 Special:Foobar_nonexistent
10808 ### For Parsoid-specific tests, see
10809 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
10814 parsoid=wt2html,wt2wt,html2html
10816 [[Image:foobar.jpg]]
10818 <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>
10821 <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>
10826 Simple image (using File: namespace, now canonical)
10828 [[File:Foobar.jpg]]
10830 <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>
10833 <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>
10838 Right-aligned image
10840 [[File:Foobar.jpg|right]]
10842 <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>
10845 <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>
10851 [[File:Foobar.jpg|right|Caption text]]
10853 <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>
10856 <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>
10860 Image with caption, bug 53312 #1
10862 [[File:Foobar.jpg|right|Caption page stuff]]
10864 <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>
10867 <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>
10871 Image with caption, bug 53312 #2
10873 [[File:Foobar.jpg|right|Caption page=]]
10875 <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>
10878 <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>
10882 Image with caption, bug 53312 #3
10884 [[File:Foobar.jpg|right|Caption page=stuff]]
10886 <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>
10889 <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>
10893 Allow empty links in image captions (Bug 60753)
10897 [[File:Foobar.jpg|thumb|Caption [[Link1]]
10902 <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>
10905 <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>
10907 <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>
10908 </figcaption></figure>
10912 Link with empty target
10921 Image with empty attribute
10923 parsoid=wt2html,wt2wt,html2html
10925 [[File:Foobar.jpg|right||Caption text]]
10927 <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>
10930 <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>
10934 1. Block image with individual attributes from templates
10936 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
10938 <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>
10941 <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>
10945 2. Block Image with individual attributes from templates
10947 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
10949 <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>
10952 <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>
10956 3. Inline image with individual attributes from templates
10958 [[File:Foobar.jpg|{{echo|50px}}]]
10960 <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>
10963 <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>
10966 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
10967 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
10969 Image with multiple attributes from the same template
10971 [[File:Foobar.jpg|{{image_attribs}}]]
10973 <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>
10976 <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>
10979 # Parsoid's output here is broken (incorrect p-wrapping); see bug 64901.
10981 Image with link tails
10985 123[[File:Foobar.jpg]]456
10986 123[[File:Foobar.jpg|right]]456
10987 123[[File:Foobar.jpg|thumb]]456
10989 <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
10991 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
10992 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
10995 <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>
10997 <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>
10999 <div class="thumb tright">
11000 <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>
11001 <div class="thumbcaption">
11002 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11008 <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>
11009 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
11010 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
11014 Image with multiple captions -- only last one is accepted
11016 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
11018 <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>
11021 <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>
11025 Image with multiple widths -- use last
11027 [[File:Foobar.jpg|200px|300px|caption]]
11029 <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>
11032 <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>
11036 Image with multiple alignments -- use first (bug 48664)
11040 [[File:Foobar.jpg|thumb|left|right|center|caption]]
11042 [[File:Foobar.jpg|middle|text-top|caption]]
11044 <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>
11045 <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>
11048 <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>
11049 <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>
11053 Image with width attribute at different positions
11055 [[File:Foobar.jpg|200px|right|Caption]]
11056 [[File:Foobar.jpg|right|200px|Caption]]
11057 [[File:Foobar.jpg|right|Caption|200px]]
11059 <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>
11060 <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>
11061 <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>
11064 <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>
11065 <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>
11066 <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>
11069 # a sad bit of backward-compatibility
11071 Image with size specified with pxpx (bug 13500, 51628)
11073 parsoid=wt2html,wt2wt,html2html
11075 [[File:Foobar.jpg|20pxpx]]
11076 [[File:Foobar.jpg|200x20pxpx]]
11078 <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>
11079 <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>
11082 <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>
11086 Image with link parameter, wiki target
11088 [[File:Foobar.jpg|link=Main Page]]
11090 <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>
11093 <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>
11096 # parsoid bug 49293 (part 1)
11098 Image with link parameter, URL target
11100 [[File:Foobar.jpg|link=http://example.com/]]
11102 <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>
11105 <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>
11108 # parsoid bug 49293 (part 2)
11110 Image with link parameter, protocol-less URL target
11112 [[File:Foobar.jpg|link=//example.com/]]
11114 <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>
11117 <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>
11121 Image with link parameter, wgExternalLinkTarget
11123 [[Image:foobar.jpg|link=http://example.com/]]
11125 wgExternalLinkTarget='foobar'
11127 <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>
11132 Image with link parameter, wgNoFollowLinks set to false
11134 [[Image:foobar.jpg|link=http://example.com/]]
11136 wgNoFollowLinks=false
11138 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11143 Image with link parameter, wgNoFollowDomainExceptions
11145 [[Image:foobar.jpg|link=http://example.com/]]
11147 wgNoFollowDomainExceptions='example.com'
11149 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11154 Image with link parameter, wgExternalLinkTarget, unnamed parameter
11156 [[Image:foobar.jpg|link=http://example.com/|Title]]
11158 wgExternalLinkTarget='foobar'
11160 <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>
11165 Image with empty link parameter
11167 [[File:Foobar.jpg|link=]]
11169 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
11172 <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>
11176 Image with link parameter (wiki target) and unnamed parameter
11178 [[File:Foobar.jpg|link=Main_Page|Title]]
11180 <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>
11183 <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>
11187 Image with link parameter (URL target) and unnamed parameter
11189 [[File:Foobar.jpg|link=http://example.com/|Title]]
11191 <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>
11194 <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>
11198 Thumbnail image with link parameter
11201 parsoid=wt2html,wt2wt,html2html
11203 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
11205 <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>
11208 <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>
11212 Manually-specified thumbnail image
11216 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
11218 <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>
11221 <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>
11225 Manually-specified thumbnail image with explicit link to wiki page
11228 parsoid=wt2html,wt2wt,html2html
11230 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
11232 <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>
11235 <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>
11239 Manually-specified thumbnail image with explicit link to url
11242 parsoid=wt2html,wt2wt,html2html
11244 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
11246 <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>
11249 <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>
11253 Manually-specified thumbnail image with explicit no link
11256 parsoid=wt2html,wt2wt,html2html
11258 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
11260 <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>
11263 <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>
11267 Manually-specified thumbnail image with explicit link and alt text
11270 parsoid=wt2html,wt2wt,html2html
11272 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
11274 <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>
11277 <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>
11281 Image with frame and link
11283 parsoid=wt2html,wt2wt,html2html
11285 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
11287 <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>
11290 <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>
11294 Image with frame and link and explicit alt
11296 parsoid=wt2html,wt2wt,html2html
11298 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
11300 <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>
11303 <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>
11307 Image with wiki markup in implicit alt
11309 parsoid=wt2html,wt2wt,html2html
11311 [[Image:Foobar.jpg|testing '''bold''' in alt]]
11313 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
11315 <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>
11316 </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>
11319 <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>
11320 <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>
11323 ###################
11324 # Conflicting image format options.
11325 # First option specified should 'win'.
11326 # All three cases in each test should be identical.
11329 Image with 'frameless' first.
11331 parsoid=wt2html,wt2wt,html2html
11333 [[File:Foobar.jpg|frameless|caption]]
11335 [[File:Foobar.jpg|frameless|frame|caption]]
11337 [[File:Foobar.jpg|frameless|thumb|caption]]
11339 <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>
11340 </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>
11341 </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>
11344 <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>
11345 <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>
11346 <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>
11350 Image with 'frame' first.
11352 parsoid=wt2html,wt2wt,html2html
11354 [[File:Foobar.jpg|frame|caption]]
11355 [[File:Foobar.jpg|frame|frameless|caption]]
11356 [[File:Foobar.jpg|frame|thumb|caption]]
11358 <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>
11359 <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>
11360 <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>
11363 <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>
11367 Image with 'thumb' first.
11369 parsoid=wt2html,wt2wt,html2html
11371 [[File:Foobar.jpg|thumb|caption]]
11372 [[File:Foobar.jpg|thumb|frameless|caption]]
11373 [[File:Foobar.jpg|thumb|frame|caption]]
11375 <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>
11376 <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>
11377 <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>
11380 <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>
11383 ###################
11385 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
11386 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
11387 # Foobar has actual size of 1941x220
11388 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
11389 # a scalable format.
11390 # 2. Framed images always ignore size options; always render at default size.
11391 # 3. "Unspecified format" and border are the only types which can be
11395 Image: "unspecified format" and border enlarge
11397 parsoid=wt2html,wt2wt,html2html
11399 [[File:Foobar.jpg|2000px]]
11401 [[File:Foobar.jpg|border|2000px]]
11403 <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>
11404 </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>
11407 <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>
11408 <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>
11412 Image: "unspecified format" and border reduce
11414 parsoid=wt2html,wt2wt,html2html
11416 [[File:Foobar.jpg|1000px]]
11418 [[File:Foobar.jpg|border|1000px]]
11420 <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>
11421 </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>
11424 <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>
11425 <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>
11429 Image: thumbs reduce
11431 parsoid=wt2html,wt2wt,html2html
11433 [[File:Foobar.jpg|thumb|50px]]
11435 <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>
11438 <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>
11442 Image: bitmap thumbs can't be enlarged past original size, but vector can.
11444 parsoid=wt2html,wt2wt,html2html
11446 [[File:Foobar.jpg|thumb|2000px]]
11448 [[File:Foobar.svg|thumb|2000px]]
11450 <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>
11451 <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>
11454 <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>
11455 <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>
11459 Image: frameless can reduce in size
11461 parsoid=wt2html,wt2wt,html2html
11463 [[File:Foobar.jpg|frameless|50px]]
11465 <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>
11468 <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>
11472 Image: bitmap frameless can't be enlarged past original size, but vector can
11474 parsoid=wt2html,wt2wt,html2html
11476 [[File:Foobar.jpg|frameless|2000px]]
11478 [[File:Foobar.svg|frameless|2000px]]
11480 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
11481 </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>
11484 <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>
11485 <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>
11489 Image: framed images are always unscaled.
11491 parsoid=wt2html,wt2wt,html2html
11493 [[File:Foobar.jpg|frame]]
11495 [[File:Foobar.jpg|frame|50px]]
11497 [[File:Foobar.jpg|frame|50x50px]]
11499 [[File:Foobar.jpg|frame|2000px]]
11501 <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>
11502 <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>
11503 <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>
11504 <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>
11507 <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>
11510 ###################
11513 Link to image page- image page normally doesn't exists, hence edit link
11514 Add test with existing image page
11515 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
11519 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
11524 bug 18784 Link to non-existent image page with caption should use caption as link text
11526 [[:Image:test|caption]]
11528 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
11533 Frameless image caption with a free URL
11535 [[File:Foobar.jpg|http://example.com]]
11537 <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>
11540 <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>
11544 Thumbnail image caption with a free URL
11548 [[File:Foobar.jpg|thumb|http://example.com]]
11550 <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>
11553 <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>
11557 Thumbnail image caption with a free URL and explicit alt
11560 parsoid=wt2html,wt2wt,html2html
11562 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
11564 <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>
11567 <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>
11571 SVG thumbnails with no language set
11574 [[File:Foobar.svg|thumb|caption]]
11576 <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>
11579 <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>
11583 SVG thumbnails with language de
11585 parsoid=wt2html,wt2wt,html2html
11587 [[File:Foobar.svg|thumb|caption|lang=de]]
11589 <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>
11592 <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>
11596 SVG thumbnails with invalid language code
11598 parsoid=wt2html,wt2wt,html2html
11600 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
11602 <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>
11605 <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>
11609 BUG 1887: A ISBN with a thumbnail
11611 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
11613 <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>
11616 <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>
11620 BUG 1887: A RFC with a thumbnail
11622 [[File:Foobar.jpg|thumb|This is RFC 12354]]
11624 <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>
11627 <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>
11631 BUG 1887: A mailto link with a thumbnail
11633 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
11635 <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>
11638 <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>
11641 # Pending resolution to bug 368
11643 BUG 648: Frameless image caption with a link
11645 [[File:Foobar.jpg|text with a [[link]] in it]]
11647 <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>
11650 <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>
11654 BUG 648: Frameless image caption with a link (suffix)
11656 [[File:Foobar.jpg|text with a [[link]]foo in it]]
11658 <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>
11661 <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>
11665 BUG 648: Frameless image caption with an interwiki link
11667 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
11669 <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>
11672 <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>
11676 BUG 648: Frameless image caption with a piped interwiki link
11678 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
11680 <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>
11683 <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>
11687 Escape HTML special chars in image alt text
11689 [[File:Foobar.jpg|& < > "]]
11691 <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>
11694 <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>
11698 BUG 499: Alt text should have Ӓ, not &1234;
11700 [[File:Foobar.jpg|♀]]
11702 <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>
11705 <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>
11709 Broken image caption with link
11711 parsoid=wt2html,wt2wt,html2html
11713 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
11715 <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.
11718 <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>
11722 Image caption containing another image
11724 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
11726 <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>
11729 <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>
11733 Image: caption containing a newline
11735 [[File:Foobar.jpg|This
11738 <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>
11741 <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>
11745 Image: caption containing leading space
11746 (The leading space should not trigger nowiki escaping in wt2wt mode)
11748 [[File:Foobar.jpg|thumb| bar]]
11750 <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>
11753 <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>
11757 Image: caption containing a table
11759 parsoid=wt2html,wt2wt,html2html
11761 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
11767 and some more text.]]
11769 <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>
11772 <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
11775 <tr><th>Foo </th><th>Bar</th></tr>
11778 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
11782 Bug 3090: External links other than http: in image captions
11784 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
11786 <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>
11789 <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>
11795 parsoid=wt2html,wt2wt,html2html
11797 [[Image:foobar.jpg|a|class=b]]
11799 <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>
11802 <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>
11806 Localized image handling (1).
11808 parsoid=wt2html,wt2wt,html2html
11811 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
11813 <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>
11816 <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>
11820 Localized image handling (2).
11823 parsoid=wt2html,wt2wt,html2html
11826 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
11828 <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>
11831 <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>
11835 "border", "frameless" and "class" attributes on an image.
11838 parsoid=wt2html,wt2wt,html2html
11840 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
11842 <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>
11845 <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>
11848 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
11850 Invalid image attributes (bug 62500)
11853 parsoid=wt2html,wt2wt,html2html
11855 [[File:Foobar.jpg|thumb|float|left|caption]]
11857 [[File:Foobar.jpg|thumb|righ|caption]]
11859 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
11861 <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>
11862 <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>
11863 <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>
11866 <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>
11872 #REDIRECT [[File:Barfoo.jpg]]
11878 [[Image:Barfoo.jpg]]
11880 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
11885 Missing image with uploads disabled
11889 [[Image:Foobaz.jpg]]
11891 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
11895 # Parsoid-specific testing for images
11896 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11897 # Currently imperfect due to a flaw in the Parsoid testrunner
11899 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
11903 Parsoid-specific image handling - simple image with size and middle alignment
11905 [[File:Foobar.jpg|middle|50px]]
11907 <p><span class="mw-valign-middle" typeof="mw:Image">
11908 <a href="File:Foobar.jpg">
11909 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11916 Parsoid-specific image handling - simple image with size, middle alignment,
11917 non-standard namespace alias
11919 parsoid=wt2wt,wt2html,html2html
11921 [[Image:Foobar.jpg|middle|50px]]
11923 <p><span class="mw-valign-middle" typeof="mw:Image">
11924 <a href="File:Foobar.jpg">
11925 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11932 Parsoid-specific image handling - simple image with size and middle alignment
11935 [[File:Foobar.jpg|50px|middle]]
11937 <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>
11941 Parsoid-specific image handling - simple image with size and middle alignment
11942 and non-standard namespace name
11944 parsoid=wt2html,wt2wt,html2html
11946 [[Image:Foobar.jpg|50px|middle]]
11948 <p><span class="mw-valign-middle" typeof="mw:Image">
11949 <a href="File:Foobar.jpg">
11950 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50">
11957 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
11959 [[File:Foobar.jpg|500x10px|baseline|caption]]
11961 <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>
11965 Parsoid-specific image handling - simple image with border and size spec
11967 [[File:Foobar.jpg|50px|border|caption]]
11969 <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>
11973 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11975 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
11977 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb">
11978 <a href="File:Foobar.jpg">
11979 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" height="25" width="220" />
11981 <figcaption>caption content</figcaption>
11986 Parsoid-specific image handling - thumbnail with halign, valign, and caption
11989 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
11991 <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>
11995 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
11997 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
11999 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb">
12000 <a href="File:Foobar.jpg">
12001 <img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" height="6" width="50" />
12003 <figcaption>caption</figcaption>
12008 Parsoid-specific image handling - thumbnail with specific size, halign,
12009 valign, and caption (existing content)
12011 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12013 <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>
12017 Parsoid-specific image handling - framed image with specific size and caption
12020 parsoid=wt2html,wt2wt,html2html
12022 [[File:Foobar.jpg|frame|500x50px|caption]]
12024 <figure typeof="mw:Image/Frame">
12025 <a href="File:Foobar.jpg">
12026 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
12028 <figcaption>caption</figcaption>
12033 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
12036 parsoid=wt2html,wt2wt,html2html
12038 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
12040 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame">
12041 <a href="File:Foobar.jpg">
12042 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941" />
12044 <figcaption>caption</figcaption>
12049 Parsoid-specific image handling - frameless image with specific size, border, and caption
12051 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
12053 <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>
12057 Parsoid-specific image handling - simple image with a formatted caption
12059 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
12061 <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>"}'>
12062 <a href="File:Foobar.jpg">
12063 <img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" height="220" width="1941">
12068 Parsoid-specific image handling - caption with a template in it
12070 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
12072 <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>
12076 Parsoid-specific image handling - caption with unbalanced tags in it
12078 parsoid=wt2html,wt2wt,html2html
12081 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
12085 <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>
12090 Parsoid-specific image handling - empty caption (1)
12092 parsoid=wt2html,wt2wt
12094 [[File:Foobar.jpg|thumb|]]
12096 <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>
12099 # empty captions don't get serialized unless we're in the "round trip" case
12101 Parsoid-specific image handling - empty caption (2)
12105 <figure class="mw-default-size" typeof="mw:Image/Thumb">
12106 <a href="File:Foobar.jpg">
12107 <img resource="./File:Foobar.jpg"
12108 src="//example.com/images/3/3a/Foobar.jpg"
12109 height="25" width="220"/>
12111 <figcaption></figcaption>
12114 [[File:Foobar.jpg|thumb]]
12118 Parsoid-specific image handling - whitespace caption
12120 [[File:Foobar.jpg|thumb| ]]
12122 <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>
12126 Parsoid-specific image handling - lang option
12129 [[File:Foobar.svg|lang=de|caption]]
12133 <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>
12142 Subpage test/subpage
12150 subpage title=[[Subpage test]]
12154 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
12159 Subpage noslash link
12161 subpage title=[[Subpage test]]
12165 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
12169 # TODO: make this PHP-parser compatible!
12171 Relative subpage noslash link
12173 parsoid=wt2wt,wt2html,html2html
12174 subpage title=[[Subpage test/1/2/3/4]]
12180 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage/" title="Subpage test/1/2/subpage/">subpage</a></p>
12181 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
12185 Parsoid: dot-slash prefixed wikilinks
12195 </p><p>[[././baz/]]
12200 </p><p>[[././baz/]]
12205 Render invalid page names as plain text (bug 51090)
12218 [[{{echo|./../foo}}|bar]]
12219 [[{{echo|foo/.}}|bar]]
12220 [[{{echo|foo/..}}|bar]]
12221 [[{{echo|foo~~~~bar}}]]
12222 [[{{echo|foo>bar}}]]
12223 [[{{echo|foo././bar}}]]
12224 [[{{echo|foo{bar}}]]
12225 [[{{echo|foo}bar}}]]
12226 [[{{echo|foo[bar}}]]
12227 [[{{echo|foo]bar}}]]
12228 [[{{echo|foo<bar}}]]
12230 <p>[[./../foo|bar]]
12240 </p><p>[[./../foo|bar]]
12253 <p>[[./../foo|bar]][[foo�|bar]][[foo/.|bar]][[foo/..|bar]][[foo~~~bar]][[foo>bar]][[foo[bar]][[.]][[..]][[foo././bar]]</p>
12254 <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>
12262 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
12267 BUG 561: {{/Subpage}}
12269 subpage title=[[Page]]
12273 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
12281 Category:MediaWiki User's Guide
12289 [[:Category:MediaWiki User's Guide]]
12291 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
12300 [[Category:MediaWiki User's Guide]]
12302 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12306 PAGESINCATEGORY invalid title fatal (r33546 fix)
12308 {{PAGESINCATEGORY:<bogus>}}
12315 Category with different sort key
12319 [[Category:MediaWiki User's Guide|Foo]]
12321 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12325 Category with identical sort key
12329 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12331 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
12335 Category with empty sort key
12340 [[Category:MediaWiki User's Guide|]]
12342 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
12346 Category with empty sort key and parentheses
12351 [[Category:Foo (bar)|]]
12353 [[Category:Foo (bar)|Foo]]
12357 Category with link tail
12362 123[[Category:Foo]]456
12364 123[[Category:Foo]]456
12368 Category with template
12373 [[Category:{{echo|Foo}}]]
12375 [[Category:{{echo|Foo}}]]
12379 Category with template in sort key
12384 [[Category:Foo|{{echo|Bar}}]]
12386 [[Category:Foo|{{echo|Bar}}]]
12390 Category with template in sort key and title
12395 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12397 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
12401 Category / paragraph interactions
12403 Foo [[Category:Baz]] Bar
12405 Foo [[Category:Baz]]
12413 [[Category:Baz]] Bar
12426 {{echo|[[Category:Baz]]}}
12441 Parsoid: Serialize link to category page with colon escape
12447 [[:Category:Foo|Bar]]
12450 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
12451 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
12456 Parsoid: Link prefix/suffixes aren't applied to category links
12458 parsoid=wt2html,wt2wt,html2html
12463 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
12467 Parsoid: Serialize link to file page with colon escape
12473 [[:File:Foo.png|Bar]]
12476 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">File:Foo.png</a>
12477 <a rel="mw:WikiLink" href="File:Foo.png" title="File:Foo.png">Bar</a>
12482 Parsoid: Serialize a genuine category link without colon escape
12487 [[Category:Foo|Bar]]
12489 <link rel="mw:PageProp/Category" href="Category:Foo">
12490 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
12494 Parsoid: Defaultsort
12498 {{DEFAULTSORT:Foo}}
12500 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
12504 ### Inter-language links
12507 Interlanguage links
12515 es:Alimento fr:Nourriture zh:食品
12517 <p><link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/Alimento"/>
12518 <link rel="mw:PageProp/Language" href="//fr.wikipedia.org/wiki/Nourriture"/>
12519 <link rel="mw:PageProp/Language" href="//zh.wikipedia.org/wiki/食品"/></p>
12523 Duplicate interlanguage links (bug 24502)
12534 <p><link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/1"/>
12535 <link rel="mw:PageProp/Language" href="//es.wikipedia.org/wiki/2"/>
12536 <link rel="mw:PageProp/Language" href="//fr.wikipedia.org/wiki/1"/>
12537 <link rel="mw:PageProp/Language" href="//fr.wikipedia.org/wiki/2"/></p>
12544 Basic section headings
12551 ===Smaller headline===
12554 <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>
12557 <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>
12560 <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>
12566 Section headings with TOC
12569 === Subheadline 1 ===
12570 ===== Skipping a level =====
12571 ====== Skipping a level ======
12575 ===Another headline===
12577 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12579 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
12581 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
12583 <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>
12585 <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>
12592 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
12594 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
12600 <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>
12601 <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>
12602 <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>
12603 <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>
12604 <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>
12607 <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>
12611 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
12613 Handling of sections up to level 6 and beyond
12616 == Level 2 Heading==
12617 === Level 3 Heading===
12618 ==== Level 4 Heading====
12619 ===== Level 5 Heading=====
12620 ====== Level 6 Heading======
12621 ======= Level 7 Heading=======
12622 ======== Level 8 Heading========
12623 ========= Level 9 Heading=========
12624 ========== Level 10 Heading==========
12626 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12628 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
12630 <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>
12632 <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>
12634 <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>
12636 <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>
12638 <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>
12639 <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>
12640 <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>
12641 <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>
12642 <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>
12656 <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>
12657 <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>
12658 <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>
12659 <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>
12660 <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>
12661 <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>
12662 <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>
12663 <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>
12664 <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>
12665 <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>
12670 TOC regression (bug 9764)
12674 ==== title 1.1.1 ====
12679 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12681 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12683 <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>
12685 <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>
12688 <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>
12691 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12693 <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>
12699 <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>
12700 <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>
12701 <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>
12702 <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>
12703 <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>
12704 <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>
12709 TOC with wgMaxTocLevel=3 (bug 6204)
12715 ==== title 1.1.1 ====
12720 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12722 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12724 <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>
12725 <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>
12728 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
12730 <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>
12736 <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>
12737 <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>
12738 <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>
12739 <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>
12740 <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>
12741 <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>
12746 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
12752 ====Section 1.1.1====
12753 ====Section 1.1.1.1====
12756 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12758 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
12760 <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>
12763 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
12767 <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>
12768 <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>
12769 <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>
12770 <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>
12771 <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>
12777 Resolving duplicate section names
12782 <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>
12783 <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>
12788 Resolving duplicate section names with differing case (bug 10721)
12793 <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>
12794 <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>
12806 Template with sections, __NOTOC__
12813 <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>
12814 <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>
12815 <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>
12816 <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>
12821 __NOEDITSECTION__ keyword
12827 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
12828 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
12833 Link inside a section heading
12835 ==Section with a [[Main Page|link]] in it==
12837 <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>
12842 TOC regression (bug 12077)
12849 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12851 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
12853 <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>
12856 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
12860 <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>
12861 <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>
12862 <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>
12867 BUG 1219 URL next to image (good)
12869 http://example.com [[Image:foobar.jpg]]
12871 <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>
12876 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
12879 The line above must have a trailing space!
12882 But just in case it doesn't...
12884 <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>
12885 <p>The line above must have a trailing space!
12887 <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>
12888 <p>But just in case it doesn't...
12893 Header with special characters (bug 25462)
12895 The tooltips shall not show entities to the user (ie. be double escaped)
12912 <p>The tooltips shall not show entities to the user (ie. be double escaped)
12914 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12916 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
12917 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
12918 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
12919 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
12920 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
12924 <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>
12927 <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>
12930 <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>
12933 <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>
12936 <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>
12942 Header with space, plus and underscore as entity
12944 Id should not contain + for spaces
12946 == Space between Text ==
12949 == Space-Entity between Text ==
12952 == Plus+between+Text ==
12955 == Plus-Entity+between+Text ==
12958 == Underscore_between_Text ==
12961 == Underscore-Entity_between_Text ==
12964 [[#Space between Text]]
12965 [[#Space-Entity between Text]]
12966 [[#Plus+between+Text]]
12967 [[#Plus-Entity+between+Text]]
12968 [[#Underscore_between_Text]]
12969 [[#Underscore-Entity_between_Text]]
12971 <p>Id should not contain + for spaces
12973 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
12975 <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>
12976 <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>
12977 <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>
12978 <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>
12979 <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>
12980 <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>
12984 <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>
12987 <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>
12990 <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>
12993 <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>
12996 <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>
12999 <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>
13001 </p><p><a href="#Space_between_Text">#Space between Text</a>
13002 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
13003 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
13004 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
13005 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
13006 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
13011 Headers with excess '=' characters
13012 (Are similar tests necessary beyond the 1st level?)
13016 =''italic'' heading==
13017 ==''italic'' heading=
13019 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13021 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
13022 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
13023 <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>
13024 <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>
13028 <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>
13029 <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>
13030 <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>
13031 <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>
13036 HTML headers vs TOC (bug 23393)
13037 (__NOEDITSECTION__ for clearer output, doesn't matter here)
13049 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13051 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
13053 <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>
13054 <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>
13057 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
13059 <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>
13060 <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>
13066 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
13067 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
13068 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
13069 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
13070 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
13071 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
13076 Single-line or multiline-comments can follow headings
13078 parsoid=wt2html,wt2wt
13086 <h2><span class="mw-headline" id="foo">foo</span></h2>
13087 <h2><span class="mw-headline" id="bar">bar</span></h2>
13088 <h2><span class="mw-headline" id="baz">baz</span></h2>
13093 BUG 1219 URL next to image (broken)
13095 http://example.com[[Image:foobar.jpg]]
13097 <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>
13102 Bug 1186 news: in the middle of text
13104 http://en.wikinews.org/wiki/Wikinews:Workplace
13106 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
13112 Namespaced link must have a title
13121 Namespaced link must have a title (bad fragment version)
13123 [[Project:#fragment]]
13125 <p>[[Project:#fragment]]
13131 ### HTML tags and HTML attributes
13135 div with no attributes
13137 <div>HTML rocks</div>
13139 <div>HTML rocks</div>
13144 div with double-quoted attribute
13146 <div id="rock">HTML rocks</div>
13148 <div id="rock">HTML rocks</div>
13153 div with single-quoted attribute
13155 <div id='rock'>HTML rocks</div>
13157 <div id="rock">HTML rocks</div>
13162 div with unquoted attribute
13164 <div id=rock>HTML rocks</div>
13166 <div id="rock">HTML rocks</div>
13171 div with illegal double attributes
13173 <div id="a" id="b">HTML rocks</div>
13175 <div id="b">HTML rocks</div>
13179 # FIXME: produce empty string instead of "class" in the PHP parser, following
13182 div with empty attribute value, space before equals
13186 <div class =>HTML rocks</div>
13188 <div class="">HTML rocks</div>
13193 div with multiple empty attribute values
13197 <div id= title=>HTML rocks</div>
13199 <div id="" title="">HTML rocks</div>
13204 table with multiple empty attribute values
13212 <table title="" id="">
13213 <tbody><tr><td> hi</td></tr>
13217 # The PHP parser escapes the opening brace to { for some reason, so
13218 # disabled this test for it.
13220 div with braces in attribute value
13224 <div title="{}">Foo</div>
13226 <div title="{}">Foo</div>
13229 # This it very inconsistent in the PHP parser: it returns
13230 # class="class" if there is a space between the name and the equal sign (see
13231 # 'div with empty attribute value, space before equals'), but strips the
13232 # attribute completely if the space is missing. We hope that not much content
13233 # depends on this, so are implementing the behavior below in Parsoid for
13234 # consistencies' sake. Disabled for the PHP parser.
13235 # FIXME: fix this behavior in the PHP parser?
13237 div with empty attribute value, no space before equals
13241 <div class=>HTML rocks</div>
13243 <div class="">HTML rocks</div>
13248 HTML multiple attributes correction
13250 <p class="error" class="awesome">Awesome!</p>
13252 <p class="awesome">Awesome!</p>
13257 Table multiple attributes correction
13260 !+ class="error" class="awesome"| status
13265 <th class="awesome"> status
13273 <DIV ID="x">HTML ROCKS</DIV>
13275 <div id="x">HTML ROCKS</div>
13280 Non-ASCII pseudo-tags are rendered as text
13289 Pseudo-tag with URL 'name' renders as url link
13291 <http://example.com/>
13293 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
13298 text with amp in the middle of nowhere
13302 <p>Remember AT&T?
13307 text with character entity: eacute
13309 I always thought é was a cute letter.
13311 <p>I always thought é was a cute letter.
13314 <p>I always thought é was a cute letter.</p>
13318 text with entity-escaped character entity-like string: eacute
13320 I always thought &eacute; was a cute letter.
13322 <p>I always thought &eacute; was a cute letter.
13327 text with undefined character entity: xacute
13329 I always thought &xacute; was a cute letter.
13331 <p>I always thought &xacute; was a cute letter.
13335 # TODO: generalize to PHP parser?
13341 <data value="5">five</data>
13342 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13343 <mark>This highlighted text</mark>
13345 <p><data value="5">five</data>
13346 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
13347 <mark>This highlighted text</mark></p>
13351 HTML tag with leading space is parsed as text
13355 <p>< div>foo< /div>
13360 ### Nesting tests (see bug 41545, 50604, 51081)
13363 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
13364 # Note that html2wt is considerably more difficult if we use <b> in
13365 # the test case, instead of <big>
13367 Ensure that HTML adoption agency algorithm is properly implemented.
13369 <big>X<big>Y</big>Z</big>
13371 <p><big>X<big>Y</big>Z</big>
13375 # This was bug 41545 in the PHP parser.
13376 # Note that tidy doesn't handle this correctly.
13380 <kbd>X<kbd>Y</kbd>Z</kbd>
13382 <p><kbd>X<kbd>Y</kbd>Z</kbd>
13386 # The following cases were bug 51081 in the PHP parser.
13387 # Note that there are some other nestable tags (b, i, etc) which are
13388 # not covered; see bug 51081 for discussion.
13390 # Note that tidy doesn't handle this correctly.
13394 <em>X<em>Y</em>Z</em>
13396 <p><em>X<em>Y</em>Z</em>
13400 # Note that tidy doesn't handle this correctly.
13402 Nesting of <strong>
13404 <strong>X<strong>Y</strong>Z</strong>
13406 <p><strong>X<strong>Y</strong>Z</strong>
13415 <p><q>X<q>Y</q>Z</q></p>
13418 # Note that tidy doesn't handle this correctly.
13422 <ruby>X<ruby>Y</ruby>Z</ruby>
13424 <p><ruby>X<ruby>Y</ruby>Z</ruby>
13428 # Note that tidy doesn't handle this correctly.
13432 <bdo>X<bdo>Y</bdo>Z</bdo>
13434 <p><bdo>X<bdo>Y</bdo>Z</bdo>
13446 [[Media:Foobar.jpg]]
13448 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
13453 Media link with text
13455 [[Media:Foobar.jpg|A neat file to look at]]
13457 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
13461 # FIXME: this is still bad HTML tag nesting
13463 Media link with nasty text
13464 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
13466 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
13468 <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>
13471 <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>
13475 Media link to nonexistent file (bug 1702)
13477 [[Media:No such.jpg]]
13479 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
13484 Image link to nonexistent file (bug 1850 - good)
13486 [[Image:No such.jpg]]
13488 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
13493 :Image link to nonexistent file (bug 1850 - bad)
13495 [[:Image:No such.jpg]]
13497 <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>
13504 Character reference normalization in link text (bug 1938)
13506 [[Main Page|this&that]]
13508 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
13515 Test for unicode normalization
13517 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
13521 (bug 19451) Links should refer to the normalized form.
13529 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13530 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13531 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13532 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13533 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
13538 Empty attribute crash test (bug 2067)
13540 <font color="">foo</font>
13542 <p><font color="">foo</font>
13547 Empty attribute crash test single-quotes (bug 2067)
13549 <font color=''>foo</font>
13551 <p><font color="">foo</font>
13556 Attribute test: equals, then nothing
13558 <font color=>foo</font>
13560 <p><font>foo</font>
13565 Attribute test: unquoted value
13567 <font color=x>foo</font>
13569 <p><font color="x">foo</font>
13574 Attribute test: unquoted but illegal value (hash)
13576 <font color=#x>foo</font>
13578 <p><font color="#x">foo</font>
13583 Attribute test: no value
13585 <font color>foo</font>
13587 <p><font color="color">foo</font>
13592 Bug 2095: link with three closing brackets
13596 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
13599 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
13603 Bug 2095: link with pipe and three closing brackets
13605 [[Main Page|link]]]
13607 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
13610 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
13614 Bug 2095: link with pipe and three closing brackets, version 2
13616 [[Main Page|[http://example.com/]]]
13618 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
13621 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
13630 Template:Dangerous attribute
13632 " onmouseover="alert(document.cookie)
13636 Template:Dangerous style attribute
13638 border-size: expression(alert(document.cookie))
13644 <div style="float: right; {{{1}}}">Magic div</div>
13648 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
13650 <div title="{{test}}"></div>
13652 <div title="This is a test template"></div>
13656 # Parsoid has enough context to handle this case
13658 Bug 2304: HTML attribute safety (dangerous template; 2309)
13660 <div title="{{dangerous attribute}}"></div>
13662 <div title=""></div>
13665 <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>
13669 Bug 2304: HTML attribute safety (dangerous style template; 2309)
13671 <div style="{{dangerous style attribute}}"></div>
13673 <div style="/* insecure input */"></div>
13678 Bug 2304: HTML attribute safety (safe parameter; 2309)
13680 {{div style|width: 200px}}
13682 <div style="float: right; width: 200px">Magic div</div>
13687 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
13689 {{div style|width: expression(alert(document.cookie))}}
13691 <div style="/* insecure input */">Magic div</div>
13696 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
13698 {{div style|"><script>alert(document.cookie)</script>}}
13700 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13705 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
13707 {{div style|" ><script>alert(document.cookie)</script>}}
13709 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
13714 Bug 2304: HTML attribute safety (link)
13716 <div title="[[Main Page]]"></div>
13718 <div title="[[Main Page]]"></div>
13723 Bug 2304: HTML attribute safety (italics)
13725 <div title="''foobar''"></div>
13727 <div title="''foobar''"></div>
13732 Bug 2304: HTML attribute safety (bold)
13734 <div title="'''foobar'''"></div>
13736 <div title="'''foobar'''"></div>
13742 Bug 2304: HTML attribute safety (ISBN)
13744 <div title="ISBN 1234567890"></div>
13746 <div title="ISBN 1234567890"></div>
13751 Bug 2304: HTML attribute safety (RFC)
13753 <div title="RFC 1234"></div>
13755 <div title="RFC 1234"></div>
13760 Bug 2304: HTML attribute safety (PMID)
13762 <div title="PMID 1234567890"></div>
13764 <div title="PMID 1234567890"></div>
13769 Bug 2304: HTML attribute safety (web link)
13771 <div title="http://example.com/"></div>
13773 <div title="http://example.com/"></div>
13778 Bug 2304: HTML attribute safety (named web link)
13780 <div title="[http://example.com/ link]"></div>
13782 <div title="[http://example.com/ link]"></div>
13787 Bug 3244: HTML attribute safety (extension; safe)
13789 <div style="<nowiki>background:blue</nowiki>"></div>
13791 <div style="background:blue"></div>
13796 Bug 3244: HTML attribute safety (extension; unsafe)
13798 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
13800 <div style="/* insecure input */"></div>
13804 # More MSIE fun discovered by Tom Gilder
13807 MSIE CSS safety test: spurious slash
13809 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
13811 <div style="/* insecure input */">evil</div>
13816 MSIE CSS safety test: hex code
13818 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
13820 <div style="/* insecure input */">evil</div>
13825 MSIE CSS safety test: comment in url
13827 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
13829 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
13834 MSIE CSS safety test: comment in expression
13836 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
13838 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
13843 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
13845 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
13847 <p style="/* invalid control char */">A</p>
13852 MSIE 6 CSS safety test: Fullwidth (bug 55332)
13854 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
13855 <div style="top:EXPRESSION(alert())">B</div>
13857 <p style="/* insecure input */">A</p>
13858 <div style="/* insecure input */">B</div>
13863 MSIE 6 CSS safety test: IPA extensions (bug 55332)
13865 <div style="background-image:uʀʟ(javascript:alert())">A</div>
13866 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
13868 <div style="/* insecure input */">A</div>
13869 <p style="/* insecure input */">B</p>
13874 MSIE 6 CSS safety test: sup/sub script (bug 55332)
13876 <div style="background-image:url⁽javascript:alert())">A</div>
13877 <div style="background-image:url₍javascript:alert())">B</div>
13878 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
13880 <div style="/* insecure input */">A</div>
13881 <div style="/* insecure input */">B</div>
13882 <p style="/* insecure input */">C</p>
13890 title="data:text/html,<img src=1 onerror=alert(1)>"
13891 style="-o-link:attr(title);-o-link-source:current">X</div>
13893 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
13898 MSIE 6 CSS safety test: Repetition markers (bug 55332)
13900 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
13901 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
13902 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
13903 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
13904 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
13905 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
13906 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
13908 <p style="/* insecure input */">A</p>
13909 <p style="/* insecure input */">B</p>
13910 <p style="/* insecure input */">C</p>
13911 <p style="/* insecure input */">D</p>
13912 <p style="/* insecure input */">E</p>
13913 <p style="/* insecure input */">F</p>
13914 <p style="/* insecure input */">G</p>
13919 Table attribute legitimate extension
13922 !+ style="<nowiki>color:blue</nowiki>"| status
13927 <th style="color:blue"> status
13933 Table attribute safety
13936 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
13941 <th style="/* insecure input */"> status
13947 CSS line continuation 1
13949 <div style="background-image: u\ rl(test.jpg);"></div>
13951 <div style="/* insecure input */"></div>
13956 CSS line continuation 2
13958 <div style="background-image: u\ rl(test.jpg); "></div>
13960 <div style="/* insecure input */"></div>
13971 Expansion of multi-line templates in attribute values (bug 6255)
13973 <div style="background: {{identity|#00FF00}}">-</div>
13975 <div style="background: #00FF00">-</div>
13981 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
13983 <div style="background:
13986 <div style="background: #00FF00">-</div>
13991 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
13993 <div style="background: #00FF00">-</div>
13995 <div style="background: #00FF00">-</div>
14000 evil <math>-wiki-tags without Extension:Math enabled
14002 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
14004 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
14008 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
14011 Parser hook: empty input
14024 Parser hook: empty input using terminated empty elements
14037 Parser hook: empty input using terminated empty elements (space before)
14050 Parser hook: basic input
14064 Parser hook: case insensitive
14078 Parser hook: case insensitive, redux
14091 Parser hook: nested tags
14095 <tag><tag></tag></tag>
14106 Parser hook: basic arguments
14108 <tag width=200 height = "100" depth = '50' square></tag>
14116 'square' => 'square',
14123 Parser hook: argument containing a forward slash (bug 5344)
14125 <tag filename='/tmp/bla'></tag>
14130 'filename' => '/tmp/bla',
14137 Parser hook: empty input using terminated empty elements (bug 2374)
14150 # </tag> should be output literally since there is no matching tag that begins it
14152 Parser hook: basic arguments using terminated empty elements (bug 2374)
14154 <tag width=200 height = "100" depth = '50' square/>
14164 'square' => 'square',
14173 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
14177 Parser hook: static parser hook not inside a comment
14179 <statictag>hello, world</statictag>
14180 <statictag action=flush/>
14188 Parser hook: static parser hook inside a comment
14190 <!-- <statictag>hello, world</statictag> -->
14191 <statictag action=flush/>
14197 # Nested template calls; this case was broken by Parser.php rev 1.506,
14201 Template:One-parameter
14203 (My parameter is: {{{1}}})
14207 Template:Map-one-parameter
14209 {{{{{1}}}|{{{2}}}}}
14213 Nested template calls
14215 {{Map-one-parameter|One-parameter|param}}
14217 <p>(My parameter is: param)
14226 Sanitizer: Closing of open tags
14228 <s></s><table></table>
14230 <s></s><table></table>
14235 Sanitizer: Closing of open but not closed tags
14244 Sanitizer: Closing of closed but not open tags
14253 Sanitizer: Closing of closed but not open table tags
14255 Table not started</td></tr></table>
14257 <p>Table not started</td></tr></table>
14262 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
14264 <span id="æ: v">byte</span>[[#æ: v|backlink]]
14266 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
14271 Sanitizer: Validating the contents of the id attribute (bug 4515)
14277 Something, but definitely not <br id="9" />...
14281 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
14285 <br id="foo" /><br id="foo" />
14287 Something need to be done. foo-2 ?
14291 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
14294 <meta itemprop="hello" content="world">
14295 <meta http-equiv="refresh" content="5">
14296 <meta itemprop="hello" http-equiv="refresh" content="5">
14297 <link itemprop="hello" href="{{SERVER}}">
14298 <link rel="stylesheet" href="{{SERVER}}">
14299 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
14302 <div itemscope="itemscope">
14303 <p> <meta itemprop="hello" content="world" />
14304 <meta http-equiv="refresh" content="5">
14305 <meta itemprop="hello" content="5" />
14307 <link itemprop="hello" href="http://example.org" />
14308 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
14309 <link itemprop="hello" href="http://example.org" />
14315 Language converter: output gets cut off unexpectedly (bug 5757)
14319 this bit is safe: }-
14321 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
14323 then we get cut off here: }-
14325 all additional text is vanished
14327 <p>this bit is safe: }-
14328 </p><p>but if we add a conversion instance: xxx
14329 </p><p>then we get cut off here: }-
14330 </p><p>all additional text is vanished
14335 Self closed html pairs (bug 5487)
14338 <center><font id="bug" />Centered text</center>
14339 <div><font id="bug2" />In div text</div>
14341 <center><font id="bug" />Centered text</center>
14342 <div><font id="bug2" />In div text</div>
14351 Punctuation: nbsp before exclamation
14355 <p>C'est grave !
14360 Punctuation: CSS !important (bug 11874)
14362 <div style="width:50% !important">important</div>
14364 <div style="width:50% !important">important</div>
14369 Punctuation: CSS ! important (bug 11874; with space after)
14371 <div style="width:50% ! important">important</div>
14373 <div style="width:50% ! important">important</div>
14379 HTML bullet list, closed tags (bug 5497)
14394 HTML bullet list, unclosed tags (bug 5497)
14413 HTML ordered list, closed tags (bug 5497)
14428 HTML ordered list, unclosed tags (bug 5497)
14447 HTML nested bullet list, closed tags (bug 5497)
14472 HTML nested bullet list, open tags (bug 5497)
14501 HTML nested ordered list, closed tags (bug 5497)
14526 HTML nested ordered list, open tags (bug 5497)
14555 HTML ordered list item with parameters oddity
14557 <ol><li id="fragment">One</li>
14560 <ol><li id="fragment">One</li>
14565 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
14567 bug 5918: autonumbering
14569 [http://first/] [http://second] [ftp://ftp]
14573 [mailto:enclosed@mail.tld With target]
14575 [mailto:enclosed@mail.tld]
14577 mailto:inline@mail.tld
14579 <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>
14580 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
14581 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
14582 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
14583 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
14586 <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>
14587 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
14588 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
14589 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
14590 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
14595 # Security and HTML correctness
14596 # From Nick Jenkins' fuzz testing
14600 Fuzz testing: Parser13
14615 Fuzz testing: Parser14
14620 <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>
14621 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14623 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14629 <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>
14631 <div id="toc" class="toc">
14632 <div id="toctitle">
14636 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
14642 Fuzz testing: Parser14-table
14647 <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>
14648 <table style="__TOC__">
14653 <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>
14654 <table style="__TOC__">
14661 # Known to produce bogus xml (extra </td>)
14663 Fuzz testing: Parser16
14692 Fuzz testing: Parser21
14695 ! irc://{{ftp://a" onmouseover="alert('hello world');"
14700 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
14710 Fuzz testing: Parser22
14712 http://===r:::https://b
14716 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
14724 # Known to produce bad XML for now
14726 Fuzz testing: Parser24
14733 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
14734 <br style="onmouseover='alert(document.cookie);' " />
14736 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14741 <u class="|">}}}} >
14742 <br style="onmouseover='alert(document.cookie);'" />
14744 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
14753 # Note: the current result listed for this is not what the original one was,
14754 # but the original bug was JavaScript injection, which is fixed in any case.
14755 # It's not clear that the original result listed was any more correct than the
14756 # current one. Original result:
14759 # <li class="||">
14760 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14762 Fuzz testing: Parser25 (bug 6055)
14768 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
14770 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
14775 Fuzz testing: URL adjacent extension (with space, clean)
14777 http://example.com <nowiki>junk</nowiki>
14779 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
14784 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
14786 http://example.com<nowiki>junk</nowiki>
14788 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
14793 Fuzz testing: URL adjacent extension (no space, dirty; pre)
14795 http://example.com<pre>junk</pre>
14797 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
14800 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
14807 Fuzz testing: image with bogus manual thumbnail
14809 [[Image:foobar.jpg|thumbnail= ]]
14811 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
14814 <meta typeof="mw:Placeholder" data-parsoid='{"src":"[[Image:foobar.jpg|thumbnail= ]]","optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,null,null]}'/>
14818 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
14820 <pre dir=" "></pre>
14822 <pre dir=" "></pre>
14827 Parsing optional HTML elements (Bug 6171)
14832 <td> Some tabular data</td>
14833 <td> More tabular data ...
14834 <td> And yet som tabular data</td>
14840 <td> Some tabular data</td>
14841 <td> More tabular data ...
14842 </td><td> And yet som tabular data</td>
14849 Correct handling of <td>, <tr> (Bug 6171)
14854 <td> Some tabular data</td>
14855 <td> More tabular data ...</td>
14856 <td> And yet som tabular data</td>
14862 <td> Some tabular data</td>
14863 <td> More tabular data ...</td>
14864 <td> And yet som tabular data</td>
14872 Parsing crashing regression (fr:JavaScript)
14876 <p></body></x>
14881 Inline wiki vs wiki block nesting
14887 <p><b>Bold paragraph</b>
14888 </p><p>New wiki paragraph
14893 Inline HTML vs wiki block nesting
14901 <p><b>Bold paragraph</b>
14902 </p><p>New wiki paragraph
14906 # Original result was this:
14907 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
14909 # While that might be marginally more intuitive, maybe, the six-apostrophe
14910 # construct is clearly pathological and the result stated here (which is what
14911 # the parser actually does) is about as reasonable as anything.
14913 Mixing markup for italics and bold
14916 '''bold''''''bold''bolditalics'''''
14918 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
14926 Article for special page transclusion test
14930 Special page transclusion
14933 {{Special:Prefixindex/Xyzzyx}}
14935 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14940 Special page transclusion twice (bug 5021)
14943 {{Special:Prefixindex/Xyzzyx}}
14944 {{Special:Prefixindex/Xyzzyx}}
14946 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14947 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
14952 Transclusion of default MediaWiki message
14954 {{MediaWiki:Mainpage}}
14961 Transclusion of nonexistent MediaWiki message
14963 {{MediaWiki:Mainpagexxx}}
14965 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
14970 Transclusion of MediaWiki message with underscore
14972 {{MediaWiki:history_short}}
14979 Transclusion of MediaWiki message with space
14981 {{MediaWiki:history short}}
14988 Invalid header with following text
14998 Section extraction test (section 0)
15018 Section extraction test (section 1)
15040 Section extraction test (section 2)
15061 Section extraction test (section 3)
15081 Section extraction test (section 4)
15105 Section extraction test (section 5)
15125 Section extraction test (section 6)
15146 Section extraction test (section 7)
15166 Section extraction test (section 8)
15186 Section extraction test (section 9)
15207 Section extraction test (section 10)
15227 Section extraction test (nonexistent section 11)
15246 Section extraction test with bogus heading (section 1)
15251 ==bogus== not a legal section
15255 ==bogus== not a legal section
15259 Section extraction test with bogus heading (section 2)
15264 ==bogus== not a legal section
15271 Section extraction test with comment after heading (section 1)
15283 Section extraction test with comment after heading (section 2)
15295 Section extraction test with bogus <nowiki> heading (section 1)
15300 ==bogus== <nowiki>not a legal section</nowiki>
15304 ==bogus== <nowiki>not a legal section</nowiki>
15308 Section extraction test with bogus <nowiki> heading (section 2)
15313 ==bogus== <nowiki>not a legal section</nowiki>
15320 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
15321 # instead of respecting commented sections
15323 Section extraction prefixed by comment (section 1)
15334 Section extraction prefixed by comment (section 2)
15345 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
15346 # instead of respecting HTML-style headings
15348 Section extraction, mixed wiki and html (section 1)
15364 Section extraction, mixed wiki and html (section 2)
15380 # Formerly testing for bug 3342
15382 Section extraction, heading surrounded by <noinclude>
15386 <noinclude>==unmarked==</noinclude>
15392 # Test behavior of bug 19910
15394 Sectiion with all-equals
15399 The line above must have a trailing space
15402 But just in case it doesn't...
15406 But just in case it doesn't...
15410 Section replacement test (section 0)
15441 Section replacement test (section 1)
15470 Section replacement test (section 2)
15500 Section replacement test (section 3)
15531 Section replacement test (section 4)
15558 Section replacement test (section 5)
15589 Section replacement test (section 6)
15619 Section replacement test (section 7)
15650 Section replacement test (section 8)
15681 Section replacement test (section 9)
15710 Section replacement test (section 10)
15740 Section replacement test with initial whitespace (bug 13728)
15744 Preformatted initial line
15748 Preformatted initial line
15755 Section extraction, heading followed by pre with 20 spaces (bug 6398)
15767 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
15780 Section extraction, <pre> around bogus header (bug 10309)
15797 Section replacement, <pre> around bogus header (bug 10309)
15799 noxml replace=2,"xxx"
15820 Handling of 
 in URLs
15824 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15827 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
15829 a</a></li></ul></li></ul>
15833 Handling of %0A in URLs
15837 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15840 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
15844 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
15846 5 quotes, code coverage +1 line
15853 <p><b><i></i></b></p>
15856 # same html as previous, but wikitext adjusted to match parsoid html2wt
15857 # note that wt2html and html2html will put the <i> before the <b>
15859 5 quotes, code coverage +1 line w/ nowiki (1)
15861 parsoid=wt2wt,html2wt
15863 '''''<nowiki/>'''''
15868 <p><b><i></i></b></p>
15871 # same as previous, just swapping the <i> and <b>
15873 5 quotes, code coverage +1 line w/ nowiki (2)
15875 '''''<nowiki/>'''''
15880 <p><i><b></b></i></p>
15884 Special:Search page linking.
15888 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
15895 title=[[Parser test]]
15900 * {{FULLPAGENAMEE}}
15902 * {{BASEPAGENAMEE}}
15906 * {{ROOTPAGENAMEE}}
15908 * {{TALKPAGENAMEE}}
15909 * {{SUBJECTPAGENAME}}
15910 * {{SUBJECTPAGENAMEE}}
15913 * {{NAMESPACENUMBER}}
15917 * {{SUBJECTSPACEE}}
15918 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
15920 <ul><li> Parser test</li>
15921 <li> Parser_test</li>
15922 <li> Parser test</li>
15923 <li> Parser_test</li>
15924 <li> Parser test</li>
15925 <li> Parser_test</li>
15926 <li> Parser test</li>
15927 <li> Parser_test</li>
15928 <li> Parser test</li>
15929 <li> Parser_test</li>
15930 <li> Talk:Parser test</li>
15931 <li> Talk:Parser_test</li>
15932 <li> Parser test</li>
15933 <li> Parser_test</li>
15941 <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>
15944 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
15954 image4 |300px| centre
15955 image5.svg| http://///////
15960 <ul class="gallery mw-gallery-traditional">
15961 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15962 <div class="thumb" style="height: 150px;">Image1.png</div>
15963 <div class="gallerytext">
15966 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15967 <div class="thumb" style="height: 150px;">Image2.gif</div>
15968 <div class="gallerytext">
15973 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15974 <div class="thumb" style="height: 150px;">Image3</div>
15975 <div class="gallerytext">
15978 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15979 <div class="thumb" style="height: 150px;">Image4</div>
15980 <div class="gallerytext">
15985 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15986 <div class="thumb" style="height: 150px;">Image5.svg</div>
15987 <div class="gallerytext">
15988 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
15992 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15993 <div class="thumb" style="height: 150px;">* image6</div>
15994 <div class="gallerytext">
16002 Gallery (with options)
16004 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
16005 File:Nonexistant.jpg|caption
16006 File:Nonexistant.jpg
16007 image:foobar.jpg|some '''caption''' [[Main Page]]
16009 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
16012 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
16013 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
16014 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16015 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16016 <div class="gallerytext">
16021 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16022 <div class="thumb" style="height: 70px;">Nonexistant.jpg</div>
16023 <div class="gallerytext">
16026 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16027 <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>
16028 <div class="gallerytext">
16029 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16033 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16034 <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>
16035 <div class="gallerytext">
16038 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
16039 <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>
16040 <div class="gallerytext">
16050 Gallery with link that has fragment
16053 image:foobar.jpg|link=Main_Page
16054 image:foobar.jpg|link=Main_Page#section
16055 image:foobar.jpg|link=Main Page#section|caption
16058 <ul class="gallery mw-gallery-traditional">
16059 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16060 <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>
16061 <div class="gallerytext">
16064 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16065 <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>
16066 <div class="gallerytext">
16069 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16070 <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>
16071 <div class="gallerytext">
16081 Gallery with wikitext inside caption
16084 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
16085 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
16088 <ul class="gallery mw-gallery-traditional">
16089 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16090 <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>
16091 <div class="gallerytext">
16092 <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>
16096 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16097 <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>
16098 <div class="gallerytext">
16099 <p>This is a test template
16108 gallery (with showfilename option)
16110 <gallery showfilename>
16111 File:Nonexistant.jpg|caption
16112 File:Nonexistant.jpg
16113 image:foobar.jpg|some '''caption''' [[Main Page]]
16117 <ul class="gallery mw-gallery-traditional">
16118 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16119 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16120 <div class="gallerytext">
16121 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16126 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16127 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16128 <div class="gallerytext">
16129 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
16133 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16134 <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>
16135 <div class="gallerytext">
16136 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16137 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
16141 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16142 <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>
16143 <div class="gallerytext">
16144 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
16153 Gallery (with namespace-less filenames)
16156 File:Nonexistant.jpg
16162 <ul class="gallery mw-gallery-traditional">
16163 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16164 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16165 <div class="gallerytext">
16168 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16169 <div class="thumb" style="height: 150px;">Nonexistant.jpg</div>
16170 <div class="gallerytext">
16173 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16174 <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>
16175 <div class="gallerytext">
16178 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
16179 <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>
16180 <div class="gallerytext">
16188 HTML Hex character encoding (spells the word "JavaScript")
16190 parsoid=wt2html,wt2wt,html2html
16192 JavaScript
16194 <p>JavaScript
16199 <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>
16203 HTML Hex character encoding bogus encoding (bug 26437 regression check)
16207 <p>&#xsee;&#XSEE;
16210 <p>&#xsee;&#XSEE;</p>
16214 HTML Hex character encoding mixed case
16216 parsoid=wt2html,wt2wt,html2html
16225 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
16229 __FORCETOC__ override
16241 ISBN 978-0-1234-56 789
16243 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
16246 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
16250 ISBN followed by 5 spaces
16261 ISBN ISBN 1234567890
16263 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16272 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
16277 ISBN with empty prefix (parsoid test)
16281 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
16285 Bug 22905: <abbr> followed by ISBN followed by </a>
16287 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
16289 <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>
16298 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
16303 Double RFC with a wiki link
16307 <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>
16316 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
16319 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
16323 Centre-aligned image
16325 [[Image:foobar.jpg|centre]]
16327 <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>
16334 [[Image:foobar.jpg|none]]
16336 <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>
16341 Width + Height sized image (using px) (height is ignored)
16343 [[Image:foobar.jpg|640x480px]]
16345 <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>
16350 Width-sized image (using px, no following whitespace)
16352 [[Image:foobar.jpg|640px]]
16354 <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>
16359 Width-sized image (using px, with following whitespace - test regression from r39467)
16361 [[Image:foobar.jpg|640px ]]
16363 <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>
16368 Width-sized image (using px, with preceding whitespace - test regression from r39467)
16370 [[Image:foobar.jpg| 640px]]
16372 <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>
16377 Image with page parameter
16381 [[File:LoremIpsum.djvu|page=2]]
16383 <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>
16388 Another italics / bold test
16396 # Note the results may be incorrect, as parserTest output included this:
16397 # XML error: Mismatched tag at byte 6120:
16398 # ...<dd> </dt></dl> </dd...
16429 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
16431 Images with the "|" character in the comment
16433 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
16435 <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>
16438 <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>
16442 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
16444 <html><script>alert(1);</script></html>
16446 <p><html><script>alert(1);</script></html>
16451 HTML with raw HTML ($wgRawHtml==true)
16455 <html><script>alert(1);</script></html>
16457 <p><script>alert(1);</script>
16462 Parents of subpages, one level up
16464 subpage title=[[Subpage test/L1/L2/L3]]
16468 <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>
16474 Parents of subpages, one level up, not named
16476 subpage title=[[Subpage test/L1/L2/L3]]
16480 <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>
16487 Parents of subpages, two levels up
16489 subpage title=[[Subpage test/L1/L2/L3]]
16495 <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
16496 </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>
16501 Parents of subpages, two levels up, without trailing slash or name.
16503 subpage title=[[Subpage test/L1/L2/L3]]
16512 Parents of subpages, two levels up, with lots of extra trailing slashes.
16514 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)">///</a>
16523 Subpage test/L1/L2/L3Sibling
16529 Transclusion of a sibling page (one level up)
16531 subpage title=[[Subpage test/L1/L2/L3]]
16540 Transclusion of a child page
16542 subpage title=[[Subpage test/L1/L2]]
16551 Non-transclusion because of too many up levels
16553 subpage title=[[Subpage test/L1/L2/L3]]
16555 {{../../../../More than parent}}
16557 <p>{{../../../../More than parent}}
16562 Definition list code coverage
16568 <dl><dt> title  </dt>
16570 <dt> title </dt>
16578 Don't fall for the self-closing div
16580 <div>hello world</div/>
16582 <div>hello world</div>
16591 <p>[[:Template:Msg]]
16600 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
16604 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
16606 Always escape literal '>' in output, not just after '<'
16620 <p>This is a test template
16621 This is a test template
16633 Inclusion of !userCanEdit() content
16637 <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>
16643 Out-of-order TOC heading levels
16652 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16654 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
16656 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
16657 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
16660 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
16662 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
16663 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
16669 <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>
16670 <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>
16671 <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>
16672 <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>
16673 <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>
16674 <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>
16680 ISBN with a dummy number
16690 ISBN with space-delimited number
16694 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
16700 ISBN with multiple spaces, no number
16719 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
16720 </p><p>ISBN 12345678901
16726 ISBN with trailing year (bug 8110)
16728 ISBN 1-234-56789-0 - 2006
16730 ISBN 1 234 56789 0 - 2006
16732 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
16733 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
16741 {{anchorencode:foo bar©#%n}}
16743 <p>foo_bar.C2.A9.23.25n
16748 anchorencode trims spaces
16750 {{anchorencode: __pretty__please__}}
16757 anchorencode deals with links
16759 {{anchorencode: [[hello|world]] [[hi]]}}
16766 anchorencode deals with templates
16768 {{anchorencode: {{Foo}} }}
16775 anchorencode encodes like the TOC generator: (bug 18431)
16777 === _ +:.3A%3A&&]] ===
16778 {{anchorencode: _ +:.3A%3A&&]] }}
16781 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
16782 <p>.2B:.3A.253A.26.26.5D.5D
16787 Bug 6200: blockquotes and paragraph formatting
16808 Bug 8293: Use of center tag ruins paragraph formatting
16829 Parsing of overlapping (improperly nested) inline html tags
16831 <span><s>x</span></s>
16833 <p><span><s>x</span></s></span>
16836 <p><span><s>x</s></span>
16841 ### Language variants related tests
16844 Self-link in language variants
16846 title=[[Dunav]] language=sr
16848 Both [[Dunav]] and [[Дунав]] are names for this river.
16850 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
16861 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
16863 title=[[Duna]] language=sr
16865 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
16867 <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.
16872 Link to a section of a variant of this title shouldn't be parsed as self-link
16874 title=[[Duna]] language=sr
16876 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
16878 <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.
16883 Link to pages in language variants
16887 Main Page can be written as [[Маин Паге]]
16889 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
16895 Multiple links to pages in language variants
16899 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
16901 <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>.
16907 Simple template in language variants
16913 <p>This is a test template
16919 Template with explicit namespace in language variants
16925 <p>This is a test template
16931 Basic test for template parameter in language variants
16935 {{парамтест|param=foo}}
16937 <p>This is a test template with parameter foo
16943 Simple category in language variants
16947 [[Category:МедиаWики Усер'с Гуиде]]
16949 <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>
16966 Don't convert blue categorylinks to another variant (bug 33210)
16970 [[A]][[Category:分类]]
16972 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
16977 Stripping -{}- tags (language variants)
16981 Latin proverb: -{Ne nuntium necare}-
16983 <p>Latin proverb: Ne nuntium necare
16989 Prevent conversion with -{}- tags (language variants)
16991 language=sr variant=sr-ec
16993 Latinski: -{Ne nuntium necare}-
16995 <p>Латински: Ne nuntium necare
17001 Prevent conversion of text with -{}- tags (language variants)
17003 language=sr variant=sr-ec
17005 Latinski: -{Ne nuntium necare}-
17007 <p>Латински: Ne nuntium necare
17013 Prevent conversion of links with -{}- tags (language variants)
17015 language=sr variant=sr-ec
17019 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17025 -{}- tags within headlines (within html for parserConvert())
17027 language=sr variant=sr-ec
17031 <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>
17037 Explicit definition of language variant alternatives
17039 language=zh variant=zh-tw
17041 -{zh:China;zh-tw:Taiwan}-, not China
17043 <p>Taiwan, not China
17049 Conversion around HTML tags
17051 language=sr variant=sr-ec
17053 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
17054 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
17057 <span title="ЛаCтин">ски</span>
17063 Explicit session-wise language variant mapping (A flag and - flag)
17065 language=zh variant=zh-tw
17067 Taiwan is not China.
17068 But -{A|zh:China;zh-tw:Taiwan}- is China,
17069 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
17070 and -{China}- is China.
17072 <p>Taiwan is not China.
17073 But Taiwan is Taiwan,
17074 (This should be stripped!)
17075 and China is China.
17080 Explicit session-wise language variant mapping (H flag for hide)
17082 language=zh variant=zh-tw
17084 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
17087 <p>(This should be stripped!)
17093 Adding explicit conversion rule for title (T flag)
17095 language=zh variant=zh-tw showtitle
17097 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17100 <p>Should be stripped!
17105 Testing that changing the language variant here in the tests actually works
17107 language=zh variant=zh showtitle
17109 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17112 <p>Should be stripped!
17117 Recursive conversion of alt and title attrs shouldn't clear converter state
17119 language=zh variant=zh-cn showtitle
17121 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
17122 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
17126 Should be stripped<span title="Exclamation">!</span>
17131 Bug 24072: more test on conversion rule for title
17133 language=zh variant=zh-tw showtitle
17135 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
17136 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
17139 <p>This should be stripped!
17140 This won't take interferes with the title rule.
17145 Partly disable title conversion if variant == main language code
17147 language=zh variant=zh title=[[ZH]] showtitle
17149 -{T|zh-cn:CN;zh-tw:TW}-
17157 Partly disable title conversion if variant == main language code, more
17159 language=zh variant=zh title=[[ZH]] showtitle
17169 Raw output of variant escape tags (R flag)
17171 language=zh variant=zh-tw
17173 Raw: -{R|zh:China;zh-tw:Taiwan}-
17175 <p>Raw: zh:China;zh-tw:Taiwan
17180 Nested using of manual convert syntax
17182 language=zh variant=zh-hk
17184 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
17186 <p>Nested: Hello Hong Kong!
17191 Proper conversion of text in external links
17193 language=sr variant=sr-ec
17195 http://www.google.com
17196 gopher://www.google.com
17197 [http://www.google.com http://www.google.com]
17198 [gopher://www.google.com gopher://www.google.com]
17199 [https://www.google.com irc://www.google.com]
17200 [ftp://www.google.com www.google.com/ftp://dir]
17201 [//www.google.com www.google.com]
17203 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17204 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17205 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
17206 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
17207 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
17208 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
17209 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
17214 Do not convert roman numbers to language variants
17216 language=sr variant=sr-ec
17220 <p>Фридрих IV је цар.
17225 Unclosed language converter markup "-{"
17236 Don't convert raw rule "-{R|=>}-" to "=>"
17247 Don't break link parsing if language converter markup is in the caption.
17249 language=sr variant=sr-ec
17251 [[Main Page|-{R|main page}-]]
17253 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
17257 # This test is currently broken in the PHP parser (bug 52661)
17259 Don't break image parsing if language converter markup is in the caption.
17264 [[File:Foobar.jpg|-{R|caption}-]]
17266 <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>
17270 # This test is currently broken in the PHP parser (bug 52661)
17272 Don't break list handling if language converter markup is in the item.
17274 language=zh variant=zh-cn
17277 ;-{zh-cn:AAA;zh-tw:BBB}-
17284 # This test is currently broken in the PHP parser (bug 52661)
17286 Don't break table handling if language converter markup is in the cell.
17288 language=sr variant=sr-ec
17305 Bug 529: Uncovered bullet
17314 # Plain MediaWiki does not remove empty lists, but tidy actually does.
17315 # Templates in Wikipedia rely on this behavior, as tidy has always been
17316 # enabled there. These tests are normally run *without* tidy, so specify the
17317 # full output here.
17318 # To test realistic parsing behavior, apply a tidy-like transformation to both
17319 # the expected output and your parser's output.
17321 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
17323 ******* Foo {{bullet}}
17325 <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>
17331 Bug 529: Uncovered table already at line-start
17354 Bug 529: Uncovered bullet in parser function result
17356 * Foo {{lc:{{bullet}} }}
17364 Bug 5678: Double-parsed template argument
17366 {{lc:{{{1}}}|hello}}
17373 Bug 5678: Double-parsed template invocation
17375 {{lc:{{paramtest {{!}} param = hello }} }}
17377 <p>{{paramtest | param = hello }}
17382 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
17385 title=[[Main Page]]
17387 {{PRVNÍVELKÉ:ěščř}}
17388 {{prvnívelké:ěščř}}
17408 Morwen/13: Unclosed link followed by heading
17415 <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>
17420 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
17427 <h1><span class="mw-headline" id="heading">heading</span></h1>
17432 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
17439 <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>
17454 Paragraphs inside divs (no extra line breaks)
17466 Paragraphs inside divs (extra line break on open)
17481 Paragraphs inside divs (extra line break on close)
17496 Paragraphs inside divs (extra line break on open and close)
17513 Nesting tags, paragraphs on lines which begin with <div>
17517 <div></div><strong>A
17526 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
17528 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
17530 <blockquote>Line one
17532 Line two</blockquote>
17534 <blockquote>Line one
17535 Line two</blockquote>
17539 <p>Line one Line two</p>
17544 Bug 6200: paragraphs inside blockquotes (extra line break on open)
17549 Line two</blockquote>
17554 Line two</blockquote>
17559 Line two</blockquote>
17563 Bug 6200: paragraphs inside blockquotes (extra line break on close)
17565 <blockquote>Line one
17570 <blockquote>Line one
17583 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
17605 Paragraphs inside blockquotes/divs (no extra line breaks)
17607 <blockquote><div>Line one
17609 Line two</div></blockquote>
17611 <blockquote><div>Line one
17612 Line two</div></blockquote>
17617 Paragraphs inside blockquotes/divs (extra line break on open)
17622 Line two</div></blockquote>
17627 Line two</div></blockquote>
17632 Paragraphs inside blockquotes/divs (extra line break on close)
17634 <blockquote><div>Line one
17637 </div></blockquote>
17639 <blockquote><div>Line one
17642 </div></blockquote>
17647 Paragraphs inside blockquotes/divs (extra line break on open and close)
17653 </div></blockquote>
17659 </div></blockquote>
17664 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
17666 wgLinkHolderBatchSize=0
17672 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
17673 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
17674 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
17679 Free external link invading image caption
17681 [[Image:Foobar.jpg|thumb|http://x|hello]]
17683 <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>
17688 Bug 15196: localised external link numbers
17692 [http://en.wikipedia.org/]
17694 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
17697 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
17701 Multibyte character in padleft
17703 {{padleft:-Hello|7|Æ}}
17710 Multibyte character in padright
17712 {{padright:Hello-|7|Æ}}
17719 formatdate parser function
17721 {{#formatdate:2009-03-24}}
17723 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
17728 formatdate parser function, with default format
17730 {{#formatdate:2009-03-24|mdy}}
17732 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
17737 Spacing of numbers in formatted dates
17739 {{#formatdate:January 15}}
17741 <p><span class="mw-formatted-date" title="01-15">January 15</span>
17746 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
17748 language=nl title=[[MediaWiki:Common.css]]
17750 {{#formatdate:2009-03-24|dmy}}
17752 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
17765 Edit comment with link
17769 I like the [[Main Page]] a lot
17771 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
17775 Edit comment with link and link text
17779 I like the [[Main Page|best pages]] a lot
17781 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17785 Edit comment with link and link text with suffix
17789 I like the [[Main Page|best page]]s a lot
17791 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
17795 Edit comment with section link (non-local, eg in history list)
17797 comment title=[[Main Page]]
17799 /* External links */ removed bogus entries
17801 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17805 Edit comment with section link and text before it (non-local, eg in history list)
17807 comment title=[[Main Page]]
17809 pre-comment text /* External links */ removed bogus entries
17811 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>
17815 Edit comment with section link (local, eg in diff view)
17817 comment local title=[[Main Page]]
17819 /* External links */ removed bogus entries
17821 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
17825 Edit comment with subpage link (bug 14080)
17829 title=[[Subpage test]]
17831 Poked at a [[/subpage]] here...
17833 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
17837 Edit comment with subpage link and link text (bug 14080)
17841 title=[[Subpage test]]
17843 Poked at a [[/subpage|neat little page]] here...
17845 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
17849 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
17852 title=[[Subpage test]]
17854 Poked at a [[/subpage]] here...
17856 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
17860 Edit comment with bare anchor link (local, as on diff)
17864 title=[[Main Page]]
17868 <a href="#section">#section</a>
17872 Edit comment with bare anchor link (non-local, as on history)
17875 title=[[Main Page]]
17879 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
17883 Anchor starting with underscore
17887 <p><a href="#_ref">One</a>
17892 Id starting with underscore
17894 <div id="_ref"></div>
17896 <div id="_ref"></div>
17901 Space normalisation on autocomment (bug 22784)
17904 title=[[Main Page]]
17906 /* __hello__world__ */
17908 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
17912 percent-encoding and + signs in comments (Bug 26410)
17916 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
17918 <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>
17922 Bad images - basic functionality
17931 Bad images - bug 16039: text after bad image disappears
17945 Verify that displaytitle works (bug #22501) no displaytitle
17949 wgAllowDisplayTitle=true
17950 wgRestrictDisplayTitle=false
17952 this is not the the title
17955 <p>this is not the the title
17960 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
17965 wgAllowDisplayTitle=true
17966 wgRestrictDisplayTitle=false
17968 this is not the the title
17969 {{DISPLAYTITLE:whatever}}
17972 <p>this is not the the title
17977 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
17982 wgAllowDisplayTitle=true
17983 wgRestrictDisplayTitle=true
17985 this is not the the title
17986 {{DISPLAYTITLE:whatever}}
17989 <p>this is not the the title
17994 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
17999 wgAllowDisplayTitle=true
18000 wgRestrictDisplayTitle=true
18002 this is not the the title
18003 {{DISPLAYTITLE:screen}}
18006 <p>this is not the the title
18011 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
18016 wgAllowDisplayTitle=false
18018 this is not the the title
18019 {{DISPLAYTITLE:screen}}
18022 <p>this is not the the title
18023 <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>
18028 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
18033 wgAllowDisplayTitle=false
18035 this is not the the title
18038 <p>this is not the the title
18043 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
18048 wgAllowDisplayTitle=true
18049 wgRestrictDisplayTitle=true
18051 this is not the the title
18052 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
18054 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
18055 <p>this is not the the title
18060 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
18065 wgAllowDisplayTitle=true
18066 wgRestrictDisplayTitle=true
18068 this is not the the title
18069 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
18071 <span style="color: red;">s</span>creen
18072 <p>this is not the the title
18077 preload: check <noinclude> and <includeonly>
18081 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
18087 preload: check <onlyinclude>
18091 Goodbye <onlyinclude>Hello world</onlyinclude>
18097 preload: can pass tags through if we want to
18101 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
18103 <includeonly>Hello world</includeonly>
18107 preload: check that it doesn't try to do tricks
18111 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18113 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
18117 Play a bit with r67090 and bug 3158
18121 <div style="width:50% !important"> </div>
18122 <div style="width:50% !important"> </div>
18123 <div style="width:50% !important"> </div>
18124 <div style="border : solid;"> </div>
18126 <div style="width:50% !important"> </div>
18127 <div style="width:50% !important"> </div>
18128 <div style="width:50% !important"> </div>
18129 <div style="border : solid;"> </div>
18134 HTML5 data attributes
18136 <span data-foo="bar">Baz</span>
18137 <p data-abc-def_hij="">Quuz</p>
18139 <p><span data-foo="bar">Baz</span>
18141 <p data-abc-def_hij="">Quuz</p>
18146 percent-encoding and + signs in internal links (Bug 26410)
18148 [[User:+%]] [[Page+title%]]
18149 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
18150 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
18151 [[%33%45]] [[%33%45+]]
18153 <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>
18154 <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>
18155 <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>
18156 <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>
18161 Special characters in embedded file links (bug 27679)
18163 [[File:Contains & ampersand.jpg]]
18164 [[File:Does not exist.jpg|Title with & ampersand]]
18166 <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>
18167 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
18173 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
18175 Text's been normalized?
18177 <p>Text's been normalized?
18182 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
18184 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
18186 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
18191 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
18193 [http://www.example.org/ ideograms]
18195 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
18200 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
18202 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
18204 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
18228 Bug 31098 Template which includes system messages which includes the template
18232 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18233 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
18238 Bug31490 Turkish: ucfirst 'blah'
18249 Bug31490 Turkish: ucfirst 'ix'
18260 Bug31490 Turkish: lcfirst 'BLAH'
18271 Bug31490 Turkish: ucfırst (with a dotless i)
18277 <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>
18282 Bug31490 ucfırst (with a dotless i) with English language
18288 <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>
18293 Bug 26375: TOC with italics
18295 title=[[Main Page]]
18298 == ''Lost'' episodes ==
18300 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18302 <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>
18306 <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>
18311 Bug 26375: TOC with bold
18313 title=[[Main Page]]
18316 == '''should be bold''' then normal text ==
18318 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18320 <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>
18324 <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>
18329 Bug 33845: Headings become cursive in TOC when they contain an image
18331 title=[[Main Page]]
18334 == Image [[Image:foobar.jpg]] ==
18336 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18338 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
18342 <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>
18347 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
18349 title=[[Main Page]]
18352 == <blockquote>Quote</blockquote> ==
18354 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18356 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18360 <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>
18363 <div id="toc" class="toc">
18364 <div id="toctitle">
18368 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
18371 <h2><span class="mw-headline" id="Quote"></span></h2>
18373 <p><span class="mw-headline" id="Quote">Quote</span></p>
18375 <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>
18379 Unclosed tags in TOC
18381 title=[[Main Page]]
18385 <small>Hanc marginis exiguitas non caperet.</small>
18388 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18390 <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>
18394 <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>
18395 <p><small>Hanc marginis exiguitas non caperet.</small>
18401 Multiple tags in TOC
18404 == <i>Foo</i> <b>Bar</b> ==
18406 == <i>Foo</i> <blockquote>Bar</blockquote> ==
18408 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18410 <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>
18411 <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>
18415 <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>
18416 <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>
18419 <div id="toc" class="toc">
18420 <div id="toctitle">
18424 <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>
18425 <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>
18428 <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>
18429 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
18431 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
18433 <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>
18437 Tags with parameters in TOC
18440 == <sup class="in-h2">Hello</sup> ==
18442 == <sup class="a > b">Evilbye</sup> ==
18444 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18446 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
18447 <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>
18451 <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>
18452 <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>
18457 span tags with directionality in TOC
18460 == <span dir="ltr">C++</span> ==
18462 == <span dir="rtl">זבנג!</span> ==
18464 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
18466 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
18468 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
18470 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18472 <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>
18473 <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>
18474 <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>
18475 <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>
18476 <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>
18480 <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>
18481 <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>
18482 <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>
18483 <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>
18484 <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>
18491 == {{int:headline_sample}} ==
18495 Bug 32057: Title needed when expanding <h> nodes.
18497 title=[[Main Page]]
18501 <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>
18506 Strip marker in urlencode
18508 {{urlencode:x<nowiki/>y}}
18509 {{urlencode:x<nowiki/>y|wiki}}
18510 {{urlencode:x<nowiki/>y|path}}
18537 Strip marker in formatNum
18539 {{formatnum:1<nowiki/>2}}
18540 {{formatnum:1<nowiki/>2|R}}
18548 Check noCommafy in formatNum
18552 {{formatnum:123456.78}}
18553 {{formatnum:123456.78|NOSEP}}
18561 Wrong option for formatNum (bug 56199)
18563 {{formatnum:1,234.56|Random}}
18564 {{formatnum:1,234.56|EVERYTHING}}
18565 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
18574 Strip marker in grammar
18578 {{grammar:elative|foo<nowiki/>bar}}
18585 Strip marker in padleft
18587 {{padleft:|2|x<nowiki/>y}}
18594 Strip marker in padright
18596 {{padright:|2|x<nowiki/>y}}
18603 Strip marker in anchorencode
18605 {{anchorencode:x<nowiki/>y}}
18612 nowiki inside link inside heading (bug 18295)
18614 ==[[foo|x<nowiki>y</nowiki>z]]==
18616 <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>
18621 new support for bdi element (bug 31817)
18623 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18625 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
18630 Ignore pipe between table row attributes
18634 |- id=foo | style='color: red'
18642 <tr id="foo" style="color: red">
18649 Gallery override link with WikiLink (bug 34852)
18652 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
18655 <ul class="gallery mw-gallery-traditional">
18656 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18657 <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>
18658 <div class="gallerytext">
18668 Gallery override link with absolute external link (bug 34852)
18671 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
18674 <ul class="gallery mw-gallery-traditional">
18675 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18676 <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>
18677 <div class="gallerytext">
18687 Gallery override link with malicious javascript (bug 34852)
18690 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
18693 <ul class="gallery mw-gallery-traditional">
18694 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18695 <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>
18696 <div class="gallerytext">
18706 Gallery with invalid title as link (bug 43964)
18709 File:foobar.jpg|link=<
18712 <ul class="gallery mw-gallery-traditional">
18713 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18714 <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>
18715 <div class="gallerytext">
18723 Language parser function
18732 Padleft and padright as substr
18734 {{padleft:|3|abcde}}
18735 {{padright:|3|abcde}}
18743 Special parser function
18745 {{#special:RandomPage}}
18746 {{#special:BaDtItLe}}
18747 {{#special:Foobar}}
18756 Bug 34939 - Case insensitive link parsing ([HttP://])
18758 [HttP://MediaWiki.Org/]
18760 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
18763 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
18767 Bug 34939 - Case insensitive link parsing ([HttP:// title])
18769 [HttP://MediaWiki.Org/ MediaWiki]
18771 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
18776 Bug 34939 - Case insensitive link parsing (HttP://)
18778 HttP://MediaWiki.Org/
18780 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
18783 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
18801 <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>
18802 <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>
18803 <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>
18804 <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>
18805 <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>
18811 ### Parsoid-specific tests
18812 ### Parsoid-PHP parser incompatibilities
18815 1. SOL-sensitive wikitext tokens as template-args
18817 parsoid=wt2html,wt2wt
18823 <span about="#mwt1" typeof="mw:Transclusion">
18824 </span><ul about="#mwt1"><li>a</li>
18826 <span about="#mwt2" typeof="mw:Transclusion">
18827 </span><ol about="#mwt2"><li>a</li>
18829 <span about="#mwt3" typeof="mw:Transclusion">
18830 </span><dl about="#mwt3"><dd>a</dd>
18834 #### -----------------------------------------------------------------
18835 #### Parsoid-specific functionality tests
18836 #### -----------------------------------------------------------------
18838 # Bug 63642: Formatting elt fixup is cleaned up.
18839 # We know wt2wt will fail, but we expect selser to pass.
18840 # Due to the nature of our testing, wt2wt and selser tests will enter the
18841 # blacklist and we'll catch selser regressions based on changes to the
18842 # blacklist entries for selser tests.
18844 Bad treebuilder fixup of formatting elt is cleaned up
18846 parsoid=wt2html,wt2wt
18851 [[Image:Foobar.jpg|right|Test]]
18857 <p><small></small></p>
18858 <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>
18863 #### ----------------------------------------------------------------
18864 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
18865 #### tags. Parsoid's output for these tags differs from that of the
18867 #### ----------------------------------------------------------------
18870 Ref: 1. ref-location should be replaced with an index span
18875 B <ref name="x">foo</ref>
18878 <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>
18879 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>
18880 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>
18884 Ref: 2. ref-tags with identical names should all get the same index
18888 A <ref name="x">foo</ref>
18891 <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>
18892 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>
18896 Ref: 3. spaces in ref-names should be ignored
18900 A <ref name="x">foo</ref>
18901 B <ref name=" x " />
18904 <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>
18905 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>
18906 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>
18910 Ref: 4. 'constructor' should be accepted as a valid ref-name
18911 (NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
18915 A <ref name="constructor">foo</ref>
18917 <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>
18921 Ref: 5. body should accept generic wikitext
18926 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
18931 <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>
18933 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
18934 <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>
18940 Ref: 6. indent-pres should not be output in ref-body
18952 <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>
18954 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'>
18955 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
18963 Ref: 7. No p-wrapping in ref-body
18982 <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>
18984 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
18985 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo
19000 Ref: 8. transclusion wikitext has lower precedence
19004 A <ref> foo {{echo|</ref> B C}}
19008 <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>
19009 <ol class="references" typeof="mw:Extension/references" data-mw="{"name":"references","attrs":{}}">
19010 <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>
19015 Ref: 9. unclosed comments should not leak out of ref-body
19019 A <ref> foo <!--</ref> B C
19022 <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>
19023 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19024 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo </li>
19029 Ref: 10. Unclosed HTML tags should not leak out of ref-body
19033 A <ref> <b> foo </ref> B C
19037 <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>
19040 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
19041 <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>
19046 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
19053 <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
19054 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>
19058 Ref: 12. ref-tags act as trailing newline migration barrier
19062 <!--the newline at the end of this line moves out of the p-tag-->a
19064 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
19069 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
19072 <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>
19073 <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>
19080 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
19088 <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
19089 <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>
19093 Ref: 14. A nested ref-tag should be emitted as plain text
19097 <ref>foo <ref>bar</ref> baz</ref>
19101 <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>
19103 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"<references />"}' data-mw='{"name":"references","attrs":{}}'>
19104 <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>
19109 Ref: 15. ref-tags with identical names should get identical indexes
19113 A1 <ref name="a">foo</ref> A2 <ref name="a" />
19114 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
19118 <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>
19119 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>
19121 <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>
19125 ## We don't bother wt2wt-ing non-standard whitespace
19127 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
19135 <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>
19137 <ol class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'>
19138 <li id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> foo</li></ol>
19142 References: 1. references tag without any refs should be handled properly
19148 <ol about="#mwt2" class="references" typeof="mw:Extension/references" data-mw='{"name":"references","attrs":{}}'></ol>
19152 References: 2. references tag with group only outputs references from that group
19156 A <ref group="a">foo</ref>
19157 B <ref group="b">bar</ref>
19159 <references group="a" />
19161 <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>
19162 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>
19164 <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>
19169 References: 3. ref list should be cleared after processing references
19181 <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>
19183 <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>
19186 <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>
19188 <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>
19193 References: 4. only referenced group should be cleared after processing references
19197 A <ref group="a">afoo</ref>
19200 <references group="a" />
19206 <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>
19207 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>
19209 <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>
19212 <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>
19214 <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>
19219 References: 5. ref tags in references should be processed while ignoring all other content
19224 B <ref name="b">bar</ref>
19227 <ref name="a">foo</ref>
19228 This should just get lost.
19231 <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>
19232 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>
19235 <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":{}}'>
19236 <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>
19237 <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>
19242 References: 6. <references /> from a transclusion
19246 <ref>Foo</ref> {{echo|<references />}}
19248 <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>
19252 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
19256 A <ref>foo bar for a</ref>
19257 B <ref group="X" name="b" />
19261 <references group="X">
19262 <ref name="b">foo</ref>
19265 <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>
19266 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>
19268 <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>
19270 <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>
19274 Entities in ref name
19278 <ref name="test & me">hi</ref>
19280 <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>
19283 # This test is wt2html only because we're permitting the serializer to produce
19284 # dirty diffs, normalizing the unclosed references to the self-closed version.
19286 Generate references for unclosed references tag
19294 <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>
19297 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-parsoid='{"src":"<references>"}' data-mw='{"name":"references","attrs":{}}'>
19298 <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>
19302 New reference serializes on its own line
19304 parsoid=wt2wt,html2wt
19309 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
19312 #### ----------------------------------------------------------------
19313 #### The following section of tests are primarily to test
19314 #### wikitext escaping capabilities of Parsoid. Given that
19315 #### escaping can be done any number of ways, the wikitext (input)
19316 #### is always adjusted to reflect how Parsoid adds nowiki
19319 #### We are marking several tests as parsoid-only since the
19320 #### HTML in the result section is different from what the
19321 #### PHP parser generates for it.
19322 #### ----------------------------------------------------------------
19325 #### --------------- Headings ---------------
19327 #### 1. Nested inside html <h1>=foo=</h1>
19328 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
19329 #### 3. Nested inside html with wikitext split by html tags
19330 #### 4. No escape needed
19331 #### 5. Empty headings <h1></h1>
19332 #### 6. Heading chars in SOL context
19333 #### ----------------------------------------
19335 Headings: 0. Unnested
19339 <nowiki>=foo=</nowiki>
19341 <nowiki> =foo= </nowiki>
19343 <nowiki>=foo=</nowiki>
19345 =foo''a''<nowiki>=</nowiki>
19347 <p><span typeof="mw:Nowiki">=foo=</span></p>
19349 <p><span typeof="mw:Nowiki"> =foo= </span>
19351 <span typeof="mw:Nowiki">=foo=</span></p>
19353 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
19357 Headings: 1. Nested inside html
19358 (New headings and existing headings are handled differently)
19368 =<nowiki>=foo=</nowiki>=
19369 ==<nowiki>=foo=</nowiki>==
19370 ===<nowiki>=foo=</nowiki>===
19371 ====<nowiki>=foo=</nowiki>====
19372 =====<nowiki>=foo=</nowiki>=====
19373 ======<nowiki>=foo=</nowiki>======
19380 <h1 data-parsoid='{}'>=foo=</h1>
19381 <h2 data-parsoid='{}'>=foo=</h2>
19382 <h3 data-parsoid='{}'>=foo=</h3>
19383 <h4 data-parsoid='{}'>=foo=</h4>
19384 <h5 data-parsoid='{}'>=foo=</h5>
19385 <h6 data-parsoid='{}'>=foo=</h6>
19389 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
19394 <nowiki>*</nowiki>bar
19400 <nowiki>=bar=</nowiki>
19408 Headings: 3. Nested inside html with wikitext split by html tags
19412 = ='''bold'''<nowiki>foo=</nowiki> =
19414 <h1>=<b>bold</b><span typeof="mw:Nowiki">foo=</span></h1>
19418 Headings: 4a. No escaping needed (testing just h1 and h2)
19436 = <nowiki>=</nowiki> =
19444 <h1><i>=</i>foo=</h1>
19445 <h1><span typeof="mw:Nowiki">=</span></h1>
19449 Headings: 4b. No escaping needed (inside p-tags)
19464 Headings: 5. Empty headings
19476 =====<nowiki/>=====
19478 ======<nowiki/>======
19489 Headings: 6a. Heading chars in SOL context (with trailing spaces)
19493 <nowiki>=a=</nowiki>
19495 <nowiki>=a=</nowiki>
19497 <nowiki>=a=</nowiki>
19499 <nowiki>=a=</nowiki>
19508 Headings: 6b. Heading chars in SOL context (with trailing newlines)
19536 Headings: 6c. Heading chars in SOL context (leading newline break)
19541 <nowiki>=b=</nowiki>
19548 Headings: 6d. Heading chars in SOL context (with interspersed comments)
19552 <!--c0--><nowiki>=a=</nowiki>
19554 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
19556 <p><!--c0-->=a=</p>
19557 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
19561 Headings: 6d. Heading chars in SOL context (No escaping needed)
19570 #### --------------- Lists ---------------
19571 #### 0. Outside nests (*foo, etc.)
19572 #### 1. Nested inside html <ul><li>*foo</li></ul>
19573 #### 2. Inside definition lists
19574 #### 3. Only bullets at start should be escaped
19575 #### 4. No escapes needed
19576 #### 5. No unnecessary escapes
19577 #### 6. Escape bullets in SOL position
19578 #### 7. Escape bullets in a multi-line context
19579 #### ----------------------------------------
19582 Lists: 0. Outside nests
19584 <nowiki>*</nowiki>foo
19586 <nowiki>#</nowiki>foo
19588 <nowiki>;Foo:</nowiki>bar
19597 Lists: 1. Nested inside html
19599 *<nowiki>*foo</nowiki>
19601 *<nowiki>#foo</nowiki>
19603 *<nowiki>:foo</nowiki>
19605 *<nowiki>;foo</nowiki>
19607 #<nowiki>*foo</nowiki>
19609 #<nowiki>#foo</nowiki>
19611 #<nowiki>:foo</nowiki>
19613 #<nowiki>;foo</nowiki>
19615 <ul><li>*foo</li></ul>
19616 <ul><li>#foo</li></ul>
19617 <ul><li>:foo</li></ul>
19618 <ul><li>;foo</li></ul>
19619 <ol><li>*foo</li></ol>
19620 <ol><li>#foo</li></ol>
19621 <ol><li>:foo</li></ol>
19622 <ol><li>;foo</li></ol>
19627 Lists: 2. Inside definition lists
19629 ;<nowiki>;foo</nowiki>
19631 ;<nowiki>:foo</nowiki>
19633 ;<nowiki>:foo</nowiki>
19636 :<nowiki>:foo</nowiki>
19638 <dl><dt>;foo</dt></dl>
19639 <dl><dt>:foo</dt></dl>
19642 <dl><dd>:foo</dd></dl>
19647 Lists: 3. Only bullets at start of text should be escaped
19649 *<nowiki>*foo*bar</nowiki>
19651 *<nowiki>*foo</nowiki>''it''*bar
19653 <ul><li>*foo*bar</li></ul>
19654 <ul><li>*foo<i>it</i>*bar</li></ul>
19659 Lists: 4. No escapes needed
19680 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
19684 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
19690 Lists: 5. No unnecessary escapes
19692 * bar <span><nowiki>[[foo]]</nowiki></span>
19694 *=bar <span><nowiki>[[foo]]</nowiki></span>
19696 *[[bar <span><nowiki>[[foo]]</nowiki></span>
19698 *]]bar <span><nowiki>[[foo]]</nowiki></span>
19700 *=bar <span>foo]]</span>=
19704 <ul><li> bar <span>[[foo]]</span></li></ul>
19705 <ul><li>=bar <span>[[foo]]</span></li></ul>
19706 <ul><li>[[bar <span>[[foo]]</span></li></ul>
19707 <ul><li>]]bar <span>[[foo]]</span></li></ul>
19708 <ul><li>=bar <span>foo]]</span>=</li></ul>
19709 <ul><li> <s></s>: a</li></ul>
19714 Lists: 6. Escape bullets in SOL position
19718 <!--cmt--><nowiki>*foo</nowiki>
19720 <p><!--cmt--><span typeof="mw:Nowiki">*foo</span></p>
19724 Lists: 7. Escape bullets in a multi-line context
19727 <nowiki>*</nowiki>b
19734 #### --------------- HRs ---------------
19735 #### 1. Single line
19736 #### -----------------------------------
19739 HRs: 1. Single line
19743 ----<nowiki>----</nowiki>
19747 <hr><span typeof="mw:Nowiki">----</span>
19752 #### --------------- Tables ---------------
19753 #### 1a. Simple example
19754 #### 1b. No escaping needed (!foo)
19755 #### 1c. No escaping needed (|foo)
19756 #### 1d. No escaping needed (|}foo)
19758 #### 2a. Nested in td (<td>foo|bar</td>)
19759 #### 2b. Nested in td (<td>foo||bar</td>)
19760 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
19762 #### 3a. Nested in th (<th>foo!bar</th>)
19763 #### 3b. Nested in th (<th>foo!!bar</th>)
19764 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
19768 #### 4c. No escaping needed
19769 #### --------------------------------------
19772 Tables: 1a. Simple example
19783 Tables: 1b. No escaping needed
19792 Tables: 1c. No escaping needed
19801 Tables: 1d. No escaping needed
19810 Tables: 2a. Nested in td
19815 |<nowiki>foo|bar</nowiki>
19817 |x<div><nowiki>a|b</nowiki></div>
19821 <td>foo|bar</td></tr>
19822 <tr><td>x<div>a|b</div></td>
19827 Tables: 2b. Nested in td
19832 |<nowiki>foo||bar</nowiki>
19833 |''it''<nowiki>foo||bar</nowiki>
19837 <td><span typeof="mw:Nowiki">foo||bar</span></td>
19838 <td><i>it</i><span typeof="mw:Nowiki">foo||bar</span></td></tr></tbody></table>
19842 Tables: 2c. Nested in td -- no escaping needed
19850 <table><tbody><tr><td>foo!!bar
19851 </td></tr></tbody></table>
19856 Tables: 3a. Nested in th
19864 <table><tbody><tr><th>foo!bar
19865 </th></tr></tbody></table>
19870 Tables: 3b. Nested in th
19875 !<nowiki>foo!!bar</nowiki>
19879 <tbody><tr><th><span typeof="mw:Nowiki">foo!!bar</span></th></tr>
19884 Tables: 3c. Nested in th -- no escaping needed
19889 !<nowiki>foo||bar</nowiki>
19893 <th><span typeof="mw:Nowiki">foo||bar</span></th></tr></tbody></table>
19897 Tables: 4a. Escape -
19904 |<nowiki>-bar</nowiki>
19908 <tr><th>-bar</th></tr>
19910 <td><span typeof="mw:Nowiki">-bar</span></td></tr></tbody></table>
19914 Tables: 4b. Escape +
19921 |<nowiki>+bar</nowiki>
19925 <tr><th>+bar</th></tr>
19927 <td><span typeof="mw:Nowiki">+bar</span></td></tr></tbody></table>
19931 Tables: 4c. No escaping needed
19952 <tr><td>foo-bar</td><td>foo+bar</td></tr>
19953 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
19959 <div>a|b</div></td>
19964 Tables: 4d. No escaping needed
19975 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
19976 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
19977 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
19982 Tables: Digest broken attributes on table and tr tag
19998 #### --------------- Links ----------------
19999 #### 1. Quote marks in link text
20000 #### 2. Wikilinks: Escapes needed
20001 #### 3. Wikilinks: No escapes needed
20002 #### 4. Extlinks: Escapes needed
20003 #### 5. Extlinks: No escapes needed
20004 #### --------------------------------------
20006 Links 1. Quote marks in link text
20010 [[Foo|Foo<nowiki>''boo''</nowiki>]]
20012 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
20016 Links 2. WikiLinks: Escapes needed
20021 [[Foo|<nowiki>Foobar]</nowiki>]]
20022 [[Foo|x [Foobar] x]]
20023 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
20024 [[Foo|<nowiki>[[Bar]]</nowiki>]]
20025 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
20026 [[Foo|<nowiki>|Bar</nowiki>]]
20027 [[Foo|<nowiki>]]bar</nowiki>]]
20028 [[Foo|<nowiki>[[bar</nowiki>]]
20029 [[Foo|<nowiki>x [[ y</nowiki>]]
20030 [[Foo|<nowiki>x ]] y</nowiki>]]
20031 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
20033 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
20034 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
20035 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
20036 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
20037 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
20038 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
20039 <a href="Foo" rel="mw:WikiLink">|Bar</a>
20040 <a href="Foo" rel="mw:WikiLink">]]bar</a>
20041 <a href="Foo" rel="mw:WikiLink">[[bar</a>
20042 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
20043 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
20044 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
20048 Links 3. WikiLinks: No escapes needed
20055 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
20056 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
20060 Links 4. ExtLinks: Escapes needed
20064 [http://google.com <nowiki>[google]</nowiki>]
20065 [http://google.com <nowiki>google]</nowiki>]
20067 <nowiki>[http://google.com]</nowiki>
20069 <nowiki>[http://google.com google]</nowiki>
20072 <p><a href="http://google.com" rel="mw:ExtLink">[google]</a>
20073 <a href="http://google.com" rel="mw:ExtLink">google]</a></p>
20074 <p>[http://google.com]</p>
20075 <p>[http://google.com google]</p>
20079 Links 5. ExtLinks: No escapes needed
20083 [http://google.com [google]
20085 <a href="http://google.com" rel="mw:ExtLink">[google</a>
20089 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
20091 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
20092 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
20093 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
20094 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
20095 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
20096 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
20097 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20098 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
20099 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
20100 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
20101 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
20102 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
20103 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
20106 x<nowiki/>http://example.com<nowiki/>y
20107 http://example.com<nowiki/>?x
20108 http://example.com<nowiki/>&x
20109 http://example.com<nowiki/>'x
20110 http://example.com<nowiki/>,x
20111 http://example.com<nowiki/>.x
20112 http://example.com<nowiki/>;x
20113 http://example.com<nowiki/>:x
20114 http://example.com<nowiki/>;x
20115 http://example.com<nowiki/>!x
20116 http://example.com<nowiki/>=x
20117 http://example.com<nowiki/>(x)
20118 http://example.com(x<nowiki/>)
20122 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20125 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
20127 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
20128 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
20129 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
20130 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
20131 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
20137 "http://example.com"
20138 (http://example.com)
20139 (http://example.com) foo
20140 http://example.com,
20141 http://example.com, foo
20144 ## Parsoid currently fails wt2html on this one!
20146 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
20148 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?</p>
20150 http://example.com.,;:!?
20154 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
20156 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4</p>
20162 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
20164 <p>x<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20165 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
20166 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
20167 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
20177 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
20179 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
20185 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
20187 <p>x<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20188 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
20189 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
20190 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
20200 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
20202 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
20203 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
20204 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
20207 ISBN 1234567890<nowiki/>1
20208 ISBN 1234567890<nowiki/>x
20209 ISBN 1234567890<nowiki/>b
20213 Links 12. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
20215 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
20220 #### --------------- Quotes ---------------
20221 #### 1. Quotes inside <b> and <i>
20222 #### 2. Link fragments separated by <i> and <b> tags
20223 #### 3. Link fragments inside <i> and <b>
20224 #### 4. No escaping needed
20225 #### --------------------------------------
20227 1. Quotes inside <b> and <i>
20229 parsoid=html2wt,wt2wt
20231 ''<nowiki>'foo'</nowiki>''
20232 ''<nowiki>''foo''</nowiki>''
20233 ''<nowiki>'''foo'''</nowiki>''
20235 '''<nowiki>'foo'</nowiki>'''
20236 '''<nowiki>''foo''</nowiki>'''
20237 '''<nowiki>'''foo'''</nowiki>'''
20238 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
20239 '''foo'''<nowiki/>'s
20242 '<nowiki/>''foo''<nowiki/>'
20244 '''foo'''<nowiki/>'
20245 '<nowiki/>'''foo'''<nowiki/>'
20246 ''fools'<span> errand</span>''
20247 ''<span>fool</span>'s errand''
20256 <b>foo'<i>bar'</i>baz</b>
20264 <i>fools'<span> errand</span></i>
20265 <i><span>fool</span>'s errand</i>
20269 2. Link fragments separated by <i> and <b> tags
20271 [[''foo''<nowiki>hello]]</nowiki>
20273 [['''foo'''<nowiki>hello]]</nowiki>
20275 <p>[[<i>foo</i>hello]]
20276 </p><p>[[<b>foo</b>hello]]
20281 3. Link fragments inside <i> and <b>
20282 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
20283 this is one of the shortcomings of this format)
20285 ''[[foo''<nowiki>]]</nowiki>
20287 '''[[foo'''<nowiki>]]</nowiki>
20290 </p><p><b>[[foo</b>]]
20295 4. No escaping needed
20297 '<span>''bar''</span>'
20298 '<span>'''bar'''</span>'
20300 <p>'<span><i>bar</i></span>'
20301 '<span><b>bar</b></span>'
20305 #### ----------- Paragraphs ---------------
20306 #### 1. No unnecessary escapes
20307 #### --------------------------------------
20310 1. No unnecessary escapes
20312 bar <span><nowiki>[[foo]]</nowiki></span>
20314 =bar <span><nowiki>[[foo]]</nowiki></span>
20316 [[bar <span><nowiki>[[foo]]</nowiki></span>
20318 ]]bar <span><nowiki>[[foo]]</nowiki></span>
20320 =bar <span>foo]]</span><nowiki>=</nowiki>
20322 <p>bar <span>[[foo]]</span>
20323 </p><p>=bar <span>[[foo]]</span>
20324 </p><p>[[bar <span>[[foo]]</span>
20325 </p><p>]]bar <span>[[foo]]</span>
20326 </p><p>=bar <span>foo]]</span>=
20330 #### ----------------------- PRE --------------------------
20331 #### 1. Leading whitespace in SOL context should be escaped
20332 #### ------------------------------------------------------
20334 1. Leading whitespace in SOL context should be escaped
20338 <nowiki> </nowiki>a
20340 <nowiki> </nowiki> a
20342 <nowiki> </nowiki>a(tab)
20344 <nowiki> </nowiki> a
20346 <nowiki> </nowiki> a
20349 <nowiki> </nowiki>b
20352 <nowiki> </nowiki>b
20355 <nowiki> </nowiki> b
20361 <p><!--cmt--> a</p>
20371 2. Leading whitespace in non-indent-pre contexts should not be escaped
20378 <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>
20382 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
20401 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
20405 [[File:Foobar.jpg|thumb|caption]]
20408 <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>
20412 5. Nowiki escaping should account for indent-pres
20421 #### --------------- Behavior Switches --------------------
20423 1. Valid behavior switches should be escaped
20427 <nowiki>__TOC__</nowiki>
20428 ''<nowiki>__TOC__</nowiki>''
20435 2. Invalid behavior switches should not be escaped
20446 #### --------------- HTML tags ---------------
20449 #### 3. multi-line html tag
20450 #### 4. extension tags
20451 #### -----------------------------------------
20457 <a href="http://google.com">google</a>
20459 <a href="http://google.com">google</a>
20465 <nowiki><div>foo</div>
20466 <div style="color:red">foo</div></nowiki>
20468 <p><div>foo</div>
20469 <div style="color:red">foo</div>
20474 3. multi-line html tag
20489 <nowiki><ref>foo</ref></nowiki>
20491 <nowiki><ref>bar</nowiki>
20493 baz<nowiki></ref></nowiki>
20495 <p><ref>foo</ref>
20496 </p><p><ref>bar
20497 </p><p>baz</ref>
20501 #### --------------- Others ---------------
20505 <nowiki>foo</nowiki>
20507 <p><nowiki>foo</nowiki>
20511 ## The quote-char in the input is necessary for triggering the bug
20513 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
20515 parsoid=wt2wt,html2wt
20524 Tag-like HTML structures are passed through as text
20546 </p><p>1<d e>f
20551 # This was a bug in the PHP parser (see bug 17663 and its dups,
20552 # https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
20554 Tag names followed by punctuation should not be recognized as tags
20558 <p><s.ome> text
20563 HTML tag with necessary entities in attributes
20565 <span title="&amp;">foo</span>
20567 <p><span title="&amp;">foo</span>
20572 HTML tag with 'unnecessary' entity encoding in attributes
20574 <span title="&">foo</span>
20576 <p><span title="&">foo</span>
20581 HTML tag with broken attribute value quoting
20583 <span title="Hello world>Foo</span>
20585 <p><span>Foo</span>
20588 <p><span title="Hello world">Foo</span>
20593 Parsoid-only: HTML tag with broken attribute value quoting
20597 <span title="Hello world>Foo</span>
20599 <p><span title="Hello world">Foo</span>
20604 Table with broken attribute value quoting
20607 | title="Hello world|Foo
20618 <td title="Hello world">Foo
20624 Table with broken attribute value quoting on consecutive lines
20627 | title="Hello world|Foo
20628 | style="color:red|Bar
20641 Parsoid-only: Table with broken attribute value quoting on consecutive lines
20646 | title="Hello world|Foo
20647 | style="color:red|Bar
20652 <td title="Hello world">Foo
20653 </td><td style="color: red">Bar
20654 </td></tr></tbody></table>
20659 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
20669 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
20679 Accept empty td cell attribute
20682 | align="center" | foo || |
20687 <td align="center"> foo </td>
20694 Non-empty attributes in th-cells
20697 ! Foo !! style="color: red" | Bar
20703 <th style="color: red"> Bar
20709 Accept empty attributes in th-cells
20724 Empty table rows go away
20745 ### Parsoid-centric tests for testing RTing of inter-element separators
20746 ### Edge cases not tested by existing parser tests and specific to
20747 ### Parsoid-specific serialization strategies.
20751 RT-ed inter-element separators should be valid separators
20764 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
20765 (Parsoid-only since PHP parser relies on Tidy for correct output)
20781 Empty TD followed by TD with tpl-generated attribute
20786 |{{echo|style='color:red'}}|foo
20800 Indented table with an empty td
20819 Indented block & table
20833 <div data-parsoid='{"stx":"html"}'>foo</div>
20835 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
20840 Indent and comment before table row
20854 <table data-parsoid='{}'>
20855 <!--hi--><tbody data-parsoid='{}'><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
20856 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
20861 Empty TR followed by a template-generated TR
20862 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
20868 {{echo|<tr><td>foo</td></tr>}}
20874 <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}}]}'>
20879 ## PHP and parsoid output differ for this, and since this is primarily
20880 ## for testing Parsoid's serializer, marking this Parsoid only
20882 Empty TR followed by mixed-ws-comment line should RT correctly
20898 <!--c--> </tr><!--d-->
20904 Multi-line image caption generated by templates with/without trailing newlines
20908 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
20909 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
20911 <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>
20912 <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>
20917 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
20921 <includeonly>foo</includeonly>
20928 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
20930 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid=''/><h1>new heading</h1>
20933 ## PHP emits broken html for this, and since this is primarily
20934 ## a Parsoid serializer test, marking this Parsoid only
20936 Improperly nested inline or quotes tags with whitespace in between
20940 <span> <s>x</span> </s>
20943 <p><span> <s>x</s></span><s> </s>
20944 <b> <i>x</i></b><i> </i>
20949 Encapsulate protected attributes from wt
20953 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
20955 <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>
20959 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
20960 ## Having nested or stray pre tags results in the attempt to add duplicates,
20961 ## causing an assertion fail. This test tries to prevent that situation.
20963 Ensure ParagraphWrapper can deal with stray closing pre tags
20973 1. Ensure fostered text content is wrapped in spans
20977 <table>hi</table><table>ho</table>
20986 2. Ensure fostered text content is wrapped in spans (traps regressions around fostered marker on the span getting lost)
20988 parsoid=wt2html,wt2wt
20995 <span> || ||</span>
21004 Encapsulation properly handles null DSR information from foster box
21006 parsoid=wt2html,wt2wt
21008 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
21010 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
21013 <td>bar</td></tr></table>"}},"i":0}}]}">foo</span>
21017 <td>bar</td></tr></tbody></table>
21021 1. Encapsulate foster-parented transclusion content
21023 parsoid=wt2wt,wt2html
21025 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
21027 <span typeof="mw:Transclusion" data-mw="{"parts":["
21028 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo
21030 <td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</span>
21034 <td>bar</td></tr></tbody></table>
21038 2. Encapsulate foster-parented transclusion content
21040 parsoid=wt2wt,wt2html
21042 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
21044 <div typeof="mw:Transclusion" data-mw="{"parts":["
21046 <div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div>
21048 <td>bar</td></tr></table>"]}">foo</div>
21052 <td>bar</td></tr></tbody></table>
21056 3. Encapsulate foster-parented transclusion content
21058 parsoid=wt2wt,wt2html
21060 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21062 <div typeof="mw:Transclusion" data-mw="{"parts":["
21065 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
21067 <td>"}},"i":0}},"bar</td></tr></table>"]}">
21072 <td>bar</td></tr></tbody></table>
21076 4. Encapsulate foster-parented transclusion content
21078 parsoid=wt2wt,wt2html
21080 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
21082 <div typeof="mw:Transclusion" data-mw="{"parts":["
21085 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div>
21087 <td>"}},"i":0}},"bar</td></tr></table>"]}">
21092 <td>bar</td></tr></tbody></table>
21096 5. Encapsulate foster-parented transclusion content
21098 parsoid=wt2wt,wt2html
21100 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
21102 <span typeof="mw:Transclusion" data-mw="{"parts":["
21107 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</span>
21113 <p>foo</p></div></td></tr></tbody></table>
21117 6. Encapsulate foster-parented transclusion content
21119 parsoid=wt2wt,wt2html
21121 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
21123 <span typeof="mw:Transclusion" data-mw="{"parts":["
21128 <p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</span>
21134 <p>foo</p></div></td></tr></tbody></table>
21139 7. Encapsulate foster-parented transclusion content
21141 parsoid=wt2wt,wt2html
21143 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
21145 <p typeof="mw:Transclusion" data-mw="{"parts":["
21146 <table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"
21147 <p>foo</p>"}},"i":0}},"
21148 <td>bar</td></table>"]}">foo</p>
21152 <td>bar</td></tr></tbody></table>
21156 8. Encapsulate foster-parented transclusion content
21158 parsoid=wt2wt,wt2html
21161 }}{|{{echo|style='color:red'}}
21166 <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>
21170 <td>b</td></tr></tbody></table>
21174 9. Encapsulate foster-parented transclusion content
21176 parsoid=wt2wt,wt2html
21178 <table>{{echo|hi</table>hello}}
21180 <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>
21181 <table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2" data-parsoid="{}">hello</span>
21185 Table in fosterable position
21187 parsoid=wt2html,wt2wt
21196 <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="{}">
21198 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
21204 # Parsoid only for bug 64747
21206 Properly encapsulate empty-content transclusions in fosterable positions
21214 <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>"}'>
21220 Support <object> element with .data attribute
21224 <object data="test.swf"></object>
21226 <object data="test.swf"></object>
21229 # -----------------------------------------------------------------
21230 # The following section of tests are primarily to spec requirements
21231 # around serialization of new/edited content.
21233 # All these tests are marked Parsoid html2wt and html2html only
21234 # ----------------------------------------------------------------
21237 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
21244 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Foo">Foo</a></p>
21248 Image: Modifying size of an image (1)
21251 "modes": ["wt2wt"],
21253 ["img[height]", "attr", "height", "22"],
21254 ["img[width]", "attr", "width", "200"]
21258 [[Image:Foobar.jpg|230x230px]]
21260 [[Image:Foobar.jpg|200x200px]]
21264 Image: Modifying size of an image (2)
21267 "modes": ["wt2wt"],
21269 ["img[height]", "attr", "height", "100"],
21270 ["img[width]", "attr", "width", "500"]
21274 [[Image:Foobar.jpg|230x230px]]
21276 [[Image:Foobar.jpg|500x500px]]
21279 # Change in size is ignored so long as class='mw-default-size'
21281 Image: Modifying size of an image (3)
21284 "modes": ["wt2wt"],
21286 ["figure[class]", "removeClass", "mw-default-size"],
21287 ["figure img", "attr", "height", "19"],
21288 ["figure img", "attr", "width", "170"]
21292 [[Image:Foobar.jpg|thumb]]
21294 [[Image:Foobar.jpg|thumb|170x170px]]
21298 Image: Modifying alignment of an image (bug 48665)
21301 "modes": ["wt2wt"],
21303 ["figure[class]", "removeClass", "mw-halign-right"],
21304 ["figure[class]", "addClass", "mw-halign-left"]
21308 [[Image:Foobar.jpg|thumb|caption|right]]
21310 [[Image:Foobar.jpg|thumb|caption|left]]
21314 Image: Modifying mw-default-size of an frameless image (bug 62805)
21317 "modes": ["wt2wt"],
21319 ["figure.mw-default-size", "removeClass", "mw-default-size"]
21323 [[Image:Foobar.jpg|frameless|right]]
21325 [[Image:Foobar.jpg|frameless|right|220x220px]]
21329 Image: Modifying valign of an image (bug 49221)
21332 "modes": ["wt2wt"],
21334 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
21335 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
21339 [[File:Foobar.jpg|20px|middle]]
21341 [[File:Foobar.jpg|20px|text-top]]
21345 Image: Modifying alt attribute of an image (bug 56400)
21348 "modes": ["wt2wt"],
21350 ["img[alt]", "attr", "alt", "some alternate edited text"]
21354 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
21356 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
21360 Image: Modifying caption of an image
21363 "modes": ["wt2wt"],
21365 ["figcaption", "text", "new caption"]
21369 [[Image:Foobar.jpg|thumb|original caption]]
21371 [[Image:Foobar.jpg|thumb|new caption]]
21375 Image: empty alt attribute (bug 48924)
21379 [[File:Foobar.jpg|thumb|alt=|bar]]
21381 <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>
21385 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
21390 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
21392 #<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>
21396 Image: Block level image should have \n before and after
21401 [[File:Foobar.jpg|right|thumb|150x150px]]
21404 <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>
21408 Image: New block level image should have \n before and after (existing
21414 [[File:Foobar.jpg|right|thumb|150x150px]]
21417 <p data-parsoid='{"dsr":[0,3,0,0]}'>123</p>
21418 <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>
21419 <p data-parsoid='{"dsr":[46,49,0,0]}'>456</p>
21423 Image: upright option (parsoid)
21427 [[File:Foobar.jpg|thumb|upright|caption]]
21428 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
21429 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
21431 <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>
21435 Image: upright option is ignored on inline and frame images (parsoid)
21439 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
21441 <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>
21445 Image: from basic HTML (1)
21449 <span typeof="mw:Image">
21450 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21453 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21457 Image: from basic HTML (2)
21461 <img src="File:Foobar.jpg" width=100 height=100 alt="Alt">
21463 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
21467 Image: from basic HTML (3)
21471 <a href="Main"><img src="File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
21473 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
21477 Image: from basic HTML (4)
21481 <img src="File:Foobar.jpg">
21483 [[File:Foobar.jpg|link=]]
21487 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
21494 <li><p>foo</p></li>
21499 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
21505 <ul> <li>foo</li></ul>
21509 Don't strip leading whitespace when handling indent-pre suppressing tags
21517 '''This is very bold of you!'''
21521 indented cell (no pre-wrapping!)
21528 <tr><td> indented row</td></tr>
21531 <b>This is very bold of you!</b>
21534 indented cell (no pre-wrapping!)
21542 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
21547 <nowiki> </nowiki><span>bar</span>
21550 <nowiki> </nowiki></span>bar2
21553 <nowiki> </nowiki><span>bar</span>
21556 <nowiki> </nowiki><span>foo</span>
21574 Lists: Add space after bullets
21580 * <span> baz</span>
21585 <li><span> baz</span></li>
21590 Lists: Dont insert newlines in a serialized list item.
21597 <ul><li>a<br>b</li><li>c</li></ul>
21601 Headings: Add space before/after == (Bug 51744)
21611 == <span> baz</span> ==
21616 <h2><span> baz</span></h2>
21620 Parsoid: Serialize positional parameters with = in them as named parameter
21626 {{echo|1 = f=oo|2 = bar}}
21628 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21629 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21630 {{echo|<nowiki>f=oo</nowiki>|bar}}
21632 <p about="#mwt1" typeof="mw:Transclusion"
21633 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
21635 <p about="#mwt1" typeof="mw:Transclusion"
21636 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
21638 <!--Orig params with data-parsoid has heuristics for handling = chars-->
21639 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
21640 <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>
21644 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
21660 <div>a<p>b</p></div>
21669 Substrings resembling wikitext in hrefs should not get nowiki escapes
21675 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
21678 #-----------------------------
21679 # I/B quote minimization tests
21680 #-----------------------------
21683 1. I/B quote minimization: wikitext-only tags should be combined
21703 <p><i>A</i><i>B</i></p>
21704 <p><b>A</b><b>B</b></p>
21705 <p><i>A</i><b><i>B</i></b></p>
21706 <p><b>A</b><i><b>B</b></i></p>
21707 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
21708 <p><i><b>A</b></i><i><b>B</b></i></p>
21709 <p><i><b>A</b></i><b><i>B</i></b></p>
21710 <p><b><i>A</i></b><i><b>B</b></i></p>
21714 2. I/B quote minimization: wikitext and html tags should not be combined
21720 ''A'''''<i>B</i>'''
21722 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
21723 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
21727 3. I/B quote minimization: templated content stops minimization
21731 ''A''{{echo|''B''}}
21733 ''A''{{echo|'''''B'''''}}
21735 <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>
21736 <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>
21740 4. I/B quote minimization: new content should be mimimized with adjacent old content
21750 <p><i>A</i><i data-parsoid='{}'>B</i></p>
21751 <p><b data-parsoid='{}'>A</b><b>B</b></p>
21752 <p><i>A</i><b data-parsoid='{}'><i data-parsoid='{}'>B</i></b></p>
21755 #------------------------------------
21756 # End of I/B quote minimization tests
21757 #------------------------------------
21760 Bug 54262: New entities
21766 <span typeof="mw:Entity"> </span>
21769 ## Note that there is no wikitext output for 'unknownproperty' ##
21770 ## Unknown magic words are silently dropped ##
21785 __NOCONTENTCONVERT__
21787 <meta property='mw:PageProp/toc' />
21788 <meta property='mw:PageProp/notoc' />
21789 <meta property='mw:PageProp/forcetoc' />
21790 <meta property='mw:PageProp/index' />
21791 <meta property='mw:PageProp/noindex' />
21792 <meta property='mw:PageProp/nogallery' />
21793 <meta property='mw:PageProp/noeditsection' />
21794 <meta property='mw:PageProp/notitleconvert' />
21795 <meta property='mw:PageProp/nocontentconvert' />
21796 <meta property='mw:PageProp/unknownproperty' />
21800 Consecutive <pre>s should not get merged
21802 parsoid=html2wt,html2html
21818 <pre>a</pre><pre>b</pre>
21832 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
21836 [[Special:BookSources/1234567890|ISBN 1234567895]]
21838 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
21842 Edited RFC links not serializable as RFC links should serialize as extlinks
21846 [//tools.ietf.org/html/rfc123 New RFC]
21848 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
21852 Edited PMID links not serializable as PMID links should serialize as extlinks
21856 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
21858 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
21862 Edited Redirect link should emit a non-piped wikitext link
21868 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
21871 # -----------------------------------------------------------------
21872 # End of section for Parsoid-only html2wt tests for serialization
21874 # -----------------------------------------------------------------
21881 Try for 100% code coverage