1 # MediaWiki Parser test cases
2 # Some taken from https://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 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
41 # For testing purposes, temporary articles can created:
42 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
43 # where '/' denotes a newline.
45 # This is the standard article assumed to exist.
82 MediaWiki:bad image list
84 * [[File:Bad.jpg]] except [[Nasty page]]
112 Template:echo_with_span
118 Template:echo_with_div
131 Template:table_attribs
134 |</noinclude>style="color:red;"|Foo
138 Template:table_attribs_2
141 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_3
149 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
153 Template:table_attribs_4
155 | style="background-color:#DC241f;" width="10px" |
159 Template:table_attribs_5
162 |</noinclude>style="color:red;"||Bar
166 Template:table_attribs_6
168 style="background: <nowiki>
175 Template:table_attribs_7
178 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
182 Template:table_header_cells
184 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
190 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
194 Template:PartialTable
201 Template:image_attribs
204 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
207 ## See T48811 for details
209 Template:mixed_attr_content_template
211 style="color:red;" title="T48811"
217 Template:definition_list
264 Template:EmptyTRWithHTMLAttrTest
267 <tr align="center"></tr>
268 <tr><td>foo</td></tr>
269 <tr align="center"></tr>
270 <tr><td>bar</td></tr>
277 <ref>{{CircularRef}}</ref>
295 <p><span about="#mwt1" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"CircularRef","href":"./Template:CircularRef"},"params":{},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
296 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">Error: Expansion loop detected at <a data-parsoid='{"a":{"href":null},"sa":{"href":"Template:CircularRef"}}'>Template:CircularRef</a></span></li></ol>
302 This is a simple paragraph.
304 <p>This is a simple paragraph.
309 Paragraphs with extra newline spacing
332 Paragraphs with newline spacing with comment lines in between
340 <!--foo--><!--More than 1 comment, still stripped-->
344 <!--foo--> <!----> <!-- bar -->
405 Paragraphs with newline spacing with non-empty white-space lines in between
432 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
440 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
479 Extra newlines: More paragraphs with indented comment
494 Extra newlines followed by heading
509 <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>
510 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
513 <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>
518 Extra newlines between heading and content are swallowed
526 <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>
527 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
534 http://fr.wikipedia.org/wiki/🍺
535 <!-- EasterEgg we love beer, better be able be able to link to it -->
537 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
541 # Note that the html+tidy output removes the spaces after the <li>,
542 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
543 # This is an issue for all tests with lists. We intentionally do
544 # *not* add html+tidy clauses for these, as we don't want to
545 # document/test the broken behavior. (Parsoid matches the non-tidy
546 # output in these cases.)
555 <li> Item 2</li></ul>
563 * plain''italic''plain
564 * plain''italic''plain''italic''plain
565 * plain'''bold'''plain
566 * plain'''bold'''plain'''bold'''plain
567 * plain''italic''plain'''bold'''plain
568 * plain'''bold'''plain''italic''plain
569 * plain''italic'''bold-italic'''italic''plain
570 * plain'''bold''bold-italic''bold'''plain
571 * plain'''''bold-italic'''italic''plain
572 * plain'''''bold-italic''bold'''plain
573 * plain''italic'''bold-italic'''''plain
574 * plain'''bold''bold-italic'''''plain
575 * plain l'''italic''plain
576 * plain l''''bold''' plain
579 <li> plain<i>italic</i>plain</li>
580 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
581 <li> plain<b>bold</b>plain</li>
582 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
583 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
584 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
585 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
586 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
587 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
588 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
589 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
590 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
591 <li> plain l'<i>italic</i>plain</li>
592 <li> plain l'<b>bold</b> plain</li></ul>
596 # this example taken from the [[simple:Moon]] article (bug 47326)
598 Italics and possessives (1)
600 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
602 <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
606 # this example taken from [[en:Flaming Pie]] (bug 49926)
608 Italics and possessives (2)
610 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
612 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
616 # this example taken from [[en:Dictionary]] (bug 49926)
618 Italics and possessives (3)
620 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''.
622 <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>.
628 ### 2-quote opening sequence tests
631 Italics and bold: 2-quote opening sequence: (2,2)
640 Italics and bold: 2-quote opening sequence: (2,3)
649 Italics and bold: 2-quote opening sequence: (2,4)
659 # same html as previous, but wikitext adjusted to match parsoid html2wt
661 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
663 ''foo<nowiki>''</nowiki>''
669 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
671 Italics and bold: 2-quote opening sequence: (2,5)
684 # same html as previous, but wikitext adjusted to match parsoid html2wt
686 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
688 ''foo'''''<nowiki/>'''
699 ### 3-quote opening sequence tests
703 Italics and bold: 3-quote opening sequence: (3,2)
712 Italics and bold: 3-quote opening sequence: (3,3)
721 Italics and bold: 3-quote opening sequence: (3,4)
729 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
731 Italics and bold: 3-quote opening sequence: (3,5)
744 # same html as previous, but wikitext adjusted to match parsoid html2wt
746 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
748 '''foo'''''<nowiki/>''
759 ### 4-quote opening sequence tests
763 Italics and bold: 4-quote opening sequence: (4,2)
773 # same html as previous, but wikitext adjusted to match parsoid html2wt
775 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
777 <nowiki>''</nowiki>''foo''
784 Italics and bold: 4-quote opening sequence: (4,3)
793 Italics and bold: 4-quote opening sequence: (4,4)
803 # same html as previous, but wikitext adjusted to match parsoid html2wt
805 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
813 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
815 Italics and bold: 4-quote opening sequence: (4,5)
824 <p>'<b>foo</b><i></i>
828 # same html as previous, but wikitext adjusted to match parsoid html2wt
830 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
832 '<nowiki/>'''foo'''''<nowiki/>''
837 <p>'<b>foo</b><i></i>
843 ### 5-quote opening sequence tests
847 Italics and bold: 5-quote opening sequence: (5,2)
857 # same html as previous, but wikitext adjusted to match parsoid html2wt
859 Italics and bold: 5-quote opening sequence: (5,2+3)
868 Italics and bold: 5-quote opening sequence: (5,3)
878 # same html as previous, but wikitext adjusted to match parsoid html2wt
880 Italics and bold: 5-quote opening sequence: (5,3+2)
889 Italics and bold: 5-quote opening sequence: (5,4)
895 <p><i><b>foo'</b></i>
900 Italics and bold: 5-quote opening sequence: (5,5)
909 Italics and bold: 5-quote opening sequence: (5,6)
913 <p><i><b>foo'</b></i>
918 ### multiple quote sequences in a line
921 Italics and bold: multiple quote sequences: (2,4,2)
927 <p><i>foo'<b>bar</b></i>
932 # same html as previous, but wikitext adjusted to match parsoid html2wt
934 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
936 ''foo'<nowiki/>'''bar'''''
938 <p><i>foo'<b>bar</b></i>
944 Italics and bold: multiple quote sequences: (2,4,3)
950 <p><i>foo'<b>bar</b></i>
955 # same html as previous, but wikitext adjusted to match parsoid html2wt
957 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
959 ''foo'<nowiki/>'''bar'''''
961 <p><i>foo'<b>bar</b></i>
967 Italics and bold: multiple quote sequences: (2,4,4)
973 <p><i>foo'<b>bar'</b></i>
978 # same html as previous, but wikitext adjusted to match parsoid html2wt
980 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
982 ''foo'<nowiki/>'''bar'<nowiki/>'''''
984 <p><i>foo'<b>bar'</b></i>
989 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
991 Italics and bold: multiple quote sequences: (3,4,2)
1000 <p><b>foo'</b>bar<i></i>
1004 # same html as previous, but wikitext adjusted to match parsoid html2wt
1006 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1010 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1015 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1020 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1022 Italics and bold: multiple quote sequences: (3,4,3)
1031 <p><b>foo'</b>bar<b></b>
1035 # same html as previous, but wikitext adjusted to match parsoid html2wt
1037 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1039 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1044 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1049 ### other quote tests
1052 Italics and bold: other quote tests: (2,3,5)
1054 ''this is about '''foo's family'''''
1056 <p><i>this is about <b>foo's family</b></i>
1062 Italics and bold: other quote tests: (2,(3,3),2)
1064 ''this is about '''foo's''' family''
1066 <p><i>this is about <b>foo's</b> family</i>
1072 Italics and bold: other quote tests: (3,2,3,2)
1076 '''this is about ''foo'''s family''
1078 <p><b>this is about <i>foo</i></b><i>s family</i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: other quote tests: (3,2,3+2+2,2)
1087 '''this is about ''foo'''''<nowiki/>''s family''
1089 <p><b>this is about <i>foo</i></b><i>s family</i>
1095 Italics and bold: other quote tests: (3,2,3,3)
1097 '''this is about ''foo'''s family'''
1099 <p>'<i>this is about </i>foo<b>s family</b>
1105 Italics and bold: other quote tests: (3,(2,2),3)
1107 '''this is about ''foo's'' family'''
1109 <p><b>this is about <i>foo's</i> family</b>
1115 Italicized possessive
1117 The ''[[Main Page]]'''s talk page.
1119 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1122 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1126 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1127 (Requires tidy for PHP parser output to be fixed up)
1129 parsoid=wt2html,wt2wt
1146 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1147 <td><i>a</i></td><td><i>b</i></td></tr>
1156 Non-html5 tags should be accepted
1158 <center>''foo''</center>
1160 <font>''foo''</font>
1161 <strike>''foo''</strike>
1164 <center><i>foo</i></center>
1165 <p><big><i>foo</i></big>
1166 <font><i>foo</i></font>
1167 <strike><i>foo</i></strike>
1173 <wbr> is valid wikitext (bug 52468)
1181 # <strike> is HTML4, <s> is HTML4/5.
1183 <s> or <strike> for strikethrough
1185 <strike>strike</strike>
1189 <p><strike>strike</strike>
1197 Text-level semantic html elements in wikitext
1200 <strong>text</strong>
1216 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1223 <strong>text</strong>
1239 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1247 # test cases taken from
1248 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1250 Ruby markup (W3C-style)
1252 ; Mono-ruby for individual base characters
1253 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1255 : <ruby>今日<rt>きょう</rt></ruby>
1257 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1259 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1261 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1268 <dl><dt> Mono-ruby for individual base characters</dt>
1269 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1270 <dt> Group ruby</dt>
1271 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1272 <dt> Jukugo ruby</dt>
1273 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1274 <dt> Inline ruby</dt>
1275 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1276 <dt> Double-sided ruby</dt>
1277 <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>
1279 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1280 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1281 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1286 # The next two test different paths in the sanitizer.
1288 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1290 <blockquote|>a</blockquote>
1292 <b→> doesn't terminate </b→>
1294 <bä> doesn't terminate </bä>
1296 <boo> doesn't terminate </boo>
1298 <s.foo> doesn't terminate </s.foo>
1302 <p><blockquote|>a</blockquote>
1303 </p><p><b→> doesn't terminate </b→>
1304 </p><p><bä> doesn't terminate </bä>
1305 </p><p><boo> doesn't terminate </boo>
1306 </p><p><s.foo> doesn't terminate </s.foo>
1307 </p><p><sub-ID#1>
1311 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1312 # If the non-word-character tag made it through the sanitizer, tidy
1313 # would munge it up.
1315 Non-word characters don't terminate tag names + tidy
1317 <blockquote|>a</blockquote>
1319 <b→> doesn't terminate </b→>
1321 <bä> doesn't terminate </bä>
1323 <boo> doesn't terminate </boo>
1325 <s.foo> doesn't terminate </s.foo>
1329 <p><blockquote|>a</p>
1330 <p><b→> doesn't terminate </b→></p>
1331 <p><bä> doesn't terminate </bä></p>
1332 <p><boo> doesn't terminate </boo></p>
1333 <p><s.foo> doesn't terminate </s.foo></p>
1334 <p><sub-ID#1></p>
1338 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1339 ### This checks that HTML5 tags (with non-word characters in the tag
1340 ### name) make it safely through the parser -- the Sanitizer will
1341 ### munge them later, as it should.
1344 Non-word characters are valid in extension tags (T19663)
1355 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1359 Isolated close tags should be treated as literal text (bug 52760)
1367 <p><s.foo>s</p>
1369 <p><s.foo>s</p>
1373 ### Special characters
1377 Bare pipe character (bug 52363)
1386 Bare pipe character from a template (bug 52363)
1395 ### <nowiki> test cases
1399 <nowiki> unordered list
1401 <nowiki>* This is not an unordered list item.</nowiki>
1403 <p>* This is not an unordered list item.
1406 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1412 <nowiki>Lorem ipsum dolor
1420 <p>Lorem ipsum dolor
1429 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1439 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1441 <nowiki><span class="error"></nowiki>
1443 <p><span class="error">
1446 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1452 :There is not nowiki.
1453 :There is <nowiki>nowiki</nowiki>.
1455 #There is not nowiki.
1456 #There is <nowiki>nowiki</nowiki>.
1458 *There is not nowiki.
1459 *There is <nowiki>nowiki</nowiki>.
1461 <dl><dd>There is not nowiki.</dd>
1462 <dd>There is nowiki.</dd></dl>
1463 <ol><li>There is not nowiki.</li>
1464 <li>There is nowiki.</li></ol>
1465 <ul><li>There is not nowiki.</li>
1466 <li>There is nowiki.</li></ul>
1469 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1470 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1472 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1473 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1475 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1476 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1480 Entities inside <nowiki>
1482 <nowiki><</nowiki>
1489 Entities inside template parameters
1495 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1499 Properly escape nowiki when combined with other wiki markup
1503 <p>* </nowiki> tag</p>
1505 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1509 T93824: Put escaped HTML tags inside nowiki
1513 <p><h2>foo</h2></p>
1515 <nowiki><h2>foo</h2></nowiki>
1519 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1523 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1524 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1525 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1527 This text: L'[[Foo]]
1528 This text: L<nowiki>''</nowiki>[[Foo]]
1529 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1532 # This test fails because wikitext whitespace is not normalized before comparing.
1534 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1538 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1541 This text : L<nowiki>''</nowiki>[[Foo]]
1544 # This test and the next one are html2wt only as they test that incorrect wikitext
1545 # passed in template arguments gets escaped or wrapped in nowikis where required.
1547 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1551 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1552 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1554 {{echo|foo{{!}}bar}}
1555 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1559 T53961: Output correct nowikis in template arguments
1563 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1564 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1565 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1566 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1567 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1570 {{echo|<nowiki>a }} b</nowiki>}}
1571 {{echo|<nowiki>a [[ b</nowiki>}}
1572 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1573 {{echo|a <nowiki>}</nowiki>}}
1577 Cases where "!!" needs nowiki protection
1582 <tr><th>this needs protection !! here</th></tr>
1586 <tr><th>this does not need
1587 protection !! here</th></tr>
1591 !<nowiki>this needs protection !! here</nowiki>
1604 Comments and Indent-Pre
1606 <!-- comment 1 --> asdf
1608 <!-- comment 1 --> asdf
1611 <!-- comment 1 --> asdf
1612 <!-- comment 2 -->xyz
1614 <!-- comment 1 --> asdf
1615 <!-- comment 2 --> xyz
1671 asdf<!-- comment 1 -->jkl
1681 <!-- foo --> b <!-- bar -->
1695 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1701 Comment semantics and delimiters
1703 <!-- --><!----><!-----><!------>
1707 <!-- --><!----><!-----><!------>
1711 Comment semantics and delimiters, redux
1713 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1714 -- foo -- funky huh? ... -->
1718 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1719 -- foo -- funky huh? ... -->
1723 Comment semantics and delimiters: directors cut
1725 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1726 everything starting with < followed by !-- until the first -- and > we see,
1727 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1733 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1734 everything starting with < followed by !-- until the first -- and > we see,
1735 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1740 Comment semantics: nesting
1742 <!--<!-- no, we're not going to do anything fancy here -->-->
1747 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1750 # Parsoid closes the unclosed comment, even if it means a slight
1753 Comment semantics: unclosed comment at end
1755 parsoid=wt2html,html2html
1757 <!--This comment will run out to the end of the document
1761 <!--This comment will run out to the end of the document-->
1765 Comment semantics: normalize comments to play nice with XML and browsers
1767 <!-- Browsers --!> think this is closed -->
1768 <!--> This would normally be text -->
1769 <!---> As would this -->
1770 <!-- XML doesn't like trailing dashes -------->
1771 <!-- Nor doubled hyphens -- anywhere in the data -->
1772 But this is not a comment.
1774 <p>But this is not a comment.
1777 <!-- Browsers --!> think this is closed -->
1778 <!--> This would normally be text -->
1779 <!---> As would this -->
1780 <!-- XML doesn't like trailing dashes -------->
1781 <!-- Nor doubled hyphens -- anywhere in the data -->
1782 <p>But this is not a comment.</p>
1786 Comment semantics: round-trip even text which contains encoded -->
1788 <!-- hello & goodbye - > --> --&gt; --&xx -->
1790 <!-- hello & goodbye - > --> --&gt; --&xx -->
1794 Comment in template title
1803 Comment on its own line post-expand
1815 Comment on its own line post-expand with non-significant whitespace
1827 Multiple comments should still parse as SOL-transparent
1829 parsoid=wt2html,wt2wt
1832 <!--c2--><!--c3--><!--c4-->*b
1841 <!--c2--><!--c3--><!--c4-->
1848 ### paragraph wrapping tests
1863 Block tag on one line (<div>)
1879 Block tag on one line (<blockquote>)
1881 a <blockquote>foo</blockquote>
1885 a <blockquote>foo</blockquote>
1897 Block tag on both lines (<div>)
1914 Block tag on both lines (<blockquote>)
1916 a <blockquote>foo</blockquote>
1918 b <blockquote>foo</blockquote>
1920 a <blockquote>foo</blockquote>
1921 b <blockquote>foo</blockquote>
1935 Multiple lines without block tags
1959 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1960 # So, we have a separate section for Parsoid. We don't want
1961 # to mimic this stripping behavior in Parsoid. It affects
1962 # editing experience and also requires us to maintain additional
1965 Empty lines between lines with block tags
2003 <div data-parsoid='{"stx":"html"}'></div>
2006 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2009 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2011 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2014 <div data-parsoid='{"stx":"html"}'>e</div>
2017 ## PHP parser emits output which is broken
2019 Unclosed HTML p-tags should be handled properly
2032 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2037 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2038 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2041 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2045 a [[Category:A1]] [[Category:A2]]
2050 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2054 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2060 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2064 ### Preformatted text
2073 And a [[Main Page|link]]
2079 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2084 Tabs don't trigger preformatted text
2088 This is preformatted text.
2094 <pre>This is preformatted text.
2099 preformatted text.</p>
2100 <pre>This is preformatted text.
2105 Space before tab needs nowiki pre protection
2111 <nowiki> </nowiki> a
2115 Ident preformatting with inline content
2126 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2143 Regression with preformatted in <center>
2157 Bug 52763: Preformatted in <blockquote>
2163 indented cell (no pre-wrapping!)
2173 <p> indented cell (no pre-wrapping!)
2181 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2198 Bug 15491: <ins>/<del> in blockquote
2201 Foo <del>bar</del> <ins>baz</ins> quux
2205 <p>Foo <del>bar</del> <ins>baz</ins> quux
2211 # Note that the p-wrapping is newline sensitive, which could be
2212 # considered a bug: tidy will wrap only the 'Foo' in the example
2213 # below in a <p> tag. (see comment 23-25 of bug #6200)
2215 Bug 15491: <ins>/<del> in blockquote (2)
2217 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2220 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2226 <del>bar</del> <ins>baz</ins> quux</blockquote>
2230 <pre> with attributes (bug 3202)
2232 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2234 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2239 <pre> with width attribute (bug 3202)
2241 <pre width="8">Narrow screen goodies</pre>
2243 <pre width="8">Narrow screen goodies</pre>
2248 <pre> with forbidden attribute (bug 3202)
2250 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2252 <pre width="8">Narrow screen goodies</pre>
2257 Entities inside <pre>
2266 <pre> with forbidden attribute values (bug 3202)
2268 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2270 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2275 <nowiki> inside <pre> (bug 13238)
2283 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2291 <pre><nowiki>Foo</nowiki></pre>
2296 <nowiki> inside of #tag:pre
2298 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2300 <pre>Foo →bar</pre>
2303 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2307 <nowiki> and <pre> preference (first one wins)
2336 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2338 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2341 <p><span typeof="mw:Nowiki">
2350 </pre> inside nowiki
2352 <nowiki></pre></nowiki>
2358 # Parsoid doesn't strip empty tags, like Tidy does.
2360 Empty pre; pre inside other HTML tags (bug 54946)
2362 parsoid=wt2html,wt2wt
2393 HTML pre followed by indent-pre
2403 # Note that tidy removes the empty <p> tags from the start and end.
2404 # Parsoid does not, by design.
2408 <p><pre>foo</pre></p>
2414 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2418 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2426 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2436 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2448 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2469 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2473 {{echo| foo}}{{echo| bar}}
2478 {{echo|<!--cmt--> foo}}
2480 <!--cmt-->{{echo| foo}}
2482 {{echo|{{echo| }}bar}}
2500 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2537 Pres with newline attributes
2542 <pre class="one two">hi</pre>
2546 two" data-parsoid='{"stx":"html"}'>hi</pre>
2550 Things that look like <pre> tags aren't treated as such
2552 Barack Obama <President> of the United States
2553 <President></President>
2555 <p>Barack Obama <President> of the United States
2556 <President></President>
2561 Handle broken pre-like tags (bug 64025)
2565 {{echo|<pre <pre>x</pre>}}
2567 <table><pre </table>
2570 <table><pre </table>
2578 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2587 Parsoid: handle pre with space after attribute
2591 <pre style="width:50%;" >{{echo|foo}}</pre>
2593 <pre style="width:50%;">{{echo|foo}}</pre>
2596 <pre style="width:50%;">{{echo|foo}}</pre>
2599 # TODO / maybe: fix wt2wt for this
2601 Parsoid: Don't paragraph-wrap fosterable content
2627 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2655 #--------------------------------------------------------------------
2656 # Transclusion parameter whitespace stripping tests
2657 # Behavior is different for positional and named parameters
2658 #--------------------------------------------------------------------
2660 Templates: Strip leading and trailing whitespace from named-param values
2664 {{echo|1= {{echo|b}} }}
2677 <ul><li> d</li></ul>
2682 Templates: Don't strip whitespace from positional-param values
2686 {{echo|{{echo|b}} }}
2718 <ul><li> f</li></ul>
2726 Templates: Handle empty comment-and-ws-only lines correctly
2729 <!--should be ignored-->
2730 <!--should be ignored as well-->
2737 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
2741 Templates: Handle comments in the target
2744 <!-- should be ignored -->
2748 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2751 {{echo<!-- should be ignored -->
2754 {{echo<!-- should be ignored -->|foo}}
2756 {{<!-- should be ignored -->echo|foo}}
2765 <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>
2767 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2769 <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>
2771 <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>
2773 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2777 Templates: Handle comments in parameter names (bug 67657)
2780 <!-- should be ignored -->
2784 <!-- should be ignored -->
2787 {{echo|1<!-- should be ignored -->=foo}}
2789 {{echo|<!-- should be ignored -->1=foo}}
2797 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2799 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2801 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2803 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2807 Templates: Other wikitext in parameter names (bug 67657)
2814 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2817 #--------------------------------------------------------------------
2818 # Transclusion parameter escaping tests
2819 #--------------------------------------------------------------------
2821 Templates: Parsoid parameter escaping test 1
2823 {{echo|[foo]|{{echo|[bar]}}}}
2827 <p about="#mwt1" typeof="mw:Transclusion"
2828 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2832 Parsoid: Pipes in external links in template parameter
2834 {{echo|[{{echo|http://example.com}} link]}}
2836 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2838 <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>
2842 Parsoid: pipe in transclusion parameter
2844 {{echo|http://foo.com/a|b}}
2846 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2848 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2849 typeof="mw:Transclusion"
2850 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>
2854 Parsoid: Pipe in external link target and content in template parameter
2856 parsoid=html2wt,wt2wt
2858 {{echo|[http://foo.com/a|b a|b]}}
2860 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2862 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2863 typeof="mw:Transclusion"
2864 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2865 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2869 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2873 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2875 <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>
2879 Templates: Don't escape already nowiki-escaped text in template parameters
2881 parsoid=html2wt,wt2wt
2883 {{echo|foo<nowiki>|</nowiki>bar}}
2884 {{echo|<nowiki><div></nowiki>}}
2885 {{echo|<nowiki></nowiki>}}
2887 <p>foo|bar <div></p>
2889 <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>
2890 <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>
2891 <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>
2897 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2899 parsoid=html2wt,wt2wt
2901 {{echo|{{echo|1=bar}}}}
2905 <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>
2910 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2916 <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:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2921 Templates: Preserve blank parameter names
2927 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2931 Templates: Preserve blank parameter names in other positions
2933 {{blank_param|bar|=foo}}
2937 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2942 ### Parsoid-centric tests for testing RT edge cases for pre
2946 1a. Indent-Pre and Comments
2959 1b. Indent-Pre and Comments
2972 1c. Indent-Pre and Comments
2985 1d. Indent-Pre and Comments
2986 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2999 2a. Indent-Pre and tables
3020 2b. Indent-Pre and tables
3036 2c. Indent-Pre and tables (bug 42252)
3053 2d. Indent-Pre and tables
3070 <tbody><tr><td> b</td></tr>
3075 2e. Indent-Pre and table-line syntax
3088 2f. Indent-pre started by table-line syntax
3107 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3112 Text that should be rendered preformatted
3120 <pre>Text that should be rendered preformatted
3129 3a. Indent-Pre and block tags (single-line html)
3133 c <blockquote> foo </blockquote>
3138 c <blockquote> foo </blockquote>
3139 <pre><span> foo </span>
3142 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3143 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3144 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3145 <pre><span> foo </span>
3162 3b. Indent-Pre and block tags (multi-line html)
3167 <pre>a <span>foo</span>
3172 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3173 b <div data-parsoid='{"stx":"html"}'> foo </div>
3183 3c. Indent-Pre and block tags (pre-content on separate line)
3247 4. Indent-Pre and extension tags
3258 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3262 Render paragraphs when indent-pre is suppressed in blocklevels
3279 4. Multiple spaces at start-of-line
3297 ## NOTE: the leading white-space chars on empty line are significant
3299 5a. White-space in indent-pre
3311 ## NOTE: the leading white-space chars on empty line are significant
3313 5b. White-space in indent-pre
3332 5c. White-space in indent-pre
3345 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3368 7a. Indent-pre and category links
3370 parsoid=wt2html,wt2wt
3372 [[Category:foo]] <!-- No pre-wrapping -->
3373 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3376 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3377 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3380 ## We used to, but no longer wt2wt this test since the default serializer
3381 ## will normalize all categories to serialize on their own line.
3382 ## This wikitext usage is going to be fairly uncommon in production and
3383 ## selser will take care of preserving formatting in those scenarios.
3385 7b. Indent-pre and category links
3390 [[Category:foo]] {{echo|b}}
3392 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3393 <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>
3397 Indent-Pre: Newlines in comments shouldn't affect sol state
3411 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3415 HTML-pre: 1. embedded newlines
3450 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3452 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3456 <pre data-parsoid='{"stx":"html"}'>
3461 <pre data-parsoid='{"stx":"html"}'>
3469 HTML-pre: big spaces
3505 <pre data-parsoid='{"stx":"html"}'>
3524 HTML-pre: 2: indented text
3537 HTML-pre: 3: other wikitext
3556 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3565 ### Definition lists
3572 <dl><dt> name </dt>
3573 <dd> Definition</dd></dl>
3578 Definition list for indentation only
3582 <dl><dd> Indented text</dd></dl>
3587 Definition list with no space
3592 <dd>Definition</dd></dl>
3597 Definition list with URL link
3599 ; http://example.com/ : definition
3601 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3602 <dd> definition</dd></dl>
3607 Definition list with bracketed URL link
3609 ;[http://www.example.com/ Example]:Something about it
3611 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3612 <dd>Something about it</dd></dl>
3617 Definition list with wikilink containing colon
3619 ; [[Help:FAQ]]: The least-read page on Wikipedia
3621 <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>
3622 <dd> The least-read page on Wikipedia</dd></dl>
3626 # At Brion's and JeLuF's insistence... :)
3628 Definition list with news link containing colon
3630 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3632 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3633 <dd> This isn't even a real newsgroup!</dd></dl>
3636 <dl><dt> <a rel="mw:ExtLink" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
3640 Malformed definition list with colon
3642 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3644 <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>
3649 Definition lists: colon in external link text
3651 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3653 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3654 <dd> OK, I made that up</dd></dl>
3659 Definition lists: colon in HTML attribute
3661 ;<b style="display: inline">bold</b>
3663 <dl><dt><b style="display: inline">bold</b></dt></dl>
3668 Definition lists: self-closed tag
3670 ;one<br/>two : two-line fun
3672 <dl><dt>one<br />two </dt>
3673 <dd> two-line fun</dd></dl>
3678 Bug 11748: Literal closing tags
3682 <dd>test test test test test</dd>
3684 <dd>test test test test test</dd>
3689 <dd>test test test test test</dd>
3691 <dd>test test test test test</dd>
3697 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3700 ; term : description
3705 <dl><dt> term </dt>
3706 <dd> description</dd></dl>
3707 <ul><li> unordered</li></ul>
3713 Definition list with empty definition and following paragraph
3725 Nested definition lists using html syntax
3738 Definition Lists: No nesting: Multiple dd's
3751 Definition Lists: Indentation: Regular
3759 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3764 Definition Lists: Indentation: Missing 1st level
3770 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3775 Definition Lists: Indentation: Multi-level indent
3779 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3784 Definition Lists: Hacky use to indent tables
3791 should be left alone
3793 <dl><dd><dl><dd><table>
3798 </td></tr></table></dd></dl></dd></dl>
3800 should be left alone
3805 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3813 should be left alone
3816 <dl><dd><dl><dd><table><tr>
3819 </tr></table><!-- bar --></dd></dl></dd></dl>
3821 should be left alone</p>
3825 Definition Lists: Hacky use to indent tables, with comment before table
3831 <dl><dd><dl><dd><!-- foo --><table><tr>
3833 </tr></table></dd></dl></dd></dl>
3836 # The trailing whitespace in this test is to catch a regression in
3837 # Parsoid after T54473.
3839 Definition Lists: Hacky use to indent tables (WS-insensitive)
3848 </td></tr></table></dd></dl>
3852 <tbody><tr><td>a</td></tr>
3853 </tbody></table> </dd></dl>
3856 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3857 ## as an empty dt item. It also ignores all but the last ";" when followed
3858 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3859 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3862 ## Ex: ";;t2 ::d2" is transformed into:
3874 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3875 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3886 ## All Parsoid only definition list tests have this difference.
3888 ## See also: https://phabricator.wikimedia.org/T8569
3889 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3892 Table / list interaction: indented table with lists in table contents
3907 <ul><li> b</li></ul>
3911 <ul><li> d</li></ul>
3912 </td></tr></table></dd></dl>
3917 Table / list interaction: lists nested in tables nested in indented lists
3940 </td></tr></table></dd></dl>
3947 Definition Lists: Nesting: Multi-level (Parsoid only)
3977 Definition Lists: Nesting: Test 2 (Parsoid only)
4004 Definition Lists: Nesting: Test 3 (Parsoid only)
4047 Definition Lists: Nesting: Test 4
4052 <dl><dd><dl><dd><dl><dt>t3</dt>
4053 <dd>d3</dd></dl></dd></dl></dd></dl>
4058 ## The Parsoid team believes the following three test exposes a
4059 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4060 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4061 ## It also exposes a "misfeature" in tidy, which doesn't like
4062 ## <dl> tags with a single <dt> child; it converts the <dt> into
4063 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4065 Definition Lists: Mixed Lists: Test 1
4071 <dl><dd><dl><dt><ul><li> foo</li>
4072 <li> bar</li></ul></dt></dl>
4073 <dl><dt> baz</dt></dl></dd></dl>
4108 Definition Lists: Mixed Lists: Test 2
4113 <ul><li><dl><dd> d1</dd>
4114 <dd> d2</dd></dl></li></ul>
4120 Definition Lists: Mixed Lists: Test 3
4125 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4126 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4132 Definition Lists: Mixed Lists: Test 4
4137 <ul><li><dl><dt>d1 </dt>
4140 <dd>d4</dd></dl></li></ul>
4146 Definition Lists: Mixed Lists: Test 5
4152 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4158 Definition Lists: Mixed Lists: Test 6
4163 <ol><li><ul><li><dl><dd>d1
4164 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4170 Definition Lists: Mixed Lists: Test 7
4175 <dl><dd><ul><li> d1</li>
4176 <li> d2</li></ul></dd></dl>
4182 Definition Lists: Mixed Lists: Test 8
4187 <dl><dd><ul><li> d1</li></ul>
4188 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4194 Definition Lists: Mixed Lists: Test 9
4198 <ul><li><dl><dt>foo </dt>
4199 <dd>bar</dd></dl></li></ul>
4205 Definition Lists: Mixed Lists: Test 10
4209 <ul><li><ol><li><dl><dt>foo </dt>
4210 <dd>bar</dd></dl></li></ol></li></ul>
4214 # The Parsoid team disagrees with the PHP parser's seemingly-random
4215 # rules regarding dd/dt on the next two tests. Parsoid is more
4216 # consistent, and recognizes the shared nesting and keeps the
4217 # still-open tags around until the nesting is complete.
4218 # (And tidy again converts <dt> to <dd> before 'bar'.)
4221 Definition Lists: Mixed Lists: Test 11
4226 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4227 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4228 <dl><dt>boo </dt>
4229 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4284 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4285 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4289 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4290 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4299 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4301 # * The test is wrong, there are two colons where there should be :;
4302 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4304 Definition Lists: Weird Ones: Test 1
4306 *#;*::;; foo : bar (who uses this?)
4308 <ul><li><ol><li><dl><dt> foo </dt>
4309 <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>
4328 <dt>bar (who uses this?)</dt>
4360 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4361 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4373 Definition Lists: colons occurring in tags
4391 <dt><span>a:b</span></dt>
4418 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4420 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4421 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4422 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4423 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4425 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4426 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4427 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4431 Definition Lists: colons and tables 1
4443 </td></tr></table></dd></dl>
4447 </td></tr></table></dd></dl>
4451 # Parsoid's output (as documented below) differs from php's in this case.
4452 # This is probably a bug. If we fixup parsoid to match php's output, the
4453 # above test should pass and the below test case can be removed. It is
4454 # unclear which output is more desirable.
4457 Definition Lists: colons and tables 2
4469 </td></tr></table></dd>
4473 </td></tr></table></dd></dl>
4477 Definition Lists: template interaction
4479 ::{{definition_list}}
4482 ::{{definition_list}}
4487 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4488 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4490 <dl><dd data-parsoid='{}'>one
4491 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4492 </span><dd about="#mwt2">two
4494 <dd>three</dd></dl></dd>
4495 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4503 External links: non-bracketed
4505 Non-bracketed: http://example.com
4507 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4511 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4513 External links: numbered
4515 Numbered: [http://example.com]
4516 Numbered: [http://example.net]
4517 Numbered: [http://example.com]
4519 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4520 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4521 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4524 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4525 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4526 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4530 External links: specified text
4532 Specified text: [http://example.com link]
4534 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4539 External links: trail
4541 Linktrails should not work for external links: [http://example.com link]s
4543 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4548 External links: dollar sign in URL
4550 http://example.com/1$2345
4552 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4556 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4558 External links: dollar sign in URL (autonumber)
4560 [http://example.com/1$2345]
4562 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4565 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4569 External links: open square bracket forbidden in URL (bug 4377)
4571 parsoid=wt2html,wt2wt,html2html
4573 http://example.com/1[2345
4575 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4578 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4582 External links: open square bracket forbidden in URL (named) (bug 4377)
4584 parsoid=wt2html,html2html
4586 [http://example.com/1[2345]
4588 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4591 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4594 # parsoid adds a space before the link name
4596 External links: open square bracket forbidden in URL (named) (bug 4377)
4599 [http://example.com/1 [2345]
4601 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4606 External links: nowiki in URL link text (bug 6230)
4608 [http://example.com/ <nowiki>''example site''</nowiki>]
4610 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4615 External links: newline forbidden in text (bug 6230 regression check)
4617 [http://example.com/ first
4620 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4626 External links: Pipe char between url and text
4628 [http://example.com | link]
4630 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4635 External links: protocol-relative URL in brackets
4637 [//example.com/ Test]
4639 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4643 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4645 External links: protocol-relative URL in brackets without text
4649 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4652 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4656 External links: protocol-relative URL in free text is left alone
4660 <p>//example.com/Foo
4665 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4667 foo//example.com/Foo
4669 <p>foo//example.com/Foo
4674 External links: with no contents
4676 [http://en.wikipedia.org/wiki/Foo]
4678 [[wikipedia:Foo|Bar]]
4680 [[wikipedia:Foo|<span>Bar</span>]]
4682 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4683 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4684 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4687 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4688 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4689 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4693 External links: Free with trailing punctuation
4703 http://example.com/url_with_(brackets)
4704 (http://example.com/url_without_brackets)
4705 http://example.com/url_with_entity&
4706 http://example.com/url_with_entity&
4707 http://example.com/url_with_entity&
4708 http://example.com/url_with_entity
4709 http://example.com/url_with_entity 
4710 http://example.com/url_with_entity 
4711 http://example.com/url_with_entity<
4712 http://example.com/url_with_entity<
4713 http://example.com/url_with_entity<
4715 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4716 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4717 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4718 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4719 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4720 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4721 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4722 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4723 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4724 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4725 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4726 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4727 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4728 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4729 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4730 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4731 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4732 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4733 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4736 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4737 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4738 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4739 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4740 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4741 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4742 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4743 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4744 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4745 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4746 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4747 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4748 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4749 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4750 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4751 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4752 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4753 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4754 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4758 External links: tricky Parsoid html2html case
4760 parsoid=wt2html,wt2wt,html2html
4762 http://example.com/url_with_entity&amp;
4764 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4767 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4771 External links: Free with trailing quotes (T113666)
4773 '''News:''' Stuff here
4777 <p><b>News:</b> Stuff here
4778 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4781 <p><b>News:</b> Stuff here</p>
4782 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4786 External links: Lone protocols are never linked (T105697)
4805 External links: No preceding word characters allowed (bug 65278)
4807 NOPEhttp://example.com
4808 N0http://example.com
4809 ok:http://example.com
4810 ok-http://example.com
4812 <p>NOPEhttp://example.com
4813 N0http://example.com
4814 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4815 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4820 External links: nofollow domain exception
4822 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4824 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
4831 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4833 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4838 External image from https
4840 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4842 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4847 External image (when not allowed)
4849 wgAllowExternalImages=0
4851 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4853 <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>
4858 Link to non-http image, no img tag
4860 Link to non-http image, no img tag: ftp://example.com/test.jpg
4862 <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>
4867 External links: terminating separator
4869 Terminating separator: http://example.com/thing,
4871 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4876 External links: intervening separator
4878 Intervening separator: http://example.com/1,2,3
4880 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4885 External links: old bug with URL in query
4887 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4889 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4894 External links: old URL-in-URL bug, mixed protocols
4896 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4898 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4902 # Since Parsoid is starting to emit canonical wikitext for links,
4903 # [http://example.com http://example.com] will not RT back to that
4906 External links: URL in text
4910 URL in text: [http://example.com http://example.com]
4912 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4915 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4919 External links: Clickable images
4921 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4923 <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>
4926 <p>ja-style clickable images: <a rel="mw:ExtLink" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
4930 External links: raw ampersand
4932 Old & use: http://x&y
4934 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4939 External links: encoded ampersand
4941 Old & use: http://x&y
4943 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4946 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4950 External links: encoded equals (bug 6102)
4952 http://example.com/?foo=bar
4954 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4957 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4961 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4962 ## does it number them. As discussed in bug 53505, we can identify
4963 ## autonumbered links via CSS.
4967 External links: [raw ampersand]
4969 Old & use: [http://x&y]
4971 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4974 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4977 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4978 # mode will return the [raw ampersand] wikitext
4980 External links: [encoded ampersand]
4982 parsoid=wt2html,wt2wt,html2html
4984 Old & use: [http://x&y]
4986 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4989 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4993 External links: [raw equals]
4995 [http://example.com/?foo=bar]
4997 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5000 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5003 # note that parsoid html is identical to [raw equals] case; so html2wt
5004 # mode will return the [raw equals] wikitext
5006 External links: [encoded equals] (bug 6102)
5008 parsoid=wt2html,wt2wt,html2html
5010 [http://example.com/?foo=bar]
5012 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5015 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5018 # xxx parsoid strips the IDN character, so the round-trip tests will
5019 # obviously fail and are disabled. --cscott
5021 External links: [IDN ignored character reference in hostname; strip it right off]
5023 parsoid=wt2html,wt2wt,html2html
5025 [http://e‌xample.com/]
5027 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5030 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5033 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5034 # Where an external link could easily circumvent the sanitization of the text of
5035 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5036 # test demands a higher standard. That's a bit strange.
5040 # http://example.com -> [http://example.com|http://example.com]
5041 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5043 # The first example is sanitized, but the second is not. Any security benefits
5044 # from this production are trivial to circumvent. Either remove this test and
5045 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5046 # the test accordingly.
5050 # xxx parsoid strips the IDN character, so the round-trip tests will
5051 # obviously fail and are disabled. --cscott
5053 External links: IDN ignored character reference in hostname; strip it right off
5055 parsoid=wt2html,html2html
5057 http://e‌xample.com/
5059 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5062 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5066 External links: www.jpeg.org (bug 554)
5070 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5074 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5076 External links: URL within URL (original bug 2)
5078 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5080 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5083 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5087 BUG 361: URL inside bracketed URL
5089 [http://www.example.com/foo http://www.example.com/bar]
5091 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5096 BUG 361: URL within URL, not bracketed
5098 http://www.example.com/foo?=http://www.example.com/bar
5100 <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>
5105 BUG 289: ">"-token in URL-tail
5107 http://www.example.com/<hello>
5109 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5114 BUG 289: literal ">"-token in URL-tail
5116 http://www.example.com/<b>html</b>
5118 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5121 <p><a rel="mw:ExtLink" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5125 BUG 289: ">"-token in bracketed URL
5127 [http://www.example.com/<hello> stuff]
5129 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5134 BUG 289: literal ">"-token in bracketed URL
5136 [http://www.example.com/<b>html</b> stuff]
5138 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5143 BUG 289: literal double quote at end of URL
5145 http://www.example.com/"hello"
5147 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5152 BUG 289: literal double quote in bracketed URL
5154 [http://www.example.com/"hello" stuff]
5156 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5161 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5163 [http://www.example.com test]
5165 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5170 External links: link text with spaces
5172 [http://www.example.com a b c]
5173 [http://www.example.com ''a'' ''b'']
5175 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5176 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5181 External links: wiki links within external link (Bug 3695)
5183 parsoid=wt2html,html2html
5185 [http://example.com [[wikilink]] embedded in ext link]
5187 <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>
5190 <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>
5194 BUG 787: Links with one slash after the url protocol are invalid
5198 [http:/example.com title]
5200 <p>http:/example.com
5201 </p><p>[http:/example.com title]
5206 Bracketed external links with template-generated invalid target
5208 [{{echo|http:/example.com}} title]
5210 <p>[http:/example.com title]
5215 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5217 ''[http://example.com text'']
5218 [http://example.com '''text]'''
5219 ''Something [http://example.com in italic'']
5220 ''Something [http://example.com mixed''''', even bold]'''
5221 '''''Now [http://example.com both''''']
5223 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5224 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5225 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5226 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5227 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5233 Bug 4781: %26 in URL
5235 http://www.example.com/?title=AT%26T
5237 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5240 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5243 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5244 # % is actually legal in HTML5. Any change in output would need testing though.
5246 Bug 4781, 5267: %25 in URL
5248 http://www.example.com/?title=100%25_Bran
5250 <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>
5253 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5257 Bug 4781, 5267: %28, %29 in URL
5259 http://www.example.com/?title=Ben-Hur_%281959_film%29
5261 <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>
5264 <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>
5269 Bug 4781: %26 in autonumber URL
5271 [http://www.example.com/?title=AT%26T]
5273 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5276 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5280 Bug 4781, 5267: %26 in autonumber URL
5282 [http://www.example.com/?title=100%25_Bran]
5284 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5287 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5291 Bug 4781, 5267: %28, %29 in autonumber URL
5293 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5295 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5298 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5303 Bug 4781: %26 in bracketed URL
5305 [http://www.example.com/?title=AT%26T link]
5307 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5310 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5314 Bug 4781, 5267: %25 in bracketed URL
5316 [http://www.example.com/?title=100%25_Bran link]
5318 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5323 Bug 4781, 5267: %28, %29 in bracketed URL
5325 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5327 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5330 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5334 External link containing a period in the anchor. (bug 63947)
5336 [//foo.org/bar#baz. bang]
5338 [//foo.org/bar. bang]
5340 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5341 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5344 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5345 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5349 External link containing a single quote. (bug 63947)
5353 [//foo.org/bar'baz bang]
5355 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5356 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5359 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5360 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5364 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5366 Some [http://example.com/ pretty ''italics'' and stuff]!
5368 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5373 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5375 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5377 <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>
5382 External link containing double-single-quotes with no space separating the url from text in italics
5384 [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]].]
5386 <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>
5389 <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>
5391 <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>
5395 External link with comments in link text
5397 [http://www.google.com Google <!-- comment -->]
5399 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5402 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5406 External link to bare IPv4 address
5408 [http://192.168.0.1 Link]
5410 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5413 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5417 URL-encoding in URL functions (single parameter)
5419 {{localurl:Some page|amp=&}}
5421 <p>/index.php?title=Some_page&amp=&
5426 URL-encoding in URL functions (multiple parameters)
5428 {{localurl:Some page|q=?&=&}}
5430 <p>/index.php?title=Some_page&q=?&amp=&
5437 http://example.com/index.php?foozoid%5B%5D=bar
5439 http://example.com/index.php?foozoid[]=bar
5441 <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>
5442 </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>
5445 <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>
5447 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5451 IPv6 urls, autolink format (T23261)
5453 http://[2404:130:0:1000::187:2]/index.php
5455 Examples from RFC 2373, section 2.2:
5456 * http://[1080::8:800:200C:417A]/unicast
5457 * http://[FF01::101]/multicast
5458 * http://[::1]/loopback
5459 * http://[::]/unspecified
5460 * http://[::13.1.68.3]/ipv4compat
5461 * http://[::FFFF:129.144.52.38]/ipv4compat
5463 Examples from RFC 2732, section 2:
5464 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5465 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5466 * http://[3ffe:2a00:100:7031::1]
5467 * http://[1080::8:800:200C:417A]/foo
5468 * http://[::192.9.5.5]/ipng
5469 * http://[::FFFF:129.144.52.38]:80/index.html
5470 * http://[2010:836B:4179::836B:4179]
5473 <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>
5474 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5476 <ul><li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5477 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5478 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5479 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5480 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5481 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5482 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5484 <ul><li> <a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5485 <li> <a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5486 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5487 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5488 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5489 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5490 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5493 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5495 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5496 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5497 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5498 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5499 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5500 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5501 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5503 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5504 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5505 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5506 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5507 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5514 IPv6 urls, bracketed format (T23261)
5516 [http://[2404:130:0:1000::187:2]/index.php test]
5518 Examples from RFC 2373, section 2.2:
5519 * [http://[1080::8:800:200C:417A] unicast]
5520 * [http://[FF01::101] multicast]
5521 * [http://[::1]/ loopback]
5522 * [http://[::] unspecified]
5523 * [http://[::13.1.68.3] ipv4compat]
5524 * [http://[::FFFF:129.144.52.38] ipv4compat]
5526 Examples from RFC 2732, section 2:
5527 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5528 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5529 * [http://[3ffe:2a00:100:7031::1] 3]
5530 * [http://[1080::8:800:200C:417A]/foo 4]
5531 * [http://[::192.9.5.5]/ipng 5]
5532 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5533 * [http://[2010:836B:4179::836B:4179] 7]
5536 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5537 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5539 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5540 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5541 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5542 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5543 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5544 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5545 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5547 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5548 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5549 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5550 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5551 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5552 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5553 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5556 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5558 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5559 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5560 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5561 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5562 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5563 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5564 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5566 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5567 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5568 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5569 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5570 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5571 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5572 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5573 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5577 Non-extlinks in brackets
5586 [{{echo|foo}} ''bar'']
5587 [{{echo|foo}}l's] errand
5588 [{{echo|foo}}l's errand]
5590 [url=http://example.com]
5591 [http:// bare protocols don't count]
5604 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5605 [http:// bare protocols don't count]
5613 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5614 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5615 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5616 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5617 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5618 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5619 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5620 [http:// bare protocols don't count]</p>
5624 Percent encoding in external links
5626 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5628 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5631 <p><a rel="mw:ExtLink"
5632 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5636 Use url link syntax for links where the content is equal the link target
5640 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5643 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5647 Parenthesis in external links, especially URL links
5651 http://example.com/test)
5653 http://example.com/(test)
5655 http://example.com/((test)
5657 (http://example.com/(test))
5659 (http://example.com/(test)))))
5661 http://example.com/a)b
5663 [http://example.com) foo]
5665 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5666 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5667 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5668 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5669 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5670 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5671 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5672 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5675 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5676 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5677 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5678 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5679 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5680 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5681 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5682 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5686 Parenthesis in external links, w/ transclusion or comment
5688 (http://example.com/{{echo|hi}})
5690 (http://example.com<!-- hi -->)
5692 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5693 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5696 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
5698 <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>
5702 Serialize <a> tags with invalid link targets as plain text
5704 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5706 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5707 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5708 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5709 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5712 <nowiki>*</nowiki>text
5713 <nowiki>[[foo]]</nowiki>
5714 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5718 mw:ExtLink -vs- mw:WikiLink (T94723)
5722 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5723 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5724 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5725 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5727 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5728 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5733 [[wikipedia:Foo|Bar]]
5734 [[wikipedia:Foo|Bar]]
5736 [[wikipedia:European_Robin|European Robin]]
5737 [[wikipedia:European_Robin|European Robin]]
5741 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5745 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5747 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5758 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5760 Normal text. '''''Bold italic text.''''' Normal text.
5762 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5763 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5768 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5769 # parser strips. The wikitext contains just the first half of the bold
5772 Unclosed and unmatched quotes
5774 '''''Bold italic text '''with bold deactivated''' in between.'''''
5776 '''''Bold italic text ''with italic deactivated'' in between.'''''
5780 ..spanning two paragraphs (should not work).'''
5782 '''Bold tag left open
5784 ''Italic tag left open
5788 <!-- Unmatching number of opening, closing tags: -->
5789 '''This year''''s election ''should'' beat '''last year''''s.
5791 ''Tom'''s car is bigger than ''Susan'''s.
5793 Plain ''italic'''s plain
5795 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5796 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5797 </p><p><b>Bold text..</b>
5798 </p><p>..spanning two paragraphs (should not work).
5799 </p><p><b>Bold tag left open</b>
5800 </p><p><i>Italic tag left open</i>
5802 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5803 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5804 </p><p>Plain <i>italic'</i>s plain
5807 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5808 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5809 </p><p><b>Bold text..</b>
5810 </p><p>..spanning two paragraphs (should not work).<b></b>
5811 </p><p><b>Bold tag left open</b>
5812 </p><p><i>Italic tag left open</i>
5815 <!-- Unmatching number of opening, closing tags: -->
5816 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5817 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5818 </p><p>Plain <i>italic'</i>s plain
5825 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5828 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5829 # is the bare minimum required by the spec, see:
5830 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5831 # Parsoid team replies: empty table tags are legal in HTML5
5833 A table with no data.
5846 A table with stray table end tags on start tag line (wt2html)
5850 {|style="color: red;"|}
5852 {|style="color: red;" |}
5856 {|style="color: red;"|} id="foo"
5860 {|style="color: red;" |} id="foo"
5864 <table style="color: red;"></table>
5866 <table style="color: red;">
5872 <table style="color: red;" id="foo">
5878 <table style="color: red;" id="foo">
5887 A table with no data (take 2)
5895 # A table with nothing but a caption is invalid XHTML, we might want to render
5896 # this as <p>caption</p>
5897 # Parsoid team replies: table with only a caption is legal in HTML5
5899 A table with nothing but a caption
5907 </caption><tr><td></td></tr></table>
5910 <table><caption> caption</caption></table>
5914 A table with caption with default-spaced attributes and a table row
5917 |+ style="color: red;" | caption1
5923 <caption style="color: red;"> caption1
5932 A table with captions with non-default spaced attributes and a table row
5935 |+style="color: red;"|caption2
5936 |+ style="color: red;"| caption3
5942 <caption style="color: red;">caption2
5944 <caption style="color: red;"> caption3
5953 Table td-cell syntax variations
5957 | foo bar foo || baz
5958 | style='color:red;' | baz
5959 | style='color:red;' || baz
5966 <td> foo bar foo </td>
5969 <td style="color:red;"> baz
5971 <td> style='color:red;' </td>
5999 Simple table but with multiple dashes for row wikitext
6018 Multiplication table
6020 {| border="1" cellpadding="2"
6021 |+Multiplication table
6023 ! × !! 1 !! 2 !! 3
6041 <table border="1" cellpadding="2">
6042 <caption>Multiplication table
6089 Accept "||" in table headings
6104 Accept "!!" in table data
6118 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
6123 Accept "||" in indented table headings
6133 </th></tr></table></dd></dl>
6138 Accept "!!" in templates
6152 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6156 Accept "!!" in table headings after newline
6173 <p>b!!c</p></th></tr>
6178 Accept "!!" in table data of mixed wikitext / html syntax
6182 <tr><td>b!!c</td></tr>
6195 <tbody><tr><th>a</th></tr>
6196 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6201 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6218 Accept "| !" at start of line in tables (ignore !-attribute)
6222 | !style="color:red" | bar
6234 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 +/-
6238 |style='color:red;'|+1
6239 |style='color:blue;'|-1
6251 <td style="color:red;">+1
6253 <td style="color:blue;">-1
6277 |rowspan=2| Cell 2, row 1 (and 2)
6288 <td rowspan="2"> Cell 2, row 1 (and 2)
6306 {| bgcolor=#ABCDEF border=2
6311 |the original table again
6319 <table bgcolor="#ABCDEF" border="2">
6327 <td>the original table again
6333 Invalid attributes in table cell (bug 1830)
6347 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6351 | title="foo<nowiki>|</nowiki>" |bar
6352 | title="foo<nowiki>|</nowiki>" bar
6359 <td title="foo|">bar
6361 <td> title="foo|" bar
6366 <tbody><tr><td title="foo">bar</td>
6367 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6368 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6372 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6373 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6374 # *2wt modes will fail.
6376 Table security: embedded pipes
6378 parsoid=wt2html,html2html
6381 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6385 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6386 <td>]" onmouseover="alert(document.cookie)">test
6394 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6398 Element attributes with double ! should not be broken up by <th>
6401 ! hi <div class="!!">ha</div> ho
6406 <th> hi <div class="!!">ha</div> ho
6411 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6416 ! and || in element attributes should not be parsed as <th>/<td>
6419 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6424 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6429 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6433 # FIXME: The output seems broken. Filed as T110268.
6435 ! and || in td attributes should not be parsed as <th>/<td>
6440 | style="color: red !important;" data-contrived="put this here ||" | foo
6445 <td> style="color: red !important;" data-contrived="put this here </td>
6451 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx_v":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6456 Break on | in element attribute in template
6458 parsoid=wt2html,html2html
6460 {{echo|1=<div class="hi|ho">ha</div>}}
6462 <p>ho">ha</div>
6465 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6469 Don't break on | in extension attribute in template
6471 {{echo|<ref name="hi|ho">ha</ref>}}
6475 <p><span about="#mwt2" class="mw-ref" id="cite_ref-hi.7Cho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi.7Cho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
6477 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi.7Cho-1" id="cite_note-hi.7Cho-1"><a href="./Main_Page#cite_ref-hi.7Cho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi.7Cho-1" class="mw-reference-text">ha</span></li></ol>
6480 ## We don't support roundtripping of these attributes in Parsoid.
6481 ## Selective serialization takes care of preventing dirty diffs.
6482 ## But, on edits, we dirty-diff the invalid attribute text.
6484 Invalid text in table attributes should be discarded
6488 {| <span>boo</span> style='border:1px solid black'
6489 | <span>boo</span> style='color:blue' | 1
6490 |<span>boo</span> style='color:blue'| 2
6493 <table style="border:1px solid black">
6495 <td style="color:blue"> 1
6497 <td style="color:blue"> 2
6501 <table style="border:1px solid black">
6503 <td style="color:blue"> 1</td>
6504 <td style="color:blue"> 2</td>
6510 Invalid text in table attributes should be preserved by selective serializer
6513 "modes": ["selser"],
6515 ["td:first-child", "text", "abc"],
6516 ["td + td", "text", "xyz"]
6520 {| <span>boo</span> style='border:1px solid black'
6521 | <span>boo</span> style='color:blue' | 1
6522 |<span>boo</span> style='color:blue'| 2
6525 {| <span>boo</span> style='border:1px solid black'
6526 | <span>boo</span> style='color:blue' |abc
6527 |<span>boo</span> style='color:blue'|xyz
6532 1. Template-generated table cell attributes and cell content
6537 || {{table_attribs_5}}
6538 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6539 |align=center {{table_attribs}}
6540 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6545 <td style="color:red;">Foo
6547 <td style="color:red;">Foo
6549 <td> style="color:red;"</td>
6552 <td style="color:red;">Foo
6554 <td align="center" style="color:red;">Foo
6556 <td align="center" style="color:red;">Foo
6562 2. Template-generated table cell attributes and cell content
6565 |{{table_attribs_2}}
6570 <td style="color:red;">Foo
6578 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6579 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6584 3. Template-generated table cell attributes and cell content
6587 !align=center {{table_header_cells}}
6589 |align=center {{table_cells}}
6594 <th align="center" style="color:red;">Foo</th>
6595 <th style="color:red;"><i>Bar</i></th>
6596 <th style="color:brown;"><i>Foo</i> and Baz
6599 <td align="center" style="color:red;">Foo</td>
6600 <td style="color:red;"><i>Bar</i></td>
6601 <td style="color:brown;"><i>Foo</i> and Baz
6606 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
6607 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
6612 4. Template-generated table cell attributes and cell content inside a templated table
6615 !align=center {{table_header_cells}}
6617 |align=center {{table_cells}}
6622 <th align="center" style="color:red;">Foo</th>
6623 <th style="color:red;"><i>Bar</i></th>
6624 <th style="color:brown;"><i>Foo</i> and Baz
6627 <td align="center" style="color:red;">Foo</td>
6628 <td style="color:red;"><i>Bar</i></td>
6629 <td style="color:brown;"><i>Foo</i> and Baz
6633 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
6634 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
6636 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
6640 ## Edge case fix to prevent future regressions
6642 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6645 |{{table_attribs_7}}
6650 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<span class="mw-ref" id="cite_ref-1" rel="dc:references" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
6652 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
6656 Table with row followed by newlines and table heading
6658 parsoid=wt2html,html2html
6676 Table with empty line following the start tag
6678 parsoid=wt2html,html2html
6696 Table attributes with empty value
6698 parsoid=wt2html,html2html
6711 <tbody><tr><td style=""> hello</td></tr>
6716 Wikitext table with a lot of comments
6739 Wikitext table comments represented in parsoid dom
6741 {|<!--c1--><!--c2-->
6752 <table><!--c1--><!--c2-->
6753 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6754 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6759 Wikitext table with double-line table cell
6776 Table cell with a single comment
6793 Table-cell after a comment-only-empty-line
6810 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6812 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6818 Build table with {{!}}
6820 {{{!}} class="wikitable"
6823 {{!}}- style="color:red;"
6824 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6827 <table class="wikitable">
6833 <tr style="color:red;">
6835 <td style="color:red;"> second data
6841 Build table with pipe as data
6843 {| class="wikitable"
6846 |- style="color:red;"
6847 | data || style="color:red;" | second data
6849 | style="color:red;" | data with | || style="color:red;" | second data with |
6851 || data with | ||| second data with |
6854 <table class="wikitable">
6860 <tr style="color:red;">
6862 <td style="color:red;"> second data
6865 <td style="color:red;"> data with | </td>
6866 <td style="color:red;"> second data with |
6869 <td> data with | </td>
6870 <td> second data with |
6876 Build table with wikilink
6878 {| class="wikitable"
6879 ! header || second header
6880 |- style="color:red;"
6881 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6883 | data || second data [[Main Page|link|text with pipe]]
6886 <table class="wikitable">
6891 <tr style="color:red;">
6892 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6893 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6897 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6902 # The expected HTML structure in this test is debatable. The PHP parser does
6903 # not parse this kind of table at all. The main focus for Parsoid is on
6904 # round-tripping, so this output is ok for now. TODO: revisit!
6906 Wikitext table with html-syntax row
6916 <td>foo</td></tr></tbody></table>
6919 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6920 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6921 ## PHP parser, which tidy then compounds by fostering the content
6922 ## entirely out of the table. Parsoid recognizes the table context
6923 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6924 ## depends on PHP's treatment of broken table markup!
6926 Implicit <td> after a |-
6928 parsoid=wt2html,html2html
6948 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6950 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6952 parsoid=wt2html,html2html
6985 <tr><td><pre>a</pre></td></tr>
6986 <tr><td> b</td></tr>
6991 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6992 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6994 Lists should be recognized in an implicit <td> context
6996 parsoid=wt2html,html2html
7023 Table cells not properly parsed in an implicit-td context
7027 {{table_attribs_4}} || a || b
7032 <td style="background-color:#DC241f;" width="10px"></td>
7039 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7040 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["",{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," "]}'> </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> a </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> b</td></tr>
7045 Parsoid: Round-trip tables directly followed by content (bug 51219)
7047 parsoid=wt2html,wt2wt
7072 Parsoid: Default to a newline after tables in new content (bug 51219)
7077 <tr><td>foo</td></tr></tbody></table> bar
7079 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7084 <nowiki> </nowiki>bar
7092 Parsoid: newline inducing block nodes don't suppress <nowiki>
7104 Parsoid: Row-syntax table headings followed by comment & table cells
7106 parsoid=wt2html,wt2wt
7110 <!-- foo --> || baz || quux
7124 <tbody><tr><th> foo </th><th> bar
7125 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7130 Parsoid: Recover better from broken table attributes
7150 <p>foo</p></td></tr>
7155 Tables: Digest broken attributes on table and tr tag
7171 # T137406: Whitespace in the HTML
7173 1. Generate correct wikitext for tables with thead/tbody/tfoot
7178 <caption>Test</caption>
7219 <caption>Test</caption>
7239 # T137406: No whitespace in the HTML
7241 2. Generate correct wikitext for tables with thead/tbody/tfoot
7245 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7255 Testing serialization after deletion in references
7264 hi <ref><div id="x">ho</div></ref>
7274 Testing serialization after deletion of table cells
7277 "modes": ["wt2wt", "selser"],
7285 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7295 Testing selser after addition of new row before first row (T125419)
7298 "modes": ["wt2wt", "selser"],
7300 [ "tr", "before", "<tr><td>X</td></tr>" ]
7316 Serialize new table rows in a HTML table using HTML tags
7319 "modes": ["wt2wt", "selser"],
7321 [ "tr", "before", "<tr><td>X</td></tr>" ]
7325 <table><tr><td>a</td></tr></table>
7327 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7331 Serialize new table cells in a HTML row using HTML tags
7334 "modes": ["wt2wt", "selser"],
7336 [ "td", "before", "<td>X</td>" ]
7340 <table><tr><td>a</td></tr></table>
7342 <table><tr><td>X</td><td>a</td></tr></table>
7346 Wikitext tables can be nested inside HTML tables
7350 <table data-parsoid='{"stx":"html"}'>
7353 <tr><td>foo</td></tr>
7368 Serialize wikitext list items as HTML list items when embedded in a HTML list
7372 <ul data-parsoid='{"stx": "html"}'>
7373 <li data-parsoid='{}'>a</li>
7383 # SSS FIXME: Is this actually a good thing given the
7384 # odd nested list output that is generated by MW?
7385 # <ul><li>foo<ul>..</ul></li></ul> instead of
7386 # <ul><li>foo</li><ul>..</ul></ul>
7388 Wikitext lists can be nested inside HTML lists
7392 <ul data-parsoid='{"stx": "html"}'>
7393 <li data-parsoid='{"stx": "html"}'>a
7398 <ul data-parsoid='{"stx": "html"}'>
7421 Plain link, capitalized
7425 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7430 Plain link, uncapitalized
7434 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7441 [[Main Page|The Main Page]]
7443 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7448 Piped link with comment in link text
7450 [[Main Page|The Main<!--front--> Page]]
7452 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7457 Piped link with multiple pipe characters in link text
7459 [[Main Page||The|Main|Page|]]
7461 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7464 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7468 Piped link with no link text
7470 [[Thomas Bek (bishop of St David's)|]]
7472 <p>[[Thomas Bek (bishop of St David's)|]]
7475 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7479 Piped link with empty link text
7481 [[Main Page|<nowiki />]] - empty nowiki
7482 [[Main Page| ]] - empty space
7483 [[Main Page| ]] - empty non breaking space
7485 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7486 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7487 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7490 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki />"}'/></a> - empty nowiki
7491 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7492 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7500 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7505 Broken link with fragment
7507 [[Zigzagzogzagzig#zug]]
7509 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7514 Special page link with fragment
7516 [[Special:Version#anchor]]
7518 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7523 Nonexistent special page link with fragment
7525 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7527 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7534 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7536 <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>
7543 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7545 <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>!!!
7556 Bug 43661: Piped links with identical prefixes
7558 [[prefixed article|prefixed articles with spaces]]
7560 [[prefixed article|prefixed articlesaoeu]]
7562 [[Main Page|Main Page test]]
7564 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7565 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7566 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7572 Link with HTML entity in suffix / tail
7574 [[Main Page]]", [[Main Page]]a
7576 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7579 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7583 Link with 3 brackets
7594 Link with 4 brackets
7598 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7603 Piped link with 3 brackets
7605 [[[main page|the main page]]]
7607 <p>[[[main page|the main page]]]
7612 Piped link with extlink-like text
7615 [[Main Page|This is a [bar]]]
7617 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7618 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7621 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7622 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7626 Link with multiple pipes
7628 [[Main Page|The|Main|Page]]
7630 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7635 Anchor containing a #. (bug 63430)
7637 [[Main Page#And#Link]]
7639 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7642 <p><a rel="mw:WikiLink" href="./Main_Page#And.23Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And.23Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7648 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7650 <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>
7655 Link with space in namespace
7657 [[User talk:Foo bar]]
7659 <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>
7664 MemoryAlpha:AlphaTest
7666 This is an article in the MemoryAlpha namespace
7667 (which shadows the memoryalpha interwiki link).
7671 Namespace takes precedence over interwiki link (bug 51680)
7673 [[MemoryAlpha:AlphaTest]]
7675 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7679 # The previous test doesn't work correctly in html2*, due to not recognizing the
7680 # link as an internal one. This one checks for the correct behavior.
7682 Link to namespace preferred over interwiki with correct rel attribute
7684 parsoid=html2wt,html2html
7686 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7688 [[MemoryAlpha:AlphaTest]]
7692 Piped link to namespace
7694 [[Meta:Disclaimers|The disclaimers]]
7696 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7703 [[Usually caused by a typo (oops}]]
7705 <p>[[Usually caused by a typo (oops}]]
7712 Just a test of an article title containing a percent.
7716 Link containing % (not as a hex sequence)
7719 [[7% Solution|7%25 Solution]]
7721 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7722 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7725 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7726 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7729 # note that the parsoid HTML is identical to the previous test output,
7730 # so the previous test ensures that the html2wt mode will generate the
7731 # "not as a hex sequence" wikitext.
7733 Link containing % as a single hex sequence interpreted to char
7735 parsoid=wt2wt,wt2html,html2html
7738 [[7%25 Solution|7%25 Solution]]
7740 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7741 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7744 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7745 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7749 Link containing % as a double hex sequence interpreted to hex sequence
7753 <p>[[7%2525 Solution]]
7757 ## Example for such a section: == < ==
7759 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7761 [[%23%3c]][[%23%3e]]
7763 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7766 <p><a rel="mw:WikiLink" href="./Main_Page#.3C" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#.3C"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#.3E" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#.3E"},"sa":{"href":"%23%3e"}}'>#></a></p>
7770 Link containing "<#" and ">#" as a hex sequences
7772 [[%3c%23]][[%3e%23]]
7774 <p>[[%3c%23]][[%3e%23]]
7779 Link containing an equals sign
7781 [[Special:BookSources/isbn=4-00-026157-6]]
7783 <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>
7786 <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>
7792 Just a test of an article title containing a tilde.
7795 # note that links containing signatures, like [[Foo~~~~]], are
7796 # massaged by the pre-save transform (PST) and so the tildes are never
7797 # seen by the parser.
7799 Link containing a tilde
7803 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7806 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7810 Link containing double-single-quotes '' (bug 4598)
7812 [[Lista d''e paise d''o munno]]
7814 <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>
7817 <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>
7821 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7823 Some [[Link|pretty ''italics'' and stuff]]!
7825 <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>!
7828 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7832 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7834 ''Some [[Link|pretty ''italics'' and stuff]]!''
7836 <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>
7841 Link with double quotes in title part (literal) and alternate part (interpreted)
7843 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7847 [[''Pentecoste''|Pentecoste]]
7849 [[''Pentecoste''|''Pentecoste'']]
7851 <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>
7852 </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>
7853 </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>
7854 </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>
7857 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></span></p>
7858 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7859 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7860 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7864 Broken image links with HTML captions (bug 39700)
7866 [[File:Nonexistent|<script></script>]]
7867 [[File:Nonexistent|100x100px|<script></script>]]
7868 [[File:Nonexistent|<]]
7869 [[File:Nonexistent|a<i>b</i>c]]
7871 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7872 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7873 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7874 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7877 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7878 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7879 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7880 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span></p>
7886 [[http://www.example.com]]
7888 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7891 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7895 Plain link to URL with link text
7897 [[http://www.example.com Link text]]
7899 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7904 Plain link to protocol-relative URL
7906 [[//www.example.com]]
7908 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7911 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7915 Plain link to protocol-relative URL with link text
7917 [[//www.example.com Link text]]
7919 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7924 Plain link to page with question mark in title
7930 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7931 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7936 # I'm fairly sure the expected result here is wrong.
7937 # We want these to be URL links, not pseudo-pages with URLs for titles....
7938 # However the current output is also pretty screwy.
7941 # I'm changing it to match the current output--it arguably makes more
7942 # sense in the light of the test above. Old expected result was:
7943 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7945 # But I think this test is bordering on "garbage in, garbage out" anyway.
7950 Piped link to URL: [[http://www.example.com|an example URL]]
7952 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7955 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7959 BUG 2: [[page|http://url/]] should link to page, not http://url/
7961 [[Main Page|http://url/]]
7963 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7966 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7969 # Parsoid does not mark self-links, by design.
7971 BUG 337: Escaped self-links should be bold
7975 [[Bug462]] [[Bug462]]
7977 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7980 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7982 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7986 Self-link to section should not be bold
7990 [[Main Page#section]]
7992 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8003 Self-link to numeric title
8009 <p><strong class="selflink">0</strong>
8014 Link to numeric-equivalent title
8020 <p><a href="/wiki/00" title="00">00</a>
8025 <nowiki> inside a link
8027 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8029 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8034 Non-breaking spaces in title
8036 [[ Main Page ]]
8038 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8043 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
8049 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8054 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8060 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8065 Internal link with en linktrail: no apostrophes (bug 27473)
8071 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8076 Internal link with ca linktrail with apostrophes (bug 27473)
8082 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8087 Internal link with kaa linktrail with apostrophes (bug 27473)
8093 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8098 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8100 [[User:Foo/Test/63636:Bar|Test]]
8102 <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>
8105 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8108 ## Mainly a sanity check for Parsoid
8110 Handle title parsing for subpages
8119 ## FIXME: Add a working php section here
8121 Link to a subpage from a namespace other than main
8127 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8131 Ensure that transclusion titles are not url-decoded
8133 subpage title=[[Test]]
8136 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8138 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8141 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8145 Purely hash wikilink
8147 title=[[User:test/123]]
8151 <p><a href="#a">b</a>
8154 <p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
8158 1. Interaction of linktrail and template encapsulation
8164 <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>
8168 2. Interaction of linktrail and template encapsulation
8172 {{echo|Some [[Fool]]}}s
8174 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>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>
8178 3. Interaction of linktrail and template encapsulation
8182 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8184 <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"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
8194 Internal link with is link prefix
8198 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8200 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8211 Internal link with is link trail and link prefix
8215 [[mótmælendatrú|xxx]]ar
8217 mótmælenda[[söfnuður]]
8218 mótmælenda[[söfnuður|söfnuðir]]
8219 mótmælenda[[söfnuður|söfnuðir]]xxx
8221 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8222 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8223 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8224 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8225 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8230 Parsoid link trail escaping
8232 parsoid=html2wt,html2html
8234 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8240 Parsoid link prefix escaping
8243 parsoid=html2wt,html2html
8245 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8247 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8251 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8259 [http://wp.org ''foo'']
8261 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8262 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8263 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8264 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8269 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8273 [[Foo|{{echo|a}} b {{echo|c}}]]
8275 <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>
8279 Link with angle bracket after anchor
8283 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8286 <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>
8290 ### Interwiki links (see maintenance/interwiki.sql)
8294 Inline interwiki link
8296 parsoid=wt2html,wt2wt,html2html
8298 [[MeatBall:SoftSecurity]]
8300 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8303 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8307 Inline interwiki link with empty title (bug 2372)
8309 parsoid=wt2html,wt2wt,html2html
8313 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8316 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8320 Interwiki link encoding conversion (bug 1636)
8322 *[[Wikipedia:ro:Olteniţa]]
8323 *[[Wikipedia:ro:Olteniţa]]
8325 <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>
8326 <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>
8330 <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>
8331 <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>
8336 Interwiki link with fragment (bug 2130)
8338 [[MeatBall:SoftSecurity#foo]]
8340 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8345 Link scenarios with escaped fragments
8348 [[Foo#Is this great?]]
8349 [[meatball:Foo#Is this great?]]
8351 <p><a href="#Is_this_great.3F">#Is this great?</a>
8352 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8353 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8356 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great.3F" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great.3F"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8357 <a rel="mw:WikiLink" href="./Foo#Is_this_great.3F" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great.3F"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8358 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8361 # Ideally the wikipedia: prefix here should be proto-relative too
8362 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8363 # define the 'en' prefix, and originally the test used 'wikipedia',
8364 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8367 Different interwiki prefixes mapping to the same URL
8375 [[:wikipedia:Foo|Foo]]
8377 [[wikipedia:en:Foo]]
8379 [[:wikipedia:en:Foo]]
8383 <p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
8385 <p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
8387 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
8389 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
8391 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8393 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8395 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8399 Interwiki links that cannot be represented in wiki syntax
8402 [[meatball:ok#foo|ok with fragment]]
8403 [[meatball:ok_as_well?|ok ending with ? mark]]
8404 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8405 [http://de.wikipedia.org/wiki/#foo is just fragment]
8408 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8409 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8410 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
8411 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8412 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8415 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8416 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8417 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8418 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8419 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8423 Interwiki links: trail
8425 [[wikipedia:Foo|Ba]]r
8427 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8430 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
8434 Local interwiki link
8436 parsoid=wt2html,wt2wt,html2html
8438 [[local:Template:Foo]]
8440 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8443 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8446 # Parsoid does not mark self-links, by design.
8448 Local interwiki link: self-link to current page
8451 parsoid=wt2html,wt2wt,html2html
8455 <p><strong class="selflink">local:Main Page</strong>
8458 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8462 Local interwiki link: prefix only (bug 64167)
8464 parsoid=wt2html,wt2wt,html2html
8468 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8471 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8475 Local interwiki link: with additional interwiki prefix (bug 61357)
8477 parsoid=wt2html,wt2wt,html2html
8479 [[local:meatball:Hello]]
8481 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8484 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8488 Multiple local interwiki link prefixes
8490 [[local:local:local:local:mi:local:Foo]]
8492 parsoid=wt2html,wt2wt,html2html
8494 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8497 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8501 ### Interlanguage links
8502 ### Language links (so that searching for '### language' matches..)
8514 <p>Blah blah blah</p>
8515 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8518 ## parsoid html2wt will lose the space variations
8520 Interlanguage link with spacing
8522 parsoid=wt2html,wt2wt,html2html
8530 <p>Blah blah blah</p>
8531 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8535 Double interlanguage link
8544 <p>Blah blah blah</p>
8545 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8546 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8549 ## parsoid html2wt will lose the space variations
8551 Interlanguage link variations
8553 parsoid=wt2html,wt2wt,html2html
8563 <p>Blah blah blah</p>
8564 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8565 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8566 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8569 ## parsoid html2wt will normalize the space to _
8571 Space and question mark encoding in interlanguage links (T95473)
8573 parsoid=wt2html,wt2wt,html2html
8581 <p>Blah blah blah</p>
8582 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8586 Interlanguage link, with prefix links
8596 <p>Blah blah blah</p>
8597 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8601 Double interlanguage link, with prefix links (bug 8897)
8612 <p>Blah blah blah</p>
8613 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8614 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8618 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8626 <p>Blah blah blah</p>
8627 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8630 ## PHP parser tests script needs an update
8631 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8633 Language links render as inline links if $wgInterwikiMagic=false
8635 wgInterwikiMagic=false
8636 parsoid=wt2html,wt2wt,html2html
8641 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8644 ## PHP parser tests script needs an update
8645 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8647 Language links render as inline links in the Talk namespace
8650 parsoid=wt2html,wt2wt,html2html
8655 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8659 Parsoid-specific test: Wikilinks with should RT properly
8665 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8670 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8672 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8674 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8675 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8677 He&nbsp;llo [[Foo|He&nbsp;llo]]
8679 He&nbsp;llo He&nbsp;llo
8681 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8682 </p><p>He&nbsp;llo He&nbsp;llo
8686 # html2wt will fail because of title normalization without data-parsoid
8688 Parsoid: handle constructor well
8690 parsoid=wt2html,wt2wt
8696 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8697 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
8700 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8702 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
8711 # Note that `ko` isn't a known interlanguage prefix
8713 Parsoid: recognize interlanguage links without a target page
8723 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8725 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8728 # Note that `ko` isn't a known interwiki prefix
8730 Parsoid: recognize interwiki links without a target page
8732 parsoid=wt2html,wt2wt,html2html
8738 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8739 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8742 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8743 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8747 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8751 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8754 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8758 Interlanguage link with preceding local interwiki link (bug 68085)
8760 parsoid=wt2html,wt2wt,html2html
8763 [[local:es:Spanish]]
8766 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8770 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8774 Looks like an interlanguage link, but is actually a local interwiki
8776 parsoid=wt2html,wt2wt,html2html
8782 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8786 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8790 ### Redirects, Parsoid-only
8794 1. Simple redirect to page
8796 #REDIRECT [[Main Page]]
8798 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8802 2. Other redirect variants
8804 #REDIRECT [[Main_Page]]
8806 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8809 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8810 # This tests the Parsoid bail-out code.
8812 3. Other redirect variants
8814 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8816 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8820 4. Redirect to a templated destination
8822 #REDIRECT [[{{echo|Foo}}bar]]
8824 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
8830 parsoid=wt2html,wt2wt
8835 <li>REDIRECT [[]]</li></ol>
8839 Optional colon in #REDIRECT
8841 # the colon is archaic syntax. we support it for wt2html, but we
8842 # don't care that it roundtrips back to the modern syntax.
8843 parsoid=wt2html,html2html
8845 #REDIRECT:[[Main Page]]
8847 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8851 Whitespace in #REDIRECT with optional colon
8853 # the colon and gratuitous whitespace is archaic syntax. we support
8854 # it for wt2html, but we don't care that it roundtrips back to the
8855 # modern syntax (without extra whitespace)
8856 parsoid=wt2html,html2html
8863 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8867 Piped link in #REDIRECT
8869 # content after piped link is ignored. we support this syntax,
8870 # but don't care that the piped link is lost when we roundtrip this.
8873 #REDIRECT [[Main Page|bar]]
8875 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8879 Redirect to category (T104502)
8881 parsoid=wt2html,wt2wt
8883 #REDIRECT [[Category:Foo]]
8885 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8889 Redirect to category with URL encoding (T104502)
8893 #REDIRECT [[Category%3AFoo]]
8895 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8899 Redirect to category page
8901 #REDIRECT [[:Category:Foo]]
8903 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8907 Redirect to image page (1)
8909 #REDIRECT [[File:Wiki.png]]
8911 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8915 Redirect to image page (2)
8917 #REDIRECT [[Image:Wiki.png]]
8919 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8922 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8923 # Next test confirms this.
8925 Redirect to language (1) (T104918)
8927 parsoid=wt2html,wt2wt,html2html
8929 #REDIRECT [[en:File:Wiki.png]]
8931 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8935 Redirect to language (2) (T104918)
8937 #REDIRECT [[:en:File:Wiki.png]]
8939 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8943 Redirect to interwiki (T104918)
8945 #REDIRECT [[meatball:File:Wiki.png]]
8947 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8951 Non-English #REDIRECT
8955 #TILVÍSUN [[Main Page]]
8957 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8961 Redirect syntax under text isn't considered a redirect
8964 #redirect [[Main Page]]
8967 <ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
8970 # FIXME: Should hoist the redirect to the top of the page and ensure there
8977 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8997 Broken br tag sanitization
9005 # TODO: Fix html2html mode (bug 51055)!
9007 Parsoid: Broken br tag recognition
9020 Incorrecly removing closing slashes from correctly formed XHTML
9022 <br style="clear:both;" />
9024 <p><br style="clear:both;" />
9029 Failing to transform badly formed HTML into correct XHTML
9031 <br style="clear: left;">
9032 <br style="clear: right;">
9033 <br style="clear: both;">
9035 <p><br style="clear: left;" />
9036 <br style="clear: right;" />
9037 <br style="clear: both;" />
9041 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9042 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9044 Handling html with a div self-closing tag
9053 <p><div title />
9057 <p><div title=bar />
9058 <div title=bar/>
9060 <div title="bar/"></div>
9064 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9065 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9066 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9067 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9068 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9069 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9073 Handling html with a br self-closing tag
9100 Horizontal ruler (should it add that extra space?)
9115 Horizontal ruler -- 4+ dashes render hr
9124 Horizontal ruler -- eats additional dashes on the same line
9133 Horizontal ruler -- does not collapse dashes on consecutive lines
9144 Horizontal ruler -- <4 dashes render as plain text
9153 Horizontal ruler -- Supports content following dashes on same line
9165 ### Block-level elements
9174 <ul><li>Common list</li>
9176 <li>item 3</li></ul>
9187 <ol><li>Numbered list</li>
9189 <li> item 3</li></ol>
9203 ***#Number on level 4
9205 **#Number on level 3
9206 **#Number on level 3
9210 #** Level 3, but ordered
9213 <ol><li> with numbers</li></ol>
9214 <ul><li> and bullets</li></ul>
9215 <ol><li> and numbers</li></ol></li>
9217 <ul><li>bullet level 2
9218 <ul><li>bullet level 3
9219 <ol><li>Number on level 4</li></ol></li></ul></li>
9221 <ol><li>Number on level 3</li>
9222 <li>Number on level 3</li></ol></li></ul>
9223 <ol><li>number level 2</li></ol></li>
9225 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9226 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9231 1. Nested mixed wikitext and html list
9234 * <ul><li>ho</li></ul>
9239 <li> <ul><li>ho</li></ul></li>
9241 <ul><li> ho</li></ul></li></ul>
9245 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9247 <ul><li> ho</li></ul></li></ul>
9251 2. Nested mixed wikitext and html list (incompatible)
9254 : {{echo|<li>ho</li>}}
9257 <dd> <li>ho</li></dd></dl>
9261 <dd> <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9271 <ul><li>bar</li></ul></li></ul>
9281 <ul><li><ul><li>foo</li></ul></li>
9287 Nested lists 3 (first element empty)
9293 <ul><li>bar</li></ul></li></ul>
9298 Nested lists 4 (first element empty)
9303 <ul><li><ul><li></li></ul></li>
9309 Nested lists 5 (both elements empty)
9314 <ul><li><ul><li></li></ul></li>
9320 Nested lists 6 (both elements empty)
9326 <ul><li></li></ul></li></ul>
9331 Nested lists 7 (skip initial nesting levels)
9335 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9340 Nested lists 8 (multiple nesting transitions)
9348 <ul><li><ul><li> bar</li></ul></li>
9349 <li> baz</li></ul></li>
9355 Nested lists 9 (extension interaction)
9361 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9365 1. Lists with start-of-line-transparent tokens before bullets: Comments
9378 2. Lists with start-of-line-transparent tokens before bullets: Template close
9383 <ul><li>foo bar</li>
9389 List items are not parsed correctly following a <pre> block (bug 785)
9395 <ul><li> <pre>foo</pre></li>
9396 <li> <pre>bar</pre></li>
9400 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9401 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9406 List items from template
9417 * notSOL{{inner list}}
9420 <ul><li> item 1</li>
9421 <li> item 2</li></ul>
9422 <ul><li> item 0</li>
9424 <li> item 2</li></ul>
9425 <ul><li> item 0</li>
9428 <li> item 2</li></ul>
9433 List interrupted by empty line or heading
9441 <ul><li> foo</li></ul>
9442 <ul><li><ul><li> bar</li></ul></li></ul>
9443 <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>
9444 <ul><li> Another list item</li></ul>
9449 Multiple list tags generated by templates
9470 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9473 <!--This line will NOT split the list-->
9475 <!--This line will NOT split the list either-->
9477 <!--foo--> <!----> <!--This line NOT split the list either-->
9488 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9491 <!--This line will NOT split the list-->
9493 <!--This line will NOT split the list either-->
9495 <!--foo--> <!----> <!--This line NOT split the list
9508 (The PHP parser relies on Tidy for the hack)
9510 parsoid=wt2html,wt2wt
9514 * {{echo|<li>templated li-hack}}
9515 * <!--foo--> <li> unsupported li-hack with preceding comments
9518 <li><li>not a li-hack
9525 <li>templated li-hack</li>
9526 <li>unsupported li-hack with preceding comments</li>
9529 <li>not a li-hack</li>
9534 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9561 Parsoid: Test of whitespace serialization with Templated bullets
9568 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9572 # ------------------------------------------------------------------------
9573 # The next set of tests are about Parsoid's ability to handle badly nested
9574 # tags (parse, minimize scope of fixup, and roundtrip back)
9575 # ------------------------------------------------------------------------
9578 Unbalanced closing block tags break a list
9579 (php parser relies on Tidy to fix up)
9597 # Parsoid fails this test, but it might be tricky to support properly.
9600 Unbalanced closing non-block tags don't break a list
9601 (php parser relies on Tidy to fix up)
9608 <li><span>a</span></li>
9609 <li><span>b</span></li>
9623 Unclosed formatting tags that straddle lists are closed and reopened
9624 (php parser relies on Tidy to fix up)
9626 parsoid=wt2html,wt2wt,html2html
9636 <ol><li> <s> a</s></li>
9637 <li><s> b </s></li></ol>
9642 1. List embedded in a formatting tag
9649 <li><small>foo</small></li>
9659 ## Ugly Parsoid output here
9660 ## Not sure what the right output is.
9662 2. List embedded in a formatting tag
9669 <li><small>a</small></li>
9670 <li><small>b</small></li>
9677 <li><small>b</small></li>
9681 # Ugly Parsoid and PHP parser output here
9682 # Not sure if we want to make this a test!
9685 ## 3. Unclosed formatting tags in list elements
9691 ## <li><small>a</small></li>
9692 ## <li><small><small>b</small></small></li>
9696 ## <li><small>a</small></li>
9698 ## <li><small>b</small></li>
9702 # This is a bug in the PHP parser + tidy combination.
9703 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9704 # and then fostered out of the table by tidy.)
9705 # We believe the Parsoid output to be correct.
9707 Table with missing opening <tr> tag
9709 parsoid=wt2html,wt2wt
9727 # Note that the current date is hard-coded as
9728 # 1970-01-01T00:02:03Z (a Thursday)
9729 # when running parser tests. The timezone is also fixed to GMT, so
9730 # local date will be identical to current date.
9733 Magic Word: {{CURRENTDAY}}
9742 Magic Word: {{CURRENTDAY2}}
9751 Magic Word: {{CURRENTDAYNAME}}
9760 Magic Word: {{CURRENTDOW}}
9769 Magic Word: {{CURRENTMONTH}}
9778 Magic Word: {{CURRENTMONTH1}}
9787 Magic Word: {{CURRENTMONTHABBREV}}
9789 {{CURRENTMONTHABBREV}}
9796 Magic Word: {{CURRENTMONTHNAME}}
9798 {{CURRENTMONTHNAME}}
9805 Magic Word: {{CURRENTMONTHNAMEGEN}}
9807 {{CURRENTMONTHNAMEGEN}}
9814 Magic Word: {{CURRENTTIME}}
9823 Magic Word: {{CURRENTHOUR}}
9832 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9841 Magic Word: {{CURRENTYEAR}}
9850 Magic Word: {{CURRENTTIMESTAMP}}
9852 {{CURRENTTIMESTAMP}}
9859 Magic Words LOCAL (UTC)
9863 * {{LOCALMONTHNAME}}
9864 * {{LOCALMONTHNAMEGEN}}
9865 * {{LOCALMONTHABBREV}}
9874 * {{LOCALTIMESTAMP}}
9889 <li> 19700101000203</li></ul>
9894 Magic Word: {{FULLPAGENAME}}
9896 title=[[User:Ævar Arnfjörð Bjarmason]]
9900 <p>User:Ævar Arnfjörð Bjarmason
9905 Magic Word: {{FULLPAGENAMEE}}
9907 title=[[User:Ævar Arnfjörð Bjarmason]]
9911 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9916 Magic Word: {{TALKSPACE}}
9918 title=[[User:Ævar Arnfjörð Bjarmason]]
9927 Magic Word: {{TALKSPACE}}, same namespace
9929 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9938 Magic Word: {{TALKSPACE}}, main namespace
9940 title=[[Parser Test]]
9949 Magic Word: {{TALKSPACEE}}
9951 title=[[User:Ævar Arnfjörð Bjarmason]]
9960 Magic Word: {{SUBJECTSPACE}}
9962 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9971 Magic Word: {{SUBJECTSPACE}}, same namespace
9973 title=[[User:Ævar Arnfjörð Bjarmason]]
9982 Magic Word: {{SUBJECTSPACE}}, main namespace
9984 title=[[Parser Test]]
9992 Magic Word: {{SUBJECTSPACEE}}
9994 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10003 Magic Word: {{NAMESPACE}}
10005 title=[[User:Ævar Arnfjörð Bjarmason]]
10014 Magic Word: {{NAMESPACEE}}
10016 title=[[User:Ævar Arnfjörð Bjarmason]]
10025 Magic Word: {{NAMESPACENUMBER}}
10027 title=[[User:Ævar Arnfjörð Bjarmason]]
10029 {{NAMESPACENUMBER}}
10036 Magic Word: {{SUBPAGENAME}}
10038 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10047 Magic Word: {{SUBPAGENAMEE}}
10049 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10058 Magic Word: {{ROOTPAGENAME}}
10060 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10064 <p>Ævar Arnfjörð Bjarmason
10069 Magic Word: {{ROOTPAGENAMEE}}
10071 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10075 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10080 Magic Word: {{BASEPAGENAME}}
10082 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10086 <p>Ævar Arnfjörð Bjarmason
10091 Magic Word: {{BASEPAGENAMEE}}
10093 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10097 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10102 Magic Word: {{TALKPAGENAME}}
10104 title=[[User:Ævar Arnfjörð Bjarmason]]
10108 <p>User talk:Ævar Arnfjörð Bjarmason
10113 Magic Word: {{TALKPAGENAMEE}}
10115 title=[[User:Ævar Arnfjörð Bjarmason]]
10119 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10124 Magic Word: {{SUBJECTPAGENAME}}
10126 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10128 {{SUBJECTPAGENAME}}
10130 <p>User:Ævar Arnfjörð Bjarmason
10135 Magic Word: {{SUBJECTPAGENAMEE}}
10137 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10139 {{SUBJECTPAGENAMEE}}
10141 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10146 Magic Word: {{NUMBEROFFILES}}
10155 Magic Word: {{PAGENAME}}
10157 title=[[User:Ævar Arnfjörð Bjarmason]]
10161 <p>Ævar Arnfjörð Bjarmason
10166 Magic Word: {{PAGENAME}} with metacharacters
10168 title=[['foo & bar = baz']]
10172 <p><i>'foo & bar = baz'</i>
10175 <p><i>'foo & bar = baz'</i></p>
10179 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10181 title=[[*RFC 1234 http://example.com/]]
10185 <p>*RFC 1234 http://example.com/
10188 <p>*RFC 1234 http://example.com/</p>
10192 Magic Word: {{PAGENAMEE}}
10194 title=[[User:Ævar Arnfjörð Bjarmason]]
10198 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10203 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10205 title=[[*RFC 1234 http://example.com/]]
10209 <p>*RFC_1234_http://example.com/
10212 <p>*RFC_1234_http://example.com/</p>
10216 Magic Word: {{REVISIONID}}
10225 Magic Word: {{SCRIPTPATH}}
10233 Magic Word: {{STYLEPATH}}
10242 Magic Word: {{SERVER}}
10246 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10251 Magic Word: {{SERVERNAME}}
10260 Magic Word: {{SITENAME}}
10269 Case-sensitive magic words, when cased differently, should just be template transclusions
10276 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10277 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10278 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10279 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10284 Case-insensitive magic words should still work with weird casing.
10294 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10298 # From plwiki:PLOS_ONE
10300 Parsoid: Page property magic word with magic word contents
10302 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10304 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10308 Parsoid: Template-generated DISPLAYTITLE
10310 {{{{echo|DISPLAYTITLE}}:Foo}}
10312 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
10316 Namespace 1 {{ns:1}}
10325 Namespace 1 {{ns:01}}
10334 Namespace 0 {{ns:0}} (bug 4783)
10342 Namespace 0 {{ns:00}} (bug 4783)
10350 Namespace -1 {{ns:-1}}
10359 Namespace User {{ns:User}}
10368 Namespace User talk {{ns:User_talk}}
10377 Namespace User talk {{ns:uSeR tAlK}}
10386 Namespace File {{ns:File}}
10395 Namespace File {{ns:Image}}
10404 Namespace (lang=de) Benutzer {{ns:User}}
10415 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10421 <p>Benutzer Diskussion
10428 {{urlencode:hi world?!}}
10429 {{urlencode:hi world?!|WIKI}}
10430 {{urlencode:hi world?!|PATH}}
10431 {{urlencode:hi world?!|QUERY}}
10441 Magic Word: prioritize type info over data-parsoid
10445 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10451 Magic Word: serialize on separate line (parsoid)
10453 parsoid=wt2wt,html2wt
10459 foo<meta property="mw:PageProp/notoc"/>bar
10463 Magic Word: rt non-english wikis
10470 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10474 __proto__ is treated as normal wikitext (T105997)
10486 Magic links: internal link to RFC (bug 479)
10490 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10493 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10497 Magic links: RFC (bug 479)
10501 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10504 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10508 Magic links: RFC (bug 65278)
10510 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10512 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
10515 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10519 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10521 RFC      822
10525 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10530 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
10536 Magic links: ISBN (bug 1937)
10540 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10543 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10547 Magic links: ISBN (bug 65278)
10549 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10551 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10554 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
10558 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10560 ISBN      978 0 316 09811 3
10566 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10573 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
10581 Magic links: PMID incorrectly converts space to underscore
10585 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10588 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10592 Magic links: PMID (bug 65278)
10594 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10596 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
10599 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
10603 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10605 PMID      1234
10609 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10614 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
10619 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10620 # since these are ExtLinkText, not MagicLinkText
10622 Magic links: use appropriate serialization for "almost" magic links.
10624 X[[Special:BookSources/0978739256|foo]]
10626 X[//tools.ietf.org/html/rfc1234 foo]
10628 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10629 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10632 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10633 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10637 Magic links: All disabled (T47942)
10639 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10645 <p>ISBN 0-306-40615-2
10656 Nonexistent template
10658 {{thistemplatedoesnotexist}}
10660 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10665 Template with invalid target containing tags
10667 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10669 <p>{{a<b>b</b>|foo|a=b|a = b}}
10674 Template with invalid target containing unclosed tag
10676 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10678 <p>{{a<b>|foo|a=b|a = b}}</b>
10683 Template with invalid target containing wikilink
10687 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10690 <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>
10694 Template with just whitespace in it, bug #68421
10698 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
10704 This is a test template
10712 <p>This is a test template
10717 Template with explicit namespace
10721 <p>This is a test template
10729 This is a test template with parameter {{{param}}}
10735 {{paramtest|param=foo}}
10737 <p>This is a test template with parameter foo
10742 Template:paramtestnum
10744 [[{{{1}}}|{{{2}}}]]
10748 Template unnamed parameter
10750 {{paramtestnum|Main Page|the main page}}
10752 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10757 Template:templatesimple
10763 Template:templateredirect
10765 #redirect [[Template:templatesimple]]
10769 Template:templateasargtestnum
10775 Template:templateasargtest
10777 {{template{{{templ}}}}}
10781 Template:templateasargtest2
10787 Template with template name as unnamed argument
10789 {{templateasargtestnum|templatesimple}}
10796 Template with template name as argument
10798 {{templateasargtest|templ=simple}}
10805 Template with template name as argument (2)
10807 {{templateasargtest2|templ=templatesimple}}
10814 Template:templateasargtestdefault
10816 {{{{{templ|templatesimple}}}}}
10826 Template with default value
10828 {{templateasargtestdefault}}
10835 Template with default value (value set)
10837 {{templateasargtestdefault|templ=templa}}
10846 {{templateredirect}}
10851 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10855 Template with argument in separate line
10857 {{ templateasargtest |
10865 Template with complex template as argument
10868 param ={{ templateasargtest |
10869 templ = simple }}}}
10871 <p>This is a test template with parameter (test)
10876 Template with thumb image (with link in description)
10878 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10880 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>
10883 <p>This is a test template with parameter</p>
10884 <div class="thumb tright">
10885 <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>
10886 <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>
10890 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
10894 Template:complextemplate
10896 {{{1}}} {{paramtest|
10897 param ={{{param}}}}}
10901 Template with complex arguments
10904 param ={{ templateasargtest |
10905 templ = simple }}|[[Template:complextemplate|link]]}}
10907 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10912 BUG 553: link with two variables in a piped link
10915 |[[{{{1}}}|{{{2}}}]]
10920 <td>[[{{{1}}}|{{{2}}}]]
10925 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-parsoid='{"src":"{{{1}}}"}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-parsoid='{"src":"{{{2}}}"}'>{{{2}}}</span>]]</td></tr>
10930 Abort table cell attribute parsing on wikilink
10933 | testing [[one|two]] | three || four
10934 | testing one two | three || four
10935 | testing="[[one|two]]" | three || four
10940 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10946 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10952 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
10953 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
10954 <td> testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td></tr>
10959 Don't abort table cell attribute parsing if wikilink is found in template arg
10962 | Test {{#tag:ref|One two "[[three]]" four}}
10966 <tbody><tr><td> Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"#tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
10971 Magic variable as template parameter
10973 {{paramtest|param={{SITENAME}}}}
10975 <p>This is a test template with parameter MediaWiki
10982 [[{{{param}}}|link]]
10986 Template parameter as link source
10988 {{linktest|param=Main Page}}
10990 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10995 Template:paramtest2
10997 including another template, {{paramtest|param={{{arg}}}}}
11001 Template passing argument to another template
11003 {{paramtest2|arg='hmm'}}
11005 <p>including another template, This is a test template with parameter 'hmm'
11016 Template as link source
11020 [[{{linktest2}}|Main Page]]
11022 [[{{linktest2}}]]Page
11024 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11025 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11026 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11044 Template infinite loop
11048 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11053 Template from main namespace
11072 BUG 529: Template with table, not included at beginning of line
11091 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11111 BUG 41: Template parameters shown as broken links
11120 Template with targets containing wikilinks
11124 {{[[{{echo|foo}}]]}}
11126 {{{{echo|[[foo}}]]}}
11128 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11129 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11141 Templates: Double quotes as template target
11148 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11152 ## This test is about making sure Parsoid's data-mw is well formed in the
11153 ## face of multiple templates with intersecting and overlapping ranges. The
11154 ## wikitext itself is wretched.
11156 Templates with intersecting and overlapping ranges
11181 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11183 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11185 <tbody><tr><td>hi</td></tr>
11190 Template:MSGNW test
11192 ''None'' of '''this''' should be
11194 but rather passed unmodified
11202 # hmm, fix this or just deprecate msgnw and document its behavior?
11206 {{msgnw:MSGNW test}}
11208 <p>''None'' of '''this''' should be
11210  but rather passed unmodified
11211 {{test}}
11215 <!-- comment -->
11222 {{int:youhavenewmessages|lots of money|not!}}
11224 <p>You have lots of money (not!).
11229 int keyword - non-existing message
11240 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11244 <includeonly> and <noinclude> being included
11255 <onlyinclude>Foo</onlyinclude>bar
11259 <onlyinclude> being included
11271 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11275 <onlyinclude> and <includeonly> being included
11284 <includeonly> and <noinclude> on a page
11286 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11293 Un-closed <noinclude>
11300 <onlyinclude> on a page
11302 <onlyinclude>Foo</onlyinclude>bar
11309 Un-closed <onlyinclude>
11316 Self-closed noinclude, includeonly, onlyinclude tags
11327 Unbalanced includeonly and noinclude tags
11331 |b</noinclude></noinclude>
11332 |c</noinclude></includeonly>
11333 |d</includeonly></includeonly>
11342 <td>c</includeonly>
11344 <td>d</includeonly></includeonly>
11350 Template:Includeonly section
11353 ==Includeonly section==
11359 Bug 6563: Edit link generation for section shown by <includeonly>
11361 {{includeonly section}}
11363 <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>
11364 <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>
11368 # Uses same input as the contents of [[Template:Includeonly section]]
11370 Bug 6563: Section extraction for section shown by <includeonly>
11375 ==Includeonly section==
11383 Bug 6563: Edit link generation for section suppressed by <includeonly>
11386 ==Includeonly section==
11390 <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>
11395 Bug 6563: Section extraction for section suppressed by <includeonly>
11400 ==Includeonly section==
11408 Un-closed <includeonly>
11413 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11416 ## We used to, but no longer wt2wt this test since the default serializer
11417 ## will normalize the include directives to serialize on their own line.
11418 ## Selser will take care of preserving formatting in scenarios where they
11419 ## intermingled with other wikitext.
11421 Includes and comments at SOL
11423 parsoid=wt2html,html2html
11425 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11429 </noinclude>* stuff
11432 <includeonly>can have stuff</includeonly>=== here ===
11435 <h2><span class="mw-headline" id="hu">hu</span></h2>
11438 <ul><li> stuff</li>
11439 <li> here</li></ul>
11440 <h3><span class="mw-headline" id="here">here</span></h3>
11443 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2> hu </h2>
11445 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11447 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11448 <li> here</li></ul>
11450 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3> here </h3>
11454 # TODO: test with DOM fragment reuse!
11456 Parsoid: DOM fragment reuse
11458 parsoid=wt2wt,wt2html
11460 a{{echo|b<table></table>c}}d
11472 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
11474 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
11475 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11476 </span><p about="#mwt2">cd</p>
11478 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
11480 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11482 </span><p about="#mwt3">b</p>
11486 Parsoid: Merge double tds (T52603)
11491 |{{echo|{{!}} foo}}
11495 <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>
11500 Parsoid: Merge double tds in nested transclusion content (T52603)
11506 |{{echo|{{!}} foo}}
11510 <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}}]}'>
11512 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11518 ### <includeonly> and <noinclude> in attributes
11521 0. includeonly around the entire attribute
11523 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11525 <p><span id="v2">bar</span>
11530 1. includeonly in html attr key
11532 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11534 <p><span id="foo">bar</span>
11539 2. includeonly in html attr value
11541 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11542 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11544 <p><span id="v1">bar</span>
11545 <span id="v1">bar</span>
11550 3. includeonly in part of an attr value
11552 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11554 <p><span style="color:red;">bar</span>
11559 4. includeonly in table attributes
11583 ### Token Stream Patcher tests
11585 ### These tests won't always pass wt2wt and other modes because
11586 ### on serialization, the table will be output on a new line.
11587 ### For now, we are blacklisting them, and using this to test selser.
11591 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11593 parsoid=wt2html,wt2wt
11595 {{echo|}}{| width = '100%'
11599 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11600 <tbody><tr><td>foo</td></tr>
11604 ## We used to, but no longer wt2wt this test since the default serializer
11605 ## will normalize the include directives to serialize on their own line.
11606 ## Selser will take care of preserving formatting in scenarios where they
11607 ## intermingled with other wikitext.
11609 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11613 <includeonly>a</includeonly>{| {{{b}}}
11617 <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-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"dsr\":[31,38,null,null],\"src\":\"{{{b}}}\"}'>{{{b}}}</span>"},{"html":""}]]}'>
11618 <tbody><tr><td>c</td></tr>
11623 Table wikitext syntax outside wiki-tables
11627 ! not a table heading
11630 | class="foo bar" | baz
11638 ! not a table heading
11641 | class="foo bar" | baz
11650 ### Testing parsing of templates where a template arg
11651 ### has the same name as the template itself.
11657 {{{quote|{{{1}}}}}}
11661 Templates: Template Name/Arg clash: 1. Use of positional param
11670 Templates: Template Name/Arg clash: 2. Use of named param
11672 {{quote|quote=foo}}
11679 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11688 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11692 Templates: 1. Simple use
11701 Templates: 2. Inside a block tag
11703 <div>{{echo|Foo}}</div>
11704 <blockquote>{{echo|Foo}}</blockquote>
11707 <blockquote>Foo</blockquote>
11717 Templates: P-wrapping: 1a. Templates on consecutive lines
11728 Templates: P-wrapping: 1b. Templates on consecutive lines
11742 Templates: P-wrapping: 1c. Templates on consecutive lines
11745 {{echo|bar}} <div>baz</div>
11758 Templates: P-wrapping: 1d. Template preceded by comment-only line
11767 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11771 Templates: Inline Text: 1. Multiple template uses
11773 {{echo|Foo}}bar{{echo|baz}}
11780 Templates: Inline Text: 2. Back-to-back template uses
11782 {{echo|Foo}}{{echo|bar}}
11789 Templates: Block Tags: 1. Multiple template uses
11791 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11793 <div>Foo</div><div>bar</div><div>baz</div>
11798 Templates: Block Tags: 2. Back-to-back template uses
11800 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11802 <div>Foo</div><div>bar</div>
11806 # This is an edge case relating to paragraph wrapping.
11808 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11813 <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
11818 Templates: Links: 1. Simple example
11820 {{echo|[[Foo|bar]]}}
11822 <p><a href="/wiki/Foo" title="Foo">bar</a>
11827 Templates: Links: 2. Generation of link href
11829 [[{{echo|Foo}}|bar]]
11831 <p><a href="/wiki/Foo" title="Foo">bar</a>
11836 Templates: Links: 3. Generation of part of a link href
11838 [[Fo{{echo|o}}|bar]]
11840 [[Foo{{echo|bar}}]]
11842 [[Foo{{echo|bar}}baz]]
11844 [[Foo{{echo|bar}}|bar]]
11846 [[:Foo{{echo|bar}}]]
11848 [[:Foo{{echo|bar}}|bar]]
11850 <p><a href="/wiki/Foo" title="Foo">bar</a>
11851 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11852 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11853 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11854 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11855 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11860 Templates: Links: 4. Multiple templates generating link href
11862 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11864 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11869 Templates: Links: 5. Generation of link text
11871 [[Foo|{{echo|bar}}]]
11873 <p><a href="/wiki/Foo" title="Foo">bar</a>
11878 Templates: Links: 5. Nested templates (only outermost template should be marked)
11880 {{echo|[[{{echo|Foo}}|bar]]}}
11882 <p><a href="/wiki/Foo" title="Foo">bar</a>
11887 Templates: HTML Tag: 1. Generation of HTML attr. key
11889 <div {{echo|style}}="color:red;">foo</div>
11891 <div style="color:red;">foo</div>
11896 Templates: HTML Tag: 2. Generation of HTML attr. value
11898 <div style={{echo|'color:red;'}}>foo</div>
11900 <div style="color:red;">foo</div>
11905 Templates: HTML Tag: 3. Generation of HTML attr key and value
11907 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11909 <div style="color:red;">foo</div>
11914 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11916 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11918 <div title="This is a long title with just one piece templated">foo</div>
11923 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11925 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11927 <div title="This is a long title with just one piece templated">foo</div>
11932 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11934 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11936 <div title="This is a long title with just one piece templated">foo</div>
11940 # SSS FIXME: While it is great we added support for all this,
11941 # do we want to make this part of the spec? Maybe we want to
11942 # deprecate this kind of usage in the future?
11944 Templates: HTML Tag: 7. Generation of partial attribute key string
11946 <div st{{echo|yle}}="color:red;">foo</div>
11948 <div style="color:red;">foo</div>
11953 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11955 <div {{echo|1=id="v1"}}>bar</div>
11957 <div id="v1">bar</div>
11962 Templates: HTML Tag: 9. Multiple template-generated attributes
11964 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11966 <div id="v1" title="foo">bar</div>
11971 Templates: Support for templates generating attributes and content
11973 {| {{mixed_attr_content_template}}
11978 <table style="color:red;" title="T48811">
11988 <table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
11997 1. Entities and nowikis inside templated attributes should be handled correctly
11999 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12001 <div style="background:#f9f9f9;">foo</div>
12004 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}'>style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
12008 2. Entities and nowikis inside templated attributes should be handled correctly
12011 |{{table_attribs_3}}
12016 <td style="background:#f9f9f9;">Foo
12021 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":0}}]}'>Foo</td></tr>
12026 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12029 |{{table_attribs_3}}
12034 <td style="background:#f9f9f9;">Foo
12038 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
12039 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12045 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12048 | {{table_attribs_6}} hi
12053 <td style="background: red;"> hi
12058 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["| ",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
12063 Templates: HTML Tables: 1. Generating start of a HTML table
12065 {{echo|<table><tr><td>foo</td>}}</tr></table>
12067 <table><tr><td>foo</td></tr></table>
12072 Templates: HTML Tables: 2a. Generating middle of a HTML table
12074 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12076 <table><tr><td>foo</td></tr></table>
12081 Templates: HTML Tables: 2b. Generating middle of a HTML table
12083 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12085 <table><tr><td>foo</td></tr></table>
12090 Templates: HTML Tables: 3. Generating end of a HTML table
12092 <table><tr>{{echo|<td>foo</td></tr></table>}}
12094 <table><tr><td>foo</td></tr></table>
12099 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12101 {{echo|<table>}}<tr><td>foo</td></tr></table>
12103 <table><tr><td>foo</td></tr></table>
12108 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12110 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12112 <table><tr><td>foo</td></tr></table>
12117 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12119 <table><tr>{{echo|<td>}}foo</td></tr></table>
12121 <table><tr><td>foo</td></tr></table>
12126 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12128 <table><tr><td>foo{{echo|</td>}}</tr></table>
12130 <table><tr><td>foo</td></tr></table>
12135 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12137 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12139 <table><tr><td>foo</td></tr></table>
12144 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12146 <table><tr><td>foo</td></tr>{{echo|</table>}}
12148 <table><tr><td>foo</td></tr></table>
12153 Templates: HTML Tables: 5. Proper fostering of categories from inside
12155 parsoid=wt2html,wt2wt
12157 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12158 <!--Two categories (Bug 50330)-->
12159 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12161 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12162 <!--Two categories (Bug 50330)-->
12163 <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>
12167 Templates: Wiki Tables: 1a. Fostering of entire template content
12175 <tr><td></td></tr></table>
12187 Templates: Wiki Tables: 1b. Fostering of entire template content
12200 <tr><td></td></tr></table>
12214 Templates: Wiki Tables: 2. Fostering of partial template content
12224 <tr><td></td></tr></table>
12237 Templates: Wiki Tables: 3. td-content via multiple templates
12240 {{echo|{{pipe}}a}}{{echo|b}}
12251 Templates: Wiki Tables: 4. Templated tags, no content
12257 <tr><td></td></tr></table>
12262 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12276 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12289 ## This test case is very specific to Parsoid's internals
12290 ## and is hence only tested for Parsoid's code. Parsoid uses
12291 ## a <meta> marker tag for <ref> tags and they are expanded
12292 ## much later. We are verifying that this <meta> tag usage
12293 ## doesn't prevent foster parenting.
12295 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12297 {{PartialTable}}<ref>foo</ref>
12302 <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span><table about="#mwt2">
12306 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
12310 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12320 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n{{{!}}\n{{!}}-"}},"i":0}},"\n<onlyinclude>\n|foo\n</onlyinclude>\n{{!}}}"]}'>
12321 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12325 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12330 Templates: Lists: Multi-line list-items via templates
12332 *{{echo|a {{nonexistent|
12334 *{{echo|b {{nonexistent|
12337 <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>
12338 <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>
12343 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12345 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12347 <p><i>ab</i>c<i>d</i>e
12352 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12353 (PHP parser generates misnested html)
12355 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12357 <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>
12361 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12362 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12364 parsoid=wt2html,wt2wt
12366 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12368 <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>
12369 <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>
12370 <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>
12374 Templates: Ugly nesting: 4. Divs opened/closed across templates
12376 a<div>b{{echo|c</div>d}}e
12387 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12393 |{{echo|foo</table>}}
12397 <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|}"]}'>
12401 <td>foo</td></tr></tbody></table><span about="#mwt1">
12402 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12407 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12417 <td>1. {{echo|foo </table>}}</td>
12419 <td>2. {{echo|baz </table>}}</td>
12432 <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>"]}'>
12437 <td>1. foo </td></tr></tbody></table></td>
12439 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12440 </span><span about="#mwt2">
12441 </span><span about="#mwt2">
12442 </span><span about="#mwt2">abc</span><span about="#mwt2">
12443 </span><span about="#mwt2">
12444 </span><span about="#mwt2">
12445 </span><span about="#mwt2">
12446 </span><span about="#mwt2">
12447 </span><span about="#mwt2">
12448 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12449 </span><span about="#mwt2">
12454 Templates: Ugly templates: 3. newline-only template parameter
12463 # This looks like a bug: a single newline triggers p/br for some reason.
12465 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12474 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12475 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12477 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12483 <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"}],[{"k":"1"}],[{"k":"1"}]]}'>foo
12484 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12488 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12489 # that are "identical" and generate nesting cycles in the algorithm
12491 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12493 {{echo|<table><tr><td><table>}}
12497 <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"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
12498 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12499 </table></td></tr></tbody></table>
12503 Templates: Parameters substituted at the top-level
12505 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12507 <p><i>who</i> me? <b>never!</b>
12510 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12514 Parser Functions: 1. Simple example
12523 Parser Functions: 2. Nested use (only outermost should be marked up)
12532 ### Pre-save transform tests
12535 pre-save transform: subst:
12541 This is a test template
12545 pre-save transform: normal template
12555 pre-save transform: nonexistent template
12559 {{thistemplatedoesnotexist}}
12561 {{thistemplatedoesnotexist}}
12565 pre-save transform: subst magic variables
12574 # This is bug 89, which I fixed. -- wtm
12576 pre-save transform: subst: templates with parameters
12580 {{subst:paramtest|param="something else"}}
12582 This is a test template with parameter "something else"
12586 Template:nowikitest
12588 <nowiki>'''not wiki'''</nowiki>
12592 pre-save transform: nowiki in subst (bug 1188)
12596 {{subst:nowikitest}}
12598 <nowiki>'''not wiki'''</nowiki>
12602 Template:commenttest
12604 This template has <!-- a comment --> in it.
12608 pre-save transform: comment in subst (bug 1936)
12612 {{subst:commenttest}}
12614 This template has <!-- a comment --> in it.
12618 pre-save transform: unclosed tag
12622 <nowiki>'''not wiki'''
12624 <nowiki>'''not wiki'''
12628 pre-save transform: mixed tag case
12632 <NOwiki>'''not wiki'''</noWIKI>
12634 <NOwiki>'''not wiki'''</noWIKI>
12638 pre-save transform: unclosed comment in <nowiki>
12642 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12644 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12647 # Leading @ in this template definition works around a limitation
12648 # in parsoid's parserTests which otherwise strips the <span> from the
12649 # result (confusing it for a template wrapper)
12653 @<span onmouseover="alert('crap')">Oh no</span>
12657 (confirming safety of fix for subst bug 1936)
12659 {{Template:dangerous}}
12661 <p>@<span>Oh no</span>
12666 pre-save transform: comment containing gallery (bug 5024)
12670 <!-- <gallery>data</gallery> -->
12672 <!-- <gallery>data</gallery> -->
12676 pre-save transform: comment containing extension
12680 <!-- <tag>data</tag> -->
12682 <!-- <tag>data</tag> -->
12686 pre-save transform: comment containing nowiki
12690 <!-- <nowiki>data</nowiki> -->
12692 <!-- <nowiki>data</nowiki> -->
12696 pre-save transform: <noinclude> in subst (bug 3298)
12706 pre-save transform: <onlyinclude> in subst (bug 3298)
12710 {{subst:Includes2}}
12718 {{<includeonly>subst:</includeonly>Includes}}
12722 Template:SafeSubstTest
12724 {{<includeonly>safesubst:</includeonly>Includes}}
12728 bug 22297: safesubst: works during PST
12732 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12738 bug 22297: safesubst: works during normal parse
12747 subst: does not work during normal parse
12751 <p>{{subst:Includes}}
12756 pre-save transform: context links ("pipe trick")
12760 [[Article (context)|]]
12763 [[Bar:Article (context)|]]
12764 [[:Bar:Article (context)|]]
12766 [[|Article (context)]]
12770 [[Article (context)|Article]]
12771 [[Bar:Article|Article]]
12772 [[:Bar:Article|Article]]
12773 [[Bar:Article (context)|Article]]
12774 [[:Bar:Article (context)|Article]]
12776 [[Article (context)]]
12777 [[Bar:X (Y) Z|X (Y) Z]]
12778 [[:Bar:X (Y) Z|X (Y) Z]]
12782 pre-save transform: context links ("pipe trick") with interwiki prefix
12786 [[interwiki:Article|]]
12787 [[:interwiki:Article|]]
12788 [[interwiki:Bar:Article|]]
12789 [[:interwiki:Bar:Article|]]
12791 [[interwiki:Article|Article]]
12792 [[:interwiki:Article|Article]]
12793 [[interwiki:Bar:Article|Bar:Article]]
12794 [[:interwiki:Bar:Article|Bar:Article]]
12798 pre-save transform: context links ("pipe trick") with parens in title
12800 pst title=[[Somearticle (context)]]
12804 [[Article (context)|Article]]
12808 pre-save transform: context links ("pipe trick") with comma in title
12810 pst title=[[Someplace, Somewhere]]
12813 [[Otherplace, Elsewhere|]]
12814 [[Otherplace, Elsewhere, Anywhere|]]
12816 [[Otherplace, Somewhere|Otherplace]]
12817 [[Otherplace, Elsewhere|Otherplace]]
12818 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12822 pre-save transform: context links ("pipe trick") with parens and comma
12824 pst title=[[Someplace (IGNORED), Somewhere]]
12827 [[Otherplace (place), Elsewhere|]]
12829 [[Otherplace, Somewhere|Otherplace]]
12830 [[Otherplace (place), Elsewhere|Otherplace]]
12834 pre-save transform: context links ("pipe trick") with comma and parens
12836 pst title=[[Who, me? (context)]]
12839 [[Me, Myself, and I (1937 song)|]]
12841 [[Yes, you. (context)|Yes, you.]]
12842 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12846 pre-save transform: context links ("pipe trick") with namespace
12848 pst title=[[Ns:Somearticle]]
12852 [[Ns:Article|Article]]
12856 pre-save transform: context links ("pipe trick") with namespace and parens
12858 pst title=[[Ns:Somearticle (context)]]
12862 [[Ns:Article (context)|Article]]
12866 pre-save transform: context links ("pipe trick") with namespace and comma
12868 pst title=[[Ns:Somearticle, Context, Whatever]]
12872 [[Ns:Article, Context, Whatever|Article]]
12876 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12878 pst title=[[Ns:Somearticle, Context (context)]]
12882 [[Ns:Article (context)|Article]]
12886 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12888 pst title=[[Ns:Somearticle (IGNORED), Context]]
12892 [[Ns:Article, Context|Article]]
12896 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12900 [[Article(context)|]]
12901 [[Bar:Article(context)|]]
12902 [[:Bar:Article(context)|]]
12903 [[|Article(context)]]
12907 [[Article(context)|Article]]
12908 [[Bar:Article(context)|Article]]
12909 [[:Bar:Article(context)|Article]]
12910 [[Article(context)]]
12911 [[Bar:X(Y)Z|X(Y)Z]]
12912 [[:Bar:X(Y)Z|X(Y)Z]]
12916 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12920 [[Article (context)|]]
12921 [[Bar:Article (context)|]]
12922 [[:Bar:Article (context)|]]
12923 [[|Article (context)]]
12927 [[Article (context)|Article]]
12928 [[Bar:Article (context)|Article]]
12929 [[:Bar:Article (context)|Article]]
12930 [[Article (context)]]
12931 [[Bar:X (Y) Z|X (Y) Z]]
12932 [[:Bar:X (Y) Z|X (Y) Z]]
12936 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12940 [[Article(context)|]]
12941 [[Bar:Article(context)|]]
12942 [[:Bar:Article(context)|]]
12943 [[|Article(context)]]
12947 [[Article(context)|Article]]
12948 [[Bar:Article(context)|Article]]
12949 [[:Bar:Article(context)|Article]]
12950 [[Article(context)]]
12951 [[Bar:X(Y)Z|X(Y)Z]]
12952 [[:Bar:X(Y)Z|X(Y)Z]]
12956 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12960 [[Article (context), context|]]
12961 [[Article (context),context|]]
12962 [[Bar:Article (context), context|]]
12963 [[Bar:Article (context),context|]]
12964 [[:Bar:Article (context), context|]]
12965 [[:Bar:Article (context),context|]]
12967 [[Article (context), context|Article]]
12968 [[Article (context),context|Article]]
12969 [[Bar:Article (context), context|Article]]
12970 [[Bar:Article (context),context|Article]]
12971 [[:Bar:Article (context), context|Article]]
12972 [[:Bar:Article (context),context|Article]]
12976 pre-save transform: trim trailing empty lines
12980 Empty lines are trimmed
12986 Empty lines are trimmed
12990 pre-save transform: Signature expansion
12995 * <noinclude>~~~</noinclude>
12996 * <includeonly>~~~</includeonly>
12997 * <onlyinclude>~~~</onlyinclude>
12999 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13000 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13001 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13002 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13007 pre-save transform: Signature expansion in nowiki tags (bug 93)
13013 <nowiki>~~~~</nowiki>
13015 <includeonly><nowiki>~~~~</nowiki></includeonly>
13017 <noinclude><nowiki>~~~~</nowiki></noinclude>
13019 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13021 {{subst:Foo}} shall be converted to FOO
13023 As well as inside noinclude/onlyinclude
13024 <noinclude>{{subst:Foo}}</noinclude>
13025 <onlyinclude>{{subst:Foo}}</onlyinclude>
13027 But not inside includeonly
13028 <includeonly>{{subst:Foo}}</includeonly>
13032 <nowiki>~~~~</nowiki>
13034 <includeonly><nowiki>~~~~</nowiki></includeonly>
13036 <noinclude><nowiki>~~~~</nowiki></noinclude>
13038 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13040 FOO shall be converted to FOO
13042 As well as inside noinclude/onlyinclude
13043 <noinclude>FOO</noinclude>
13044 <onlyinclude>FOO</onlyinclude>
13046 But not inside includeonly
13047 <includeonly>{{subst:Foo}}</includeonly>
13051 Parsoid: Recognize nowiki with trailing space in tags
13055 <nowiki ><div>[[foo]]</nowiki >
13063 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13070 Parsoid: Recognize nowiki with odd capitalization
13074 <noWikI ><div>[[foo]]</Nowiki >
13076 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13081 Parsoid: Escape nowiki with trailing space in tags
13085 <p><nowiki > foo </nowiki ></p>
13086 <p>a<nowiki />b</p>
13087 <p>c<nowiki/ >d</p>
13089 <nowiki > foo </nowiki >
13097 Parsoid: Escape weird noWikI capitalizations
13101 <p><noWikI > foo </NoWikI ></p>
13103 <noWikI > foo </NoWikI >
13107 ### Message transform tests
13110 message transform: magic variables
13120 message transform: should not transform wiki markup
13130 message transform: <noinclude> in transcluded template (bug 4926)
13140 message transform: <onlyinclude> in transcluded template (bug 4926)
13150 {{#special:}} page name, known
13154 {{#special:Recentchanges}}
13156 Special:RecentChanges
13160 {{#special:}} page name with subpage, known
13164 {{#special:Recentchanges/param}}
13166 Special:RecentChanges/param
13170 {{#special:}} page name, unknown
13174 {{#special:foobar nonexistent}}
13176 Special:Foobar nonexistent
13180 {{#speciale:}} page name, known
13184 {{#speciale:Recentchanges}}
13186 Special:RecentChanges
13190 {{#speciale:}} page name with subpage, known
13194 {{#speciale:Recentchanges/param}}
13196 Special:RecentChanges/param
13200 {{#speciale:}} page name, unknown
13204 {{#speciale:foobar nonexistent}}
13206 Special:Foobar_nonexistent
13212 ### For Parsoid-specific tests, see
13213 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13218 parsoid=wt2html,wt2wt,html2html
13220 [[Image:foobar.jpg]]
13222 <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>
13225 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13229 Simple image (using File: namespace, now canonical)
13231 [[File:Foobar.jpg]]
13233 <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>
13236 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13240 Right-aligned image
13242 [[File:Foobar.jpg|right]]
13244 <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>
13247 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13253 [[File:Foobar.jpg|right|Caption text]]
13255 <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>
13258 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13262 Image with caption, bug 53312 #1
13264 [[File:Foobar.jpg|right|Caption page stuff]]
13266 <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>
13269 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page stuff</figcaption></figure>
13273 Image with caption, bug 53312 #2
13275 [[File:Foobar.jpg|right|Caption page=]]
13277 <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>
13280 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=</figcaption></figure>
13284 Image with caption, bug 53312 #3
13286 [[File:Foobar.jpg|right|Caption page=stuff]]
13288 <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>
13291 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=stuff</figcaption></figure>
13295 Allow empty links in image captions (Bug 60753)
13299 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13304 <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>
13307 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption [[Link1]]\n[[]]\n[[Link2]]\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"}}'>Link1</a>
13309 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13310 </figcaption></figure>
13314 Titles in unlinked images (T23454)
13316 [[File:Foobar.jpg|link=|stuff]]
13318 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13323 Link with empty target
13332 Image with link trail
13334 Linktrails should not work for images: [[File:Foobar.jpg]]s
13336 <p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>s
13339 <p>Linktrails should not work for images: <span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span>s</p>
13343 Image with empty attribute
13345 parsoid=wt2html,wt2wt,html2html
13347 [[File:Foobar.jpg|right||Caption text]]
13349 <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>
13352 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13356 1. Block image with individual attributes from templates
13358 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13360 <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>
13363 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13367 2. Block Image with individual attributes from templates
13369 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13371 <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>
13374 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13378 3. Inline image with individual attributes from templates
13380 [[File:Foobar.jpg|{{echo|50px}}]]
13382 <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>
13385 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":0}}]}'>50px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13388 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13389 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13391 Image with multiple attributes from the same template
13393 [[File:Foobar.jpg|{{image_attribs}}]]
13395 <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>
13398 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13402 Image with link tails
13406 123[[File:Foobar.jpg]]456
13407 123[[File:Foobar.jpg|right]]456
13408 123[[File:Foobar.jpg|thumb]]456
13410 <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
13412 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
13413 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
13416 <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>
13418 <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>
13420 <div class="thumb tright">
13421 <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>
13422 <div class="thumbcaption">
13423 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13429 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span>456</p>
13430 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456</p>
13431 <p>123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
13435 Image with multiple captions -- only last one is accepted
13437 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13439 <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>
13442 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption3 - accepted</figcaption></figure>
13446 Image with multiple widths -- use last
13448 [[File:Foobar.jpg|200px|300px|caption]]
13450 <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>
13453 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></span></p>
13457 Image with multiple alignments -- use first (bug 48664)
13461 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13463 [[File:Foobar.jpg|middle|text-top|caption]]
13465 <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>
13466 <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>
13469 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13470 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13474 Image with width attribute at different positions
13476 [[File:Foobar.jpg|200px|right|Caption]]
13477 [[File:Foobar.jpg|right|200px|Caption]]
13478 [[File:Foobar.jpg|right|Caption|200px]]
13480 <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>
13481 <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>
13482 <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>
13485 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13486 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13487 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13490 # a sad bit of backward-compatibility
13492 Image with size specified with pxpx (bug 13500, 51628)
13494 parsoid=wt2html,wt2wt,html2html
13496 [[File:Foobar.jpg|20pxpx]]
13497 [[File:Foobar.jpg|200x20pxpx]]
13499 <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>
13500 <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>
13503 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></span> <span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="177"/></a></span></p>
13507 Image with link parameter, wiki target
13509 [[File:Foobar.jpg|link=Main Page]]
13511 <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>
13514 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13517 # parsoid bug 49293 (part 1)
13519 Image with link parameter, URL target
13521 [[File:Foobar.jpg|link=http://example.com/]]
13523 <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>
13526 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13529 # parsoid bug 49293 (part 2)
13531 Image with link parameter, protocol-less URL target
13533 [[File:Foobar.jpg|link=//example.com/]]
13535 <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>
13538 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13542 Escaping non-block captions (T107435)
13545 "modes": ["wt2wt"],
13547 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13551 [[Image:Foobar.jpg|caption]]
13553 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13556 # wgExternalLinkTarget not supported by Parsoid
13558 Image with link parameter, wgExternalLinkTarget
13560 [[Image:foobar.jpg|link=http://example.com/]]
13562 wgExternalLinkTarget='foobar'
13564 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13569 Image with link parameter, wgNoFollowLinks set to false
13571 [[Image:foobar.jpg|link=http://example.com/]]
13573 wgNoFollowLinks=false
13575 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13580 Image with link parameter, wgNoFollowDomainExceptions
13582 [[Image:foobar.jpg|link=http://example.com/]]
13584 wgNoFollowDomainExceptions='example.com'
13586 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13590 # wgExternalLinkTarget not supported by Parsoid
13592 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13594 [[Image:foobar.jpg|link=http://example.com/|Title]]
13596 wgExternalLinkTarget='foobar'
13598 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13603 Image with empty link parameter
13605 [[File:Foobar.jpg|link=]]
13607 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13610 <p><span class="mw-default-size" typeof="mw:Image"><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></span></p>
13614 Image with link parameter (wiki target) and unnamed parameter
13616 [[File:Foobar.jpg|link=Main_Page|Title]]
13618 <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>
13621 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13625 Image with link parameter (URL target) and unnamed parameter
13627 [[File:Foobar.jpg|link=http://example.com/|Title]]
13629 <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>
13632 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13636 Thumbnail image with link parameter
13639 parsoid=wt2html,wt2wt,html2html
13641 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13643 <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>
13646 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
13650 Manually-specified thumbnail image
13654 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13656 <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>
13659 <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" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13663 Manually-specified thumbnail image with explicit link to wiki page
13666 parsoid=wt2html,wt2wt,html2html
13668 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13670 <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>
13673 <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" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13677 Manually-specified thumbnail image with explicit link to url
13680 parsoid=wt2html,wt2wt,html2html
13682 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13684 <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>
13687 <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" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13691 Manually-specified thumbnail image with explicit no link
13694 parsoid=wt2html,wt2wt,html2html
13696 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13698 <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>
13701 <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" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
13705 Manually-specified thumbnail image with explicit link and alt text
13708 parsoid=wt2html,wt2wt,html2html
13710 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13712 <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>
13715 <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" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13719 Image with frame and link
13721 parsoid=wt2html,wt2wt,html2html
13723 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13725 <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>
13728 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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>
13732 Image with frame and link and explicit alt
13734 parsoid=wt2html,wt2wt,html2html
13736 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13738 <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>
13741 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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>
13745 Image with wiki markup in implicit alt
13747 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13749 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13751 <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>
13752 </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>
13755 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
13757 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></span></p>
13761 Alt image option should handle most kinds of wikitext without barfing
13763 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13765 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a link and a bold template." 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 the image caption</div></div></div>
13768 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&#39;&#39;bold template&#39;&#39;\"}},\"i\":0}}]}'>bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
13771 ###################
13772 # Conflicting image format options.
13773 # First option specified should 'win'.
13774 # All three cases in each test should be identical.
13777 Image with 'frameless' first.
13779 parsoid=wt2html,wt2wt,html2html
13781 [[File:Foobar.jpg|frameless|caption]]
13783 [[File:Foobar.jpg|frameless|frame|caption]]
13785 [[File:Foobar.jpg|frameless|thumb|caption]]
13787 <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>
13788 </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>
13789 </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>
13792 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
13793 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
13794 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
13798 Image with 'frame' first.
13800 parsoid=wt2html,wt2wt,html2html
13802 [[File:Foobar.jpg|frame|caption]]
13803 [[File:Foobar.jpg|frame|frameless|caption]]
13804 [[File:Foobar.jpg|frame|thumb|caption]]
13806 <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>
13807 <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>
13808 <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>
13811 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13812 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13813 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13817 Image with 'thumb' first.
13819 parsoid=wt2html,wt2wt,html2html
13821 [[File:Foobar.jpg|thumb|caption]]
13822 [[File:Foobar.jpg|thumb|frameless|caption]]
13823 [[File:Foobar.jpg|thumb|frame|caption]]
13825 <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>
13826 <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>
13827 <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>
13830 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13831 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13832 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13835 ###################
13837 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13838 # and https://phabricator.wikimedia.org/T64258
13839 # Foobar has actual size of 1941x220
13840 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13841 # a scalable format.
13842 # 2. Framed images always ignore size options; always render at default size.
13843 # 3. "Unspecified format" and border are the only types which can be
13847 Image: "unspecified format" and border enlarge
13849 parsoid=wt2html,wt2wt,html2html
13851 [[File:Foobar.jpg|2000px]]
13853 [[File:Foobar.jpg|border|2000px]]
13855 <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>
13856 </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>
13859 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
13860 <p><span class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
13864 Image: "unspecified format" and border reduce
13866 parsoid=wt2html,wt2wt,html2html
13868 [[File:Foobar.jpg|1000px]]
13870 [[File:Foobar.jpg|border|1000px]]
13872 <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>
13873 </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>
13876 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></span></p>
13877 <p><span class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></span></p>
13881 Image: thumbs reduce
13883 parsoid=wt2html,wt2wt,html2html
13885 [[File:Foobar.jpg|thumb|50px]]
13887 <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>
13890 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure>
13894 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13896 parsoid=wt2html,wt2wt,html2html
13898 [[File:Foobar.jpg|thumb|2000px]]
13900 [[File:Foobar.svg|thumb|2000px]]
13902 <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>
13903 <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>
13906 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13907 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
13911 Image: frameless can reduce in size
13913 parsoid=wt2html,wt2wt,html2html
13915 [[File:Foobar.jpg|frameless|50px]]
13917 <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>
13920 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
13924 Image: bitmap frameless can't be enlarged past original size, but vector can
13926 parsoid=wt2html,wt2wt,html2html
13928 [[File:Foobar.jpg|frameless|2000px]]
13930 [[File:Foobar.svg|frameless|2000px]]
13932 <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>
13933 </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>
13936 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13937 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></span></p>
13941 Image: framed images are always unscaled.
13943 parsoid=wt2html,wt2wt,html2html
13945 [[File:Foobar.jpg|frame]]
13947 [[File:Foobar.jpg|frame|50px]]
13949 [[File:Foobar.jpg|frame|50x50px]]
13951 [[File:Foobar.jpg|frame|2000px]]
13953 <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>
13954 <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>
13955 <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>
13956 <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>
13959 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13960 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13961 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13962 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13965 ###################
13968 Link to image page- image page normally doesn't exists, hence edit link
13969 Add test with existing image page
13970 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13974 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13979 bug 18784 Link to non-existent image page with caption should use caption as link text
13981 [[:Image:test|caption]]
13983 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13988 Frameless image caption with a free URL
13990 [[File:Foobar.jpg|http://example.com]]
13992 <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>
13995 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13999 Thumbnail image caption with a free URL
14003 [[File:Foobar.jpg|thumb|http://example.com]]
14005 <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>
14008 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
14012 Thumbnail image caption with a free URL and explicit alt
14015 parsoid=wt2html,wt2wt,html2html
14017 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14019 <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>
14022 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
14026 SVG thumbnails with no language set
14029 [[File:Foobar.svg|thumb|caption]]
14031 <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>
14034 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
14038 SVG thumbnails with language de
14040 parsoid=wt2html,wt2wt,html2html
14042 [[File:Foobar.svg|thumb|caption|lang=de]]
14044 <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>
14047 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
14051 SVG thumbnails with invalid language code
14053 parsoid=wt2html,wt2wt,html2html
14055 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14057 <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>
14060 <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" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid.language.code</figcaption></figure>
14064 BUG 1887: A ISBN with a thumbnail
14066 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14068 <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>
14071 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
14075 BUG 1887: A RFC with a thumbnail
14077 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14079 <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>
14082 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
14086 BUG 1887: A mailto link with a thumbnail
14088 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14090 <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>
14093 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
14096 # Pending resolution to bug 368
14098 BUG 648: Frameless image caption with a link
14100 [[File:Foobar.jpg|text with a [[link]] in it]]
14102 <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>
14105 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14109 BUG 648: Frameless image caption with a link (suffix)
14111 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14113 <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>
14116 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}'>linkfoo</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14120 BUG 648: Frameless image caption with an interwiki link
14122 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14124 <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>
14127 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}'>MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14131 BUG 648: Frameless image caption with a piped interwiki link
14133 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14135 <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>
14138 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14142 T107474: Frameless image caption with <nowiki>
14144 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14146 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>"}]}' data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[18,75,8,9]}'>text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14150 Escape HTML special chars in image alt text
14152 [[File:Foobar.jpg|& < > "]]
14154 <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>
14157 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14161 Entities in file name and attributes
14163 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14165 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14168 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}'>7% solution</a>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></span></p>
14172 BUG 499: Alt text should have Ӓ, not &1234;
14174 [[File:Foobar.jpg|♀]]
14176 <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>
14179 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&#9792;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}'>♀</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14183 Broken image caption with link
14185 parsoid=wt2html,wt2wt,html2html
14187 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14189 <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.
14192 <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>
14196 Image caption containing another image
14198 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14200 <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>
14203 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></span> inside it!</figcaption></figure>
14207 Image: caption containing a newline
14209 [[File:Foobar.jpg|This
14212 <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>
14215 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14219 Image: caption containing leading space
14220 (The leading space should not trigger nowiki escaping in wt2wt mode)
14222 [[File:Foobar.jpg|thumb| bar]]
14224 <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>
14227 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
14231 Image: caption containing a table
14233 parsoid=wt2html,wt2wt,html2html
14235 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14241 and some more text.]]
14243 <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>
14246 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
14249 <tr><th>Foo </th><th>Bar</th></tr>
14252 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14256 Bug 3090: External links other than http: in image captions
14258 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14260 <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>
14263 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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>
14269 parsoid=wt2html,wt2wt,html2html
14271 [[Image:foobar.jpg|a|class=b]]
14273 <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>
14276 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14280 Localized image handling (1).
14282 parsoid=wt2html,wt2wt,html2html
14285 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14287 <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>
14290 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14294 Localized image handling (2).
14297 parsoid=wt2html,wt2wt,html2html
14300 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14302 <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>
14305 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14309 Localized image handling (3).
14314 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure>
14316 [[File:Foobar.jpg|بندانگشتی]]
14320 "border", "frameless" and "class" attributes on an image.
14323 parsoid=wt2html,wt2wt,html2html
14325 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14327 <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>
14330 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
14333 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14335 Invalid image attributes (bug 62500)
14338 parsoid=wt2html,wt2wt,html2html
14340 [[File:Foobar.jpg|thumb|float|left|caption]]
14342 [[File:Foobar.jpg|thumb|righ|caption]]
14344 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14346 <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>
14347 <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>
14348 <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>
14351 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14352 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14353 <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/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14359 #REDIRECT [[File:Barfoo.jpg]]
14362 # FIXME: Parsoid should run this test -- but we'd need to teach the
14363 # mockAPI about the redirected Barfoo.jpg image.
14367 [[Image:Barfoo.jpg]]
14369 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14374 Missing image with uploads disabled
14378 [[File:Foobaz.jpg]]
14380 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14383 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></span></p>
14386 # Parsoid-specific testing for images
14387 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14388 # Currently imperfect due to a flaw in the Parsoid testrunner
14390 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14394 Parsoid-specific image handling - simple image with size and middle alignment
14396 [[File:Foobar.jpg|middle|50px]]
14398 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14402 Parsoid-specific image handling - simple image with size, middle alignment,
14403 non-standard namespace alias
14405 parsoid=wt2wt,wt2html,html2html
14407 [[Image:Foobar.jpg|middle|50px]]
14409 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14413 Parsoid-specific image handling - simple image with size and middle alignment
14416 [[File:Foobar.jpg|50px|middle]]
14418 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14422 Parsoid-specific image handling - simple image with size and middle alignment
14423 and non-standard namespace name
14425 parsoid=wt2html,wt2wt,html2html
14427 [[Image:Foobar.jpg|50px|middle]]
14429 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14433 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14435 [[File:Foobar.jpg|500x10px|baseline|caption]]
14437 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="10" width="89" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"10","width":"89"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14441 Parsoid-specific image handling - simple image with border and size spec
14443 [[File:Foobar.jpg|50px|border|caption]]
14445 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14449 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14451 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14453 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption content</figcaption></figure>
14457 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14460 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14462 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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>
14466 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14468 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14470 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption>caption</figcaption></figure>
14474 Parsoid-specific image handling - thumbnail with specific size, halign,
14475 valign, and caption (existing content)
14477 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14479 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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>
14483 Parsoid-specific image handling - framed image with specific size and caption
14486 parsoid=wt2html,wt2wt,html2html
14488 [[File:Foobar.jpg|frame|500x50px|caption]]
14490 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14494 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14497 parsoid=wt2html,wt2wt,html2html
14499 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14501 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14505 Parsoid-specific image handling - frameless image with specific size, border, and caption
14507 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14509 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14513 Parsoid-specific image handling - simple image with a formatted caption
14515 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14517 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}]}' data-mw='{"caption":"<table data-parsoid='{\"stx\":\"html\",\"dsr\":[18,81,7,8]}'><tbody data-parsoid='{\"dsr\":[25,73,0,0]}'><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[25,54,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[29,39,4,5]}'>a</td><td data-parsoid='{\"stx\":\"html\",\"dsr\":[39,49,4,5]}'>b</td></tr><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[54,73,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[58,68,4,5]}'>c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14521 Parsoid-specific image handling - caption with a template in it
14523 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14525 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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>
14529 Parsoid-specific image handling - caption with unbalanced tags in it
14531 parsoid=wt2html,wt2wt,html2html
14534 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14538 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
14543 Parsoid-specific image handling - empty caption (1)
14545 parsoid=wt2html,wt2wt
14547 [[File:Foobar.jpg|thumb|]]
14549 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
14552 # empty captions don't get serialized unless we're in the "round trip" case
14554 Parsoid-specific image handling - empty caption (2)
14558 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14559 <a href="./File:Foobar.jpg">
14560 <img resource="./File:Foobar.jpg"
14561 src="//example.com/images/3/3a/Foobar.jpg"
14562 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14563 height="25" width="220"/>
14565 <figcaption></figcaption>
14568 [[File:Foobar.jpg|thumb]]
14572 Parsoid-specific image handling - whitespace caption
14574 [[File:Foobar.jpg|thumb| ]]
14576 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> </figcaption></figure>
14580 Parsoid-specific image handling - lang option
14583 [[File:Foobar.svg|lang=de|caption]]
14587 <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" data-file-width="240" data-file-height="180" data-file-type="drawing" height="180" width="240"/></a></span>
14591 ## Edge case bugs in Parsoid from T93580
14593 T93580: 1. Templated <ref> inside block images
14595 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14599 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
14601 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14605 T93580: 2. <ref> inside inline images
14607 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14611 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14613 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14617 T93580: 3. Templated <ref> inside inline images
14619 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14623 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14625 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14632 Subpage test/subpage
14640 subpage title=[[Subpage test]]
14644 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14649 Subpage noslash link
14651 subpage title=[[Subpage test]]
14655 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14660 Subpage test/1/2/subpage
14666 Relative subpage noslash link
14668 parsoid=wt2wt,wt2html,html2html
14669 subpage title=[[Subpage test/1/2/3/4]]
14675 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14676 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14679 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14680 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14684 Parsoid: dot-slash prefixed wikilinks
14694 </p><p>[[././baz/]]
14699 </p><p>[[././baz/]]
14704 Render invalid page names as plain text (bug 51090)
14717 [[{{echo|./../foo}}|bar]]
14718 [[{{echo|foo/.}}|bar]]
14719 [[{{echo|foo/..}}|bar]]
14720 [[{{echo|foo~~~~bar}}]]
14721 [[{{echo|foo>bar}}]]
14722 [[{{echo|foo././bar}}]]
14723 [[{{echo|foo{bar}}]]
14724 [[{{echo|foo}bar}}]]
14725 [[{{echo|foo[bar}}]]
14726 [[{{echo|foo]bar}}]]
14727 [[{{echo|foo<bar}}]]
14729 <p>[[./../foo|bar]]
14739 </p><p>[[./../foo|bar]]
14752 <p>[[./../foo|bar]]
14763 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14764 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14765 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14766 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14767 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14768 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14769 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14770 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14771 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14772 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14773 [[<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>
14781 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14786 BUG 561: {{/Subpage}}
14788 subpage title=[[Page]]
14792 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14800 Category:MediaWiki User's Guide
14808 [[:Category:MediaWiki User's Guide]]
14810 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14819 [[Category:MediaWiki User's Guide]]
14821 cat=MediaWiki_User's_Guide sort=
14823 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide" data-parsoid='{"stx":"simple","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
14827 PAGESINCATEGORY invalid title fatal (r33546 fix)
14829 {{PAGESINCATEGORY:<bogus>}}
14836 Category with different sort key
14840 [[Category:MediaWiki User's Guide|Foo]]
14842 cat=MediaWiki_User's_Guide sort=Foo
14844 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#Foo" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
14848 Category with identical sort key
14852 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14854 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14856 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20User's%20Guide" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
14860 Category with empty sort key
14865 [[Category:MediaWiki User's Guide|]]
14867 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14871 Category with empty sort key and parentheses
14876 [[Category:Foo (bar)|]]
14878 [[Category:Foo (bar)|Foo]]
14882 Category with link tail
14887 123[[Category:Foo]]456
14889 123[[Category:Foo]]456
14893 Category with template
14898 [[Category:{{echo|Foo}}]]
14900 [[Category:{{echo|Foo}}]]
14904 Category with template in sort key
14909 [[Category:Foo|{{echo|Bar}}]]
14911 [[Category:Foo|{{echo|Bar}}]]
14915 Category with template in sort key and title
14920 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14922 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14925 ## We used to, but no longer wt2wt this test since the default serializer
14926 ## will normalize all categories to serialize on their own line.
14927 ## This wikitext usage is going to be fairly uncommon in production and
14928 ## selser will take care of preserving formatting in those scenarios.
14930 Category / paragraph interactions
14934 Foo [[Category:Baz]] Bar
14936 Foo [[Category:Baz]]
14944 [[Category:Baz]] Bar
14957 {{echo|[[Category:Baz]]}}
14970 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14971 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14972 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14973 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14974 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/></p>
14975 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14978 ## We used to, but no longer wt2wt this test since the default serializer
14979 ## will normalize all categories to serialize on their own line.
14980 ## This wikitext usage is going to be fairly uncommon in production and
14981 ## selser will take care of preserving formatting in those scenarios.
14983 ## The whitespace on the empty line is part of the test. Please do not delete
14985 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14991 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14993 {{echo|[[Category:Foo]] and so should this!}}
14995 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15000 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15002 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and so should this!"}},"i":0}}]}'/><span about="#mwt1"> and so should this!</span></p>
15005 ## Parsoid will not try to wt2wt this while preserving newlines because
15006 ## it suppresses excess newlines within list items -- and we don't want to
15007 ## introduce a special case just for categories, which is, in reality somewhat
15008 ## odd behavior -- categories are unlikely to be used in list items like this
15009 ## in top-level pages and are only likely to show up in template-generated
15010 ## list items where this RT-ing is a non-issue.
15012 ## The whitespace on the empty line is part of the test. Please do not delete
15014 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15020 [[Category:Foo]] and this should be part of the same list item
15023 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15025 <ul><li>This and this should be part of the same list item</li>
15026 <li>So should this and this should be part of the same list item</li></ul>
15029 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15030 <li>So should this <link rel="mw:PageProp/Category" href="./Category:Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and this should be part of the same list item"}},"i":0}}]}'/><span> and this should be part of the same list item</span></li>
15034 ## Newlines and categories that follow the last item of a list
15035 ## are treated differently because this (list followed by categories)
15036 ## is an extremely common pattern on wikis.
15038 3. Categories and newlines: newline suppression for last list item should RT properly
15051 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15053 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15054 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15058 4. Categories and newlines: newline suppression for last list item should RT properly
15066 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15068 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15071 ## only wt2html for this to make sure the algo only applies to the rightmost path
15073 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15086 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15088 <ul><li> d</li></ul></li></ul>
15089 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15092 ## We used to, but no longer wt2wt this test since the default serializer
15093 ## will normalize all categories to serialize on their own line.
15094 ## This wikitext usage is going to be fairly uncommon in production and
15095 ## selser will take care of preserving formatting in those scenarios.
15097 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15101 * a [[Category:Foo]]
15103 <ul><li>a <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
15106 # This test also demonstrates because of newline+category tunneling
15107 # through the list hander, template wrapping doesn't expand to the
15108 # containing list when the list item swallows the category.
15110 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15115 <ul><li> <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
15116 </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
15120 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15124 {{echo|[[Category:Foo]]
15128 <ul><li> a</li></ul>
15130 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
15131 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15132 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15136 Category links with multiple namespaces
15138 [[Category:Project:Foo]]
15140 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15144 Parsoid: Serialize link to category page with colon escape
15150 [[:Category:Foo|Bar]]
15153 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15154 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15158 # We used to, but no longer wt2wt this test since the default serializer
15159 # will normalize all categories to serialize on their own line.
15160 # This wikitext usage is going to be fairly uncommon in production and
15161 # selser will take care of preventing whitespace insertion if this
15162 # occurs in an article.
15164 # html2html disabled for the same reason (whitespace insertion between
15167 # html2wt disabled because it localizes the "Category" namespace.
15169 Link prefix/suffixes aren't applied to category links
15179 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15183 Parsoid: Serialize link to file page with colon escape
15189 [[:File:Foo.png|Bar]]
15192 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15193 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15198 Parsoid: Serialize a genuine category link without colon escape
15203 [[Category:Foo|Bar]]
15205 <link rel="mw:PageProp/Category" href="./Category:Foo">
15206 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15210 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15214 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15216 [[Category:Toxine bactérienne]]
15220 Parsoid: Defaultsort
15222 {{DEFAULTSORT:Foo}}
15224 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15228 Parsoid: Defaultsort (template-generated)
15230 {{{{echo|DEFAULTSORT}}:Foo}}
15232 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
15236 ### Inter-language links
15239 Interlanguage links
15247 es:Alimento fr:Nourriture zh:食品
15249 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15250 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15251 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15255 Duplicate interlanguage links (bug 24502)
15266 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15267 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15268 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15269 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15276 Basic section headings
15283 ===Smaller headline===
15286 <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>
15289 <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>
15292 <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>
15298 Section headings with TOC
15301 === Subheadline 1 ===
15302 ===== Skipping a level =====
15303 ====== Skipping a level ======
15307 ===Another headline===
15309 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15311 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15313 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15315 <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>
15317 <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>
15324 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15326 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15332 <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>
15333 <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>
15334 <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>
15335 <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>
15336 <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>
15339 <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>
15344 TOC anchors don't collide
15352 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15354 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15355 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15356 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15357 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15361 <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=1" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15362 <h2><span class="mw-headline" id="Headline">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15363 <h2><span class="mw-headline" id="Headline_2_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15364 <h2><span class="mw-headline" id="Headline_3">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15368 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15370 Handling of sections up to level 6 and beyond
15373 == Level 2 Heading==
15374 === Level 3 Heading===
15375 ==== Level 4 Heading====
15376 ===== Level 5 Heading=====
15377 ====== Level 6 Heading======
15378 ======= Level 7 Heading=======
15379 ======== Level 8 Heading========
15380 ========= Level 9 Heading=========
15381 ========== Level 10 Heading==========
15383 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15385 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15387 <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>
15389 <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>
15391 <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>
15393 <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>
15395 <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>
15396 <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>
15397 <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>
15398 <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>
15399 <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>
15413 <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>
15414 <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>
15415 <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>
15416 <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>
15417 <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>
15418 <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>
15419 <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>
15420 <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>
15421 <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>
15422 <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>
15427 TOC regression (T11764)
15431 ==== title 1.1.1 ====
15436 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15438 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15440 <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>
15442 <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>
15445 <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>
15448 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15450 <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>
15456 <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>
15457 <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>
15458 <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>
15459 <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>
15460 <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>
15461 <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>
15466 TOC for heading containing <span id="..."></span> (T96153)
15469 ==<span id="old-anchor"></span>New title==
15471 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15473 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15477 <h2><span class="mw-headline" id="New_title"><span id="old-anchor"></span>New title</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: New title">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15482 TOC with wgMaxTocLevel=3 (bug 6204)
15488 ==== title 1.1.1 ====
15493 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15495 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15497 <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>
15498 <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>
15501 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15503 <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>
15509 <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>
15510 <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>
15511 <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>
15512 <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>
15513 <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>
15514 <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>
15519 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15525 ====Section 1.1.1====
15526 ====Section 1.1.1.1====
15529 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15531 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15533 <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>
15536 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15540 <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>
15541 <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>
15542 <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>
15543 <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>
15544 <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>
15550 Resolving duplicate section names
15555 <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>
15556 <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>
15561 Resolving duplicate section names with differing case (bug 10721)
15566 <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>
15567 <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>
15579 Template with sections, __NOTOC__
15586 <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>
15587 <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>
15588 <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>
15589 <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>
15594 __NOEDITSECTION__ keyword
15600 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15601 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15606 Link inside a section heading
15608 ==Section with a [[Main Page|link]] in it==
15610 <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>
15615 TOC regression (T14077)
15622 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15624 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15626 <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>
15629 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15633 <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>
15634 <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>
15635 <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>
15640 BUG 1219 URL next to image (good)
15642 http://example.com [[File:Foobar.jpg]]
15644 <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>
15647 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
15651 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15654 The line above must have a trailing space!
15657 But just in case it doesn't...
15659 <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>
15660 <p>The line above must have a trailing space!
15662 <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>
15663 <p>But just in case it doesn't...
15668 Header with special characters (bug 25462)
15670 The tooltips shall not show entities to the user (ie. be double escaped)
15687 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15689 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15691 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15692 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15693 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15694 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15695 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15699 <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>
15702 <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>
15705 <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>
15708 <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>
15711 <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>
15717 Header with space, plus and underscore as entity
15719 Id should not contain + for spaces
15721 == Space between Text ==
15724 == Space-Entity between Text ==
15727 == Plus+between+Text ==
15730 == Plus-Entity+between+Text ==
15733 == Underscore_between_Text ==
15736 == Underscore-Entity_between_Text ==
15739 [[#Space between Text]]
15740 [[#Space-Entity between Text]]
15741 [[#Plus+between+Text]]
15742 [[#Plus-Entity+between+Text]]
15743 [[#Underscore_between_Text]]
15744 [[#Underscore-Entity_between_Text]]
15746 <p>Id should not contain + for spaces
15748 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15750 <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>
15751 <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>
15752 <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>
15753 <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>
15754 <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>
15755 <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>
15759 <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>
15762 <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>
15765 <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>
15768 <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>
15771 <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>
15774 <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>
15776 </p><p><a href="#Space_between_Text">#Space between Text</a>
15777 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15778 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15779 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15780 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15781 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15786 Headers with excess '=' characters
15787 (Are similar tests necessary beyond the 1st level?)
15791 =''italic'' heading==
15792 ==''italic'' heading=
15794 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15796 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15797 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15798 <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>
15799 <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>
15803 <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>
15804 <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>
15805 <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>
15806 <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>
15811 HTML headers vs TOC (bug 23393)
15812 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15824 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15826 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15828 <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>
15829 <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>
15832 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15834 <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>
15835 <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>
15841 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15842 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15843 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15844 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15845 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15846 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15851 Single-line or multiline-comments can follow headings
15853 parsoid=wt2html,wt2wt
15861 <h2><span class="mw-headline" id="foo">foo</span></h2>
15862 <h2><span class="mw-headline" id="bar">bar</span></h2>
15863 <h2><span class="mw-headline" id="baz">baz</span></h2>
15868 BUG 1219 URL next to image (broken)
15870 http://example.com[[File:Foobar.jpg]]
15872 <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>
15875 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
15879 Bug 1186 news: in the middle of text
15881 http://en.wikinews.org/wiki/Wikinews:Workplace
15883 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15889 Namespaced link must have a title
15898 Namespaced link must have a title (bad fragment version)
15900 [[Project:#fragment]]
15902 <p>[[Project:#fragment]]
15908 ### HTML tags and HTML attributes
15912 div with no attributes
15914 <div>HTML rocks</div>
15916 <div>HTML rocks</div>
15921 div with double-quoted attribute
15923 <div id="rock">HTML rocks</div>
15925 <div id="rock">HTML rocks</div>
15930 div with single-quoted attribute
15932 <div id='rock'>HTML rocks</div>
15934 <div id="rock">HTML rocks</div>
15939 div with unquoted attribute
15941 <div id=rock>HTML rocks</div>
15943 <div id="rock">HTML rocks</div>
15948 div with illegal double attributes
15950 <div id="a" id="b">HTML rocks</div>
15952 <div id="b">HTML rocks</div>
15957 div with empty attribute value, space before equals
15959 parsoid=wt2html,html2html
15961 <div class =>HTML rocks</div>
15963 <div class="">HTML rocks</div>
15966 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15970 div with multiple empty attribute values
15972 parsoid=wt2html,html2html
15974 <div id= title=>HTML rocks</div>
15976 <div id="title.3D">HTML rocks</div>
15979 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15983 table with multiple empty attribute values
15985 parsoid=wt2html,html2html
15991 <table title="id=">
15997 <table title="id=">
15998 <tbody><tr><td> hi</td></tr>
16003 div with braces in attribute value
16005 <div title="{}">Foo</div>
16007 <div title="{}">Foo</div>
16010 <div title="{}">Foo</div>
16014 div with empty attribute value, no space before equals
16016 parsoid=wt2html,html2html
16018 <div class=>HTML rocks</div>
16020 <div class="">HTML rocks</div>
16023 <div class="">HTML rocks</div>
16027 HTML multiple attributes correction
16029 <p class="error" class="awesome">Awesome!</p>
16031 <p class="awesome">Awesome!</p>
16036 Table multiple attributes correction
16039 !+ class="error" class="awesome"| status
16044 <th class="awesome"> status
16052 <DIV ID="x">HTML ROCKS</DIV>
16054 <div id="x">HTML ROCKS</div>
16059 Non-ASCII pseudo-tags are rendered as text
16068 Pseudo-tag with URL 'name' renders as url link
16070 <http://example.com/>
16072 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16077 text with amp in the middle of nowhere
16081 <p>Remember AT&T?
16086 text with character entity: eacute
16088 I always thought é was a cute letter.
16090 <p>I always thought é was a cute letter.
16093 <p>I always thought é was a cute letter.</p>
16097 text with entity-escaped character entity-like string: eacute
16099 I always thought &eacute; was a cute letter.
16101 <p>I always thought &eacute; was a cute letter.
16106 text with undefined character entity: xacute
16108 I always thought &xacute; was a cute letter.
16110 <p>I always thought &xacute; was a cute letter.
16117 <data value="5">five</data>
16118 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16119 <mark>This highlighted text</mark>
16121 <p><data value="5">five</data>
16122 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16123 <mark>This highlighted text</mark>
16128 HTML tag with leading space is parsed as text
16132 <p>< div>foo< /div>
16137 ### Nesting tests (see bug 41545, 50604, 51081)
16140 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16141 # Note that html2wt is considerably more difficult if we use <b> in
16142 # the test case, instead of <big>
16144 Ensure that HTML adoption agency algorithm is properly implemented.
16146 <big>X<big>Y</big>Z</big>
16148 <p><big>X<big>Y</big>Z</big>
16152 # This was bug 41545 in the PHP parser.
16153 # Note that tidy doesn't handle this correctly.
16157 <kbd>X<kbd>Y</kbd>Z</kbd>
16159 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16163 # The following cases were bug 51081 in the PHP parser.
16164 # Note that there are some other nestable tags (b, i, etc) which are
16165 # not covered; see bug 51081 for discussion.
16167 # Note that tidy doesn't handle this correctly.
16171 <em>X<em>Y</em>Z</em>
16173 <p><em>X<em>Y</em>Z</em>
16177 # Note that tidy doesn't handle this correctly.
16179 Nesting of <strong>
16181 <strong>X<strong>Y</strong>Z</strong>
16183 <p><strong>X<strong>Y</strong>Z</strong>
16192 <p><q>X<q>Y</q>Z</q></p>
16195 # Note that tidy doesn't handle this correctly.
16199 <ruby>X<ruby>Y</ruby>Z</ruby>
16201 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16205 # Note that tidy doesn't handle this correctly.
16209 <bdo>X<bdo>Y</bdo>Z</bdo>
16211 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16223 [[Media:Foobar.jpg]]
16225 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16230 Media link with text
16232 [[Media:Foobar.jpg|A neat file to look at]]
16234 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16238 # FIXME: this is still bad HTML tag nesting
16239 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16241 Media link with nasty text
16243 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16245 <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>
16248 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16249 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16253 Media link to nonexistent file (bug 1702)
16255 [[Media:No such.jpg]]
16257 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16262 Image link to nonexistent file (bug 1850 - good)
16264 [[File:No_such.jpg]]
16266 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16269 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></span></p>
16273 :Image link to nonexistent file (bug 1850 - bad)
16275 [[:Image:No such.jpg]]
16277 <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>
16280 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16286 Character reference normalization in link text (bug 1938)
16288 [[Main Page|this&that]]
16290 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16297 Test for unicode normalization
16299 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16303 (bug 19451) Links should refer to the normalized form.
16311 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16312 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16313 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16314 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16315 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16320 Empty attribute crash test (bug 2067)
16322 <font color="">foo</font>
16324 <p><font color="">foo</font>
16329 Empty attribute crash test single-quotes (bug 2067)
16331 <font color=''>foo</font>
16333 <p><font color="">foo</font>
16338 Attribute test: equals, then nothing
16340 parsoid=wt2html,html2html
16342 <font color=>foo</font>
16344 <p><font color="">foo</font>
16347 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16351 Attribute test: unquoted value
16353 parsoid=wt2html,html2html
16355 <font color=x>foo</font>
16357 <p><font color="x">foo</font>
16360 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16364 Attribute test: unquoted but illegal value (hash)
16366 <font color=#x>foo</font>
16368 <p><font color="#x">foo</font>
16372 # Parsoid does not serialize to empty attribute syntax,
16373 # so wt2wt and html2wt cases are skipped
16375 Attribute test: no value (T54330)
16377 parsoid=wt2html,html2html
16379 <font color>foo</font>
16381 <p><font color="">foo</font>
16384 <p><font color="">foo</font></p>
16388 Bug 2095: link with three closing brackets
16392 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16395 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16399 Bug 2095: link with pipe and three closing brackets
16401 [[Main Page|link]]]
16403 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16406 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16410 Bug 2095: link with pipe and three closing brackets, version 2
16412 [[Main Page|[http://example.com/]]]
16414 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16417 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16426 Template:Dangerous attribute
16428 " onmouseover="alert(document.cookie)
16432 Template:Dangerous style attribute
16434 border-size: expression(alert(document.cookie))
16440 <div style="float: right; {{{1}}}">Magic div</div>
16444 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16446 <div title="{{test}}"></div>
16448 <div title="This is a test template"></div>
16452 # Parsoid has enough context to handle this case
16454 Bug 2304: HTML attribute safety (dangerous template; 2309)
16456 <div title="{{dangerous attribute}}"></div>
16458 <div title=""></div>
16461 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
16465 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16467 <div style="{{dangerous style attribute}}"></div>
16469 <div style="/* insecure input */"></div>
16474 Bug 2304: HTML attribute safety (safe parameter; 2309)
16476 {{div style|width: 200px}}
16478 <div style="float: right; width: 200px">Magic div</div>
16483 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16485 {{div style|width: expression(alert(document.cookie))}}
16487 <div style="/* insecure input */">Magic div</div>
16492 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16494 {{div style|"><script>alert(document.cookie)</script>}}
16496 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16501 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16503 {{div style|" ><script>alert(document.cookie)</script>}}
16505 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16510 Bug 2304: HTML attribute safety (link)
16512 <div title="[[Main Page]]"></div>
16514 <div title="[[Main Page]]"></div>
16519 Bug 2304: HTML attribute safety (italics)
16521 <div title="''foobar''"></div>
16523 <div title="''foobar''"></div>
16528 Bug 2304: HTML attribute safety (bold)
16530 <div title="'''foobar'''"></div>
16532 <div title="'''foobar'''"></div>
16538 Bug 2304: HTML attribute safety (ISBN)
16540 <div title="ISBN 1234567890"></div>
16542 <div title="ISBN 1234567890"></div>
16547 Bug 2304: HTML attribute safety (RFC)
16549 <div title="RFC 1234"></div>
16551 <div title="RFC 1234"></div>
16556 Bug 2304: HTML attribute safety (PMID)
16558 <div title="PMID 1234567890"></div>
16560 <div title="PMID 1234567890"></div>
16565 Bug 2304: HTML attribute safety (web link)
16567 <div title="http://example.com/"></div>
16569 <div title="http://example.com/"></div>
16574 Bug 2304: HTML attribute safety (named web link)
16576 <div title="[http://example.com/ link]"></div>
16578 <div title="[http://example.com/ link]"></div>
16583 Bug 3244: HTML attribute safety (extension; safe)
16585 <div style="<nowiki>background:blue</nowiki>"></div>
16587 <div style="background:blue"></div>
16592 Bug 3244: HTML attribute safety (extension; unsafe)
16594 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16596 <div style="/* insecure input */"></div>
16600 # More MSIE fun discovered by Tom Gilder
16603 MSIE CSS safety test: spurious slash
16605 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16607 <div style="/* insecure input */">evil</div>
16612 MSIE CSS safety test: hex code
16614 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16616 <div style="/* insecure input */">evil</div>
16621 MSIE CSS safety test: comment in url
16623 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16625 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16630 MSIE CSS safety test: comment in expression
16632 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16634 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16639 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16641 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16643 <p style="/* invalid control char */">A</p>
16648 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16650 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16651 <div style="top:EXPRESSION(alert())">B</div>
16653 <p style="/* insecure input */">A</p>
16654 <div style="/* insecure input */">B</div>
16659 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16661 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16662 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16664 <div style="/* insecure input */">A</div>
16665 <p style="/* insecure input */">B</p>
16670 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16672 <div style="background-image:url⁽javascript:alert())">A</div>
16673 <div style="background-image:url₍javascript:alert())">B</div>
16674 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16676 <div style="/* insecure input */">A</div>
16677 <div style="/* insecure input */">B</div>
16678 <p style="/* insecure input */">C</p>
16682 # FIXME: Parsoid fails to sanitize this! See T58846.
16687 title="data:text/html,<img src=1 onerror=alert(1)>"
16688 style="-o-link:attr(title);-o-link-source:current">X</div>
16690 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16695 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16697 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16698 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16699 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16700 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16701 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16702 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16703 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16705 <p style="/* insecure input */">A</p>
16706 <p style="/* insecure input */">B</p>
16707 <p style="/* insecure input */">C</p>
16708 <p style="/* insecure input */">D</p>
16709 <p style="/* insecure input */">E</p>
16710 <p style="/* insecure input */">F</p>
16711 <p style="/* insecure input */">G</p>
16716 Table attribute legitimate extension
16719 !+ style="<nowiki>color:blue</nowiki>"| status
16724 <th style="color:blue"> status
16730 Table attribute safety
16733 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16738 <th style="/* insecure input */"> status
16744 CSS line continuation 1
16746 <div style="background-image: u\ rl(test.jpg);"></div>
16748 <div style="/* insecure input */"></div>
16753 CSS line continuation 2
16755 <div style="background-image: u\ rl(test.jpg); "></div>
16757 <div style="/* invalid control char */"></div>
16768 Expansion of multi-line templates in attribute values (bug 6255)
16770 <div style="background: {{identity|#00FF00}}">-</div>
16772 <div style="background: #00FF00">-</div>
16778 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16780 <div style="background:
16783 <div style="background: #00FF00">-</div>
16786 <div style="background:
16791 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16793 <div style="background: #00FF00">-</div>
16795 <div style="background: #00FF00">-</div>
16800 Tags which are hidden from Tidy cannot pass through the Sanitizer
16802 <mw:toc><script>alert();</script></mw:toc>
16804 <p><mw:toc><script>alert();</script></mw:toc></p>
16808 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16811 Parser hook: empty input
16822 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16825 ## Don't expect parsoid to rt this form.
16827 Parser hook: empty input using terminated empty elements
16829 parsoid=wt2html,html2html
16840 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16844 Parser hook: empty input using terminated empty elements (space before)
16855 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16859 Parser hook: basic input
16870 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16873 ## Don't expect parsoid to rt this form.
16875 Parser hook: case insensitive
16877 parsoid=wt2html,html2html
16888 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16891 ## Don't expect parsoid to rt this form.
16893 Parser hook: case insensitive, redux
16895 parsoid=wt2html,html2html
16906 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16910 Parser hook: nested tags
16912 <tag><tag></tag></tag>
16921 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16925 Parser hook: basic arguments
16927 <tag width="200" height="100" depth="50" square=""></tag>
16940 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16943 ## Don't expect parsoid to rt this form.
16945 Parser hook: basic arguments, variations
16947 parsoid=wt2html,html2html
16949 <tag width=200 height = "100" depth = '50' square></tag>
16962 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16966 Parser hook: argument containing a forward slash (bug 5344)
16968 <tag filename="/tmp/bla"></tag>
16973 'filename' => '/tmp/bla',
16978 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16981 ## Don't expect parsoid to rt this form.
16983 Parser hook: empty input using terminated empty elements (bug 2374)
16985 parsoid=wt2html,html2html
16997 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17000 ## </tag> should be output literally since there is no matching tag that begins it
17001 ## Don't expect parsoid to rt this form.
17003 Parser hook: basic arguments using terminated empty elements (bug 2374)
17007 <tag width=200 height = "100" depth = '50' square/>
17024 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
17028 ## Don't expect parsoid to rt this form.
17030 Parser hook: Don't allow unclosed extension tags
17036 this is a '''test'''
17038 <p>test <tag>123
17039 </p><p>this is a <b>test</b>
17042 <p>test <tag>123</p>
17044 <p>this is a <b>test</b></p>
17048 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17052 Parser hook: static parser hook not inside a comment
17054 <statictag>hello, world</statictag>
17056 <statictag action="flush" />
17062 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17063 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17067 Parser hook: static parser hook inside a comment
17069 <!-- <statictag>hello, world</statictag> -->
17070 <statictag action="flush" />
17075 <!-- <statictag>hello, world</statictag> -->
17076 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17079 # Nested template calls; this case was broken by Parser.php rev 1.506,
17083 Template:One-parameter
17085 (My parameter is: {{{1}}})
17089 Template:Map-one-parameter
17091 {{{{{1}}}|{{{2}}}}}
17095 Nested template calls
17097 {{Map-one-parameter|One-parameter|param}}
17099 <p>(My parameter is: param)
17108 # HTML+Tidy effectively strips out the empty tags completely
17109 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17110 # which Tidy would have done for the PHP parser had there been content inside it.
17112 Sanitizer: Closing of open tags
17114 <s></s><table></table>
17116 <s></s><table></table>
17119 <p><s></s></p><table></table>
17123 Sanitizer: Closing of open but not closed tags
17132 Sanitizer: Closing of closed but not open tags
17142 Sanitizer: Closing of closed but not open table tags
17146 Table not started</td></tr></table>
17148 <p>Table not started</p>
17150 <p>Table not started</p>
17154 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17156 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17158 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17161 <p><span id=".C3.A6:_v" data-parsoid='{"stx":"html","a":{"id":".C3.A6:_v"},"sa":{"id":"æ: v"}}'>byte</span><a rel="mw:WikiLink" href="./Main_Page#.C3.A6:_v" data-parsoid='{"stx":"piped","a":{"href":"./Main_Page#.C3.A6:_v"},"sa":{"href":"#æ: v"}}'>backlink</a></p>
17164 # In HTML5, the restrictions are that id must contain at least one character,
17165 # and must not contain any space characters.
17167 Sanitizer: Validating the contents of the id attribute (bug 4515)
17171 <br id="" /><br id="a space" />
17176 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17178 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17182 <br id="foo" /><br id="foo" />
17184 Something need to be done. foo-2 ?
17188 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17191 <meta itemprop="hello" content="world">
17192 <meta http-equiv="refresh" content="5">
17193 <meta itemprop="hello" http-equiv="refresh" content="5">
17194 <link itemprop="hello" href="{{SERVER}}">
17195 <link rel="stylesheet" href="{{SERVER}}">
17196 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17200 <p> <meta itemprop="hello" content="world" />
17201 <meta http-equiv="refresh" content="5">
17202 <meta itemprop="hello" content="5" />
17204 <link itemprop="hello" href="http://example.org" />
17205 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17206 <link itemprop="hello" href="http://example.org" />
17212 Language converter: output gets cut off unexpectedly (bug 5757)
17216 this bit is safe: }-
17218 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17220 then we get cut off here: }-
17222 all additional text is vanished
17224 <p>this bit is safe: }-
17225 </p><p>but if we add a conversion instance: xxx
17226 </p><p>then we get cut off here: }-
17227 </p><p>all additional text is vanished
17232 Self closed html pairs (bug 5487)
17235 <center><font id="bug" />Centered text</center>
17236 <div><font id="bug2" />In div text</div>
17238 <center><font id="bug" />Centered text</center>
17239 <div><font id="bug2" />In div text</div>
17248 Punctuation: nbsp before exclamation
17252 <p>C'est grave !
17257 Punctuation: CSS !important (bug 11874)
17259 <div style="width:50% !important">important</div>
17261 <div style="width:50% !important">important</div>
17266 Punctuation: CSS ! important (bug 11874; with space after)
17268 <div style="width:50% ! important">important</div>
17270 <div style="width:50% ! important">important</div>
17275 HTML bullet list, closed tags (bug 5497)
17288 <ul data-parsoid='{"stx":"html"}'>
17289 <li data-parsoid='{"stx":"html"}'>One</li>
17290 <li data-parsoid='{"stx":"html"}'>Two</li>
17296 HTML bullet list, unclosed tags (bug 5497)
17308 <ul data-parsoid='{"stx":"html"}'>
17309 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17310 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17316 HTML ordered list, closed tags (bug 5497)
17329 <ol data-parsoid='{"stx":"html"}'>
17330 <li data-parsoid='{"stx":"html"}'>One</li>
17331 <li data-parsoid='{"stx":"html"}'>Two</li>
17337 HTML ordered list, unclosed tags (bug 5497)
17350 <ol data-parsoid='{"stx":"html"}'>
17351 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17352 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17358 HTML nested bullet list, closed tags (bug 5497)
17381 <ul data-parsoid='{"stx":"html"}'>
17382 <li data-parsoid='{"stx":"html"}'>One</li>
17383 <li data-parsoid='{"stx":"html"}'>Two:
17384 <ul data-parsoid='{"stx":"html"}'>
17385 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17386 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17393 HTML nested bullet list, open tags (bug 5497)
17430 HTML nested ordered list, closed tags (bug 5497)
17455 HTML nested ordered list, open tags (bug 5497)
17492 HTML ordered list item with parameters oddity
17494 <ol><li id="fragment">One</li>
17497 <ol><li id="fragment">One</li>
17502 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17504 bug 5918: autonumbering
17506 [http://first/] [http://second] [ftp://ftp]
17510 [mailto:enclosed@mail.tld With target]
17512 [mailto:enclosed@mail.tld]
17514 mailto:inline@mail.tld
17516 <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>
17517 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17518 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17519 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17520 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17523 <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>
17524 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17525 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17526 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17527 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17532 # Security and HTML correctness
17533 # From Nick Jenkins' fuzz testing
17537 Fuzz testing: Parser13
17552 Fuzz testing: Parser14
17557 <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>
17558 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17560 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17566 <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>
17568 <div id="toc" class="toc">
17569 <div id="toctitle">
17573 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17580 Fuzz testing: Parser14-table
17582 parsoid=wt2html,html2html
17587 <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>
17588 <table style="__TOC__">
17593 <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>
17594 <table style="__TOC__">
17601 <table style="__TOC__"></table>
17604 # Known to produce bogus xml (extra </td>)
17606 Fuzz testing: Parser16
17633 Fuzz testing: Parser21
17636 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17641 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17651 Fuzz testing: Parser22
17653 http://===r:::https://b
17657 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17665 # Known to produce bad XML for now
17667 Fuzz testing: Parser24
17672 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17673 <br style="onmouseover='alert(document.cookie);' " />
17675 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17680 <u class="|">}}}} >
17681 <br style="onmouseover='alert(document.cookie);'" />
17683 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17692 # Note: the current result listed for this is not what the original one was,
17693 # but the original bug was JavaScript injection, which is fixed in any case.
17694 # It's not clear that the original result listed was any more correct than the
17695 # current one. Original result:
17698 # <li class="||">
17699 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17701 Fuzz testing: Parser25 (bug 6055)
17707 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17709 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17714 Fuzz testing: URL adjacent extension (with space, clean)
17716 http://example.com <nowiki>junk</nowiki>
17718 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17721 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17725 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17727 http://example.com<nowiki>junk</nowiki>
17729 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17732 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17736 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17738 http://example.com<pre>junk</pre>
17740 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17743 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17748 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre data-parsoid='{"stx":"html"}'>junk</pre>
17752 Fuzz testing: image with bogus manual thumbnail
17754 [[Image:foobar.jpg|thumbnail= ]]
17756 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17759 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
17763 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17765 <pre dir=" "></pre>
17767 <pre dir=" "></pre>
17772 Parsing optional HTML elements (Bug 6171)
17777 <td> Some tabular data</td>
17778 <td> More tabular data ...
17779 <td> And yet som tabular data</td>
17785 <td> Some tabular data</td>
17786 <td> More tabular data ...
17787 </td><td> And yet som tabular data</td>
17794 Correct handling of <td>, <tr> (Bug 6171)
17799 <td> Some tabular data</td>
17800 <td> More tabular data ...</td>
17801 <td> And yet som tabular data</td>
17807 <td> Some tabular data</td>
17808 <td> More tabular data ...</td>
17809 <td> And yet som tabular data</td>
17817 Parsing crashing regression (fr:JavaScript)
17821 <p></body></x>
17826 Inline wiki vs wiki block nesting
17832 <p><b>Bold paragraph</b>
17833 </p><p>New wiki paragraph
17837 # FIXME: The current php output is documented
17838 # and desired output is the parsoid target.
17840 Inline HTML vs wiki block nesting
17846 <p><b>Bold paragraph
17847 </p><p>New wiki paragraph</b>
17850 <p><b>Bold paragraph</b>
17851 </p><p>New wiki paragraph
17855 # Original result was this:
17856 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17858 # While that might be marginally more intuitive, maybe, the six-apostrophe
17859 # construct is clearly pathological and the result stated here (which is what
17860 # the parser actually does) is about as reasonable as anything.
17862 Mixing markup for italics and bold
17865 '''bold''''''bold''bolditalics'''''
17867 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17875 Article for special page transclusion test
17879 Special page transclusion
17882 {{Special:Prefixindex/Xyzzyx}}
17884 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17890 Special page transclusion twice (bug 5021)
17893 {{Special:Prefixindex/Xyzzyx}}
17894 {{Special:Prefixindex/Xyzzyx}}
17896 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17898 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17904 Transclusion of default MediaWiki message
17906 {{MediaWiki:Mainpage}}
17913 Transclusion of nonexistent MediaWiki message
17915 {{MediaWiki:Mainpagexxx}}
17917 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17922 Transclusion of MediaWiki message with underscore
17924 {{MediaWiki:history_short}}
17931 Transclusion of MediaWiki message with space
17933 {{MediaWiki:history short}}
17940 Invalid header with following text
17950 Section extraction test (section 0)
17970 Section extraction test (section 1)
17992 Section extraction test (section 2)
18013 Section extraction test (section 3)
18033 Section extraction test (section 4)
18057 Section extraction test (section 5)
18077 Section extraction test (section 6)
18098 Section extraction test (section 7)
18118 Section extraction test (section 8)
18138 Section extraction test (section 9)
18159 Section extraction test (section 10)
18179 Section extraction test (nonexistent section 11)
18198 Section extraction test with bogus heading (section 1)
18203 ==bogus== not a legal section
18207 ==bogus== not a legal section
18211 Section extraction test with bogus heading (section 2)
18216 ==bogus== not a legal section
18223 Section extraction test with comment after heading (section 1)
18235 Section extraction test with comment after heading (section 2)
18247 Section extraction test with bogus <nowiki> heading (section 1)
18252 ==bogus== <nowiki>not a legal section</nowiki>
18256 ==bogus== <nowiki>not a legal section</nowiki>
18260 Section extraction test with bogus <nowiki> heading (section 2)
18265 ==bogus== <nowiki>not a legal section</nowiki>
18271 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18272 # instead of respecting commented sections
18274 Section extraction prefixed by comment (section 1)
18285 Section extraction prefixed by comment (section 2)
18295 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18296 # instead of respecting HTML-style headings
18298 Section extraction, mixed wiki and html (section 1)
18314 Section extraction, mixed wiki and html (section 2)
18330 # Formerly testing for bug 3342
18332 Section extraction, heading surrounded by <noinclude>
18336 <noinclude>==unmarked==</noinclude>
18342 # Test behavior of bug 19910
18344 Sectiion with all-equals
18349 The line above must have a trailing space
18352 But just in case it doesn't...
18356 But just in case it doesn't...
18360 Section replacement test (section 0)
18391 Section replacement test (section 1)
18420 Section replacement test (section 2)
18450 Section replacement test (section 3)
18481 Section replacement test (section 4)
18508 Section replacement test (section 5)
18539 Section replacement test (section 6)
18569 Section replacement test (section 7)
18600 Section replacement test (section 8)
18631 Section replacement test (section 9)
18660 Section replacement test (section 10)
18690 Section replacement test with initial whitespace (bug 13728)
18694 Preformatted initial line
18698 Preformatted initial line
18705 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18717 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18730 Section extraction, <pre> around bogus header (bug 10309)
18747 Section replacement, <pre> around bogus header (bug 10309)
18769 Handling of 
 in URLs
18773 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18776 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18778 a</a></li></ul></li></ul>
18782 Handling of %0A in URLs
18786 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18789 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18793 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18795 5 quotes, code coverage +1 line
18802 <p><b><i></i></b></p>
18805 # same html as previous, but wikitext adjusted to match parsoid html2wt
18806 # note that wt2html and html2html will put the <i> before the <b>
18808 5 quotes, code coverage +1 line w/ nowiki (1)
18810 parsoid=wt2wt,html2wt
18812 '''''<nowiki/>'''''
18817 <p><b><i></i></b></p>
18820 # same as previous, just swapping the <i> and <b>
18822 5 quotes, code coverage +1 line w/ nowiki (2)
18824 '''''<nowiki/>'''''
18829 <p><i><b></b></i></p>
18833 Special:Search page linking.
18837 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18842 {{!}} is a magic word
18844 {{!}} is a magic word there and {{!}} is still a magic word here
18845 | is not a magic word here but {{!}} is still a magic word here
18847 <p>| is a magic word there and | is still a magic word here
18848 | is not a magic word here but | is still a magic word here
18851 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
18852 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
18859 title=[[Parser test]]
18864 * {{FULLPAGENAMEE}}
18866 * {{BASEPAGENAMEE}}
18870 * {{ROOTPAGENAMEE}}
18872 * {{TALKPAGENAMEE}}
18873 * {{SUBJECTPAGENAME}}
18874 * {{SUBJECTPAGENAMEE}}
18877 * {{NAMESPACENUMBER}}
18881 * {{SUBJECTSPACEE}}
18882 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18884 <ul><li> Parser test</li>
18885 <li> Parser_test</li>
18886 <li> Parser test</li>
18887 <li> Parser_test</li>
18888 <li> Parser test</li>
18889 <li> Parser_test</li>
18890 <li> Parser test</li>
18891 <li> Parser_test</li>
18892 <li> Parser test</li>
18893 <li> Parser_test</li>
18894 <li> Talk:Parser test</li>
18895 <li> Talk:Parser_test</li>
18896 <li> Parser test</li>
18897 <li> Parser_test</li>
18905 <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>
18908 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18910 ## Parsoid thinks the "centre" here is a property, not a caption.
18915 "modes": ["wt2html"],
18916 "nativeGallery": true
18924 image4 |300px| centre
18925 image5.svg| http://///////
18930 <ul class="gallery mw-gallery-traditional">
18931 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18932 <div class="thumb" style="height: 150px;">Image1.png</div>
18933 <div class="gallerytext">
18936 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18937 <div class="thumb" style="height: 150px;">Image2.gif</div>
18938 <div class="gallerytext">
18941 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18942 <div class="thumb" style="height: 150px;">Image3</div>
18943 <div class="gallerytext">
18946 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18947 <div class="thumb" style="height: 150px;">Image4</div>
18948 <div class="gallerytext">
18953 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18954 <div class="thumb" style="height: 150px;">Image5.svg</div>
18955 <div class="gallerytext">
18956 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18960 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18961 <div class="thumb" style="height: 150px;">* image6</div>
18962 <div class="gallerytext">
18968 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
18969 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image1.png </span></div><div class="gallerytext"></div></li>
18970 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image2.gif</span></div><div class="gallerytext"></div></li>
18971 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image3</span></div><div class="gallerytext"></div></li>
18972 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image4 </span></div><div class="gallerytext"></div></li>
18973 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;"> image5.svg</span></div><div class="gallerytext"> <a rel="mw:ExtLink" href="http://///////">http://///////</a></div></li>
18974 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">* image6</span></div><div class="gallerytext"></div></li>
18979 Gallery (with options, html)
18982 "modes": ["wt2html", "html2html"],
18983 "nativeGallery": true
18986 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
18987 File:Nonexistent.jpg|caption
18988 File:Nonexistent.jpg
18989 image:foobar.jpg|some '''caption''' [[Main Page]]
18991 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18994 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18995 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18996 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18997 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18998 <div class="gallerytext">
19003 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19004 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19005 <div class="gallerytext">
19008 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19009 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
19010 <div class="gallerytext">
19011 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19015 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19016 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
19017 <div class="gallerytext">
19020 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19021 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
19022 <div class="gallerytext">
19030 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2"},"body":{}}'>
19031 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19032 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext">caption</div></li>
19033 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19034 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
19035 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext"></div></li>
19036 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">blabla.</div></li>
19041 Gallery (with options, extsrc)
19044 "nativeGallery": false
19047 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19048 File:Nonexistent.jpg|caption
19049 File:Nonexistent.jpg
19050 image:foobar.jpg|some '''caption''' [[Main Page]]
19052 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19055 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19056 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19057 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19058 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19059 <div class="gallerytext">
19064 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19065 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19066 <div class="gallerytext">
19069 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19070 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
19071 <div class="gallerytext">
19072 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19076 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19077 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
19078 <div class="gallerytext">
19081 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19082 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
19083 <div class="gallerytext">
19091 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-parsoid='{}' data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2","caption":"Foo [[Main Page]]"},"body":{"extsrc":"\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some '''caption''' [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.\n"}}'>
19092 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19093 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext">caption</div></li>
19094 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19095 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
19096 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext"></div></li>
19097 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">blabla.</div></li>
19102 Gallery with link that has fragment
19105 "modes": ["wt2html", "html2html"],
19106 "nativeGallery": true
19110 image:foobar.jpg|link=Main_Page
19111 image:foobar.jpg|link=Main_Page#section
19112 image:foobar.jpg|link=Main Page#section|caption
19115 <ul class="gallery mw-gallery-traditional">
19116 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19117 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19118 <div class="gallerytext">
19121 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19122 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19123 <div class="gallerytext">
19126 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19127 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19128 <div class="gallerytext">
19136 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19137 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19138 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19139 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext">caption</div></li>
19143 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19145 Gallery with template inside caption
19148 "nativeGallery": true
19151 <gallery caption="{{echo|hi}}">
19152 File:Foobar.jpg|{{echo|ho}}
19155 <ul class="gallery mw-gallery-traditional">
19156 <li class='gallerycaption'>{{echo|hi}}</li>
19157 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19158 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19159 <div class="gallerytext">
19167 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19168 <li class="gallerycaption"><span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span></li>
19169 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><span about="#mwt5" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho"}},"i":0}}]}'>ho</span></div></li>
19174 Gallery with wikitext inside caption
19177 "nativeGallery": true
19181 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19182 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19185 <ul class="gallery mw-gallery-traditional">
19186 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19187 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19188 <div class="gallerytext">
19189 <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>
19193 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19194 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19195 <div class="gallerytext">
19196 <p>This is a test template
19203 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19204 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><span typeof="mw:Image" data-mw='{"caption":"desc"}'><a href="./File:Foobar.jpg"><img alt="inneralt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></span></div></li>
19205 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><span about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"param"}},"i":0}}]}'>This is a test template</span></div></li>
19210 Gallery (with showfilename option)
19213 "nativeGallery": true
19216 <gallery showfilename="">
19217 File:Nonexistent.jpg|caption
19218 File:Nonexistent.jpg
19219 File:Foobar.jpg|some '''caption''' [[Main Page]]
19223 <ul class="gallery mw-gallery-traditional">
19224 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19225 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19226 <div class="gallerytext">
19227 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19232 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19233 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19234 <div class="gallerytext">
19235 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19239 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19240 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19241 <div class="gallerytext">
19242 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19243 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19247 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19248 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19249 <div class="gallerytext">
19250 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19257 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19258 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a>caption</div></li>
19259 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
19260 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a>some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
19261 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
19265 ## Should Parsoid be preserving these variations?
19267 Gallery (with namespace-less filenames)
19270 "modes": ["wt2html", "html2html"],
19271 "nativeGallery": true
19275 File:Nonexistent.jpg
19281 <ul class="gallery mw-gallery-traditional">
19282 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19283 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19284 <div class="gallerytext">
19287 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19288 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19289 <div class="gallerytext">
19292 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19293 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19294 <div class="gallerytext">
19297 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19298 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19299 <div class="gallerytext">
19305 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19306 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19307 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19308 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19309 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19314 Gallery override link with WikiLink (T36852)
19317 "nativeGallery": true
19321 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19324 <ul class="gallery mw-gallery-traditional">
19325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19326 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19327 <div class="gallerytext">
19333 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-parsoid='{"dsr":[0,70,2,2]}' data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19334 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./InterWikiLink"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19339 Gallery override link with absolute external link (T36852)
19342 "nativeGallery": true
19346 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19349 <ul class="gallery mw-gallery-traditional">
19350 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19351 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19352 <div class="gallerytext">
19358 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19359 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="http://www.example.org"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19364 Gallery override link with malicious javascript (T36852)
19367 "modes": ["wt2html", "html2html"],
19368 "nativeGallery": true
19372 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19375 <ul class="gallery mw-gallery-traditional">
19376 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19377 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19378 <div class="gallerytext">
19384 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19385 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./"_onclick="alert('malicious_javascript_code!');"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19390 Gallery with invalid title as link (T45964)
19393 "modes": ["wt2html", "html2html"],
19394 "nativeGallery": true
19398 File:Foobar.jpg|link=<
19401 <ul class="gallery mw-gallery-traditional">
19402 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19403 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19404 <div class="gallerytext">
19410 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19411 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext">link=<</div></li>
19416 HTML Hex character encoding (spells the word "JavaScript")
19418 parsoid=wt2html,wt2wt,html2html
19420 JavaScript
19422 <p>JavaScript
19427 <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>
19431 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19435 <p>&#xsee;&#XSEE;
19438 <p>&#xsee;&#XSEE;</p>
19442 HTML Hex character encoding mixed case
19444 parsoid=wt2html,wt2wt,html2html
19453 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19456 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19457 # Note that U+000C (form feed) is not a valid XML character, so
19458 # it is banned even though allowed in HTML5.
19460 Illegal character references (T106578)
19465 ; Control (low): 
19466 ; Control (high):  Ÿ
19467 ; Surrogate: ��
19468 ; This is an okay astral character: 💩
19477 <dt>Control (low)</dt>
19479 <dt>Control (high)</dt>
19480 <dd>&#x7F; &#x9F;</dd>
19482 <dd>&#xD83D;&#xDCA9;</dd>
19483 <dt>This is an okay astral character</dt>
19489 __FORCETOC__ override
19501 ISBN 978-0-1234-56 789
19503 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19506 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19508 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
19512 ISBN followed by 5 spaces
19523 ISBN ISBN 1234567890
19525 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19528 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19531 # Uppercase X and lowercase x as well
19542 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19543 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19544 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19545 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19546 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19547 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19550 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19551 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19552 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19553 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19554 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19555 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19559 ISBN with empty prefix (parsoid test)
19563 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19566 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19570 Bug 22905: <abbr> followed by ISBN followed by </a>
19572 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19574 <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>
19577 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
19585 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19590 Double RFC with a wiki link
19594 <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>
19603 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19606 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19610 Centre-aligned image
19612 [[Image:foobar.jpg|centre]]
19614 <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>
19621 [[Image:foobar.jpg|none]]
19623 <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>
19628 Width + Height sized image (using px) (height is ignored)
19630 [[Image:foobar.jpg|640x480px]]
19632 <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>
19637 Width-sized image (using px, no following whitespace)
19639 [[Image:foobar.jpg|640px]]
19641 <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>
19646 Width-sized image (using px, with following whitespace - test regression from r39467)
19648 [[Image:foobar.jpg|640px ]]
19650 <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>
19655 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19657 [[Image:foobar.jpg| 640px]]
19659 <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>
19664 Image with page parameter
19668 [[File:LoremIpsum.djvu|page=2]]
19670 <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>
19673 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" data-file-width="2480" data-file-height="3508" data-file-type="bitmap" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></span></p>
19677 Another italics / bold test
19685 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19691 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19694 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19699 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19701 Images with the "|" character in the comment
19703 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19705 <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>
19708 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=|left|&param2=|x">external</a> URL</figcaption></figure>
19712 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19714 <html><script>alert(1);</script></html>
19716 <p><html><script>alert(1);</script></html>
19721 HTML with raw HTML ($wgRawHtml==true)
19725 <html><script>alert(1);</script></html>
19727 <p><script>alert(1);</script>
19732 Parents of subpages, one level up
19734 subpage title=[[Subpage test/L1/L2/L3]]
19738 <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>
19744 Parents of subpages, one level up, not named
19746 subpage title=[[Subpage test/L1/L2/L3]]
19750 <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>
19757 Parents of subpages, two levels up
19759 subpage title=[[Subpage test/L1/L2/L3]]
19765 <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
19766 </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>
19771 Parents of subpages, two levels up, without trailing slash or name.
19773 subpage title=[[Subpage test/L1/L2/L3]]
19782 Parents of subpages, two levels up, with lots of extra trailing slashes.
19784 subpage title=[[Subpage test/L1/L2/L3]]
19788 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">Subpage test/L1</a>
19793 Subpage test/L1/L2/L3Sibling
19799 Transclusion of a sibling page (one level up)
19801 subpage title=[[Subpage test/L1/L2/L3]]
19810 Transclusion of a child page
19812 subpage title=[[Subpage test/L1/L2]]
19820 # This is wt2html only in Parsoid because we add <nowiki>
19821 # because of {{..}} and we don't expect to fix that to
19822 # eliminate the nowikis selective for {{..}} markup.
19824 Non-transclusion because of too many up levels
19826 subpage title=[[Subpage test/L1/L2/L3]]
19829 {{../../../../More than parent}}
19831 <p>{{../../../../More than parent}}
19834 <p>{{../../../../More than parent}}</p>
19838 Definition list code coverage
19844 <dl><dt> title  </dt>
19846 <dt> title </dt>
19852 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19853 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19854 <dt>title</dt><dd> def</dd></dl>
19858 Don't fall for the self-closing div
19860 <div>hello world</div/>
19862 <div>hello world</div>
19871 <p>[[:Template:Msg]]
19880 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19884 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19886 Always escape literal '>' in output, not just after '<'
19900 <p>This is a test template
19901 This is a test template
19913 Inclusion of !userCanEdit() content
19917 <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>
19923 Out-of-order TOC heading levels
19932 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19934 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19936 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19937 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19940 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19942 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19943 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19949 <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>
19950 <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>
19951 <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>
19952 <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>
19953 <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>
19954 <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>
19960 ISBN with a dummy number
19970 ISBN with space-delimited number
19974 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19980 ISBN with multiple spaces, no number
19999 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20000 </p><p>ISBN 12345678901
20006 ISBN with trailing year (bug 8110)
20008 ISBN 1-234-56789-0 - 2006
20010 ISBN 1 234 56789 0 - 2006
20012 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20013 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20021 {{anchorencode:foo bar©#%n}}
20023 <p>foo_bar.C2.A9.23.25n
20028 anchorencode trims spaces
20030 {{anchorencode: __pretty__please__}}
20037 anchorencode deals with links
20039 {{anchorencode: [[hello|world]] [[hi]]}}
20046 anchorencode deals with templates
20048 {{anchorencode: {{Foo}} }}
20055 anchorencode encodes like the TOC generator: (bug 18431)
20057 === _ +:.3A%3A&&]] ===
20058 {{anchorencode: _ +:.3A%3A&&]] }}
20061 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20062 <p>.2B:.3A.253A.26.26.5D.5D
20067 Bug 6200: blockquotes and paragraph formatting
20088 Bug 8293: Use of center tag ruins paragraph formatting
20109 Parsing of overlapping (improperly nested) inline html tags
20111 <span><s>x</span></s>
20113 <p><span><s>x</span></s></span>
20116 <p><span><s>x</s></span>
20121 ### Language variants related tests
20124 Self-link in language variants
20126 title=[[Dunav]] language=sr
20128 Both [[Dunav]] and [[Дунав]] are names for this river.
20130 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
20141 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20143 title=[[Duna]] language=sr
20145 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20147 <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.
20152 Link to a section of a variant of this title shouldn't be parsed as self-link
20154 title=[[Duna]] language=sr
20156 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20158 <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.
20163 Link to pages in language variants
20167 Main Page can be written as [[Маин Паге]]
20169 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20175 Multiple links to pages in language variants
20179 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20181 <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>.
20187 Simple template in language variants
20193 <p>This is a test template
20199 Template with explicit namespace in language variants
20205 <p>This is a test template
20211 Basic test for template parameter in language variants
20215 {{парамтест|param=foo}}
20217 <p>This is a test template with parameter foo
20222 Simple category in language variants
20226 [[Category:МедиаWики Усер'с Гуиде]]
20228 cat=МедиаWики_Усер'с_Гуиде sort=
20230 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20245 ## We used to, but no longer wt2wt this test since the default serializer
20246 ## will normalize all categories to serialize on their own line.
20247 ## This wikitext usage is going to be fairly uncommon in production and
20248 ## selser will take care of preserving formatting in those scenarios.
20250 Don't convert blue categorylinks to another variant (bug 33210)
20256 [[A]][[Category:分类]]
20260 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
20261 <link rel="mw:PageProp/Category" href="Category:分类"/>
20265 Stripping -{}- tags (language variants)
20269 Latin proverb: -{Ne nuntium necare}-
20271 <p>Latin proverb: Ne nuntium necare
20277 Prevent conversion with -{}- tags (language variants)
20279 language=sr variant=sr-ec
20281 Latinski: -{Ne nuntium necare}-
20283 <p>Латински: Ne nuntium necare
20289 Prevent conversion of text with -{}- tags (language variants)
20291 language=sr variant=sr-ec
20293 Latinski: -{Ne nuntium necare}-
20295 <p>Латински: Ne nuntium necare
20301 Prevent conversion of links with -{}- tags (language variants)
20303 language=sr variant=sr-ec
20307 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20313 -{}- tags within headlines (within html for parserConvert())
20315 language=sr variant=sr-ec
20319 <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>
20325 Explicit definition of language variant alternatives
20327 language=zh variant=zh-tw
20329 -{zh:China;zh-tw:Taiwan}-, not China
20331 <p>Taiwan, not China
20337 Conversion around HTML tags
20339 language=sr variant=sr-ec
20341 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20342 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20345 <span title="ЛаCтин">ски</span>
20351 Explicit session-wise language variant mapping (A flag and - flag)
20353 language=zh variant=zh-tw
20355 Taiwan is not China.
20356 But -{A|zh:China;zh-tw:Taiwan}- is China,
20357 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20358 and -{China}- is China.
20360 <p>Taiwan is not China.
20361 But Taiwan is Taiwan,
20362 (This should be stripped!)
20363 and China is China.
20368 Explicit session-wise language variant mapping (H flag for hide)
20370 language=zh variant=zh-tw
20372 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20375 <p>(This should be stripped!)
20381 Adding explicit conversion rule for title (T flag)
20383 language=zh variant=zh-tw showtitle
20385 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20388 <p>Should be stripped!
20393 Testing that changing the language variant here in the tests actually works
20395 language=zh variant=zh showtitle
20397 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20400 <p>Should be stripped!
20405 Recursive conversion of alt and title attrs shouldn't clear converter state
20407 language=zh variant=zh-cn showtitle
20409 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20410 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20414 Should be stripped<span title="Exclamation">!</span>
20419 Bug 24072: more test on conversion rule for title
20421 language=zh variant=zh-tw showtitle
20423 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20424 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20427 <p>This should be stripped!
20428 This won't take interferes with the title rule.
20433 Partly disable title conversion if variant == main language code
20435 language=zh variant=zh title=[[ZH]] showtitle
20437 -{T|zh-cn:CN;zh-tw:TW}-
20445 Partly disable title conversion if variant == main language code, more
20447 language=zh variant=zh title=[[ZH]] showtitle
20457 Raw output of variant escape tags (R flag)
20459 language=zh variant=zh-tw
20461 Raw: -{R|zh:China;zh-tw:Taiwan}-
20463 <p>Raw: zh:China;zh-tw:Taiwan
20468 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20470 language=zh variant=zh-cn
20472 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20479 Conversion rules from [numeric-only string] to [something else] (T48634)
20481 language=zh variant=zh-cn
20483 -{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345
20490 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20492 language=zh variant=zh-cn
20494 -{H|zh-cn:foo;zh-tw:;}-foobar
20501 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20503 language=zh variant=zh-cn
20505 -{H|=>zh-cn:foo;}-foobar
20512 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20514 language=zh variant=zh-cn
20523 Nested using of manual convert syntax
20525 language=zh variant=zh-hk
20527 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20529 <p>Nested: Hello Hong Kong!
20533 # Since Parsoid is starting to emit canonical wikitext for links,
20534 # [http://example.com http://example.com] will not RT back to that
20537 Proper conversion of text in external links
20539 language=sr variant=sr-ec
20542 http://www.google.com
20543 gopher://www.google.com
20544 [http://www.google.com http://www.google.com]
20545 [gopher://www.google.com gopher://www.google.com]
20546 [https://www.google.com irc://www.google.com]
20547 [ftp://www.google.com www.google.com/ftp://dir]
20548 [//www.google.com www.google.com]
20550 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20551 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20552 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20553 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20554 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20555 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20556 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20559 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20560 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20561 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20562 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20563 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20564 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20565 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20569 Do not convert roman numbers to language variants
20571 language=sr variant=sr-ec
20575 <p>Фридрих IV је цар.
20580 Unclosed language converter markup "-{"
20591 Don't convert raw rule "-{R|=>}-" to "=>"
20602 Don't break link parsing if language converter markup is in the caption.
20604 language=sr variant=sr-ec
20606 [[Main Page|-{R|main page}-]]
20608 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20612 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20614 Don't break image parsing if language converter markup is in the caption.
20618 [[File:Foobar.jpg|-{R|caption}-]]
20620 <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>
20624 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20626 Don't break list handling if language converter markup is in the item.
20628 language=zh variant=zh-cn
20630 ;-{zh-cn:AAA;zh-tw:BBB}-
20632 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20639 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20641 Don't break table handling if language converter markup is in the cell.
20643 language=sr variant=sr-ec
20666 Bug 529: Uncovered bullet
20675 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20676 # Templates in Wikipedia rely on this behavior, as tidy has always been
20677 # enabled there. These tests are normally run *without* tidy, so specify the
20678 # full output here.
20679 # To test realistic parsing behavior, apply a tidy-like transformation to both
20680 # the expected output and your parser's output.
20682 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20684 ******* Foo {{bullet}}
20686 <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>
20692 Bug 529: Uncovered table already at line-start
20715 Bug 529: Uncovered bullet in parser function result
20717 * Foo {{lc:{{bullet}} }}
20725 Bug 5678: Double-parsed template argument
20727 {{lc:{{{1}}}|hello}}
20734 Bug 5678: Double-parsed template invocation
20736 {{lc:{{paramtest {{!}} param = hello }} }}
20738 <p>{{paramtest | param = hello }}
20743 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20746 title=[[Main Page]]
20748 {{PRVNÍVELKÉ:ěščř}}
20749 {{prvnívelké:ěščř}}
20769 Morwen/13: Unclosed link followed by heading
20776 <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>
20781 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20788 <h1><span class="mw-headline" id="heading">heading</span></h1>
20793 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20800 <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>
20815 Paragraphs inside divs (no extra line breaks)
20827 Paragraphs inside divs (extra line break on open)
20842 Paragraphs inside divs (extra line break on close)
20857 Paragraphs inside divs (extra line break on open and close)
20874 Nesting tags, paragraphs on lines which begin with <div>
20876 <div></div><strong>A
20879 <p><strong>A</strong></p>
20880 <p><strong>B</strong></p>
20888 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20890 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20892 <blockquote>Line one
20894 Line two</blockquote>
20896 <blockquote>Line one
20897 Line two</blockquote>
20901 <p>Line one Line two</p>
20906 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20911 Line two</blockquote>
20916 Line two</blockquote>
20921 Line two</blockquote>
20925 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20927 <blockquote>Line one
20932 <blockquote>Line one
20945 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20967 Paragraphs inside blockquotes/divs (no extra line breaks)
20969 <blockquote><div>Line one
20971 Line two</div></blockquote>
20973 <blockquote><div>Line one
20974 Line two</div></blockquote>
20979 Paragraphs inside blockquotes/divs (extra line break on open)
20984 Line two</div></blockquote>
20989 Line two</div></blockquote>
20994 Paragraphs inside blockquotes/divs (extra line break on close)
20996 <blockquote><div>Line one
20999 </div></blockquote>
21001 <blockquote><div>Line one
21004 </div></blockquote>
21009 Paragraphs inside blockquotes/divs (extra line break on open and close)
21015 </div></blockquote>
21021 </div></blockquote>
21026 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21028 wgLinkHolderBatchSize=0
21034 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21035 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21036 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21041 Free external link invading image caption
21043 [[Image:Foobar.jpg|thumb|http://x|hello]]
21045 <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>
21050 Bug 15196: localised external link numbers
21054 [http://en.wikipedia.org/]
21056 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21059 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21063 Multibyte character in padleft
21065 {{padleft:-Hello|7|Æ}}
21072 Multibyte character in padright
21074 {{padright:Hello-|7|Æ}}
21081 formatdate parser function
21083 {{#formatdate:2009-03-24}}
21085 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21090 formatdate parser function, with default format
21092 {{#formatdate:2009-03-24|mdy}}
21094 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21099 Spacing of numbers in formatted dates
21101 {{#formatdate:January 15}}
21103 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21108 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
21110 language=nl title=[[MediaWiki:Common.css]]
21112 {{#formatdate:2009-03-24|dmy}}
21114 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21127 Edit comment with link
21131 I like the [[Main Page]] a lot
21133 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21137 Edit comment with link and link text
21141 I like the [[Main Page|best pages]] a lot
21143 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21147 Edit comment with link and link text with suffix
21151 I like the [[Main Page|best page]]s a lot
21153 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21157 Edit comment with section link (non-local, eg in history list)
21159 comment title=[[Main Page]]
21161 /* External links */ removed bogus entries
21163 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21167 Edit comment with section link and text before it (non-local, eg in history list)
21169 comment title=[[Main Page]]
21171 pre-comment text /* External links */ removed bogus entries
21173 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>
21177 Edit comment with section link (local, eg in diff view)
21179 comment local title=[[Main Page]]
21181 /* External links */ removed bogus entries
21183 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21187 Edit comment with subpage link (bug 14080)
21191 title=[[Subpage test]]
21193 Poked at a [[/subpage]] here...
21195 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21199 Edit comment with subpage link and link text (bug 14080)
21203 title=[[Subpage test]]
21205 Poked at a [[/subpage|neat little page]] here...
21207 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21211 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
21214 title=[[Subpage test]]
21216 Poked at a [[/subpage]] here...
21218 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21222 Edit comment with bare anchor link (local, as on diff)
21226 title=[[Main Page]]
21230 <a href="#section">#section</a>
21234 Edit comment with bare anchor link (non-local, as on history)
21237 title=[[Main Page]]
21241 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21245 Anchor starting with underscore
21251 <p><a href="#_ref">One</a>
21254 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21258 Id starting with underscore
21260 <div id="_ref"></div>
21262 <div id="_ref"></div>
21267 Edit comment with link with more than one pipe (T99346)
21271 [[Main Page|Many|pipes]]
21273 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21277 Complex edit comment with link with more than one pipe (T99346)
21281 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21283 Created page with "<noinclude><a href="/index.php?title=Category:Requests_for_permissions/Bot&action=edit&redlink=1" class="new" title="Category:Requests for permissions/Bot (page does not exist)">{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</a></noinclude> === <a href="/index.php?title=User:MineoBot&action=edit&redlink=1" class="new" title="User:MineoBot (page does not exist)">User:MineoBot</a> 8=== {{Request for permissions/links|Mineo..."
21287 Space normalisation on autocomment (bug 22784)
21290 title=[[Main Page]]
21292 /* __hello__world__ */
21294 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21298 percent-encoding and + signs in comments (Bug 26410)
21302 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21304 <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>
21307 # Parsoid doesn't support this yet: see bug 73581
21308 # but it *should* omit the 'src' attribute if the image is bad.
21309 # PHP side of tests was disabled in
21310 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21311 # because of issues in the PHP parserTests infrastructure
21312 # (but the output below is indeed what the PHP side emits)
21314 Bad images - basic functionality
21317 !! DISABLED/html/php
21319 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span></p>
21323 Bad images - bug 16039: text after bad image disappears
21328 !! DISABLED/html/php
21334 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span>
21339 Verify that displaytitle works (bug #22501) no displaytitle
21343 wgAllowDisplayTitle=true
21344 wgRestrictDisplayTitle=false
21346 this is not the the title
21349 <p>this is not the the title
21354 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21359 wgAllowDisplayTitle=true
21360 wgRestrictDisplayTitle=false
21362 this is not the the title
21363 {{DISPLAYTITLE:whatever}}
21366 <p>this is not the the title
21371 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21376 wgAllowDisplayTitle=true
21377 wgRestrictDisplayTitle=true
21379 this is not the the title
21380 {{DISPLAYTITLE:whatever}}
21383 <p>this is not the the title
21388 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21393 wgAllowDisplayTitle=true
21394 wgRestrictDisplayTitle=true
21396 this is not the the title
21397 {{DISPLAYTITLE:screen}}
21400 <p>this is not the the title
21405 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21410 wgAllowDisplayTitle=false
21412 this is not the the title
21413 {{DISPLAYTITLE:screen}}
21416 <p>this is not the the title
21417 <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>
21422 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21427 wgAllowDisplayTitle=false
21429 this is not the the title
21432 <p>this is not the the title
21437 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21442 wgAllowDisplayTitle=true
21443 wgRestrictDisplayTitle=true
21445 this is not the the title
21446 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21448 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21449 <p>this is not the the title
21454 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21459 wgAllowDisplayTitle=true
21460 wgRestrictDisplayTitle=true
21462 this is not the the title
21463 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21465 <span style="color: red;">s</span>creen
21466 <p>this is not the the title
21471 Page status indicators: Empty name is invalid
21475 <indicator name=" "></indicator>
21476 <indicator></indicator>
21478 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21479 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21484 Page status indicators: Weird syntaxes that are okay
21488 <indicator name="empty" />
21489 <indicator name="name"></indicator>
21498 Page status indicators: Torture test
21502 <indicator name="01">hello world</indicator>
21503 <indicator name="02">[[Main Page]]</indicator>
21504 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21505 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21506 <indicator name="05">* foo
21508 <indicator name="06"><nowiki>foo</nowiki></indicator>
21509 <indicator name="07"> Preformatted</indicator>
21510 <indicator name="08"><div>Broken tag</indicator>
21511 <indicator name="09">{| class=wikitable
21514 <indicator name="10">Two
21516 paragraphs</indicator>
21519 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21520 03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" />
21521 04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
21522 05=<ul><li> foo</li>
21526 07=<pre>Preformatted
21528 08=<div>Broken tag</div>
21530 09=<table class="wikitable">
21547 preload: check <noinclude> and <includeonly>
21551 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21557 preload: check <onlyinclude>
21561 Goodbye <onlyinclude>Hello world</onlyinclude>
21567 preload: can pass tags through if we want to
21571 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21573 <includeonly>Hello world</includeonly>
21577 preload: check that it doesn't try to do tricks
21581 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21583 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21587 Play a bit with r67090 and bug 3158
21589 <div style="width:50% !important"> </div>
21590 <div style="width:50% !important"> </div>
21591 <div style="width:50% !important"> </div>
21592 <div style="border : solid;"> </div>
21594 <div style="width:50% !important"> </div>
21595 <div style="width:50% !important"> </div>
21596 <div style="width:50% !important"> </div>
21597 <div style="border : solid;"> </div>
21600 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21601 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&nbsp;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21602 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&#160;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21603 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21608 HTML5 data attributes
21610 <span data-foo="bar">Baz</span>
21611 <p data-abc-def_hij="">Quuz</p>
21613 <p><span data-foo="bar">Baz</span>
21615 <p data-abc-def_hij="">Quuz</p>
21618 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21619 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21623 Strip reserved data attributes
21625 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21627 <div data-ok="fred">d</div>
21630 <div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div>
21634 percent-encoding and + signs in internal links (Bug 26410)
21636 [[User:+%]] [[Page+title%]]
21637 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21638 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21639 [[%33%45]] [[%33%45+]]
21641 <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>
21642 <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>
21643 <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>
21644 <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>
21647 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%" data-parsoid='{"stx":"simple","a":{"href":"./User:+%25"},"sa":{"href":"User:+%"}}'>User:+%</a> <a rel="mw:WikiLink" href="./Page+title%25" title="Page+title%" data-parsoid='{"stx":"simple","a":{"href":"./Page+title%25"},"sa":{"href":"Page+title%"}}'>Page+title%</a>
21648 <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%+</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"piped","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%20</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+ "}}'>%+ </a> <a rel="mw:WikiLink" href="./%25+r" title="%+r" data-parsoid='{"stx":"simple","a":{"href":"./%25+r"},"sa":{"href":"%+r"}}'>%+r</a>
21649 <a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}'>bar</a>"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
21650 <a rel="mw:WikiLink" href="./3E" title="3E" data-parsoid='{"stx":"simple","a":{"href":"./3E"},"sa":{"href":"%33%45"}}'>3E</a> <a rel="mw:WikiLink" href="./3E+" title="3E+" data-parsoid='{"stx":"simple","a":{"href":"./3E+"},"sa":{"href":"%33%45+"}}'>3E+</a></p>
21654 Special characters in embedded file links (bug 27679)
21656 [[File:Contains & ampersand.jpg]]
21657 [[File:Does not exist.jpg|Title with & ampersand]]
21659 <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>
21660 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21663 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Contains_&_ampersand.jpg"><img resource="./File:Contains_&_ampersand.jpg" src="./Special:FilePath/Contains_&_ampersand.jpg" height="220" width="220"/></a></span>
21664 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
21668 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21670 Text's been normalized?
21672 <p>Text's been normalized?
21677 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21679 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21681 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21686 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21688 [http://www.example.org/ ideograms]
21690 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21695 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21697 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21699 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21723 Bug 31098 Template which includes system messages which includes the template
21727 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21728 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21733 Bug31490 Turkish: ucfirst 'blah'
21744 Bug31490 Turkish: ucfirst 'ix'
21755 Bug31490 Turkish: lcfirst 'BLAH'
21766 Bug31490 Turkish: ucfırst (with a dotless i)
21772 <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>
21777 Bug31490 ucfırst (with a dotless i) with English language
21783 <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>
21788 Bug 26375: TOC with italics
21790 title=[[Main Page]]
21793 == ''Lost'' episodes ==
21795 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21797 <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>
21801 <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>
21806 Bug 26375: TOC with bold
21808 title=[[Main Page]]
21811 == '''should be bold''' then normal text ==
21813 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21815 <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>
21819 <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>
21824 Bug 33845: Headings become cursive in TOC when they contain an image
21826 title=[[Main Page]]
21829 == Image [[Image:foobar.jpg]] ==
21831 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21833 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21837 <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>
21842 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21844 title=[[Main Page]]
21847 == <blockquote>Quote</blockquote> ==
21849 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21851 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21855 <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>
21859 <div id="toc" class="toc">
21860 <div id="toctitle">
21864 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21868 <h2><span class="mw-headline" id="Quote"></span></h2>
21870 <p><span class="mw-headline" id="Quote">Quote</span></p>
21872 <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>
21876 Unclosed tags in TOC
21878 title=[[Main Page]]
21882 <small>Hanc marginis exiguitas non caperet.</small>
21885 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21887 <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>
21891 <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>
21892 <p><small>Hanc marginis exiguitas non caperet.</small>
21898 Multiple tags in TOC
21901 == <i>Foo</i> <b>Bar</b> ==
21903 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21905 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21907 <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>
21908 <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>
21912 <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>
21913 <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>
21917 <div id="toc" class="toc">
21918 <div id="toctitle">
21922 <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>
21923 <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>
21927 <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>
21928 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21930 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21932 <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>
21935 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21936 # html5 tag parsing.
21938 Tags with parameters in TOC
21943 == <sup class="in-h2">Hello</sup> ==
21945 == <sup class="a > b">Evilbye</sup> ==
21947 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21949 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21950 <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>
21954 <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>
21955 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> 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>
21958 <meta property="mw:PageProp/toc" />
21959 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21961 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21965 span tags with directionality in TOC
21968 == <span dir="ltr">C++</span> ==
21970 == <span dir="rtl">זבנג!</span> ==
21972 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21974 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21976 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21978 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21980 <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>
21981 <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>
21982 <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>
21983 <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>
21984 <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>
21988 <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>
21989 <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>
21990 <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>
21991 <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>
21992 <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>
21997 Bug 72884: bdi element in ToC
22000 == <bdi>test</bdi> ==
22002 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22004 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22008 <h2><span class="mw-headline" id="test"><bdi>test</bdi></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22013 T35715: s/strike element in ToC
22016 == <s>test</s> test <strike>test</strike> ==
22018 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22020 <li class="toclevel-1 tocsection-1"><a href="#test_test_test"><span class="tocnumber">1</span> <span class="toctext"><s>test</s> test <strike>test</strike></span></a></li>
22024 <h2><span class="mw-headline" id="test_test_test"><s>test</s> test <strike>test</strike></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test test test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22028 # Note that the html output does not have the <p></p>, but the
22029 # html+tidy output *does*. This is because the empty <p></p> is
22030 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22032 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22037 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22039 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22043 <h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22047 <div id="toc" class="toc">
22048 <div id="toctitle">
22052 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22056 <h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22062 == {{int:headline_sample}} ==
22066 Bug 32057: Title needed when expanding <h> nodes.
22068 title=[[Main Page]]
22072 <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>
22077 Strip marker in urlencode
22079 {{urlencode:x<nowiki/>y}}
22080 {{urlencode:x<nowiki/>y|wiki}}
22081 {{urlencode:x<nowiki/>y|path}}
22082 {{urlencode:x<pre id="one">two</pre>y}}
22110 Strip marker in formatNum
22112 {{formatnum:1<nowiki/>2}}
22113 {{formatnum:1<nowiki/>2|R}}
22121 Check noCommafy in formatNum
22125 {{formatnum:123456.78}}
22126 {{formatnum:123456.78|NOSEP}}
22134 Wrong option for formatNum (bug 56199)
22136 {{formatnum:1,234.56|Random}}
22137 {{formatnum:1,234.56|EVERYTHING}}
22138 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22147 Strip marker in grammar
22151 {{grammar:elative|foo<nowiki/>bar}}
22158 Strip marker in padleft
22160 {{padleft:|2|x<nowiki/>y}}
22167 Strip marker in padright
22169 {{padright:|2|x<nowiki/>y}}
22176 Strip marker in anchorencode
22178 {{anchorencode:x<nowiki/>y}}
22185 nowiki inside link inside heading (bug 18295)
22187 ==[[foo|x<nowiki>y</nowiki>z]]==
22189 <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>
22194 new support for bdi element (bug 31817)
22196 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22198 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22203 Ignore pipe between table row attributes
22207 |- id=foo | style='color: red'
22215 <tr id="foo" style="color: red">
22222 Language parser function
22231 Padleft and padright as substr
22233 {{padleft:|3|abcde}}
22234 {{padright:|3|abcde}}
22242 Special parser function
22244 {{#special:RandomPage}}
22245 {{#special:BaDtItLe}}
22246 {{#special:Foobar}}
22255 Bug 34939 - Case insensitive link parsing ([HttP://])
22257 [HttP://MediaWiki.Org/]
22259 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22262 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22266 Bug 34939 - Case insensitive link parsing ([HttP:// title])
22268 [HttP://MediaWiki.Org/ MediaWiki]
22270 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22275 Bug 34939 - Case insensitive link parsing (HttP://)
22277 HttP://MediaWiki.Org/
22279 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22282 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22300 <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>
22301 <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>
22302 <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>
22303 <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>
22304 <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>
22310 ### Parsoid-specific tests
22311 ### Parsoid-PHP parser incompatibilities
22314 1. SOL-sensitive wikitext tokens as template-args
22316 parsoid=wt2html,wt2wt
22322 <span about="#mwt1" typeof="mw:Transclusion">
22323 </span><ul about="#mwt1"><li>a</li>
22325 <span about="#mwt2" typeof="mw:Transclusion">
22326 </span><ol about="#mwt2"><li>a</li>
22328 <span about="#mwt3" typeof="mw:Transclusion">
22329 </span><dl about="#mwt3"><dd>a</dd>
22333 #### -----------------------------------------------------------------
22334 #### Parsoid-specific functionality tests
22335 #### -----------------------------------------------------------------
22337 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22338 # We know wt2wt will fail, but we expect selser to pass.
22339 # Due to the nature of our testing, wt2wt and selser tests will enter the
22340 # blacklist and we'll catch selser regressions based on changes to the
22341 # blacklist entries for selser tests.
22343 1. Bad treebuilder fixup of formatting elt is cleaned up
22345 parsoid=wt2html,wt2wt
22350 [[Image:Foobar.jpg|right|Test]]
22357 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Test</figcaption></figure>
22364 2. Bad treebuilder fixup of formatting elt is cleaned up
22366 parsoid=wt2html,wt2wt
22368 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22370 <small>[[Image:Foobar.jpg|right|300px]]</small>
22374 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
22376 <small><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/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure></small>
22380 3. Bad treebuilder fixup of formatting elt is cleaned up
22382 parsoid=wt2html,wt2wt
22384 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22386 <p><small><b>foo</b></small></p>
22387 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><small><b>caption</b></small></figcaption></figure>
22388 <p><small><b>bar</b></small></p>
22392 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22394 parsoid=wt2html,wt2wt
22396 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22398 <p><b><small></small></b></p>
22399 <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/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure>
22403 #### ----------------------------------------------------------------
22404 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22405 #### tags. Parsoid's output for these tags differs from that of the
22407 #### ----------------------------------------------------------------
22410 Ref: 1. ref-location should be replaced with an index span
22413 B <ref name="x">foo</ref>
22417 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22418 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-2"},"attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-2"><span class="mw-reflink-text">[2]</span></a></span>
22419 C <span about="#mwt6" class="mw-ref" id="cite_ref-y_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="./Main_Page#cite_note-y-3"><span class="mw-reflink-text">[3]</span></a></span></p>
22420 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22421 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22422 <li about="#cite_note-x-2" id="cite_note-x-2"><a href="./Main_Page#cite_ref-x_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-x-2" class="mw-reference-text">foo</span></li>
22423 <li about="#cite_note-y-3" id="cite_note-y-3"><a href="./Main_Page#cite_ref-y_3-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-y-3" class="mw-reference-text"></span></li>
22428 Ref: 2. ref-tags with identical names should all get the same index
22430 A <ref name="x">foo</ref>
22434 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22435 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22436 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22437 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22442 Ref: 3. spaces in ref-names should be ignored
22444 A <ref name="x">foo</ref>
22445 B <ref name=" x " />
22449 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22450 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22451 C <span about="#mwt6" class="mw-ref" id="cite_ref-x_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22452 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22453 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a><a href="./Main_Page#cite_ref-x_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22457 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22459 Ref: 4. 'constructor' should be accepted as a valid ref-name
22461 A <ref name="constructor">foo</ref>
22464 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-constructor-1"},"attrs":{"name":"constructor"}}'><a href="./Main_Page#cite_note-constructor-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22465 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22466 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><a href="./Main_Page#cite_ref-constructor_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
22471 Ref: 5. body should accept generic wikitext
22474 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22479 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22481 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22482 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">This is a <b><a rel="mw:WikiLink" href="Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
22488 Ref: 6. indent-pres should not be output in ref-body
22498 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22500 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22501 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
22509 Ref: 7. No p-wrapping in ref-body
22526 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22528 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22529 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
22544 Ref: 8. transclusion wikitext has lower precedence
22546 A <ref> foo {{echo|</ref> B C}}
22550 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C}}</p>
22551 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22552 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo {{echo|</span></li>
22557 Ref: 9. unclosed comments should not leak out of ref-body
22559 A <ref> foo <!--</ref> B C
22562 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22563 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22564 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <!----></span></li>
22569 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22571 A <ref> <b> foo </ref> B C
22575 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22578 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22579 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
22584 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22590 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
22591 C <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> D</p>
22592 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22593 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22594 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22599 Ref: 12. ref-tags act as trailing newline migration barrier
22601 <!--the newline at the end of this line moves out of the p tag-->a
22603 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22609 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22612 <p>b<!--the newline at the end of this line stays inside the p tag--> <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22613 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22616 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22617 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"></span></li>
22618 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"></span></li></ol>
22622 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22629 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> A
22630 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> B</p>
22631 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22632 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22633 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar
22638 ## Roundtripping fails because of nowiki'ing
22640 Ref: 14. A nested ref-tag should be emitted as plain text
22644 <ref>foo <ref>bar</ref> baz</ref>
22648 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span> baz</ref></p>
22650 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo <ref>bar</span></li></ol>
22654 Ref: 15. ref-tags with identical names should get identical indexes
22656 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22657 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22661 <p>A1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a-1"},"attrs":{"name":"a"}}'><a href="./Main_Page#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span> A2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="./Main_Page#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22662 B1 <span about="#mwt7" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="./Main_Page#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span> B2 <span about="#mwt8" class="mw-ref" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="./Main_Page#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22664 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-a_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-a_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-b_2-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-b_2-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22668 ## We don't bother wt2wt-ing non-standard whitespace
22670 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22678 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22679 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22680 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
22684 Ref: 17. Generate valid HTML5 id/about attributes
22686 <ref name="a b">foo</ref>
22687 <ref name=":0">ve-created name</ref>
22691 <p><span about="#mwt2" class="mw-ref" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_b-1"},"attrs":{"name":"a b"}}'><a href="./Main_Page#cite_note-a_b-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span>
22692 <span about="#mwt4" class="mw-ref" id="cite_ref-:0_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-:0-2"},"attrs":{"name":":0"}}'><a href="./Main_Page#cite_note-:0-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></span>
22694 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a_b-1" id="cite_note-a_b-1"><a href="./Main_Page#cite_ref-a_b_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">foo</span></li><li about="#cite_note-:0-2" id="cite_note-:0-2"><a href="./Main_Page#cite_ref-:0_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-:0-2" class="mw-reference-text">ve-created name</span></li></ol>
22699 Ref: 18. T58916: Extension attributes should be parsed as plain text
22701 <ref name="{{echo|a}}">foo</ref>
22705 <p><span class="mw-ref" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1"},"attrs":{"name":"{{echo|a}}"}}'><a href="./Main_Page#cite_note-.7B.7Becho.7Ca.7D.7D-1"><span class="mw-reflink-text">[1]</span></a></span>
22708 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22709 <li about="#cite_note-.7B.7Becho.7Ca.7D.7D-1" id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><a href="./Main_Page#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1" class="mw-reference-text">foo</span></li>
22714 Ref: 19. ref-tags with identical name encodings should get identical indexes
22716 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22720 <p>1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_.26_b-1"},"attrs":{"name":"a & b"}}'><a href="./Main_Page#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span> 2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="./Main_Page#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22722 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22723 <li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-a_.26_b_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-a_.26_b_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_.26_b-1" class="mw-reference-text">foo</span></li>
22728 Ref: 20. ref-tags with identical names but different content should keep it
22730 A <ref name="foo">Foo one</ref>
22731 B <ref name="foo">Foo two</ref>
22732 C <ref name="foo" />
22736 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-foo_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-foo-1"},"attrs":{"name":"foo"}}'><a href="./Main_Page#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22737 B <span about="#mwt4" class="mw-ref" id="cite_ref-foo_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo two"},"attrs":{"name":"foo"}}'><a href="./Main_Page#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22738 C <span about="#mwt6" class="mw-ref" id="cite_ref-foo_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"foo"}}'><a href="./Main_Page#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22740 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-foo-1" id="cite_note-foo-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-foo_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-foo_1-1"><span class="mw-linkback-text">2 </span></a><a href="./Main_Page#cite_ref-foo_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-foo-1" class="mw-reference-text">Foo one</span></li>
22745 References: 1. references tag without any refs should be handled properly
22749 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22753 References: 2. references tag with group only outputs references from that group
22755 A <ref group="a">foo</ref>
22756 B <ref group="b">bar</ref>
22759 <references group="a" />
22761 <references group="b" />
22763 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="./Main_Page#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22764 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"b"}}'><a href="./Main_Page#cite_note-2" data-mw-group="b"><span class="mw-reflink-text">[b 1]</span></a></span>
22765 C <span class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="./Main_Page#cite_note-3"><span class="mw-reflink-text">[1]</span></a></span></p>
22767 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22768 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22770 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22771 <li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">baz</span></li>
22773 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22774 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" data-mw-group="b" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22779 References: 3. ref list should be cleared after processing references
22789 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22791 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22794 <p>B <span about="#mwt6" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22796 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22797 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22802 References: 4. only referenced group should be cleared after processing references
22804 A <ref group="a">afoo</ref>
22807 <references group="a" />
22813 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="./Main_Page#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22814 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22816 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">afoo</span></li>
22819 <p>C <span about="#mwt8" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="./Main_Page#cite_note-3"><span class="mw-reflink-text">[2]</span></a></span></p>
22821 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bfoo</span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">cfoo</span></li>
22825 ## Don't expect this to rt since we're dropping content
22827 References: 5. ref tags in references should be processed while ignoring all other content
22829 parsoid=wt2html,html2html
22832 B <ref name="b">bar</ref>
22835 <ref name="a">foo</ref>
22836 This should just get lost.
22839 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="./Main_Page#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22840 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="./Main_Page#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22843 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{},"body":{"html":"\n<span about=\"#mwt8\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-a-1\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"./Main_Page#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>\n"}}'><li about="#cite_note-a-1" id="cite_note-a-1"><a href="./Main_Page#cite_ref-a_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><a href="./Main_Page#cite_ref-b_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22848 References: 6. <references /> from a transclusion
22850 <ref>Foo</ref> {{echo|<references />}}
22852 <p><span about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p> <ol class="mw-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"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">Foo</span></li>
22857 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22859 A <ref>foo bar for a</ref>
22860 B <ref group="X" name="b" />
22864 <references group="X">
22865 <ref name="b">foo</ref>
22868 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22869 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="./Main_Page#cite_note-b-2" data-mw-group="X"><span class="mw-reflink-text">[X 1]</span></a></span>
22872 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22873 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo bar for a</span></li>
22876 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","attrs":{"group":"X"},"body":{"html":"\n<span about=\"#mwt10\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-b-2\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"./Main_Page#cite_note-b-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"X\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[X 1]</span></a></span>\n"}}'>
22877 <li about="#cite_note-b-2" id="cite_note-b-2"><a href="./Main_Page#cite_ref-b_2-0" data-mw-group="X" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">foo</span></li>
22882 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22884 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22887 <p>X<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22888 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt7" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</span></li>
22892 # This test only works in wt2html now as the <references /> are always generated
22893 # unless selser is active. Once T72722 is fixed, we should add a changes test
22894 # here to ensure that unrelated changes don't add the new <references />
22895 # when selser is active.
22897 References: 9. Generate missing references list at the end
22900 B <ref group="inexistent">bar</ref>
22902 <p>A <span class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B <span class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"inexistent"}}'><a href="./Main_Page#cite_note-2" data-mw-group="inexistent"><span class="mw-reflink-text">[inexistent 1]</span></a></span></p>
22903 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22904 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22906 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22907 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" data-mw-group="inexistent" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22912 References: 10. New <references/> shouldn't be added for unrelated edits.
22915 "modes": ["selser"],
22916 "changes": [["#x", "remove"]],
22920 Unrelated text<span id="x"> that's going to disappear</span>.
22928 Entities in ref name
22930 <ref name="test & me">hi</ref>
22933 <p><span about="#mwt2" class="mw-ref" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-test_.26_me-1"},"attrs":{"name":"test &amp; me"}}'><a href="./Main_Page#cite_note-test_.26_me-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22934 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22935 <li about="#cite_note-test_.26_me-1" id="cite_note-test_.26_me-1"><a href="./Main_Page#cite_ref-test_.26_me_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-test_.26_me-1" class="mw-reference-text">hi</span></li>
22939 ## The output here may look funny, but it's what the php parser will do. The
22940 ## unclosed references tag becomes escaped text, and then a new references
22941 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22942 ## nowiki tags, and the auto-generated references tag is only dropped in
22945 Generate references for unclosed references tag
22953 <p>a<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
22955 <p><references></p>
22956 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
22960 New reference serializes on its own line
22962 parsoid=wt2wt,html2wt
22967 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22970 #### ----------------------------------------------------------------
22971 #### Parsoid-only testing of Parsoid's impl of LST
22972 #### Not implemented yet, see
22973 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22974 #### ----------------------------------------------------------------
22976 ## We still need to support serializing the older format while content is stored.
22978 LST Sections: Backwards compatibility
22981 "suppressErrors": true,
22982 "modes": ["html2wt"]
22985 <section begin="2011-05-16" />
22986 <section end="2014-04-10 (MW 1.23wmf22)" />
22988 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22989 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22992 ## The unconventional output is the result of `usePHPPreProcessor` being
22993 ## disabled in parserTests.js. This test is mainly just to show <section> is
22994 ## recognized as an extension tag w/o a native handler.
22996 LST Sections: Newfangled approach
22998 parsoid={ "suppressErrors": true }
23000 <section begin="2011-05-16" />
23001 <section end="2014-04-10 (MW 1.23wmf22)" />
23003 <p><span typeof="mw:Extension/section" about="#mwt1" data-parsoid='{"stx":"html","selfClose":true,"src":"<section begin=\"2011-05-16\" />","tagWidths":[30,0]}'><section begin="2011-05-16" /></span>
23004 <span typeof="mw:Extension/section" about="#mwt2" data-parsoid='{"stx":"html","selfClose":true,"src":"<section end=\"2014-04-10 (MW 1.23wmf22)\" />","tagWidths":[43,0]}'><section end="2014-04-10 (MW 1.23wmf22)" /></span></p>
23007 #--------- Test stripping of empty nodes in template content ----------
23009 Empty LI and TR nodes should be stripped from template content
23014 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23018 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23031 Empty LI and TR nodes should not be stripped from top-level content
23058 Empty TR nodes should not be stripped if they have any attributes set
23060 {{EmptyTRWithHTMLAttrTest}}
23062 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23063 <tr align="center"></tr>
23064 <tr><td>foo</td></tr>
23065 <tr align="center"></tr>
23066 <tr><td>bar</td></tr>
23070 #### ----------------------------------------------------------------
23071 #### The following section of tests are primarily to test
23072 #### wikitext escaping capabilities of Parsoid. Given that
23073 #### escaping can be done any number of ways, the wikitext (input)
23074 #### is always adjusted to reflect how Parsoid adds nowiki
23077 #### We are marking several tests as parsoid-only since the
23078 #### HTML in the result section is different from what the
23079 #### PHP parser generates for it.
23080 #### ----------------------------------------------------------------
23083 #### --------------- Headings ---------------
23085 #### 1. Nested inside html <h1>=foo=</h1>
23086 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23087 #### 3. Nested inside html with wikitext split by html tags
23088 #### 4. No escape needed
23089 #### 5. Empty headings <h1></h1>
23090 #### 6. Heading chars in SOL context
23091 #### ----------------------------------------
23093 Headings: 0. Unnested
23103 <p>=foo<i>a</i>=</p>
23105 <nowiki>=foo=</nowiki>
23107 <nowiki> </nowiki>=foo=
23109 <nowiki>=foo=</nowiki>
23111 =foo''a''<nowiki>=</nowiki>
23114 # New headings and existing headings are handled differently
23116 Headings: 1. Nested inside html
23124 <h1 data-parsoid=''>=foo=</h1>
23125 <h2 data-parsoid=''>=foo=</h2>
23126 <h3 data-parsoid=''>=foo=</h3>
23127 <h4 data-parsoid=''>=foo=</h4>
23128 <h5 data-parsoid=''>=foo=</h5>
23129 <h6 data-parsoid=''>=foo=</h6>
23137 =<nowiki>=foo=</nowiki>=
23138 ==<nowiki>=foo=</nowiki>==
23139 ===<nowiki>=foo=</nowiki>===
23140 ====<nowiki>=foo=</nowiki>====
23141 =====<nowiki>=foo=</nowiki>=====
23142 ======<nowiki>=foo=</nowiki>======
23147 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23156 <nowiki>*</nowiki>bar
23162 <nowiki>=bar=</nowiki>
23166 Headings: 3. Nested inside html with wikitext split by html tags
23170 <h1>=<b>bold</b>foo=</h1>
23172 = ='''bold'''foo= =
23176 Headings: 4a. No escaping needed (testing just h1 and h2)
23187 <h1><i>=</i>foo=</h1>
23207 Headings: 4b. No escaping needed (inside p-tags)
23222 Headings: 5. Empty headings
23226 <h1 data-parsoid='{}'></h1>
23228 <h2 data-parsoid='{}'></h2>
23230 <h3 data-parsoid='{}'></h3>
23232 <h4 data-parsoid='{}'></h4>
23234 <h5 data-parsoid='{}'></h5>
23236 <h6 data-parsoid='{}'></h6>
23246 =====<nowiki/>=====
23248 ======<nowiki/>======
23252 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23262 <nowiki>=a=</nowiki>
23264 <nowiki>=a=</nowiki>
23266 <nowiki>=a=</nowiki>
23270 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23283 <nowiki>=a=</nowiki>
23286 <nowiki>=a=</nowiki>
23289 <nowiki>=a=</nowiki>
23294 Headings: 6c. Heading chars in SOL context (leading newline break)
23302 <nowiki>=b=</nowiki>
23306 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23310 <!--c0--><p>=a=</p>
23312 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23314 <!--c0--><nowiki>=a=</nowiki>
23316 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23320 Headings: 6d. Heading chars in SOL context (No escaping needed)
23330 Headings: 7. Insert a newline between new content and headings
23336 <h2 data-parsoid='{}'>A</h2>
23337 <p data-parsoid='{}'>a</p>
23347 #### --------------- Lists ---------------
23348 #### 0. Outside nests (*foo, etc.)
23349 #### 1. Nested inside html <ul><li>*foo</li></ul>
23350 #### 2. Inside definition lists
23351 #### 3. Only bullets at start should be escaped
23352 #### 4. No escapes needed
23353 #### 5. No unnecessary escapes
23354 #### 6. Escape bullets in SOL position
23355 #### 7. Escape bullets in a multi-line context
23356 #### ----------------------------------------
23359 Lists: 0. Outside nests
23369 <nowiki>*</nowiki>foo
23371 <nowiki>#</nowiki>foo
23373 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23376 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23377 ## to test wikitext escaping, and insignificant whitespace diffs
23378 ## cause PHP parser tests to barf
23380 Lists: 1. Nested inside html (No unnecessary escapes)
23389 <li data-parsoid='{}'>*foo</li>
23390 <li data-parsoid='{}'>#foo</li>
23391 <li data-parsoid='{}'>:foo</li>
23392 <li data-parsoid='{}'>;foo</li>
23400 <li data-parsoid='{}'>*foo</li>
23401 <li data-parsoid='{}'>#foo</li>
23402 <li data-parsoid='{}'>:foo</li>
23403 <li data-parsoid='{}'>;foo</li>
23410 *<nowiki>*foo</nowiki>
23411 *<nowiki>#foo</nowiki>
23412 *<nowiki>:foo</nowiki>
23413 *<nowiki>;foo</nowiki>
23419 #<nowiki>*foo</nowiki>
23420 #<nowiki>#foo</nowiki>
23421 #<nowiki>:foo</nowiki>
23422 #<nowiki>;foo</nowiki>
23426 Lists: 2. Inside definition lists
23430 <dl><dt>;foo</dt></dl>
23431 <dl><dt>:foo</dt></dl>
23434 <dl><dd>:foo</dd></dl>
23438 ; <nowiki>:foo</nowiki>
23440 ; <nowiki>:foo</nowiki>
23447 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23453 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23457 *<nowiki>*foo</nowiki>''it''*bar
23461 Lists: 4. No escapes needed
23474 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23478 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23492 Lists: 5. No unnecessary escapes
23496 <ul><li> bar <span>[[foo]]</span></li></ul>
23497 <ul><li> =bar <span>[[foo]]</span></li></ul>
23498 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23499 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23500 <ul><li> =bar <span>foo]]</span>=</li></ul>
23501 <ul><li> <s></s>: a</li></ul>
23502 <ul><li> <i>* foo</i></li></ul>
23505 * bar <span><nowiki>[[foo]]</nowiki></span>
23507 * =bar <span><nowiki>[[foo]]</nowiki></span>
23509 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23511 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23513 * =bar <span>foo]]</span>=
23521 Lists: 6. Escape bullets in SOL position
23525 <p><!--cmt-->*foo</p>
23527 <!--cmt--><nowiki>*</nowiki>foo
23531 Lists: 7. Escape bullets in a multi-line context
23540 <nowiki>*</nowiki>b
23544 Lists: 8. Escape colons only if not present in tags
23548 <dl><dt>a:b<i>c:d</i></dt></dl>
23550 ; <nowiki>a:b</nowiki>''c:d''
23553 #### --------------- HRs ---------------
23554 #### 1. Single line
23555 #### -----------------------------------
23558 HRs: 1. Single line
23566 ----<nowiki>----</nowiki>
23571 #### --------------- Tables ---------------
23572 #### 1a. Simple example
23573 #### 1b. No escaping needed (!foo)
23574 #### 1c. No escaping needed (|foo)
23575 #### 1d. No escaping needed (|}foo)
23577 #### 2a. Nested in td (<td>foo|bar</td>)
23578 #### 2b. Nested in td (<td>foo||bar</td>)
23579 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23581 #### 3a. Nested in th (<th>foo!bar</th>)
23582 #### 3b. Nested in th (<th>foo!!bar</th>)
23583 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23587 #### 4c. No escaping needed
23588 #### --------------------------------------
23591 Tables: 1a. Simple example
23599 <nowiki>{|</nowiki>
23604 Tables: 1b. No escaping needed
23615 Tables: 1c. No escaping needed
23626 Tables: 1d. No escaping needed
23637 Tables: 2a. Nested in td
23642 <td>foo|bar</td></tr>
23643 <tr><td>x<div>a|b</div></td>
23647 |<nowiki>foo|bar</nowiki>
23649 |x<div><nowiki>a|b</nowiki></div>
23665 Tables: 2b. Nested in td
23671 <td>a<i>b||c</i></td>
23672 <td>a<i><div>b||c</div></i></td>
23673 </tr></tbody></table>
23676 |<nowiki>foo||bar</nowiki>
23677 |a''<nowiki>b||c</nowiki>''
23678 |a''<div><nowiki>b||c</nowiki></div>''
23687 <td>a<i><div>b||c</div></i>
23693 Tables: 2c. Nested in td -- no escaping needed
23709 Tables: 3a. Nested in th
23725 Tables: 3b. Nested in th
23730 <tr><th>foo!!bar</th>
23731 <th><i>foo|bar</i></th>
23732 <th><i>foo!!bar</i></th>
23733 <th><i><span>foo!!bar</span></i></th>
23734 </tr></tbody></table>
23737 !<nowiki>foo!!bar</nowiki>
23738 !''<nowiki>foo|bar</nowiki>''
23739 !''<nowiki>foo!!bar</nowiki>''
23740 !''<span><nowiki>foo!!bar</nowiki></span>''
23749 <th><i>foo!!bar</i>
23751 <th><i><span>foo!!bar</span></i>
23757 Tables: 3c. Nested in th
23762 <tr><th>foo||bar</th>
23763 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23764 </tr></tbody></table>
23767 !<nowiki>foo||bar</nowiki>
23768 !<nowiki>foo||bar</nowiki>
23781 Tables: 4a. Escape -
23797 |<nowiki>-bar</nowiki>
23802 Tables: 4b. Escape +
23818 |<nowiki>+bar</nowiki>
23823 Tables: 4c. No escaping needed
23828 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23829 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23835 <div>a|b</div></td>
23880 Tables: 4d. No escaping needed
23885 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23886 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23887 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23898 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23908 T97430: Don't emit empty nowiki pairs around marker meta tags
23912 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23913 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23915 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23916 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23920 Unclosed xmlish element in table line shouldn't eat end delimiters
23925 <tbody><tr><td> <foo</td>
23926 <td> bar></td></tr>
23943 #### --------------- Links ----------------
23944 #### 1. Quote marks in link text
23945 #### 2. Wikilinks: Escapes needed
23946 #### 3. Wikilinks: No escapes needed
23947 #### 4. Extlinks: Escapes needed
23948 #### 5. Extlinks: No escapes needed
23949 #### --------------------------------------
23951 Links 1. WikiLinks: No escapes needed
23955 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23956 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23957 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23961 [[Foo|x [Foobar] x]]
23963 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23964 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23965 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23970 Links 2. WikiLinks: Escapes needed
23974 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23975 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23976 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23977 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23978 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23979 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23980 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23981 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23982 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23983 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23985 [[Foo|<nowiki>Foobar]</nowiki>]]
23986 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23987 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23988 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23989 [[Foo|<nowiki>|Bar</nowiki>]]
23990 [[Foo|<nowiki>]]bar</nowiki>]]
23991 [[Foo|<nowiki>[[bar</nowiki>]]
23992 [[Foo|<nowiki>x [[ y</nowiki>]]
23993 [[Foo|<nowiki>x ]] y</nowiki>]]
23994 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23996 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23997 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23998 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23999 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24000 <a href="/wiki/Foo" title="Foo">|Bar</a>
24001 <a href="/wiki/Foo" title="Foo">]]bar</a>
24002 <a href="/wiki/Foo" title="Foo">[[bar</a>
24003 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24004 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24005 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24010 Links 3. WikiLinks: No escapes needed
24014 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24015 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24020 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24021 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24026 Links 4. ExtLinks: Escapes needed
24030 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24031 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
24032 <p>[http://google.com]</p>
24033 <p>[http://google.com google]</p>
24034 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24035 <p>[<a rel="mw:ExtLink" href="http://google.com" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://google.com"}},"i":0}}]}'>http://google.com</a>]</p>
24037 [http://google.com <nowiki>[google]</nowiki>]
24038 [http://google.com <nowiki>google]</nowiki>]
24040 <nowiki>[http://google.com]</nowiki>
24042 <nowiki>[http://google.com google]</nowiki>
24044 [http://google.com<nowiki>]</nowiki>
24046 [{{echo|http://google.com}}<nowiki>]</nowiki>
24048 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24049 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24050 </p><p>[http://google.com]
24051 </p><p>[http://google.com google]
24052 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24053 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24058 Links 5. ExtLinks: No escapes needed
24062 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24063 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24065 [http://google.com [google]
24067 [[http://google.com]]
24069 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24070 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24075 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
24079 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24080 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24081 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24082 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24083 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24084 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24085 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24086 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24087 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24088 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24089 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24090 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24091 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24094 x<nowiki/>http://example.com<nowiki/>y
24095 http://example.com<nowiki/>?x
24096 http://example.com<nowiki/>&x
24097 http://example.com<nowiki/>'x
24098 http://example.com<nowiki/>,x
24099 http://example.com<nowiki/>.x
24100 http://example.com<nowiki/>;x
24101 http://example.com<nowiki/>:x
24102 http://example.com<nowiki/>;x
24103 http://example.com<nowiki/>!x
24104 http://example.com<nowiki/>=x
24105 http://example.com<nowiki/>(x)
24106 http://example.com(x<nowiki/>)
24110 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24115 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24117 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24118 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24119 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24120 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24121 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24127 "http://example.com"
24128 (http://example.com)
24129 (http://example.com) foo
24130 http://example.com,
24131 http://example.com, foo
24134 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24136 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24137 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24138 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24139 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24140 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24145 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24149 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24150 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24152 http://example.com.,;:!?\
24153 -http://example.com:
24155 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24156 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24161 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
24165 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24166 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24167 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24171 X<nowiki/>RFC 123<nowiki/>y
24175 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
24179 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24180 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24181 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24188 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24189 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24190 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24195 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
24199 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24200 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24201 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24205 X<nowiki/>PMID 123<nowiki/>y
24209 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
24213 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24214 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24215 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24222 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24223 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24224 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24229 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
24233 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24234 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24235 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24238 ISBN 1234567890<nowiki/>1
24239 ISBN 1234567890<nowiki/>x
24240 a<nowiki/>ISBN 1234567890<nowiki/>b
24244 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
24248 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24252 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24257 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24261 <p>this is not a link: http://example.com
24264 this is not a link: <nowiki>http://example.com</nowiki>
24268 Links 15. Link trails can't become link prefixes.
24273 <p><a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður" data-parsoid='{"stx":"simple","tail":"-"}'>Söfnuður-</a><a rel="mw:WikiLink" href="00" title="00">00</a></p>
24275 [[Söfnuður]]-[[00]]
24277 <p><a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">Söfnuður-</a><a href="/wiki/00" title="00">00</a>
24281 #### --------------- Quotes ---------------
24282 #### 1. Quotes inside <b> and <i>
24283 #### 2. Link fragments separated by <i> and <b> tags
24284 #### 3. Link fragments inside <i> and <b>
24285 #### 4. No escaping needed
24286 #### --------------------------------------
24288 1a. Quotes inside <b> and <i>
24299 <b>foo'<i>bar'</i>baz</b>
24308 <i>fools'<span> errand</span></i>
24309 <i><span>fool</span>'s errand</i>
24310 '<i>foo</i> bar '<i>baz</i>
24311 a|!*#-:;+-~[]{}b'<i>x</i>
24315 ''<nowiki>''foo''</nowiki>''
24316 ''<nowiki>'''foo'''</nowiki>''
24318 '''<nowiki/>'foo''''
24319 '''<nowiki>''foo''</nowiki>'''
24320 '''<nowiki>'''foo'''</nowiki>'''
24321 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24322 '''foo'''<nowiki/>'s
24328 '''foo'''<nowiki/>'
24329 ''''foo'''<nowiki/>'
24330 ''fools'<span> errand</span>''
24331 ''<span>fool</span>'s errand''
24332 '<nowiki/>''foo'' bar '''baz''
24333 a|!*#-:;+-~[]{}b'''x''
24337 1b. Quotes inside <b> and <i> with other tags on same line
24341 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24342 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24343 <i>a'</i> foo <b><a rel="mw:WikiLink" href="Bar" title="Bar" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[bar]]"}},"i":0}}]}'>bar</a></b>
24344 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24345 '<i>foo</i> <span class="mw-ref" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
24346 '<i>foo</i> <div title="name">test</div>
24347 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24348 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24349 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
24352 '''a'' foo ''[[bar]]''
24353 ''a''' foo ''[[bar]]''
24354 ''a''' foo '''{{echo|[[bar]]}}'''
24355 [[foo]] x'''[[bar]]''
24356 '''foo'' <ref>test</ref>
24357 '''foo'' <div title="name">test</div>
24358 '''foo'' and <br> bar
24363 2. Link fragments separated by <i> and <b> tags
24367 <p>[[<i>foo</i>hello]]</p>
24368 <p>[[<b>foo</b>hello]]</p>
24370 [[''foo''<nowiki>hello]]</nowiki>
24372 [['''foo'''<nowiki>hello]]</nowiki>
24375 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24376 # this is one of the shortcomings of this format
24378 3. Link fragments inside <i> and <b>
24382 <p><i>[[foo</i>]]</p>
24383 <p><b>[[foo</b>]]</p>
24385 ''[[foo''<nowiki>]]</nowiki>
24387 '''[[foo'''<nowiki>]]</nowiki>
24391 4. No escaping needed
24395 <p>'<span><i>bar</i></span>'
24396 '<span><b>bar</b></span>'
24400 '<span>''bar''</span>'
24401 '<span>'''bar'''</span>'
24405 #### ----------- Paragraphs ---------------
24406 #### 1. No unnecessary escapes
24407 #### --------------------------------------
24410 1. No unnecessary escapes
24414 <p>bar <span>[[foo]]</span>
24415 </p><p>=bar <span>[[foo]]</span>
24416 </p><p>[[bar <span>[[foo]]</span>
24417 </p><p>]]bar <span>[[foo]]</span>
24418 </p><p>=bar <span>foo]]</span>=
24421 bar <span><nowiki>[[foo]]</nowiki></span>
24423 =bar <span><nowiki>[[foo]]</nowiki></span>
24425 [[bar <span><nowiki>[[foo]]</nowiki></span>
24427 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24429 =bar <span>foo]]</span><nowiki>=</nowiki>
24432 #### ----------------------- PRE --------------------------
24433 #### 1. Leading whitespace in SOL context should be escaped
24434 #### ------------------------------------------------------
24436 1. Leading whitespace in SOL context should be escaped
24459 <nowiki> </nowiki>a
24461 <nowiki> </nowiki> a
24465 <nowiki> </nowiki> a
24467 <nowiki> </nowiki>a
24470 <nowiki> </nowiki>b
24493 2. Leading whitespace in non-indent-pre contexts should not be escaped
24497 <p>foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
24498 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24499 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i>a</i>
24509 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24528 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24532 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
24534 [[File:Foobar.jpg|thumb|caption]]
24538 5. Nowiki escaping should account for indent-pres
24548 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24561 #### --------------- Behavior Switches --------------------
24564 1. Valid behavior switches should be escaped
24571 <nowiki>__TOC__</nowiki>
24572 ''<nowiki>__TOC__</nowiki>''
24576 2. Invalid behavior switches should not be escaped
24587 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24589 Behavior switches should be SOL-transparent
24593 <meta property="mw:PageProp/toc" />
24595 <!-- this one's bogus -->
24598 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24600 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24604 <!-- this one's bogus -->
24613 #### --------------- HTML tags ---------------
24616 #### 3. multi-line html tag
24617 #### 4. extension tags
24618 #### -----------------------------------------
24624 <a href="http://google.com">google</a>
24626 <a href="http://google.com">google</a>
24634 <ul><li> <div>foo</div></li>
24635 <li> <div style="color:red">foo</div></li>
24636 <li> <td></li></ul>
24639 * <nowiki><div>foo</div></nowiki>
24640 * <nowiki><div style="color:red">foo</div></nowiki>
24641 * <nowiki><td></nowiki>
24645 3. multi-line html tag
24664 <p><ref>foo</ref>
24665 </p><p><ref>bar
24666 </p><p>baz</ref>
24669 <nowiki><ref>foo</ref></nowiki>
24671 <nowiki><ref>bar</nowiki>
24673 baz<nowiki></ref></nowiki>
24676 #### --------------- Others ---------------
24682 <p><nowiki>foo</nowiki>
24685 <nowiki>foo</nowiki>
24688 ## The quote-char in the input is necessary for triggering the bug
24690 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24699 #----------- End of wikitext escaping tests --------------
24703 Tag-like HTML structures are passed through as text
24725 </p><p>1<d e>f
24730 HTML tag with necessary entities in attributes
24732 <span title="&amp;">foo</span>
24734 <p><span title="&amp;">foo</span>
24739 HTML tag with 'unnecessary' entity encoding in attributes
24741 <span title="&">foo</span>
24743 <p><span title="&">foo</span>
24748 HTML tag with broken attribute value quoting
24750 parsoid=wt2html,html2html
24752 <span title="Hello world>Foo</span>
24754 <p><span title="Hello world">Foo</span>
24757 <p><span title="Hello world">Foo</span></p>
24761 Self-closed tag with broken attribute value quoting
24763 parsoid=wt2html,html2html
24765 <div title="Hello world />Foo
24767 <div title="Hello world"></div>
24770 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24774 Table with broken attribute value quoting
24776 parsoid=wt2html,html2html
24779 | title="Hello world|Foo
24784 <td title="Hello world">Foo
24790 <td title="Hello world">Foo
24796 Table with broken attribute value quoting on consecutive lines
24798 parsoid=wt2html,html2html
24801 | title="Hello world|Foo
24802 | style="color:red|Bar
24807 <td title="Hello world">Foo
24809 <td style="color:red">Bar
24815 <td title="Hello world">Foo
24816 </td><td style="color: red">Bar
24817 </td></tr></tbody></table>
24822 Accept empty td cell attribute
24825 | align="center" | foo || |
24830 <td align="center"> foo </td>
24837 Non-empty attributes in th-cells
24840 ! Foo !! style="color: red" | Bar
24846 <th style="color: red"> Bar
24852 Accept empty attributes in th-cells
24867 Empty table rows go away
24888 ### Parsoid-centric tests for testing RTing of inter-element separators
24889 ### Edge cases not tested by existing parser tests and specific to
24890 ### Parsoid-specific serialization strategies.
24894 RT-ed inter-element separators should be valid separators
24906 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24910 # Parsoid-only since PHP parser relies on Tidy for correct output
24912 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24926 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24927 <p>bar</p></small></td></tr>
24931 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo<small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></small></td></tr>
24935 # Note that the "style" attribute is really a template parameter here.
24936 # The = would have to be {{=}} if you wanted the literal.
24938 Empty TD followed by TD with tpl-generated attribute
24943 |{{echo|style='color:red'}}|foo
24957 Indented table with an empty td
24975 ## We have some newline diffs RT-ing this edge case
24976 ## and it is not important enough -- we seem to be emitting
24977 ## at most 2 newlines after a </tr> and this is unrelated to
24978 ## the issue from T85627 that this is testing.
24980 Indented table with blank lines in between (T85627)
24999 Indented block & table
25013 <div data-parsoid='{"stx":"html"}'>foo</div>
25015 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25020 Indent and comment before table row
25035 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25036 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25040 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25042 Empty TR followed by a template-generated TR
25048 {{echo|<tr><td>foo</td></tr>}}
25054 <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}}]}'>
25059 ## PHP and parsoid output differ for this, and since this is primarily
25060 ## for testing Parsoid's serializer, marking this Parsoid only
25062 Empty TR followed by mixed-ws-comment line should RT correctly
25078 <!--c--> </tr><!--d-->
25084 Multi-line image caption generated by templates with/without trailing newlines
25086 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25087 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25089 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt9" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt10" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt11" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span></figcaption></figure>
25090 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt12" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt14" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span>\n\n</figcaption></figure>
25094 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25098 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25100 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25102 <includeonly>foo</includeonly>
25110 ## PHP emits broken html for this, and since this is primarily
25111 ## a Parsoid serializer test, marking this Parsoid only
25113 Improperly nested inline or quotes tags with whitespace in between
25115 <span> <s>x</span> </s>
25118 <p><span> <s>x</s></span><s> </s>
25119 <b> <i>x</i></b><i> </i>
25124 Encapsulate protected attributes from wt
25126 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25128 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25132 <div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
25134 <table data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">
25135 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25139 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25140 ## Having nested or stray pre tags results in the attempt to add duplicates,
25141 ## causing an assertion fail. This test tries to prevent that situation.
25143 Ensure ParagraphWrapper can deal with stray closing pre tags
25153 1. Ensure fostered text content is wrapped in element nodes
25157 <table>hi</table><table>ho</table>
25166 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25168 parsoid=wt2html,wt2wt
25177 <tbody><tr><td> a</td></tr>
25182 Encapsulation properly handles null DSR information from foster box
25184 parsoid=wt2html,wt2wt
25186 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25188 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}">foo</span><table><tbody><tr><td>bar</td></tr></tbody></table>
25192 1. Encapsulate foster-parented transclusion content
25194 parsoid=wt2wt,wt2html
25196 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25198 <p typeof="mw:Transclusion" data-mw="{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</p><table>
25208 2. Encapsulate foster-parented transclusion content
25210 parsoid=wt2wt,wt2html
25212 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25214 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div><tr><td>bar</td></tr></table>"]}">foo</div>
25225 3. Encapsulate foster-parented transclusion content
25227 parsoid=wt2wt,wt2html
25229 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25231 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
25244 4. Encapsulate foster-parented transclusion content
25246 parsoid=wt2wt,wt2html
25248 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25250 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
25263 5. Encapsulate foster-parented transclusion content
25265 parsoid=wt2wt,wt2html
25267 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25269 <p typeof="mw:Transclusion" data-mw="{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</p>
25284 6. Encapsulate foster-parented transclusion content
25286 parsoid=wt2wt,wt2html
25288 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25290 <p typeof="mw:Transclusion" data-mw="{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</p>
25306 7. Encapsulate foster-parented transclusion content
25308 parsoid=wt2wt,wt2html
25310 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25312 <p typeof="mw:Transclusion" data-mw="{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<p>foo</p>"}},"i":0}},"<td>bar</td></table>"]}">foo</p>
25322 # Note that the wt is broken on purpose: the = should be {{=}} if you
25323 # don't want it to be a template parameter key.
25325 8. Encapsulate foster-parented transclusion content
25327 parsoid=wt2wt,wt2html
25330 }}{|{{echo|style='color:red'}}
25335 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25337 <p typeof="mw:Transclusion" data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</p>
25348 9. Encapsulate foster-parented transclusion content
25350 parsoid=wt2wt,wt2html
25352 <table>{{echo|hi</table>hello}}
25354 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}' data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"pi":[[{"k":"1"}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
25358 Table in fosterable position
25369 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>\n"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
25371 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25377 # Parsoid only for bug 64747
25379 Properly encapsulate empty-content transclusions in fosterable positions
25387 <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"}]]}'>
25393 Always encapsulate foster box when template range is expanded to table
25406 T115289: Unclosed table
25408 {{echo|<table>}}<!--c-->[[Category:Two]]
25410 <link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><table about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><!--c--></table>
25414 T115289: Don't migrate newlines out of tables with fostered content
25416 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25418 <link rel="mw:PageProp/Category" href="./Category:One" about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:One"},"sa":{"href":"Category:One"},"fostered":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><td></td>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>[[Category:One]]"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt2"/><table about="#mwt2" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
25422 T73074: More fostering fun
25424 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25426 <link rel="mw:PageProp/Category" href="./Category:Two" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"fostered":true}'/><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"stx":"html"}'></td></tr><tr about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'><!--c--></tr></tbody></table>
25430 Support <object> element with .data attribute
25434 <object data="test.swf"></object>
25436 <object data="test.swf"></object>
25440 Don't block XML namespace declaration
25442 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25444 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25447 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25450 # -----------------------------------------------------------------
25451 # The following section of tests are primarily to spec requirements
25452 # around Parsoid's serialization (old, new, edited content)
25454 # All these tests are marked Parsoid html2wt and html2html only
25455 # ----------------------------------------------------------------
25458 Ignore rel attribute in a-tags during serialization to url-links
25462 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25463 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25464 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25466 http://en.wikipedia.org/wiki/Foobar
25467 http://en.wikipedia.org/wiki/Foobar
25468 http://en.wikipedia.org/wiki/Foobar
25471 # 'mi' is a localinterwiki prefix as well as a language
25473 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25477 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25484 New wikilinks should be serialized properly
25488 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25489 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25490 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25491 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25492 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25496 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25497 http://en.wikipedia.org/wiki/Foo
25498 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25502 New wiki links (href variations)
25506 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25507 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25508 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25509 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25514 [[Toxine bactérienne]]
25518 New wiki links (content string variations)
25522 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25523 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25524 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25528 [[Foo_bar|./Foo_bar]]
25532 New category links (href variations)
25536 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25537 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25538 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25540 [[Category:Toxine bactérienne]]
25541 [[Category:Toxine bactérienne]]
25542 [[Category:Toxine bactérienne]]
25546 New sol transparent links don't need indent-pre nowiki protection
25551 <link rel="mw:PageProp/redirect" href="./Main_Page">
25552 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25553 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25555 #WEITERLEITUNG [[Main Page]]
25556 <!-- this is good --> [[Category:Good]]
25557 <!-- this is great --> [[Kategorie:Great]]
25561 New interlanguage links (href variations)
25565 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25566 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25567 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25569 [[es:Toxine bactérienne]]
25570 [[es:Toxine_bactérienne]]
25571 [[es:Toxine_bactérienne]]
25575 Image: Modifying size of an image (1)
25578 "modes": ["wt2wt"],
25580 ["img[height]", "attr", "height", "22"],
25581 ["img[width]", "attr", "width", "200"]
25585 [[Image:Foobar.jpg|230x230px]]
25587 [[Image:Foobar.jpg|200x200px]]
25591 Image: Modifying size of an image (2)
25594 "modes": ["wt2wt"],
25596 ["img[height]", "attr", "height", "100"],
25597 ["img[width]", "attr", "width", "500"]
25601 [[Image:Foobar.jpg|230x230px]]
25603 [[Image:Foobar.jpg|500x500px]]
25606 # Change in size is ignored so long as class='mw-default-size'
25608 Image: Modifying size of an image (3)
25611 "modes": ["wt2wt"],
25613 ["figure[class]", "removeClass", "mw-default-size"],
25614 ["figure img", "attr", "height", "19"],
25615 ["figure img", "attr", "width", "170"]
25619 [[Image:Foobar.jpg|thumb]]
25621 [[Image:Foobar.jpg|thumb|170x170px]]
25625 Image: Modifying alignment of an image (bug 48665)
25628 "modes": ["wt2wt"],
25630 ["figure[class]", "removeClass", "mw-halign-right"],
25631 ["figure[class]", "addClass", "mw-halign-left"]
25635 [[Image:Foobar.jpg|thumb|caption|right]]
25637 [[Image:Foobar.jpg|thumb|caption|left]]
25641 Image: Modifying mw-default-size of an frameless image (bug 62805)
25644 "modes": ["wt2wt"],
25646 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25650 [[Image:Foobar.jpg|frameless|right]]
25652 [[Image:Foobar.jpg|frameless|right|220x220px]]
25656 Image: Modifying valign of an image (bug 49221)
25659 "modes": ["wt2wt"],
25661 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25662 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25666 [[File:Foobar.jpg|20px|middle]]
25668 [[File:Foobar.jpg|20px|text-top]]
25672 Image: Modifying alt attribute of an image (bug 56400)
25675 "modes": ["wt2wt"],
25677 ["img[alt]", "attr", "alt", "some alternate edited text"]
25681 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25683 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25687 Image: Modifying caption of an image
25690 "modes": ["wt2wt"],
25692 ["figcaption", "text", "new caption"]
25696 [[Image:Foobar.jpg|thumb|original caption]]
25698 [[Image:Foobar.jpg|thumb|new caption]]
25702 Image: empty alt attribute (bug 48924)
25706 [[File:Foobar.jpg|thumb|alt=|bar]]
25708 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" 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>
25712 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25718 <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" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="180"/></a></figure>
25720 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25724 Image: Block level image should have \n before and after
25727 [[File:Foobar.jpg|right|thumb|150x150px]]
25731 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150"/></a></figure>
25736 Image: New block level image should have \n before and after (existing content)
25739 [[File:Foobar.jpg|right|thumb|150x150px]]
25743 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"right","ak":"right"},{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"150x150px"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"17","width":"150"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure>
25748 Image: upright option (parsoid)
25750 [[File:Foobar.jpg|thumb|upright|caption]]
25751 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25752 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25754 <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/170px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="19" width="170"/></a><figcaption>caption</figcaption></figure>
25755 <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/110px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="12" width="110"/></a><figcaption>caption</figcaption></figure>
25756 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
25760 Image: upright option is ignored on inline and frame images (parsoid)
25762 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25764 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a></span></p>
25768 Image: from basic HTML (1)
25772 <span typeof="mw:Image">
25773 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25776 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25780 Image: from basic HTML (2)
25784 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25786 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25790 Image: from basic HTML (3)
25794 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25796 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25800 Image: from basic HTML (4)
25804 <img src="./File:Foobar.jpg">
25806 [[File:Foobar.jpg|link=]]
25810 Image: Invalid title as link
25812 [[File:Foobar.jpg|link=<]]
25814 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
25817 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=<"}]}' data-mw='{"caption":"link=&lt;"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
25821 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25826 <li><p>foo</p></li>
25833 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25837 <ul> <li>foo</li></ul>
25843 Don't strip leading whitespace when handling indent-pre suppressing tags
25848 <tr><td> indented row</td></tr>
25851 <b>This is very bold of you!</b>
25854 indented cell (no pre-wrapping!)
25864 '''This is very bold of you!'''
25868 indented cell (no pre-wrapping!)
25876 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25898 <nowiki> </nowiki></span>bar2
25901 <nowiki> </nowiki><span>bar</span>
25904 <nowiki> </nowiki><span>foo</span>
25909 Lists: Dont insert newlines in a serialized list item.
25913 <ul><li>a<br>b</li><li>c</li></ul>
25920 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25923 "modes": ["html2wt"],
25924 "scrubWikitext": false
25927 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25928 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25930 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25931 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25933 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25935 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25937 == hello there [[Category:A1]] ==
25939 == [[Category:A2]] hi pal ==
25941 == <!--foo--> [[Category:A3]] how goes it ==
25943 == it goes well [[Category:A4]] <!--bar--> ==
25945 ==howdy [[Category:A5]]==
25951 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25954 "modes": ["html2wt"],
25955 "scrubWikitext": true
25958 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25959 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25961 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25962 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25964 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25972 <!--foo--> [[Category:A3]]
25977 [[Category:A4]] <!--bar-->
25985 Headings: Don't hoist metas that come from templates
25988 "modes": ["html2wt"],
25989 "scrubWikitext": true
25992 <h2><span about="#mwt1" typeof="mw:Transclusion" data-parsoid="{}" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo [[Category:Foo]]"}},"i":0}}]}'>foo </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid="{}" /></h2>
25994 == {{echo|foo [[Category:Foo]]}} ==
25998 Headings: Category in ref isn't hoisted
26001 "modes": ["html2wt"],
26002 "scrubWikitext": true
26005 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
26007 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">bar <link rel="mw:PageProp/Category" href="./Category:Baz" /> </span></li></ol>
26010 [[Category:Baz]] </ref> ==
26016 Parsoid: Serialize positional parameters with = in them as named parameter
26020 <p about="#mwt1" typeof="mw:Transclusion"
26021 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26023 <p about="#mwt1" typeof="mw:Transclusion"
26024 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26026 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26027 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26028 <p data-parsoid='{"pi":[[{"k":"1"},{"k":"2"}]]}' 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>
26032 {{echo|1=f=oo|2=bar}}
26034 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26035 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26036 {{echo|<nowiki>f=oo</nowiki>|bar}}
26040 Parsoid: Serialize positional parameters with = in extlink as named parameter
26044 <p><a rel="mw:ExtLink" href="http://stuff?is=ok" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://stuff?is=ok"}},"i":0}}]}'>http://stuff?is=ok</a></p>
26046 {{echo|1=http://stuff?is=ok}}
26050 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26054 <div>a<p>b</p></div>
26075 Substrings resembling wikitext in hrefs should not get nowiki escapes
26079 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26085 Enforce single-line context in the serializer
26092 <h2> hi <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bogus","href":"./Template:Bogus"},"params":{"1":{"wt":"there\nyou"}},"i":0}}]}'>there</span><span about="#mwt1">
26093 </span><span about="#mwt1">you</span> </h2>
26095 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
26097 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
26098 there</span></li></ol>
26110 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26117 </tbody></table></dd></dl>
26121 == hi {{bogus|there
26132 * foo '''bar''' baz
26144 Serialize new placeholder space without spans
26148 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26150 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26152 <span typeof="mw:Extension/ref" data-mw="{"name":"ref","body":{"html":"foo<span typeof=\"mw:Placeholder\">&nbsp;</span>: bar"}}"><sup>[1]</sup></span>ok</p>
26158 <ref>foo : bar</ref>ok
26162 #-----------------------
26163 # Tag minimization tests
26164 #-----------------------
26167 1. I/B quote minimization: wikitext-only tags should be combined
26171 <p><i>A</i><i>B</i></p>
26172 <p><b>A</b><b>B</b></p>
26173 <p><i>A</i><b><i>B</i></b></p>
26174 <p><b>A</b><i><b>B</b></i></p>
26175 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26176 <p><i><b>A</b></i><i><b>B</b></i></p>
26177 <p><i><b>A</b></i><b><i>B</i></b></p>
26178 <p><b><i>A</i></b><i><b>B</b></i></p>
26198 2. I/B quote minimization: wikitext and html tags should not be combined
26202 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26203 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26207 ''A''<nowiki/>'''<i>B</i>'''
26211 3. I/B quote minimization: templated content stops minimization
26215 <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>
26216 <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>
26218 ''A''{{echo|''B''}}
26220 ''A''{{echo|'''''B'''''}}
26224 4. I/B quote minimization: new content should be mimimized with adjacent old content
26228 <p><i>A</i><i>B</i></p>
26229 <p><b>A</b><b>B</b></p>
26230 <p><i>A</i><b><i>B</i></b></p>
26240 5a. Merge adjacent quote nodes if they've been edited
26243 "modes": ["wt2wt", "selser"],
26245 ["p", "contents", "remove", ":contains('b')"]
26255 5b. Merge adjacent quote nodes if they've been edited
26258 "modes": ["wt2wt", "selser"],
26264 ''a''<span id="x">b</span>''c''
26270 1. Merge adjacent link nodes as long as at least one element is new
26273 "modes": ["html2wt"],
26274 "scrubWikitext": true
26277 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26278 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26279 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26283 [[Football|Foot]][[Football|ball]]
26287 2. Merge adjacent link nodes and enable additional normalizations
26290 "modes": ["html2wt"],
26291 "scrubWikitext": true
26294 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26296 [[Football|''Football'']]
26300 3. Don't merge adjacent link nodes if scrubWikitext is false
26303 "modes": ["html2wt"],
26304 "scrubWikitext": false
26307 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26309 [[Football|Foot]][[Football|ball]]
26312 #------------------------------
26313 # End of tag minimization tests
26314 #------------------------------
26317 Bug 54262: New entities
26321 <span typeof="mw:Entity"> </span>
26326 ## Note that there is no wikitext output for 'unknownproperty' ##
26327 ## Unknown magic words are silently dropped ##
26334 <meta property='mw:PageProp/toc' />
26335 <meta property='mw:PageProp/notoc' />
26336 <meta property='mw:PageProp/forcetoc' />
26337 <meta property='mw:PageProp/index' />
26338 <meta property='mw:PageProp/noindex' />
26339 <meta property='mw:PageProp/nogallery' />
26340 <meta property='mw:PageProp/noeditsection' />
26341 <meta property='mw:PageProp/notitleconvert' />
26342 <meta property='mw:PageProp/nocontentconvert' />
26343 <meta property='mw:PageProp/unknownproperty' />
26353 __NOCONTENTCONVERT__
26357 Consecutive <pre>s should not get merged
26359 parsoid=html2wt,html2html
26361 <pre>a</pre><pre>b</pre>
26389 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26393 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26395 [[Special:BookSources/1234567890|ISBN 1234567895]]
26399 Edited RFC links not serializable as RFC links should serialize as extlinks
26403 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26405 [//tools.ietf.org/html/rfc123 New RFC]
26409 Edited PMID links not serializable as PMID links should serialize as extlinks
26413 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26415 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26419 WTS of autolinks with trailing/surrounding context
26423 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26424 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26425 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26426 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26427 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26428 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26430 http://cscott.net'''foo'''
26432 http://cscott.net<b>foo</b>
26434 '''http://cscott.net'''
26436 '''http://cscott.net '''
26438 '''http://cscott.net<nowiki/>x'''
26440 http://cscott.net<nowiki/>x
26444 WTS of autolinks with nowikis (round-trip)
26446 x<nowiki/>http://cscott.net<nowiki/>x
26448 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26451 # this is the "easy" test because it leaves in place all the
26452 # data-parsoid information indicating this is an autolink
26454 WTS of autolinks with escapes (editing)
26457 "modes": ["wt2wt"],
26459 [ "meta", "remove" ]
26463 x<nowiki/>http://cscott.net<nowiki/>x
26465 x<nowiki/>http://cscott.net<nowiki/>x
26469 WTS of edited autolink-like text (T103364)
26472 "modes": ["wt2wt"],
26474 [ "span[typeof]", "removeAttr", "typeof" ]
26478 Not a link: <nowiki>http://example.com</nowiki>.
26480 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26484 WTS of newly-authored autolink-like text (T103364)
26488 <p>http://example.com is not a link.</p>
26490 <nowiki>http://example.com</nowiki> is not a link.
26494 WTS of autolink-like text after an autolink (T108563)
26498 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26500 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26504 Magic links inside links (not autolinked)
26506 [[Foo|http://example.com]]
26509 [[Foo|ISBN 123456789x]]
26511 [http://foo.com http://example.com]
26512 [http://foo.com RFC 1234]
26513 [http://foo.com PMID 1234]
26514 [http://foo.com ISBN 123456789x]
26516 <p><a href="/wiki/Foo" title="Foo">http://example.com</a> <a href="/wiki/Foo" title="Foo">RFC 1234</a> <a href="/wiki/Foo" title="Foo">PMID 1234</a> <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a></p>
26517 <p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a> <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
26519 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26520 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26521 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26522 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26524 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26525 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26526 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26527 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26531 Magic links inside image captions (autolinked)
26533 [[File:Foobar.jpg|thumb|http://example.com]]
26534 [[File:Foobar.jpg|thumb|RFC 1234]]
26535 [[File:Foobar.jpg|thumb|PMID 1234]]
26536 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26538 <div class="thumb tright">
26539 <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>
26540 <div class="thumbcaption">
26541 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26542 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26545 <div class="thumb tright">
26546 <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>
26547 <div class="thumbcaption">
26548 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26549 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26552 <div class="thumb tright">
26553 <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>
26554 <div class="thumbcaption">
26555 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26556 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26559 <div class="thumb tright">
26560 <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>
26561 <div class="thumbcaption">
26562 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26563 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26567 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
26568 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
26569 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></figcaption></figure>
26570 <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/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
26574 WTS of magic word text (T109371)
26579 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26580 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26582 <nowiki>RFC 1234</nowiki>
26584 [http://foo.com RFC 1234]
26590 Edited Redirect link should emit a non-piped wikitext link
26594 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26600 T75121: Infer extension name from typeOf if data-mw is not present
26602 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26604 <div typeOf="mw:Extension/foo"></div>
26609 # Note that the <p> wrapping isn't present in PHP parser output
26610 # The important thing for this test is that P-wrapping doesn't
26611 # interfere with the <nowiki> protection for leading - in <td>
26612 # (which isn't necessary for <th>).
26614 T88318: p-wrapped dash in table.
26616 parsoid=html2wt,wt2wt
26619 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26620 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26621 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26628 |<nowiki>-</nowiki>
26629 |<nowiki>- </nowiki>
26648 <td><small>-</small></td>
26660 T149209: WTS: Handle newlines in table cells properly
26668 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26670 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26676 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26678 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26700 T149209: Selser: Handle newlines in table cells properly
26703 "modes": ["selser"],
26705 [ "#h1", "html", "a\nb\n" ],
26706 [ "#h2", "html", "a\nb\n" ],
26707 [ "#c1", "html", "a\nb\n" ],
26708 [ "#c2", "html", "<p>a</p>" ],
26709 [ "#c3", "html", "<p>a</p>" ],
26710 [ "#c4", "html", "edit-me<p>a</p>" ]
26715 ! id="h1" |edit-me!!1
26717 ! id="h2" |edit-me||2
26719 | id="c1" |edit-me||3
26721 | id="c2" |edit-me||4
26723 | id="c3" |edit-me||p||q||r
26725 | id="c4" |edit-me||p||q||r
26754 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26759 <td id='mwAc'>foo</td>
26760 <td id='serialize-this'>bar</td>
26765 | id="serialize-this" |bar
26770 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26774 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26776 <div id="hello">ok</div>
26783 "modes": ["wt2wt"],
26785 [ "#xyz", "before", "<b>before</b> stuff " ],
26786 [ "#xyz", "after", " stuff <i>after</i>" ],
26787 [ "#xyz", "html", "x <b>y</b> z" ]
26791 <span id="xyz">hello</span>
26793 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26797 Never serialize a-tag as html, regardless of what data-parsoid has to say
26799 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26801 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26806 ## SSS FIXME: This is broken output nevertheless.
26807 ## What might be a reasonable non-broken output for this?
26808 ## This is an edge case unlikely to be seen in production
26809 ## that I am not wasting more time on this right now.
26811 Never serialize a-tag as html, no matter what attributes it has
26813 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26815 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26817 [http://boo.org http://boohoo.org]
26820 # Misnested is an indication that selser can reuse the source but these have
26821 # shown to sneak through on occasion. See T101768.
26822 # The original wikitext here is: [http://test.com [[one]] two three]
26824 Strip span tags added to mark misnested links
26828 <p data-parsoid='{}'><a rel="mw:ExtLink" href="http://test.com" data-parsoid='{"targetOff":17,"contentOffsets":[17,34]}'></a><a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"simple","a":{"href":"./One"},"sa":{"href":"one"},"misnested":true}'>one</a><span data-parsoid='{"misnested":true}'> two three</span></p>
26830 [http://test.com][[one]] two three
26834 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26838 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
26850 ## This test verifies the presence and computation of this attribute indirectly
26851 ## by making an edit and ensuring that the serialization is correct (which it would be
26852 ## only if firstWikitextNode is properly set).
26854 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26857 "modes": ["wt2wt"],
26859 [ "div#x", "remove" ],
26860 [ "div", "before", "<div>new</div>" ]
26864 <div id="x">foo</div>
26866 {{echo|<div>boo</div>
26874 {{echo|<div>boo</div>
26880 # --------------------------------------------
26881 # Tests spec'ing wikitext serialization norms |
26882 # --------------------------------------------
26885 1. Categories should always be serialized on their own line
26889 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26897 2. Categories that are part of templates should not introduce a line break
26899 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26901 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span>bar</span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
26904 # Careful while editing these next 2 tests. There are \u200f characters
26905 # before and after the <link> tags in the HTML and following some
26906 # of the categories in wikitext
26907 # Do not remove these characters in edits.
26909 # As part of the serialization, these bidi characters will get stripped.
26911 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26914 "modes": ["html2wt"],
26915 "scrubWikitext": true
26918 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26919 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26922 [[קטגוריה: שיטות משפט]]
26926 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26929 "modes": ["html2wt"],
26930 "scrubWikitext": true
26933 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26940 Lists: Add space after bullets
26947 <li><span> baz</span></li>
26952 * <span> baz</span>
26956 1. Headings: Add space before/after == (T53744)
26963 <h2><span> baz</span></h2>
26971 == <span> baz</span> ==
26975 2. Headings: Add space before/after == even after hoisted content
26978 "modes": ["html2wt"],
26979 "scrubWikitext": true
26982 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26990 1. Headings: suppress newly created empty headings
26993 "modes": ["html2wt"],
26994 "scrubWikitext": true
27002 2. Headings: don't suppress empty headings if scrubWikitext is false
27012 3. Headings: suppress empty headings on edits
27015 "modes": ["selser"],
27016 "scrubWikitext": true,
27022 ==<span id="x">foo</span>==
27027 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27030 "modes": ["html2wt"],
27031 "scrubWikitext": true
27034 <h2>foo<br/>bar</h2>
27035 <h2>foo <span><br/>bar</span> baz</h2>
27039 == foo <span> bar</span> baz ==
27043 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27046 "modes": ["html2wt"],
27047 "scrubWikitext": false
27050 <h2>foo<br/>bar</h2>
27056 1. WT Quote Tags: suppress newly created empty style tags
27059 "modes": ["html2wt"],
27060 "scrubWikitext": true
27068 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27074 ''<nowiki/>'''''<nowiki/>'''
27078 3. WT Quote Tags: suppress empty style tags on edits
27081 "modes": ["selser"],
27082 "scrubWikitext": true,
27088 '''<span id="x">foo</span>'''
27093 1. Anchors: suppress newly created empty anchors
27096 "modes": ["html2wt"],
27097 "scrubWikitext": true
27100 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27105 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27108 "modes": ["html2wt"],
27109 "scrubWikitext": false
27112 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27118 3. Anchors: suppress empty anchors on edits
27121 "modes": ["selser"],
27122 "scrubWikitext": true,
27128 [[Test|<span id="x">foo</span>]]
27133 3a. Anchors: do not suppress numbered extlinks
27136 "modes": ["wt2wt"],
27137 "scrubWikitext": true
27142 <a rel="mw:ExtLink" href="http://foo.com"></a>
27146 3b. Anchors: do not suppress numbered extlinks
27149 "modes": ["wt2wt"],
27150 "scrubWikitext": true,
27156 [http://foo.com <span id="x">foo</span>]
27162 Normalizations should be restricted to edited content
27165 "modes": ["selser"],
27166 "scrubWikitext": true,
27168 [ "h1", "before", "<i></i>"]
27182 1. Multiple normalizations (html2wt)
27185 "modes": ["html2wt"],
27186 "scrubWikitext": true
27190 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27191 </a><b><i></i></b>x</p>
27200 2. Multiple normalizations (selser)
27203 "modes": ["selser"],
27204 "scrubWikitext": true,
27206 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27210 <span id="x">foo</span>
27212 <span id="x">foo</span>
27218 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27221 "modes": ["html2wt"],
27222 "scrubWikitext": true
27234 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27241 <nowiki> </nowiki>hi
27243 <nowiki> </nowiki> hello
27247 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27250 "modes": ["html2wt"],
27251 "scrubWikitext": true
27260 baz bang</td></tr></table>
27266 bar<span>boo</span></p>
27282 bar<span>boo</span>
27286 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27289 "modes": ["selser"],
27290 "scrubWikitext": true,
27292 [ "p", "html", " a\n b" ]
27303 1. New links that end in spaces
27306 "modes": ["html2wt"],
27307 "scrubWikitext": false
27310 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27311 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27312 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27314 [[Berlin ]]<nowiki/>is the capital of Germany.
27318 [[Boston ]] is a city.
27322 2. New links that end in spaces
27325 "modes": ["html2wt"],
27326 "scrubWikitext": true
27329 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27330 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27331 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27333 [[Berlin]] is the capital of Germany.
27337 [[Boston]] is a city.
27341 1. Table cells with escapable prefixes
27344 "modes": ["html2wt"],
27345 "scrubWikitext": false
27349 <tr><td>a</td></tr>
27350 <tr><td>-</td></tr>
27351 <tr><td>+</td></tr>
27357 |<nowiki>-</nowiki>
27359 |<nowiki>+</nowiki>
27364 2. Table cells with escapable prefixes
27367 "modes": ["html2wt"],
27368 "scrubWikitext": true
27372 <tr><td>a</td></tr>
27373 <tr><td>-</td></tr>
27374 <tr><td>+</td></tr>
27387 3a. Table cells with escapable prefixes after edits
27390 "modes": ["selser"],
27391 "scrubWikitext": true,
27393 [ "table tbody tr:first-child td:first-child", "remove"]
27407 3b. Table cells with escapable prefixes after edits
27410 "modes": ["selser"],
27411 "scrubWikitext": true,
27413 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27420 |<span id="x">foo</span>+
27429 # FIXME: This test will fail because
27430 # normalization doesn't realize that the id attribute
27431 # will eliminate the escapable scenario
27433 4a. Table cells without escapable prefixes after edits
27436 "modes": ["selser"],
27437 "scrubWikitext": true,
27439 [ "#x", "html", "-" ]
27452 ## This tests normalizer's ability to discriminate between
27453 ## cells having identical content.
27455 4b. Table cells without escapable prefixes after edits
27458 "modes": ["selser"],
27459 "scrubWikitext": true,
27461 [ "td", "html", "-" ]
27474 ## This tests normalizer's ability to not be tripped by
27475 ## comments (and whitespace)
27477 4c. Table cells without escapable prefixes after edits
27480 "modes": ["selser"],
27481 "scrubWikitext": true,
27483 [ "table tbody tr td:first-child", "remove" ]
27498 ## This tests normalizer's ability to handle HTML cells
27500 4d. Table cells without escapable prefixes after edits
27503 "modes": ["selser"],
27504 "scrubWikitext": true,
27506 [ "td", "html", "-" ]
27511 <tr><td>a</td></tr>
27515 <tr><td>-</td></tr>
27519 ## T111151 Remove font elements without attributes
27521 5a. font tags without attributes should be dropped in scrubWikitext mode
27524 "modes": ["html2wt"],
27525 "scrubWikitext": true
27529 <font><font>bar</font></font>
27530 <font class="x">boo</font>
27534 <font class="x">boo</font>
27538 5b. font tags should not be dropped without scrubWikitext being enabled
27541 "modes": ["html2wt"],
27542 "scrubWikitext": false
27551 Escape nowiki DOM elements
27555 <nowiki><i>foo</i></nowiki>
27557 <nowiki>''foo''</nowiki>
27560 # This is meant to be an interim fix while we go about figuring out
27561 # how to not introduce these trailing <nowiki/>s in the first place.
27563 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27567 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27569 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
27570 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
27583 # ---------------------------------------------------
27584 # End of tests spec'ing wikitext serialization norms |
27585 # ---------------------------------------------------
27589 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27597 <td><b>c</b><p>d</p></td>
27615 # -----------------------------------------------------------------
27616 # End of section for Parsoid-only html2wt tests for serialization
27618 # -----------------------------------------------------------------
27620 # -----------------------------------------------------------------
27621 # The following section of tests are primarily to spec behavior of
27622 # the selective serializer. All these tests have manual selser
27623 # changes. The automated selser changes for all tests handle the
27624 # wide variation of changes, but these tests here capture specs
27625 # deterministically.
27626 # ----------------------------------------------------------------
27630 Selser: New comments should not be lost
27633 "modes": ["selser"],
27635 [ "#a", "after", "<!--c1-->" ],
27636 [ "#b", "before", "<!--c2-->" ]
27640 <span id="a">a</span>
27642 <span id="b">b</span>
27644 <span id="a">a</span><!--c1-->
27646 <!--c2--><span id="b">b</span>
27651 Selser: Check for validity of DSR before using it
27654 "modes": ["selser"],
27656 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27660 <span id="a">a</span>
27662 {{DISPLAYTITLE:foo}}
27663 <span id="a">a</span>
27667 1. DOMDiff: Changes to <ref> content should be looked up using id
27670 "modes": ["selser"],
27672 ["#X", "after", "bar"],
27673 ["#Y", "after", "baz"]
27677 X <ref><span id="X">foo</span></ref>
27680 <ref name="a"><span id="Y">foo</span></ref>
27683 X <ref><span id="X">foo</span>bar</ref>
27686 <ref name="a"><span id="Y">foo</span>baz</ref>
27691 2. DOMDiff: Changes to <ref> content should be looked up using id
27694 "modes": ["selser"],
27696 ["#Z", "after", "bar"]
27700 A <ref>foo bar for a</ref>
27701 B <ref group="X" name="b" />
27705 <references group="X">
27706 <ref name="b"><span id="Z">foo</span></ref>
27709 A <ref>foo bar for a</ref>
27710 B <ref group="X" name="b" />
27714 <references group="X">
27715 <ref name="b"><span id="Z">foo</span>bar</ref>
27720 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27723 "modes": ["selser"],
27725 [ "div:first-child", "text", "bar" ]
27729 <div style="{{1x|color:red;}}%">foo</div>
27731 <div style="{{1x|color:red;}}%">bar</div>
27744 <li class="mw-empty-elt"></li>
27745 <li class="mw-empty-elt"></li>
27753 [[File:Thumb.png|thumb]]
27755 <div class="thumb tright">
27756 <div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>
27757 <div class="thumbcaption">
27758 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27765 unclosed internal link XSS (T137264)
27767 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27769 <p>[[#<script>alert(1)</script>|
27772 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>