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>
532 Heading with line break in nowiki
539 <h2><span class="mw-headline" id="A_B.0AC">A B
540 C</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 B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
543 <h2 id="A_B.0AC">A <span typeof="mw:Nowiki">B
550 http://fr.wikipedia.org/wiki/🍺
551 <!-- EasterEgg we love beer, better be able be able to link to it -->
553 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
557 # Note that the html+tidy output removes the spaces after the <li>,
558 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
559 # This is an issue for all tests with lists. We intentionally do
560 # *not* add html+tidy clauses for these, as we don't want to
561 # document/test the broken behavior. (Parsoid matches the non-tidy
562 # output in these cases.)
571 <li> Item 2</li></ul>
579 * plain''italic''plain
580 * plain''italic''plain''italic''plain
581 * plain'''bold'''plain
582 * plain'''bold'''plain'''bold'''plain
583 * plain''italic''plain'''bold'''plain
584 * plain'''bold'''plain''italic''plain
585 * plain''italic'''bold-italic'''italic''plain
586 * plain'''bold''bold-italic''bold'''plain
587 * plain'''''bold-italic'''italic''plain
588 * plain'''''bold-italic''bold'''plain
589 * plain''italic'''bold-italic'''''plain
590 * plain'''bold''bold-italic'''''plain
591 * plain l'''italic''plain
592 * plain l''''bold''' plain
595 <li> plain<i>italic</i>plain</li>
596 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
597 <li> plain<b>bold</b>plain</li>
598 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
599 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
600 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
601 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
602 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
603 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
604 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
605 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
606 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
607 <li> plain l'<i>italic</i>plain</li>
608 <li> plain l'<b>bold</b> plain</li></ul>
612 # this example taken from the [[simple:Moon]] article (bug 47326)
614 Italics and possessives (1)
616 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
618 <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
622 # this example taken from [[en:Flaming Pie]] (bug 49926)
624 Italics and possessives (2)
626 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
628 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
632 # this example taken from [[en:Dictionary]] (bug 49926)
634 Italics and possessives (3)
636 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''.
638 <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>.
644 ### 2-quote opening sequence tests
647 Italics and bold: 2-quote opening sequence: (2,2)
656 Italics and bold: 2-quote opening sequence: (2,3)
665 Italics and bold: 2-quote opening sequence: (2,4)
675 # same html as previous, but wikitext adjusted to match parsoid html2wt
677 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
679 ''foo<nowiki>''</nowiki>''
685 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
687 Italics and bold: 2-quote opening sequence: (2,5)
700 # same html as previous, but wikitext adjusted to match parsoid html2wt
702 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
704 ''foo'''''<nowiki/>'''
715 ### 3-quote opening sequence tests
719 Italics and bold: 3-quote opening sequence: (3,2)
728 Italics and bold: 3-quote opening sequence: (3,3)
737 Italics and bold: 3-quote opening sequence: (3,4)
745 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
747 Italics and bold: 3-quote opening sequence: (3,5)
760 # same html as previous, but wikitext adjusted to match parsoid html2wt
762 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
764 '''foo'''''<nowiki/>''
775 ### 4-quote opening sequence tests
779 Italics and bold: 4-quote opening sequence: (4,2)
789 # same html as previous, but wikitext adjusted to match parsoid html2wt
791 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
793 <nowiki>''</nowiki>''foo''
800 Italics and bold: 4-quote opening sequence: (4,3)
809 Italics and bold: 4-quote opening sequence: (4,4)
819 # same html as previous, but wikitext adjusted to match parsoid html2wt
821 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
829 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
831 Italics and bold: 4-quote opening sequence: (4,5)
840 <p>'<b>foo</b><i></i>
844 # same html as previous, but wikitext adjusted to match parsoid html2wt
846 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
848 '<nowiki/>'''foo'''''<nowiki/>''
853 <p>'<b>foo</b><i></i>
859 ### 5-quote opening sequence tests
863 Italics and bold: 5-quote opening sequence: (5,2)
873 # same html as previous, but wikitext adjusted to match parsoid html2wt
875 Italics and bold: 5-quote opening sequence: (5,2+3)
884 Italics and bold: 5-quote opening sequence: (5,3)
894 # same html as previous, but wikitext adjusted to match parsoid html2wt
896 Italics and bold: 5-quote opening sequence: (5,3+2)
905 Italics and bold: 5-quote opening sequence: (5,4)
911 <p><i><b>foo'</b></i>
916 Italics and bold: 5-quote opening sequence: (5,5)
925 Italics and bold: 5-quote opening sequence: (5,6)
929 <p><i><b>foo'</b></i>
934 ### multiple quote sequences in a line
938 Italics and bold: multiple quote sequences: (2,4,2)
944 <p><i>foo'<b>bar</b></i>
948 # same html as previous, but wikitext adjusted to match parsoid html2wt
950 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
952 ''foo'<nowiki/>'''bar'''''
954 <p><i>foo'<b>bar</b></i>
959 Italics and bold: multiple quote sequences: (2,4,3)
965 <p><i>foo'<b>bar</b></i>
969 # same html as previous, but wikitext adjusted to match parsoid html2wt
971 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
973 ''foo'<nowiki/>'''bar'''''
975 <p><i>foo'<b>bar</b></i>
980 Italics and bold: multiple quote sequences: (2,4,4)
986 <p><i>foo'<b>bar'</b></i>
990 # same html as previous, but wikitext adjusted to match parsoid html2wt
992 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
994 ''foo'<nowiki/>'''bar'<nowiki/>'''''
996 <p><i>foo'<b>bar'</b></i>
1000 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1002 Italics and bold: multiple quote sequences: (3,4,2)
1011 <p><b>foo'</b>bar<i></i>
1015 # same html as previous, but wikitext adjusted to match parsoid html2wt
1017 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1019 '''foo''''bar''<nowiki/>''
1024 <p><b>foo'</b>bar<i></i>
1028 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1030 Italics and bold: multiple quote sequences: (3,4,3)
1039 <p><b>foo'</b>bar<b></b>
1043 # same html as previous, but wikitext adjusted to match parsoid html2wt
1045 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1047 '''foo''''bar'''<nowiki/>'''
1052 <p><b>foo'</b>bar<b></b>
1057 ### other quote tests
1060 Italics and bold: other quote tests: (2,3,5)
1062 ''this is about '''foo's family'''''
1064 <p><i>this is about <b>foo's family</b></i>
1070 Italics and bold: other quote tests: (2,(3,3),2)
1072 ''this is about '''foo's''' family''
1074 <p><i>this is about <b>foo's</b> family</i>
1080 Italics and bold: other quote tests: (3,2,3,2)
1084 '''this is about ''foo'''s family''
1086 <p><b>this is about <i>foo</i></b><i>s family</i>
1091 # same html as previous, but wikitext adjusted to match parsoid html2wt
1093 Italics and bold: other quote tests: (3,2,3+2+2,2)
1095 '''this is about ''foo'''''<nowiki/>''s family''
1097 <p><b>this is about <i>foo</i></b><i>s family</i>
1103 Italics and bold: other quote tests: (3,2,3,3)
1105 '''this is about ''foo'''s family'''
1107 <p>'<i>this is about </i>foo<b>s family</b>
1113 Italics and bold: other quote tests: (3,(2,2),3)
1115 '''this is about ''foo's'' family'''
1117 <p><b>this is about <i>foo's</i> family</b>
1123 Italicized possessive
1125 The ''[[Main Page]]'''s talk page.
1127 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1130 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1134 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1135 (Requires tidy for PHP parser output to be fixed up)
1137 parsoid=wt2html,wt2wt
1154 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1155 <td><i>a</i></td><td><i>b</i></td></tr>
1164 Non-html5 tags should be accepted
1166 <center>''foo''</center>
1168 <font>''foo''</font>
1169 <strike>''foo''</strike>
1172 <center><i>foo</i></center>
1173 <p><big><i>foo</i></big>
1174 <font><i>foo</i></font>
1175 <strike><i>foo</i></strike>
1181 <wbr> is valid wikitext (bug 52468)
1189 # <strike> is HTML4, <s> is HTML4/5.
1191 <s> or <strike> for strikethrough
1193 <strike>strike</strike>
1197 <p><strike>strike</strike>
1205 Text-level semantic html elements in wikitext
1208 <strong>text</strong>
1224 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 <strong>text</strong>
1247 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1255 # test cases taken from
1256 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1258 Ruby markup (W3C-style)
1260 ; Mono-ruby for individual base characters
1261 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1263 : <ruby>今日<rt>きょう</rt></ruby>
1265 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1267 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1269 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1271 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1272 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1273 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1276 <dl><dt> Mono-ruby for individual base characters</dt>
1277 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1278 <dt> Group ruby</dt>
1279 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1280 <dt> Jukugo ruby</dt>
1281 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1282 <dt> Inline ruby</dt>
1283 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1284 <dt> Double-sided ruby</dt>
1285 <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>
1287 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1288 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1289 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1294 # The next two test different paths in the sanitizer.
1296 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1298 <blockquote|>a</blockquote>
1300 <b→> doesn't terminate </b→>
1302 <bä> doesn't terminate </bä>
1304 <boo> doesn't terminate </boo>
1306 <s.foo> doesn't terminate </s.foo>
1310 <p><blockquote|>a</blockquote>
1311 </p><p><b→> doesn't terminate </b→>
1312 </p><p><bä> doesn't terminate </bä>
1313 </p><p><boo> doesn't terminate </boo>
1314 </p><p><s.foo> doesn't terminate </s.foo>
1315 </p><p><sub-ID#1>
1319 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1320 # If the non-word-character tag made it through the sanitizer, tidy
1321 # would munge it up.
1323 Non-word characters don't terminate tag names + tidy
1325 <blockquote|>a</blockquote>
1327 <b→> doesn't terminate </b→>
1329 <bä> doesn't terminate </bä>
1331 <boo> doesn't terminate </boo>
1333 <s.foo> doesn't terminate </s.foo>
1337 <p><blockquote|>a</p>
1338 <p><b→> doesn't terminate </b→></p>
1339 <p><bä> doesn't terminate </bä></p>
1340 <p><boo> doesn't terminate </boo></p>
1341 <p><s.foo> doesn't terminate </s.foo></p>
1342 <p><sub-ID#1></p>
1346 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1347 ### This checks that HTML5 tags (with non-word characters in the tag
1348 ### name) make it safely through the parser -- the Sanitizer will
1349 ### munge them later, as it should.
1352 Non-word characters are valid in extension tags (T19663)
1363 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1367 Isolated close tags should be treated as literal text (bug 52760)
1375 <p><s.foo>s</p>
1377 <p><s.foo>s</p>
1381 ### Special characters
1385 Bare pipe character (bug 52363)
1394 Bare pipe character from a template (bug 52363)
1403 ### <nowiki> test cases
1407 <nowiki> unordered list
1409 <nowiki>* This is not an unordered list item.</nowiki>
1411 <p>* This is not an unordered list item.
1414 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1420 <nowiki>Lorem ipsum dolor
1428 <p>Lorem ipsum dolor
1437 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1447 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1449 <nowiki><span class="error"></nowiki>
1451 <p><span class="error">
1454 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1460 :There is not nowiki.
1461 :There is <nowiki>nowiki</nowiki>.
1463 #There is not nowiki.
1464 #There is <nowiki>nowiki</nowiki>.
1466 *There is not nowiki.
1467 *There is <nowiki>nowiki</nowiki>.
1469 <dl><dd>There is not nowiki.</dd>
1470 <dd>There is nowiki.</dd></dl>
1471 <ol><li>There is not nowiki.</li>
1472 <li>There is nowiki.</li></ol>
1473 <ul><li>There is not nowiki.</li>
1474 <li>There is nowiki.</li></ul>
1477 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1478 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1480 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1481 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1483 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1484 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1488 Entities inside <nowiki>
1490 <nowiki><</nowiki>
1497 Entities inside template parameters
1503 <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>
1507 Properly escape nowiki when combined with other wiki markup
1511 <p>* </nowiki> tag</p>
1513 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1517 T93824: Put escaped HTML tags inside nowiki
1521 <p><h2>foo</h2></p>
1523 <nowiki><h2>foo</h2></nowiki>
1527 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1531 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1532 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1533 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1535 This text: L'[[Foo]]
1536 This text: L<nowiki>''</nowiki>[[Foo]]
1537 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1540 # This test fails because wikitext whitespace is not normalized before comparing.
1542 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1546 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1549 This text : L<nowiki>''</nowiki>[[Foo]]
1552 # This test and the next one are html2wt only as they test that incorrect wikitext
1553 # passed in template arguments gets escaped or wrapped in nowikis where required.
1555 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1559 <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>
1560 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1562 {{echo|foo{{!}}bar}}
1563 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1567 T53961: Output correct nowikis in template arguments
1571 <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>
1572 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1573 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1574 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1575 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1578 {{echo|<nowiki>a }} b</nowiki>}}
1579 {{echo|<nowiki>a [[ b</nowiki>}}
1580 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1581 {{echo|a <nowiki>}</nowiki>}}
1585 Cases where "!!" needs nowiki protection
1590 <tr><th>this needs protection !! here</th></tr>
1594 <tr><th>this does not need
1595 protection !! here</th></tr>
1599 !<nowiki>this needs protection !! here</nowiki>
1612 Comments and Indent-Pre
1614 <!-- comment 1 --> asdf
1616 <!-- comment 1 --> asdf
1619 <!-- comment 1 --> asdf
1620 <!-- comment 2 -->xyz
1622 <!-- comment 1 --> asdf
1623 <!-- comment 2 --> xyz
1679 asdf<!-- comment 1 -->jkl
1689 <!-- foo --> b <!-- bar -->
1703 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1709 Comment semantics and delimiters
1711 <!-- --><!----><!-----><!------>
1715 <!-- --><!----><!-----><!------>
1719 Comment semantics and delimiters, redux
1721 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1722 -- foo -- funky huh? ... -->
1726 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1727 -- foo -- funky huh? ... -->
1731 Comment semantics and delimiters: directors cut
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
1741 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1742 everything starting with < followed by !-- until the first -- and > we see,
1743 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1748 Comment semantics: nesting
1750 <!--<!-- no, we're not going to do anything fancy here -->-->
1755 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1758 # Parsoid closes the unclosed comment, even if it means a slight
1761 Comment semantics: unclosed comment at end
1763 parsoid=wt2html,html2html
1765 <!--This comment will run out to the end of the document
1769 <!--This comment will run out to the end of the document-->
1773 Comment semantics: normalize comments to play nice with XML and browsers
1775 <!-- Browsers --!> think this is closed -->
1776 <!--> This would normally be text -->
1777 <!---> As would this -->
1778 <!-- XML doesn't like trailing dashes -------->
1779 <!-- Nor doubled hyphens -- anywhere in the data -->
1780 But this is not a comment.
1782 <p>But this is not a comment.
1785 <!-- Browsers --!> think this is closed -->
1786 <!--> This would normally be text -->
1787 <!---> As would this -->
1788 <!-- XML doesn't like trailing dashes -------->
1789 <!-- Nor doubled hyphens -- anywhere in the data -->
1790 <p>But this is not a comment.</p>
1794 Comment semantics: round-trip even text which contains encoded -->
1796 <!-- hello & goodbye - > --> --&gt; --&xx -->
1798 <!-- hello & goodbye - > --> --&gt; --&xx -->
1802 Comment in template title
1811 Comment on its own line post-expand
1823 Comment on its own line post-expand with non-significant whitespace
1835 Multiple comments should still parse as SOL-transparent
1837 parsoid=wt2html,wt2wt
1840 <!--c2--><!--c3--><!--c4-->*b
1849 <!--c2--><!--c3--><!--c4-->
1856 ### paragraph wrapping tests
1871 Block tag on one line (<div>)
1887 Block tag on one line (<blockquote>)
1889 a <blockquote>foo</blockquote>
1893 a <blockquote>foo</blockquote>
1905 Block tag on both lines (<div>)
1922 Block tag on both lines (<blockquote>)
1924 a <blockquote>foo</blockquote>
1926 b <blockquote>foo</blockquote>
1928 a <blockquote>foo</blockquote>
1929 b <blockquote>foo</blockquote>
1943 Multiple lines without block tags
1967 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1968 # So, we have a separate section for Parsoid. We don't want
1969 # to mimic this stripping behavior in Parsoid. It affects
1970 # editing experience and also requires us to maintain additional
1973 Empty lines between lines with block tags
2011 <div data-parsoid='{"stx":"html"}'></div>
2014 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2017 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2019 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2022 <div data-parsoid='{"stx":"html"}'>e</div>
2025 ## PHP parser emits output which is broken
2027 Unclosed HTML p-tags should be handled properly
2040 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2045 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2046 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2049 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2053 a [[Category:A1]] [[Category:A2]]
2058 <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"/>
2062 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2068 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2072 ### Preformatted text
2081 And a [[Main Page|link]]
2087 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2092 Tabs don't trigger preformatted text
2096 This is preformatted text.
2102 <pre>This is preformatted text.
2107 preformatted text.</p>
2108 <pre>This is preformatted text.
2113 Space before tab needs nowiki pre protection
2119 <nowiki> </nowiki> a
2123 Ident preformatting with inline content
2134 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2151 Regression with preformatted in <center>
2165 Bug 52763: Preformatted in <blockquote>
2171 indented cell (no pre-wrapping!)
2181 <p> indented cell (no pre-wrapping!)
2189 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2206 Bug 15491: <ins>/<del> in blockquote
2209 Foo <del>bar</del> <ins>baz</ins> quux
2213 <p>Foo <del>bar</del> <ins>baz</ins> quux
2219 # Note that the p-wrapping is newline sensitive, which could be
2220 # considered a bug: tidy will wrap only the 'Foo' in the example
2221 # below in a <p> tag. (see comment 23-25 of bug #6200)
2223 Bug 15491: <ins>/<del> in blockquote (2)
2225 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2228 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2234 <del>bar</del> <ins>baz</ins> quux</blockquote>
2238 <pre> with attributes (bug 3202)
2240 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2242 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2247 <pre> with width attribute (bug 3202)
2249 <pre width="8">Narrow screen goodies</pre>
2251 <pre width="8">Narrow screen goodies</pre>
2256 <pre> with forbidden attribute (bug 3202)
2258 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2260 <pre width="8">Narrow screen goodies</pre>
2265 Entities inside <pre>
2274 <pre> with forbidden attribute values (bug 3202)
2276 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2278 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2283 <nowiki> inside <pre> (bug 13238)
2291 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2299 <pre><nowiki>Foo</nowiki></pre>
2304 <nowiki> inside of #tag:pre
2306 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2308 <pre>Foo →bar</pre>
2311 <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>
2315 <nowiki> and <pre> preference (first one wins)
2344 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2346 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2349 <p><span typeof="mw:Nowiki">
2358 </pre> inside nowiki
2360 <nowiki></pre></nowiki>
2366 # Parsoid doesn't strip empty tags, like Tidy does.
2368 Empty pre; pre inside other HTML tags (bug 54946)
2370 parsoid=wt2html,wt2wt
2401 HTML pre followed by indent-pre
2411 # Note that tidy removes the empty <p> tags from the start and end.
2412 # Parsoid does not, by design.
2416 <p><pre>foo</pre></p>
2422 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2426 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2434 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2444 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2456 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2477 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2481 {{echo| foo}}{{echo| bar}}
2486 {{echo|<!--cmt--> foo}}
2488 <!--cmt-->{{echo| foo}}
2490 {{echo|{{echo| }}bar}}
2508 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2545 Pres with newline attributes
2550 <pre class="one two">hi</pre>
2554 two" data-parsoid='{"stx":"html"}'>hi</pre>
2558 Things that look like <pre> tags aren't treated as such
2560 Barack Obama <President> of the United States
2561 <President></President>
2563 <p>Barack Obama <President> of the United States
2564 <President></President>
2569 Handle broken pre-like tags (bug 64025)
2573 {{echo|<pre <pre>x</pre>}}
2575 <table><pre </table>
2578 <table><pre </table>
2586 <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>
2595 Parsoid: handle pre with space after attribute
2599 <pre style="width:50%;" >{{echo|foo}}</pre>
2601 <pre style="width:50%;">{{echo|foo}}</pre>
2604 <pre style="width:50%;">{{echo|foo}}</pre>
2607 # TODO / maybe: fix wt2wt for this
2609 Parsoid: Don't paragraph-wrap fosterable content
2635 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2663 #--------------------------------------------------------------------
2664 # Transclusion parameter whitespace stripping tests
2665 # Behavior is different for positional and named parameters
2666 #--------------------------------------------------------------------
2668 Templates: Strip leading and trailing whitespace from named-param values
2672 {{echo|1= {{echo|b}} }}
2685 <ul><li> d</li></ul>
2690 Templates: Don't strip whitespace from positional-param values
2694 {{echo|{{echo|b}} }}
2726 <ul><li> f</li></ul>
2734 Templates: Handle empty comment-and-ws-only lines correctly
2737 <!--should be ignored-->
2738 <!--should be ignored as well-->
2745 <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>
2749 Templates: Handle comments in the target
2752 <!-- should be ignored -->
2756 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2759 {{echo<!-- should be ignored -->
2762 {{echo<!-- should be ignored -->|foo}}
2764 {{<!-- should be ignored -->echo|foo}}
2773 <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>
2775 <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>
2777 <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>
2779 <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>
2781 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2785 Templates: Handle comments in parameter names (bug 67657)
2788 <!-- should be ignored -->
2792 <!-- should be ignored -->
2795 {{echo|1<!-- should be ignored -->=foo}}
2797 {{echo|<!-- should be ignored -->1=foo}}
2805 <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>
2807 <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>
2809 <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>
2811 <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>
2815 Templates: Other wikitext in parameter names (bug 67657)
2822 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2825 #--------------------------------------------------------------------
2826 # Transclusion parameter escaping tests
2827 #--------------------------------------------------------------------
2829 Templates: Parsoid parameter escaping test 1
2831 {{echo|[foo]|{{echo|[bar]}}}}
2835 <p about="#mwt1" typeof="mw:Transclusion"
2836 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2840 Parsoid: Pipes in external links in template parameter
2842 {{echo|[{{echo|http://example.com}} link]}}
2844 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2846 <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>
2850 Parsoid: pipe in transclusion parameter
2852 {{echo|http://foo.com/a|b}}
2854 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2856 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2857 typeof="mw:Transclusion"
2858 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%7Cb</a></p>
2862 Parsoid: Pipe in external link target and content in template parameter
2864 parsoid=html2wt,wt2wt
2866 {{echo|[http://foo.com/a|b a|b]}}
2868 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2870 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2871 typeof="mw:Transclusion"
2872 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2873 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2877 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2881 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2883 <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>
2887 Templates: Don't escape already nowiki-escaped text in template parameters
2889 parsoid=html2wt,wt2wt
2891 {{echo|foo<nowiki>|</nowiki>bar}}
2892 {{echo|<nowiki><div></nowiki>}}
2893 {{echo|<nowiki></nowiki>}}
2895 <p>foo|bar <div></p>
2897 <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>
2898 <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>
2899 <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>
2905 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2907 parsoid=html2wt,wt2wt
2909 {{echo|{{echo|1=bar}}}}
2913 <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>
2918 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2924 <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>
2929 Templates: Preserve blank parameter names
2935 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2939 Templates: Preserve blank parameter names in other positions
2941 {{blank_param|bar|=foo}}
2945 <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
2950 ### Parsoid-centric tests for testing RT edge cases for pre
2954 1a. Indent-Pre and Comments
2967 1b. Indent-Pre and Comments
2980 1c. Indent-Pre and Comments
2993 1d. Indent-Pre and Comments
2994 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3007 2a. Indent-Pre and tables
3028 2b. Indent-Pre and tables
3044 2c. Indent-Pre and tables (bug 42252)
3061 2d. Indent-Pre and tables
3078 <tbody><tr><td> b</td></tr>
3083 2e. Indent-Pre and table-line syntax
3096 2f. Indent-pre started by table-line syntax
3115 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3120 Text that should be rendered preformatted
3128 <pre>Text that should be rendered preformatted
3137 3a. Indent-Pre and block tags (single-line html)
3141 c <blockquote> foo </blockquote>
3146 c <blockquote> foo </blockquote>
3147 <pre><span> foo </span>
3150 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3151 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3152 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3153 <pre><span> foo </span>
3170 3b. Indent-Pre and block tags (multi-line html)
3175 <pre>a <span>foo</span>
3180 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3181 b <div data-parsoid='{"stx":"html"}'> foo </div>
3191 3c. Indent-Pre and block tags (pre-content on separate line)
3255 4. Indent-Pre and extension tags
3266 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3270 Render paragraphs when indent-pre is suppressed in blocklevels
3287 4. Multiple spaces at start-of-line
3305 ## NOTE: the leading white-space chars on empty line are significant
3307 5a. White-space in indent-pre
3319 ## NOTE: the leading white-space chars on empty line are significant
3321 5b. White-space in indent-pre
3340 5c. White-space in indent-pre
3353 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3376 7a. Indent-pre and category links
3378 parsoid=wt2html,wt2wt
3380 [[Category:foo]] <!-- No pre-wrapping -->
3381 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3384 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3385 <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 -->
3388 ## We used to, but no longer wt2wt this test since the default serializer
3389 ## will normalize all categories to serialize on their own line.
3390 ## This wikitext usage is going to be fairly uncommon in production and
3391 ## selser will take care of preserving formatting in those scenarios.
3393 7b. Indent-pre and category links
3398 [[Category:foo]] {{echo|b}}
3400 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3401 <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>
3405 Indent-Pre: Newlines in comments shouldn't affect sol state
3419 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3423 HTML-pre: 1. embedded newlines
3458 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3460 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3464 <pre data-parsoid='{"stx":"html"}'>
3469 <pre data-parsoid='{"stx":"html"}'>
3477 HTML-pre: big spaces
3513 <pre data-parsoid='{"stx":"html"}'>
3532 HTML-pre: 2: indented text
3545 HTML-pre: 3: other wikitext
3564 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3573 ### Definition lists
3580 <dl><dt> name </dt>
3581 <dd> Definition</dd></dl>
3586 Definition list for indentation only
3590 <dl><dd> Indented text</dd></dl>
3595 Definition list with no space
3600 <dd>Definition</dd></dl>
3605 Definition list with URL link
3607 ; http://example.com/ : definition
3609 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3610 <dd> definition</dd></dl>
3615 Definition list with bracketed URL link
3617 ;[http://www.example.com/ Example]:Something about it
3619 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3620 <dd>Something about it</dd></dl>
3625 Definition list with wikilink containing colon
3627 ; [[Help:FAQ]]: The least-read page on Wikipedia
3629 <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>
3630 <dd> The least-read page on Wikipedia</dd></dl>
3634 # At Brion's and JeLuF's insistence... :)
3636 Definition list with news link containing colon
3638 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3640 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3641 <dd> This isn't even a real newsgroup!</dd></dl>
3644 <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>
3648 Malformed definition list with colon
3650 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3652 <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>
3657 Definition lists: colon in external link text
3659 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3661 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3662 <dd> OK, I made that up</dd></dl>
3667 Definition lists: colon in HTML attribute
3669 ;<b style="display: inline">bold</b>
3671 <dl><dt><b style="display: inline">bold</b></dt></dl>
3676 Definition lists: self-closed tag
3678 ;one<br/>two : two-line fun
3680 <dl><dt>one<br />two </dt>
3681 <dd> two-line fun</dd></dl>
3686 Bug 11748: Literal closing tags
3690 <dd>test test test test test</dd>
3692 <dd>test test test test test</dd>
3697 <dd>test test test test test</dd>
3699 <dd>test test test test test</dd>
3705 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3708 ; term : description
3713 <dl><dt> term </dt>
3714 <dd> description</dd></dl>
3715 <ul><li> unordered</li></ul>
3721 Definition list with empty definition and following paragraph
3733 Nested definition lists using html syntax
3746 Definition Lists: No nesting: Multiple dd's
3759 Definition Lists: Indentation: Regular
3767 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3772 Definition Lists: Indentation: Missing 1st level
3778 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3783 Definition Lists: Indentation: Multi-level indent
3787 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3792 Definition Lists: Hacky use to indent tables
3799 should be left alone
3801 <dl><dd><dl><dd><table>
3806 </td></tr></table></dd></dl></dd></dl>
3808 should be left alone
3813 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3821 should be left alone
3824 <dl><dd><dl><dd><table><tr>
3827 </tr></table><!-- bar --></dd></dl></dd></dl>
3829 should be left alone</p>
3833 Definition Lists: Hacky use to indent tables, with comment before table
3839 <dl><dd><dl><dd><!-- foo --><table><tr>
3841 </tr></table></dd></dl></dd></dl>
3844 # The trailing whitespace in this test is to catch a regression in
3845 # Parsoid after T54473.
3847 Definition Lists: Hacky use to indent tables (WS-insensitive)
3856 </td></tr></table></dd></dl>
3860 <tbody><tr><td>a</td></tr>
3861 </tbody></table> </dd></dl>
3864 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3865 ## as an empty dt item. It also ignores all but the last ";" when followed
3866 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3867 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3870 ## Ex: ";;t2 ::d2" is transformed into:
3882 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3883 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3894 ## All Parsoid only definition list tests have this difference.
3896 ## See also: https://phabricator.wikimedia.org/T8569
3897 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3900 Table / list interaction: indented table with lists in table contents
3915 <ul><li> b</li></ul>
3919 <ul><li> d</li></ul>
3920 </td></tr></table></dd></dl>
3925 Table / list interaction: lists nested in tables nested in indented lists
3948 </td></tr></table></dd></dl>
3955 Definition Lists: Nesting: Multi-level (Parsoid only)
3985 Definition Lists: Nesting: Test 2 (Parsoid only)
4012 Definition Lists: Nesting: Test 3 (Parsoid only)
4055 Definition Lists: Nesting: Test 4
4060 <dl><dd><dl><dd><dl><dt>t3</dt>
4061 <dd>d3</dd></dl></dd></dl></dd></dl>
4066 ## The Parsoid team believes the following three test exposes a
4067 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4068 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4069 ## It also exposes a "misfeature" in tidy, which doesn't like
4070 ## <dl> tags with a single <dt> child; it converts the <dt> into
4071 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4073 Definition Lists: Mixed Lists: Test 1
4079 <dl><dd><dl><dt><ul><li> foo</li>
4080 <li> bar</li></ul></dt></dl>
4081 <dl><dt> baz</dt></dl></dd></dl>
4116 Definition Lists: Mixed Lists: Test 2
4121 <ul><li><dl><dd> d1</dd>
4122 <dd> d2</dd></dl></li></ul>
4128 Definition Lists: Mixed Lists: Test 3
4133 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4134 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4140 Definition Lists: Mixed Lists: Test 4
4145 <ul><li><dl><dt>d1 </dt>
4148 <dd>d4</dd></dl></li></ul>
4154 Definition Lists: Mixed Lists: Test 5
4160 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4166 Definition Lists: Mixed Lists: Test 6
4171 <ol><li><ul><li><dl><dd>d1
4172 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4178 Definition Lists: Mixed Lists: Test 7
4183 <dl><dd><ul><li> d1</li>
4184 <li> d2</li></ul></dd></dl>
4190 Definition Lists: Mixed Lists: Test 8
4195 <dl><dd><ul><li> d1</li></ul>
4196 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4202 Definition Lists: Mixed Lists: Test 9
4206 <ul><li><dl><dt>foo </dt>
4207 <dd>bar</dd></dl></li></ul>
4213 Definition Lists: Mixed Lists: Test 10
4217 <ul><li><ol><li><dl><dt>foo </dt>
4218 <dd>bar</dd></dl></li></ol></li></ul>
4222 # The Parsoid team disagrees with the PHP parser's seemingly-random
4223 # rules regarding dd/dt on the next two tests. Parsoid is more
4224 # consistent, and recognizes the shared nesting and keeps the
4225 # still-open tags around until the nesting is complete.
4226 # (And tidy again converts <dt> to <dd> before 'bar'.)
4229 Definition Lists: Mixed Lists: Test 11
4234 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4235 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4236 <dl><dt>boo </dt>
4237 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4292 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4293 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4297 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4298 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4307 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4309 # * The test is wrong, there are two colons where there should be :;
4310 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4312 Definition Lists: Weird Ones: Test 1
4314 *#;*::;; foo : bar (who uses this?)
4316 <ul><li><ol><li><dl><dt> foo </dt>
4317 <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>
4336 <dt>bar (who uses this?)</dt>
4368 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4369 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4381 Definition Lists: colons occurring in tags
4399 <dt><span>a:b</span></dt>
4426 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4428 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4429 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4430 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4431 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4433 <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>
4434 <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>
4435 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4439 Definition Lists: colons and tables 1
4451 </td></tr></table></dd></dl>
4455 </td></tr></table></dd></dl>
4459 # Parsoid's output (as documented below) differs from php's in this case.
4460 # This is probably a bug. If we fixup parsoid to match php's output, the
4461 # above test should pass and the below test case can be removed. It is
4462 # unclear which output is more desirable.
4465 Definition Lists: colons and tables 2
4477 </td></tr></table></dd>
4481 </td></tr></table></dd></dl>
4485 Definition Lists: template interaction
4487 ::{{definition_list}}
4490 ::{{definition_list}}
4495 <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">
4496 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4498 <dl><dd data-parsoid='{}'>one
4499 <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">
4500 </span><dd about="#mwt2">two
4502 <dd>three</dd></dl></dd>
4503 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4511 External links: non-bracketed
4513 Non-bracketed: http://example.com
4515 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4519 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4521 External links: numbered
4523 Numbered: [http://example.com]
4524 Numbered: [http://example.net]
4525 Numbered: [http://example.com]
4527 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4528 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4529 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4532 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4533 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4534 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4538 External links: specified text
4540 Specified text: [http://example.com link]
4542 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4547 External links: trail
4549 Linktrails should not work for external links: [http://example.com link]s
4551 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4556 External links: dollar sign in URL
4558 http://example.com/1$2345
4560 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4564 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4566 External links: dollar sign in URL (autonumber)
4568 [http://example.com/1$2345]
4570 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4573 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4577 External links: open square bracket forbidden in URL (bug 4377)
4579 parsoid=wt2html,wt2wt,html2html
4581 http://example.com/1[2345
4583 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4586 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4590 External links: open square bracket forbidden in URL (named) (bug 4377)
4592 parsoid=wt2html,html2html
4594 [http://example.com/1[2345]
4596 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4599 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4602 # parsoid adds a space before the link name
4604 External links: open square bracket forbidden in URL (named) (bug 4377)
4607 [http://example.com/1 [2345]
4609 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4614 External links: nowiki in URL link text (bug 6230)
4616 [http://example.com/ <nowiki>''example site''</nowiki>]
4618 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4623 External links: newline forbidden in text (bug 6230 regression check)
4625 [http://example.com/ first
4628 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4634 External links: Pipe char between url and text
4636 [http://example.com | link]
4638 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4643 External links: protocol-relative URL in brackets
4645 [//example.com/ Test]
4647 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4651 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4653 External links: protocol-relative URL in brackets without text
4657 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4660 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4664 External links: protocol-relative URL in free text is left alone
4668 <p>//example.com/Foo
4673 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4675 foo//example.com/Foo
4677 <p>foo//example.com/Foo
4682 External links: with no contents
4684 [http://en.wikipedia.org/wiki/Foo]
4686 [[wikipedia:Foo|Bar]]
4688 [[wikipedia:Foo|<span>Bar</span>]]
4690 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4691 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4692 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4695 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4696 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4697 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4701 External links: Free with trailing punctuation
4711 http://example.com/url_with_(brackets)
4712 (http://example.com/url_without_brackets)
4713 http://example.com/url_with_entity&
4714 http://example.com/url_with_entity&
4715 http://example.com/url_with_entity&
4716 http://example.com/url_with_entity
4717 http://example.com/url_with_entity 
4718 http://example.com/url_with_entity 
4719 http://example.com/url_with_entity<
4720 http://example.com/url_with_entity<
4721 http://example.com/url_with_entity<
4723 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4724 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4725 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4726 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4727 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4728 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4729 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4730 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4731 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4732 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4733 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4734 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4735 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4736 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4737 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4738 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4739 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4740 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4741 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4744 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4745 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4746 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4747 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4748 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4749 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4750 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4751 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4752 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4753 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4754 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4755 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4756 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4757 <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>
4758 <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>
4759 <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>
4760 <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>
4761 <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>
4762 <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>
4766 External links: tricky Parsoid html2html case
4768 parsoid=wt2html,wt2wt,html2html
4770 http://example.com/url_with_entity&amp;
4772 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4775 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4779 External links: Free with trailing quotes (T113666)
4781 '''News:''' Stuff here
4785 <p><b>News:</b> Stuff here
4786 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4789 <p><b>News:</b> Stuff here</p>
4790 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4794 External links: with entity
4796 [http:// www.librarieswithoutborders.org Libraries without borders]
4798 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4801 <p><a rel="mw:ExtLink" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
4805 External links: Lone protocols are never linked (T105697)
4824 External links: No preceding word characters allowed (bug 65278)
4826 NOPEhttp://example.com
4827 N0http://example.com
4828 ok:http://example.com
4829 ok-http://example.com
4831 <p>NOPEhttp://example.com
4832 N0http://example.com
4833 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4834 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4839 External links: nofollow domain exception
4841 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4843 <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>.
4850 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4852 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4857 External image from https
4859 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4861 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4866 External image (when not allowed)
4868 wgAllowExternalImages=0
4870 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4872 <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>
4877 Link to non-http image, no img tag
4879 Link to non-http image, no img tag: ftp://example.com/test.jpg
4881 <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>
4886 External links: terminating separator
4888 Terminating separator: http://example.com/thing,
4890 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4895 External links: intervening separator
4897 Intervening separator: http://example.com/1,2,3
4899 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4904 External links: old bug with URL in query
4906 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4908 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4913 External links: old URL-in-URL bug, mixed protocols
4915 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4917 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4921 # Since Parsoid is starting to emit canonical wikitext for links,
4922 # [http://example.com http://example.com] will not RT back to that
4925 External links: URL in text
4929 URL in text: [http://example.com http://example.com]
4931 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4934 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4938 External links: Clickable images
4940 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4942 <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>
4945 <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>
4949 External links: raw ampersand
4951 Old & use: http://x&y
4953 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4958 External links: encoded ampersand
4960 Old & use: http://x&y
4962 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4965 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4969 External links: encoded equals (bug 6102)
4971 http://example.com/?foo=bar
4973 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4976 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4980 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4981 ## does it number them. As discussed in bug 53505, we can identify
4982 ## autonumbered links via CSS.
4986 External links: [raw ampersand]
4988 Old & use: [http://x&y]
4990 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4993 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4996 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4997 # mode will return the [raw ampersand] wikitext
4999 External links: [encoded ampersand]
5001 parsoid=wt2html,wt2wt,html2html
5003 Old & use: [http://x&y]
5005 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5008 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5012 External links: [raw equals]
5014 [http://example.com/?foo=bar]
5016 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5019 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5022 # note that parsoid html is identical to [raw equals] case; so html2wt
5023 # mode will return the [raw equals] wikitext
5025 External links: [encoded equals] (bug 6102)
5027 parsoid=wt2html,wt2wt,html2html
5029 [http://example.com/?foo=bar]
5031 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5034 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5037 # xxx parsoid strips the IDN character, so the round-trip tests will
5038 # obviously fail and are disabled. --cscott
5040 External links: [IDN ignored character reference in hostname; strip it right off]
5042 parsoid=wt2html,wt2wt,html2html
5044 [http://e‌xample.com/]
5046 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5049 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5052 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5053 # Where an external link could easily circumvent the sanitization of the text of
5054 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5055 # test demands a higher standard. That's a bit strange.
5059 # http://example.com -> [http://example.com|http://example.com]
5060 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5062 # The first example is sanitized, but the second is not. Any security benefits
5063 # from this production are trivial to circumvent. Either remove this test and
5064 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5065 # the test accordingly.
5069 # xxx parsoid strips the IDN character, so the round-trip tests will
5070 # obviously fail and are disabled. --cscott
5072 External links: IDN ignored character reference in hostname; strip it right off
5074 parsoid=wt2html,html2html
5076 http://e‌xample.com/
5078 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5081 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5085 External links: www.jpeg.org (bug 554)
5089 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5093 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5095 External links: URL within URL (original bug 2)
5097 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5099 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5102 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5106 BUG 361: URL inside bracketed URL
5108 [http://www.example.com/foo http://www.example.com/bar]
5110 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5115 BUG 361: URL within URL, not bracketed
5117 http://www.example.com/foo?=http://www.example.com/bar
5119 <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>
5124 BUG 289: ">"-token in URL-tail
5126 http://www.example.com/<hello>
5128 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5133 BUG 289: literal ">"-token in URL-tail
5135 http://www.example.com/<b>html</b>
5137 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5140 <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>
5144 BUG 289: ">"-token in bracketed URL
5146 [http://www.example.com/<hello> stuff]
5148 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5153 BUG 289: literal ">"-token in bracketed URL
5155 [http://www.example.com/<b>html</b> stuff]
5157 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5162 BUG 289: literal double quote at end of URL
5164 http://www.example.com/"hello"
5166 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5171 BUG 289: literal double quote in bracketed URL
5173 [http://www.example.com/"hello" stuff]
5175 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5180 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5182 [http://www.example.com test]
5184 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5189 External links: link text with spaces
5191 [http://www.example.com a b c]
5192 [http://www.example.com ''a'' ''b'']
5194 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5195 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5200 External links: wiki links within external link (Bug 3695)
5202 parsoid=wt2html,html2html
5204 [http://example.com [[wikilink]] embedded in ext link]
5206 <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>
5209 <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>
5213 BUG 787: Links with one slash after the url protocol are invalid
5217 [http:/example.com title]
5219 <p>http:/example.com
5220 </p><p>[http:/example.com title]
5225 Bracketed external links with template-generated invalid target
5227 [{{echo|http:/example.com}} title]
5229 <p>[http:/example.com title]
5234 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5236 ''[http://example.com text'']
5237 [http://example.com '''text]'''
5238 ''Something [http://example.com in italic'']
5239 ''Something [http://example.com mixed''''', even bold]'''
5240 '''''Now [http://example.com both''''']
5242 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5243 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5244 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5245 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5246 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5252 Bug 4781: %26 in URL
5254 http://www.example.com/?title=AT%26T
5256 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5259 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5262 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5263 # % is actually legal in HTML5. Any change in output would need testing though.
5265 Bug 4781, 5267: %25 in URL
5267 http://www.example.com/?title=100%25_Bran
5269 <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>
5272 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5276 Bug 4781, 5267: %28, %29 in URL
5278 http://www.example.com/?title=Ben-Hur_%281959_film%29
5280 <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>
5283 <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>
5288 Bug 4781: %26 in autonumber URL
5290 [http://www.example.com/?title=AT%26T]
5292 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5295 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5299 Bug 4781, 5267: %26 in autonumber URL
5301 [http://www.example.com/?title=100%25_Bran]
5303 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5306 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5310 Bug 4781, 5267: %28, %29 in autonumber URL
5312 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5314 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5317 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5322 Bug 4781: %26 in bracketed URL
5324 [http://www.example.com/?title=AT%26T link]
5326 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5329 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5333 Bug 4781, 5267: %25 in bracketed URL
5335 [http://www.example.com/?title=100%25_Bran link]
5337 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5342 Bug 4781, 5267: %28, %29 in bracketed URL
5344 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5346 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5349 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5353 External link containing a period in the anchor. (bug 63947)
5355 [//foo.org/bar#baz. bang]
5357 [//foo.org/bar. bang]
5359 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5360 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5363 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5364 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5368 External link containing a single quote. (bug 63947)
5372 [//foo.org/bar'baz bang]
5374 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5375 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5378 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5379 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5383 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5385 Some [http://example.com/ pretty ''italics'' and stuff]!
5387 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5392 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5394 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5396 <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>
5401 External link containing double-single-quotes with no space separating the url from text in italics
5403 [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]].]
5405 <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>
5408 <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>
5410 <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>
5414 External link with comments in link text
5416 [http://www.google.com Google <!-- comment -->]
5418 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5421 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5425 External link to bare IPv4 address
5427 [http://192.168.0.1 Link]
5429 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5432 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5436 URL-encoding in URL functions (single parameter)
5438 {{localurl:Some page|amp=&}}
5440 <p>/index.php?title=Some_page&amp=&
5445 URL-encoding in URL functions (multiple parameters)
5447 {{localurl:Some page|q=?&=&}}
5449 <p>/index.php?title=Some_page&q=?&amp=&
5456 http://example.com/index.php?foozoid%5B%5D=bar
5458 http://example.com/index.php?foozoid[]=bar
5460 <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>
5461 </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>
5464 <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>
5466 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5470 IPv6 urls, autolink format (T23261)
5472 http://[2404:130:0:1000::187:2]/index.php
5474 Examples from RFC 2373, section 2.2:
5475 * http://[1080::8:800:200C:417A]/unicast
5476 * http://[FF01::101]/multicast
5477 * http://[::1]/loopback
5478 * http://[::]/unspecified
5479 * http://[::13.1.68.3]/ipv4compat
5480 * http://[::FFFF:129.144.52.38]/ipv4compat
5482 Examples from RFC 2732, section 2:
5483 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5484 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5485 * http://[3ffe:2a00:100:7031::1]
5486 * http://[1080::8:800:200C:417A]/foo
5487 * http://[::192.9.5.5]/ipng
5488 * http://[::FFFF:129.144.52.38]:80/index.html
5489 * http://[2010:836B:4179::836B:4179]
5492 <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>
5493 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5495 <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>
5496 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5497 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5498 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5499 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5500 <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>
5501 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5503 <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>
5504 <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>
5505 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5506 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5507 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5508 <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>
5509 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5512 <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>
5514 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5515 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5516 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5517 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5518 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5519 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5520 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5522 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5523 <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>
5524 <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>
5525 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5526 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5527 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5528 <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>
5529 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5533 IPv6 urls, bracketed format (T23261)
5535 [http://[2404:130:0:1000::187:2]/index.php test]
5537 Examples from RFC 2373, section 2.2:
5538 * [http://[1080::8:800:200C:417A] unicast]
5539 * [http://[FF01::101] multicast]
5540 * [http://[::1]/ loopback]
5541 * [http://[::] unspecified]
5542 * [http://[::13.1.68.3] ipv4compat]
5543 * [http://[::FFFF:129.144.52.38] ipv4compat]
5545 Examples from RFC 2732, section 2:
5546 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5547 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5548 * [http://[3ffe:2a00:100:7031::1] 3]
5549 * [http://[1080::8:800:200C:417A]/foo 4]
5550 * [http://[::192.9.5.5]/ipng 5]
5551 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5552 * [http://[2010:836B:4179::836B:4179] 7]
5555 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5556 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5558 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5559 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5560 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5561 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5562 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5563 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5564 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5566 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5567 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5568 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5569 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5570 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5571 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5572 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5575 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5577 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5578 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5579 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5580 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5581 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5582 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5583 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5585 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5586 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5587 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5588 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5589 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5590 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5591 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5592 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5596 Non-extlinks in brackets
5605 [{{echo|foo}} ''bar'']
5606 [{{echo|foo}}l's] errand
5607 [{{echo|foo}}l's errand]
5609 [url=http://example.com]
5610 [http:// bare protocols don't count]
5623 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5624 [http:// bare protocols don't count]
5632 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5633 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5634 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5635 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5636 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5637 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5638 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5639 [http:// bare protocols don't count]</p>
5643 Percent encoding in external links
5645 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5647 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5650 <p><a rel="mw:ExtLink"
5651 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5655 Use url link syntax for links where the content is equal the link target
5659 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5662 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5666 Parenthesis in external links, especially URL links
5670 http://example.com/test)
5672 http://example.com/(test)
5674 http://example.com/((test)
5676 (http://example.com/(test))
5678 (http://example.com/(test)))))
5680 http://example.com/a)b
5682 [http://example.com) foo]
5684 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5685 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5686 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5687 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5688 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5689 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5690 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5691 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5694 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5695 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5696 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5697 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5698 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5699 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5700 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5701 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5705 Parenthesis in external links, w/ transclusion or comment
5707 (http://example.com/{{echo|hi}})
5709 (http://example.com<!-- hi -->)
5711 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5712 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5715 <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>
5717 <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>
5721 Serialize <a> tags with invalid link targets as plain text
5723 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5725 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5726 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5727 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5728 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5731 <nowiki>*</nowiki>text
5732 <nowiki>[[foo]]</nowiki>
5733 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5737 mw:ExtLink -vs- mw:WikiLink (T94723)
5741 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5742 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5743 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5744 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5746 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5747 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5752 [[wikipedia:Foo|Bar]]
5753 [[wikipedia:Foo|Bar]]
5755 [[wikipedia:European_Robin|European Robin]]
5756 [[wikipedia:European_Robin|European Robin]]
5760 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5764 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5766 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5777 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5779 Normal text. '''''Bold italic text.''''' Normal text.
5781 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5782 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5787 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5788 # parser strips. The wikitext contains just the first half of the bold
5791 Unclosed and unmatched quotes
5793 '''''Bold italic text '''with bold deactivated''' in between.'''''
5795 '''''Bold italic text ''with italic deactivated'' in between.'''''
5799 ..spanning two paragraphs (should not work).'''
5801 '''Bold tag left open
5803 ''Italic tag left open
5807 <!-- Unmatching number of opening, closing tags: -->
5808 '''This year''''s election ''should'' beat '''last year''''s.
5810 ''Tom'''s car is bigger than ''Susan'''s.
5812 Plain ''italic'''s plain
5814 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5815 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5816 </p><p><b>Bold text..</b>
5817 </p><p>..spanning two paragraphs (should not work).
5818 </p><p><b>Bold tag left open</b>
5819 </p><p><i>Italic tag left open</i>
5821 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5822 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5823 </p><p>Plain <i>italic'</i>s plain
5826 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5827 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5828 </p><p><b>Bold text..</b>
5829 </p><p>..spanning two paragraphs (should not work).<b></b>
5830 </p><p><b>Bold tag left open</b>
5831 </p><p><i>Italic tag left open</i>
5834 <!-- Unmatching number of opening, closing tags: -->
5835 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5836 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5837 </p><p>Plain <i>italic'</i>s plain
5844 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5847 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5848 # is the bare minimum required by the spec, see:
5849 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5850 # Parsoid team replies: empty table tags are legal in HTML5
5852 A table with no data.
5865 A table with stray table end tags on start tag line (wt2html)
5869 {|style="color: red;"|}
5871 {|style="color: red;" |}
5875 {|style="color: red;"|} id="foo"
5879 {|style="color: red;" |} id="foo"
5883 <table style="color: red;"></table>
5885 <table style="color: red;">
5891 <table style="color: red;" id="foo">
5897 <table style="color: red;" id="foo">
5906 A table with no data (take 2)
5914 # A table with nothing but a caption is invalid XHTML, we might want to render
5915 # this as <p>caption</p>
5916 # Parsoid team replies: table with only a caption is legal in HTML5
5918 A table with nothing but a caption
5926 </caption><tr><td></td></tr></table>
5929 <table><caption> caption</caption></table>
5933 A table with caption with default-spaced attributes and a table row
5936 |+ style="color: red;" | caption1
5942 <caption style="color: red;"> caption1
5951 A table with captions with non-default spaced attributes and a table row
5954 |+style="color: red;"|caption2
5955 |+ style="color: red;"| caption3
5961 <caption style="color: red;">caption2
5963 <caption style="color: red;"> caption3
5972 Table td-cell syntax variations
5976 | foo bar foo || baz
5977 | style='color:red;' | baz
5978 | style='color:red;' || baz
5985 <td> foo bar foo </td>
5988 <td style="color:red;"> baz
5990 <td> style='color:red;' </td>
6018 Simple table but with multiple dashes for row wikitext
6037 Multiplication table
6039 {| border="1" cellpadding="2"
6040 |+Multiplication table
6042 ! × !! 1 !! 2 !! 3
6060 <table border="1" cellpadding="2">
6061 <caption>Multiplication table
6108 Accept "||" in table headings
6123 Accept "!!" in table data
6137 <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>
6142 Accept "||" in indented table headings
6152 </th></tr></table></dd></dl>
6157 Accept "!!" in templates
6171 <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>
6175 Accept "!!" in table headings after newline
6192 <p>b!!c</p></th></tr>
6197 Accept "!!" in table data of mixed wikitext / html syntax
6201 <tr><td>b!!c</td></tr>
6214 <tbody><tr><th>a</th></tr>
6215 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6220 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6237 Accept "| !" at start of line in tables (ignore !-attribute)
6241 | !style="color:red" | bar
6253 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 +/-
6257 |style='color:red;'|+1
6258 |style='color:blue;'|-1
6270 <td style="color:red;">+1
6272 <td style="color:blue;">-1
6296 |rowspan=2| Cell 2, row 1 (and 2)
6307 <td rowspan="2"> Cell 2, row 1 (and 2)
6325 {| bgcolor=#ABCDEF border=2
6330 |the original table again
6338 <table bgcolor="#ABCDEF" border="2">
6346 <td>the original table again
6352 Invalid attributes in table cell (bug 1830)
6366 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6370 | title="foo<nowiki>|</nowiki>" |bar
6371 | title="foo<nowiki>|</nowiki>" bar
6378 <td title="foo|">bar
6380 <td> title="foo|" bar
6385 <tbody><tr><td title="foo">bar</td>
6386 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6387 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6391 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6392 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6393 # *2wt modes will fail.
6395 Table security: embedded pipes
6397 parsoid=wt2html,html2html
6400 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6404 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6405 <td>]" onmouseover="alert(document.cookie)">test
6413 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6417 Element attributes with double ! should not be broken up by <th>
6420 ! hi <div class="!!">ha</div> ho
6425 <th> hi <div class="!!">ha</div> ho
6430 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6435 ! and || in element attributes should not be parsed as <th>/<td>
6438 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6443 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6448 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6452 # FIXME: The output seems broken. Filed as T110268.
6454 ! and || in td attributes should not be parsed as <th>/<td>
6459 | style="color: red !important;" data-contrived="put this here ||" | foo
6464 <td> style="color: red !important;" data-contrived="put this here </td>
6470 <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>
6475 Break on | in element attribute in template
6477 parsoid=wt2html,html2html
6479 {{echo|1=<div class="hi|ho">ha</div>}}
6481 <p>ho">ha</div>
6484 <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>
6488 Break on | in element attribute name in template
6490 {{echo|<div cla|ss="hiho">ha</div>}}
6492 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6496 Don't break on | in extension attribute in template
6498 {{echo|<ref name="hi|ho">ha</ref>}}
6502 <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>
6504 <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>
6507 ## We don't support roundtripping of these attributes in Parsoid.
6508 ## Selective serialization takes care of preventing dirty diffs.
6509 ## But, on edits, we dirty-diff the invalid attribute text.
6511 Invalid text in table attributes should be discarded
6515 {| <span>boo</span> style='border:1px solid black'
6516 | <span>boo</span> style='color:blue' | 1
6517 |<span>boo</span> style='color:blue'| 2
6520 <table style="border:1px solid black">
6522 <td style="color:blue"> 1
6524 <td style="color:blue"> 2
6528 <table style="border:1px solid black">
6530 <td style="color:blue"> 1</td>
6531 <td style="color:blue"> 2</td>
6537 Invalid text in table attributes should be preserved by selective serializer
6540 "modes": ["selser"],
6542 ["td:first-child", "text", "abc"],
6543 ["td + td", "text", "xyz"]
6547 {| <span>boo</span> style='border:1px solid black'
6548 | <span>boo</span> style='color:blue' | 1
6549 |<span>boo</span> style='color:blue'| 2
6552 {| <span>boo</span> style='border:1px solid black'
6553 | <span>boo</span> style='color:blue' |abc
6554 |<span>boo</span> style='color:blue'|xyz
6559 1. Template-generated table cell attributes and cell content
6564 || {{table_attribs_5}}
6565 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6566 |align=center {{table_attribs}}
6567 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6572 <td style="color:red;">Foo
6574 <td style="color:red;">Foo
6576 <td> style="color:red;"</td>
6579 <td style="color:red;">Foo
6581 <td align="center" style="color:red;">Foo
6583 <td align="center" style="color:red;">Foo
6589 2. Template-generated table cell attributes and cell content
6592 |{{table_attribs_2}}
6597 <td style="color:red;">Foo
6605 <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>
6606 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6611 3. Template-generated table cell attributes and cell content
6614 !align=center {{table_header_cells}}
6616 |align=center {{table_cells}}
6621 <th align="center" style="color:red;">Foo</th>
6622 <th style="color:red;"><i>Bar</i></th>
6623 <th style="color:brown;"><i>Foo</i> and Baz
6626 <td align="center" style="color:red;">Foo</td>
6627 <td style="color:red;"><i>Bar</i></td>
6628 <td style="color:brown;"><i>Foo</i> and Baz
6633 <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>
6634 <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>
6639 4. Template-generated table cell attributes and cell content inside a templated table
6642 !align=center {{table_header_cells}}
6644 |align=center {{table_cells}}
6649 <th align="center" style="color:red;">Foo</th>
6650 <th style="color:red;"><i>Bar</i></th>
6651 <th style="color:brown;"><i>Foo</i> and Baz
6654 <td align="center" style="color:red;">Foo</td>
6655 <td style="color:red;"><i>Bar</i></td>
6656 <td style="color:brown;"><i>Foo</i> and Baz
6660 <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}}]}'>
6661 <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>
6663 <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>
6667 ## Edge case fix to prevent future regressions
6669 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6672 |{{table_attribs_7}}
6677 <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>
6679 <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>
6683 Table with row followed by newlines and table heading
6685 parsoid=wt2html,html2html
6703 Table with empty line following the start tag
6705 parsoid=wt2html,html2html
6723 Table attributes with empty value
6725 parsoid=wt2html,html2html
6738 <tbody><tr><td style=""> hello</td></tr>
6743 Wikitext table with a lot of comments
6766 Wikitext table comments represented in parsoid dom
6768 {|<!--c1--><!--c2-->
6779 <table><!--c1--><!--c2-->
6780 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6781 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6786 Wikitext table with double-line table cell
6803 Table cell with a single comment
6820 Table-cell after a comment-only-empty-line
6837 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6839 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6845 Build table with {{!}}
6847 {{{!}} class="wikitable"
6850 {{!}}- style="color:red;"
6851 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6854 <table class="wikitable">
6860 <tr style="color:red;">
6862 <td style="color:red;"> second data
6868 Build table with pipe as data
6870 {| class="wikitable"
6873 |- style="color:red;"
6874 | data || style="color:red;" | second data
6876 | style="color:red;" | data with | || style="color:red;" | second data with |
6878 || data with | ||| second data with |
6881 <table class="wikitable">
6887 <tr style="color:red;">
6889 <td style="color:red;"> second data
6892 <td style="color:red;"> data with | </td>
6893 <td style="color:red;"> second data with |
6896 <td> data with | </td>
6897 <td> second data with |
6903 Build table with wikilink
6905 {| class="wikitable"
6906 ! header || second header
6907 |- style="color:red;"
6908 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6910 | data || second data [[Main Page|link|text with pipe]]
6913 <table class="wikitable">
6918 <tr style="color:red;">
6919 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6920 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6924 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6929 # The expected HTML structure in this test is debatable. The PHP parser does
6930 # not parse this kind of table at all. The main focus for Parsoid is on
6931 # round-tripping, so this output is ok for now. TODO: revisit!
6933 Wikitext table with html-syntax row
6943 <td>foo</td></tr></tbody></table>
6946 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6947 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6948 ## PHP parser, which tidy then compounds by fostering the content
6949 ## entirely out of the table. Parsoid recognizes the table context
6950 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6951 ## depends on PHP's treatment of broken table markup!
6953 Implicit <td> after a |-
6955 parsoid=wt2html,html2html
6975 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6977 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6979 parsoid=wt2html,html2html
7012 <tr><td><pre>a</pre></td></tr>
7013 <tr><td> b</td></tr>
7018 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
7019 # Parsoid generates the missing <td>, so wt2wt won't succeed.
7021 Lists should be recognized in an implicit <td> context
7023 parsoid=wt2html,html2html
7050 Table cells not properly parsed in an implicit-td context
7054 {{table_attribs_4}} || a || b
7059 <td style="background-color:#DC241f;" width="10px"></td>
7066 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7067 <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>
7072 Parsoid: Round-trip tables directly followed by content (bug 51219)
7074 parsoid=wt2html,wt2wt
7099 Parsoid: Default to a newline after tables in new content (bug 51219)
7104 <tr><td>foo</td></tr></tbody></table> bar
7106 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7111 <nowiki> </nowiki>bar
7119 Parsoid: newline inducing block nodes don't suppress <nowiki>
7131 Parsoid: Row-syntax table headings followed by comment & table cells
7133 parsoid=wt2html,wt2wt
7137 <!-- foo --> || baz || quux
7151 <tbody><tr><th> foo </th><th> bar
7152 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7157 Parsoid: Recover better from broken table attributes
7177 <p>foo</p></td></tr>
7182 Tables: Digest broken attributes on table and tr tag
7198 # T137406: Whitespace in the HTML
7200 1. Generate correct wikitext for tables with thead/tbody/tfoot
7205 <caption>Test</caption>
7246 <caption>Test</caption>
7266 # T137406: No whitespace in the HTML
7268 2. Generate correct wikitext for tables with thead/tbody/tfoot
7272 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7282 Testing serialization after deletion in references
7291 hi <ref><div id="x">ho</div></ref>
7301 Testing serialization after deletion of table cells
7304 "modes": ["wt2wt", "selser"],
7312 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7322 Testing selser after addition of new row before first row (T125419)
7325 "modes": ["wt2wt", "selser"],
7327 [ "tr", "before", "<tr><td>X</td></tr>" ]
7343 Serialize new table rows in a HTML table using HTML tags
7346 "modes": ["wt2wt", "selser"],
7348 [ "tr", "before", "<tr><td>X</td></tr>" ]
7352 <table><tr><td>a</td></tr></table>
7354 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7358 Serialize new table cells in a HTML row using HTML tags
7361 "modes": ["wt2wt", "selser"],
7363 [ "td", "before", "<td>X</td>" ]
7367 <table><tr><td>a</td></tr></table>
7369 <table><tr><td>X</td><td>a</td></tr></table>
7373 Wikitext tables can be nested inside HTML tables
7377 <table data-parsoid='{"stx":"html"}'>
7380 <tr><td>foo</td></tr>
7395 Serialize wikitext list items as HTML list items when embedded in a HTML list
7399 <ul data-parsoid='{"stx": "html"}'>
7400 <li data-parsoid='{}'>a</li>
7410 # SSS FIXME: Is this actually a good thing given the
7411 # odd nested list output that is generated by MW?
7412 # <ul><li>foo<ul>..</ul></li></ul> instead of
7413 # <ul><li>foo</li><ul>..</ul></ul>
7415 Wikitext lists can be nested inside HTML lists
7419 <ul data-parsoid='{"stx": "html"}'>
7420 <li data-parsoid='{"stx": "html"}'>a
7425 <ul data-parsoid='{"stx": "html"}'>
7448 Plain link, capitalized
7452 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7457 Plain link, uncapitalized
7461 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7468 [[Main Page|The Main Page]]
7470 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7475 Piped link with comment in link text
7477 [[Main Page|The Main<!--front--> Page]]
7479 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7484 Piped link with multiple pipe characters in link text
7486 [[Main Page||The|Main|Page|]]
7488 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7491 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7495 Piped link with no link text
7497 [[Thomas Bek (bishop of St David's)|]]
7499 <p>[[Thomas Bek (bishop of St David's)|]]
7502 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7506 Piped link with empty link text
7508 [[Main Page|<nowiki />]] - empty nowiki
7509 [[Main Page| ]] - empty space
7510 [[Main Page| ]] - empty non breaking space
7512 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7513 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7514 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7517 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki />"}'/></a> - empty nowiki
7518 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7519 <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>
7527 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7532 Broken link with fragment
7534 [[Zigzagzogzagzig#zug]]
7536 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7541 Special page link with fragment
7543 [[Special:Version#anchor]]
7545 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7550 Nonexistent special page link with fragment
7552 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7554 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7561 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7563 <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>
7570 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7572 <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>!!!
7583 Bug 43661: Piped links with identical prefixes
7585 [[prefixed article|prefixed articles with spaces]]
7587 [[prefixed article|prefixed articlesaoeu]]
7589 [[Main Page|Main Page test]]
7591 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7592 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7593 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7599 Link with HTML entity in suffix / tail
7601 [[Main Page]]", [[Main Page]]a
7603 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7606 <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>
7610 Link with 3 brackets
7621 Link with 4 brackets
7625 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7630 Piped link with 3 brackets
7632 [[[main page|the main page]]]
7634 <p>[[[main page|the main page]]]
7639 Piped link with extlink-like text
7642 [[Main Page|This is a [bar]]]
7644 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7645 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7648 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7649 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7653 Link with multiple pipes
7655 [[Main Page|The|Main|Page]]
7657 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7662 Anchor containing a #. (bug 63430)
7664 [[Main Page#And#Link]]
7666 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7669 <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>
7675 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7677 <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>
7682 Link with space in namespace
7684 [[User talk:Foo bar]]
7686 <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>
7691 MemoryAlpha:AlphaTest
7693 This is an article in the MemoryAlpha namespace
7694 (which shadows the memoryalpha interwiki link).
7698 Namespace takes precedence over interwiki link (bug 51680)
7700 [[MemoryAlpha:AlphaTest]]
7702 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7706 # The previous test doesn't work correctly in html2*, due to not recognizing the
7707 # link as an internal one. This one checks for the correct behavior.
7709 Link to namespace preferred over interwiki with correct rel attribute
7711 parsoid=html2wt,html2html
7713 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7715 [[MemoryAlpha:AlphaTest]]
7719 Piped link to namespace
7721 [[Meta:Disclaimers|The disclaimers]]
7723 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7730 [[Usually caused by a typo (oops}]]
7732 <p>[[Usually caused by a typo (oops}]]
7739 Just a test of an article title containing a percent.
7743 Link containing % (not as a hex sequence)
7746 [[7% Solution|7%25 Solution]]
7748 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7749 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7752 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7753 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7756 # note that the parsoid HTML is identical to the previous test output,
7757 # so the previous test ensures that the html2wt mode will generate the
7758 # "not as a hex sequence" wikitext.
7760 Link containing % as a single hex sequence interpreted to char
7762 parsoid=wt2wt,wt2html,html2html
7765 [[7%25 Solution|7%25 Solution]]
7767 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7768 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7771 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7772 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7776 Link containing % as a double hex sequence interpreted to hex sequence
7780 <p>[[7%2525 Solution]]
7784 ## Example for such a section: == < ==
7786 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7788 [[%23%3c]][[%23%3e]]
7790 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7793 <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>
7797 Link containing "<#" and ">#" as a hex sequences
7799 [[%3c%23]][[%3e%23]]
7801 <p>[[%3c%23]][[%3e%23]]
7806 Link containing an equals sign
7808 [[Special:BookSources/isbn=4-00-026157-6]]
7810 <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>
7813 <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>
7819 Just a test of an article title containing a tilde.
7822 # note that links containing signatures, like [[Foo~~~~]], are
7823 # massaged by the pre-save transform (PST) and so the tildes are never
7824 # seen by the parser.
7826 Link containing a tilde
7830 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7833 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7837 Link containing double-single-quotes '' (bug 4598)
7839 [[Lista d''e paise d''o munno]]
7841 <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>
7844 <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>
7848 Link containing double quotes and spaces
7852 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
7855 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7859 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7861 Some [[Link|pretty ''italics'' and stuff]]!
7863 <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>!
7866 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7870 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7872 ''Some [[Link|pretty ''italics'' and stuff]]!''
7874 <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>
7879 Link with double quotes in title part (literal) and alternate part (interpreted)
7881 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7885 [[''Pentecoste''|Pentecoste]]
7887 [[''Pentecoste''|''Pentecoste'']]
7889 <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>
7890 </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>
7891 </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>
7892 </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>
7895 <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>
7896 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7897 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7898 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7902 Broken image links with HTML captions (bug 39700)
7904 [[File:Nonexistent|<script></script>]]
7905 [[File:Nonexistent|100x100px|<script></script>]]
7906 [[File:Nonexistent|<]]
7907 [[File:Nonexistent|a<i>b</i>c]]
7909 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7910 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7911 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7912 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7915 <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>
7916 <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>
7917 <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>
7918 <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>
7924 [[http://www.example.com]]
7926 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7929 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7933 Plain link to URL with link text
7935 [[http://www.example.com Link text]]
7937 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7942 Plain link to protocol-relative URL
7944 [[//www.example.com]]
7946 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7949 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7953 Plain link to protocol-relative URL with link text
7955 [[//www.example.com Link text]]
7957 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7962 Plain link to page with question mark in title
7968 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7969 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7974 # I'm fairly sure the expected result here is wrong.
7975 # We want these to be URL links, not pseudo-pages with URLs for titles....
7976 # However the current output is also pretty screwy.
7979 # I'm changing it to match the current output--it arguably makes more
7980 # sense in the light of the test above. Old expected result was:
7981 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7983 # But I think this test is bordering on "garbage in, garbage out" anyway.
7988 Piped link to URL: [[http://www.example.com|an example URL]]
7990 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7993 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
7997 BUG 2: [[page|http://url/]] should link to page, not http://url/
7999 [[Main Page|http://url/]]
8001 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8004 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8007 # Parsoid does not mark self-links, by design.
8009 BUG 337: Escaped self-links should be bold
8013 [[Bug462]] [[Bug462]]
8015 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
8018 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
8020 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8024 Self-link to section should not be bold
8028 [[Main Page#section]]
8030 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8041 Self-link to numeric title
8047 <p><strong class="selflink">0</strong>
8052 Link to numeric-equivalent title
8058 <p><a href="/wiki/00" title="00">00</a>
8063 <nowiki> inside a link
8065 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8067 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8072 Non-breaking spaces in title
8074 [[ Main Page ]]
8076 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8081 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
8087 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8092 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8098 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8103 Internal link with en linktrail: no apostrophes (bug 27473)
8109 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8114 Internal link with ca linktrail with apostrophes (bug 27473)
8120 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8125 Internal link with kaa linktrail with apostrophes (bug 27473)
8131 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8136 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8138 [[User:Foo/Test/63636:Bar|Test]]
8140 <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>
8143 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8146 ## Mainly a sanity check for Parsoid
8148 Handle title parsing for subpages
8157 ## FIXME: Add a working php section here
8159 Link to a subpage from a namespace other than main
8165 <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>
8169 Ensure that transclusion titles are not url-decoded
8171 subpage title=[[Test]]
8174 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8176 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8179 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8183 Purely hash wikilink
8185 title=[[User:test/123]]
8189 <p><a href="#a">b</a>
8192 <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>
8196 1. Interaction of linktrail and template encapsulation
8200 <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>
8204 2. Interaction of linktrail and template encapsulation
8208 {{echo|Some [[Fool]]}}s
8210 <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>
8214 3. Interaction of linktrail and template encapsulation
8218 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8220 <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>
8230 Internal link with is link prefix
8234 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8236 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8247 Internal link with is link trail and link prefix
8251 [[mótmælendatrú|xxx]]ar
8253 mótmælenda[[söfnuður]]
8254 mótmælenda[[söfnuður|söfnuðir]]
8255 mótmælenda[[söfnuður|söfnuðir]]xxx
8257 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8258 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8259 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8260 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8261 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8266 Parsoid link trail escaping
8268 parsoid=html2wt,html2html
8270 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8276 Parsoid link prefix escaping
8279 parsoid=html2wt,html2html
8281 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8283 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8287 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8295 [http://wp.org ''foo'']
8297 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8298 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8299 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8300 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8305 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8307 [[Foo|{{echo|a}} b {{echo|c}}]]
8309 <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>
8313 Link with angle bracket after anchor
8317 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8320 <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>
8324 ### Interwiki links (see maintenance/interwiki.sql)
8328 Inline interwiki link
8330 parsoid=wt2html,wt2wt,html2html
8332 [[MeatBall:SoftSecurity]]
8334 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8337 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8341 Inline interwiki link with empty title (bug 2372)
8343 parsoid=wt2html,wt2wt,html2html
8347 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8350 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8354 Interwiki link encoding conversion (bug 1636)
8356 *[[Wikipedia:ro:Olteniţa]]
8357 *[[Wikipedia:ro:Olteniţa]]
8359 <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>
8360 <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>
8364 <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>
8365 <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>
8370 Interwiki link with fragment (bug 2130)
8372 [[MeatBall:SoftSecurity#foo]]
8374 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8379 Link scenarios with escaped fragments
8382 [[Foo#Is this great?]]
8383 [[meatball:Foo#Is this great?]]
8385 <p><a href="#Is_this_great.3F">#Is this great?</a>
8386 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8387 <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>
8390 <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>
8391 <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>
8392 <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>
8395 # Ideally the wikipedia: prefix here should be proto-relative too
8396 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8397 # define the 'en' prefix, and originally the test used 'wikipedia',
8398 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8401 Different interwiki prefixes mapping to the same URL
8409 [[:wikipedia:Foo|Foo]]
8411 [[wikipedia:en:Foo]]
8413 [[:wikipedia:en:Foo]]
8417 <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>
8419 <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>
8421 <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>
8423 <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>
8425 <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>
8427 <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>
8429 <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>
8433 Interwiki links that cannot be represented in wiki syntax
8436 [[meatball:ok#foo|ok with fragment]]
8437 [[meatball:ok_as_well?|ok ending with ? mark]]
8438 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8439 [http://de.wikipedia.org/wiki/#foo is just fragment]
8442 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8443 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8444 <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>
8445 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8446 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8449 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8450 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8451 <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>
8452 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8453 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8457 Interwiki links: trail
8459 [[wikipedia:Foo|Ba]]r
8461 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8464 <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>
8468 Local interwiki link
8470 parsoid=wt2html,wt2wt,html2html
8472 [[local:Template:Foo]]
8474 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8477 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8480 # Parsoid does not mark self-links, by design.
8482 Local interwiki link: self-link to current page
8485 parsoid=wt2html,wt2wt,html2html
8489 <p><strong class="selflink">local:Main Page</strong>
8492 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8496 Local interwiki link: prefix only (bug 64167)
8498 parsoid=wt2html,wt2wt,html2html
8502 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8505 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8509 Local interwiki link: with additional interwiki prefix (bug 61357)
8511 parsoid=wt2html,wt2wt,html2html
8513 [[local:meatball:Hello]]
8515 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8518 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8522 Multiple local interwiki link prefixes
8524 [[local:local:local:local:mi:local:Foo]]
8526 parsoid=wt2html,wt2wt,html2html
8528 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8531 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8535 ### Interlanguage links
8536 ### Language links (so that searching for '### language' matches..)
8548 <p>Blah blah blah</p>
8549 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8552 ## parsoid html2wt will lose the space variations
8554 Interlanguage link with spacing
8556 parsoid=wt2html,wt2wt,html2html
8564 <p>Blah blah blah</p>
8565 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8569 Double interlanguage link
8578 <p>Blah blah blah</p>
8579 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8580 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8583 ## parsoid html2wt will lose the space variations
8585 Interlanguage link variations
8587 parsoid=wt2html,wt2wt,html2html
8597 <p>Blah blah blah</p>
8598 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8599 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8600 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8604 Escaping of interlanguage links
8608 [[ : zh : Chinese ]]
8611 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8612 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8615 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8616 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8619 ## parsoid html2wt will normalize the space to _
8621 Space and question mark encoding in interlanguage links (T95473)
8623 parsoid=wt2html,wt2wt,html2html
8631 <p>Blah blah blah</p>
8632 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8636 Interlanguage link, with prefix links
8646 <p>Blah blah blah</p>
8647 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8651 Double interlanguage link, with prefix links (bug 8897)
8662 <p>Blah blah blah</p>
8663 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8664 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8668 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8676 <p>Blah blah blah</p>
8677 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8680 ## PHP parser tests script needs an update
8681 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8683 Language links render as inline links if $wgInterwikiMagic=false
8685 wgInterwikiMagic=false
8686 parsoid=wt2html,wt2wt,html2html
8691 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8694 ## PHP parser tests script needs an update
8695 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8697 Language links render as inline links in the Talk namespace
8700 parsoid=wt2html,wt2wt,html2html
8705 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8709 Parsoid-specific test: Wikilinks with should RT properly
8715 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8720 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8722 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8724 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8725 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8727 He&nbsp;llo [[Foo|He&nbsp;llo]]
8729 He&nbsp;llo He&nbsp;llo
8731 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8732 </p><p>He&nbsp;llo He&nbsp;llo
8736 # html2wt will fail because of title normalization without data-parsoid
8738 Parsoid: handle constructor well
8740 parsoid=wt2html,wt2wt
8746 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8747 </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>
8750 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8752 <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>
8761 # Note that `ko` isn't a known interlanguage prefix
8763 Parsoid: recognize interlanguage links without a target page
8773 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8775 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8778 # Note that `ko` isn't a known interwiki prefix
8780 Parsoid: recognize interwiki links without a target page
8782 parsoid=wt2html,wt2wt,html2html
8788 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8789 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8792 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8793 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8797 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8801 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8804 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8808 Interlanguage link with preceding local interwiki link (bug 68085)
8810 parsoid=wt2html,wt2wt,html2html
8813 [[local:es:Spanish]]
8816 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8820 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8824 Looks like an interlanguage link, but is actually a local interwiki
8826 parsoid=wt2html,wt2wt,html2html
8832 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8836 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8840 ### Redirects, Parsoid-only
8844 1. Simple redirect to page
8846 #REDIRECT [[Main Page]]
8848 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8852 2. Other redirect variants
8854 #REDIRECT [[Main_Page]]
8856 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8859 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8860 # This tests the Parsoid bail-out code.
8862 3. Other redirect variants
8864 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8866 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8870 4. Redirect to a templated destination
8872 #REDIRECT [[{{echo|Foo}}bar]]
8874 <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"}]]}'/>
8880 parsoid=wt2html,wt2wt
8885 <li>REDIRECT [[]]</li></ol>
8889 Optional colon in #REDIRECT
8891 # the colon is archaic syntax. we support it for wt2html, but we
8892 # don't care that it roundtrips back to the modern syntax.
8893 parsoid=wt2html,html2html
8895 #REDIRECT:[[Main Page]]
8897 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8901 Whitespace in #REDIRECT with optional colon
8903 # the colon and gratuitous whitespace is archaic syntax. we support
8904 # it for wt2html, but we don't care that it roundtrips back to the
8905 # modern syntax (without extra whitespace)
8906 parsoid=wt2html,html2html
8913 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8917 Piped link in #REDIRECT
8919 # content after piped link is ignored. we support this syntax,
8920 # but don't care that the piped link is lost when we roundtrip this.
8923 #REDIRECT [[Main Page|bar]]
8925 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8929 Redirect to category (T104502)
8931 parsoid=wt2html,wt2wt
8933 #REDIRECT [[Category:Foo]]
8935 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8939 Redirect to category with URL encoding (T104502)
8943 #REDIRECT [[Category%3AFoo]]
8945 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8949 Redirect to category page
8951 #REDIRECT [[:Category:Foo]]
8953 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8957 Redirect to image page (1)
8959 #REDIRECT [[File:Wiki.png]]
8961 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8965 Redirect to image page (2)
8967 #REDIRECT [[Image:Wiki.png]]
8969 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8972 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8973 # Next test confirms this.
8975 Redirect to language (1) (T104918)
8977 parsoid=wt2html,wt2wt,html2html
8979 #REDIRECT [[en:File:Wiki.png]]
8981 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8985 Redirect to language (2) (T104918)
8987 #REDIRECT [[:en:File:Wiki.png]]
8989 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8993 Redirect to interwiki (T104918)
8995 #REDIRECT [[meatball:File:Wiki.png]]
8997 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9001 Non-English #REDIRECT
9005 #TILVÍSUN [[Main Page]]
9007 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9011 Redirect syntax under text isn't considered a redirect
9014 #redirect [[Main Page]]
9017 <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>
9020 # FIXME: Should hoist the redirect to the top of the page and ensure there
9027 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9047 Broken br tag sanitization
9055 # TODO: Fix html2html mode (bug 51055)!
9057 Parsoid: Broken br tag recognition
9070 Incorrecly removing closing slashes from correctly formed XHTML
9072 <br style="clear:both;" />
9074 <p><br style="clear:both;" />
9079 Failing to transform badly formed HTML into correct XHTML
9081 <br style="clear: left;">
9082 <br style="clear: right;">
9083 <br style="clear: both;">
9085 <p><br style="clear: left;" />
9086 <br style="clear: right;" />
9087 <br style="clear: both;" />
9091 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9092 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9094 Handling html with a div self-closing tag
9103 <p><div title />
9107 <p><div title=bar />
9108 <div title=bar/>
9110 <div title="bar/"></div>
9114 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9115 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9116 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9117 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9118 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9119 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9123 Handling html with a br self-closing tag
9150 Horizontal ruler (should it add that extra space?)
9165 Horizontal ruler -- 4+ dashes render hr
9174 Horizontal ruler -- eats additional dashes on the same line
9183 Horizontal ruler -- does not collapse dashes on consecutive lines
9194 Horizontal ruler -- <4 dashes render as plain text
9203 Horizontal ruler -- Supports content following dashes on same line
9215 ### Block-level elements
9224 <ul><li>Common list</li>
9226 <li>item 3</li></ul>
9237 <ol><li>Numbered list</li>
9239 <li> item 3</li></ol>
9253 ***#Number on level 4
9255 **#Number on level 3
9256 **#Number on level 3
9260 #** Level 3, but ordered
9263 <ol><li> with numbers</li></ol>
9264 <ul><li> and bullets</li></ul>
9265 <ol><li> and numbers</li></ol></li>
9267 <ul><li>bullet level 2
9268 <ul><li>bullet level 3
9269 <ol><li>Number on level 4</li></ol></li></ul></li>
9271 <ol><li>Number on level 3</li>
9272 <li>Number on level 3</li></ol></li></ul>
9273 <ol><li>number level 2</li></ol></li>
9275 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9276 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9281 1. Nested mixed wikitext and html list
9284 * <ul><li>ho</li></ul>
9289 <li> <ul><li>ho</li></ul></li>
9291 <ul><li> ho</li></ul></li></ul>
9295 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9297 <ul><li> ho</li></ul></li></ul>
9301 2. Nested mixed wikitext and html list (incompatible)
9304 : {{echo|<li>ho</li>}}
9307 <dd> <li>ho</li></dd></dl>
9311 <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>
9321 <ul><li>bar</li></ul></li></ul>
9331 <ul><li><ul><li>foo</li></ul></li>
9337 Nested lists 3 (first element empty)
9343 <ul><li>bar</li></ul></li></ul>
9348 Nested lists 4 (first element empty)
9353 <ul><li><ul><li></li></ul></li>
9359 Nested lists 5 (both elements empty)
9364 <ul><li><ul><li></li></ul></li>
9370 Nested lists 6 (both elements empty)
9376 <ul><li></li></ul></li></ul>
9381 Nested lists 7 (skip initial nesting levels)
9385 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9390 Nested lists 8 (multiple nesting transitions)
9398 <ul><li><ul><li> bar</li></ul></li>
9399 <li> baz</li></ul></li>
9405 Nested lists 9 (extension interaction)
9411 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9415 1. Lists with start-of-line-transparent tokens before bullets: Comments
9428 2. Lists with start-of-line-transparent tokens before bullets: Template close
9433 <ul><li>foo bar</li>
9439 List items are not parsed correctly following a <pre> block (bug 785)
9445 <ul><li> <pre>foo</pre></li>
9446 <li> <pre>bar</pre></li>
9450 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9451 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9456 List items from template
9467 * notSOL{{inner list}}
9470 <ul><li> item 1</li>
9471 <li> item 2</li></ul>
9472 <ul><li> item 0</li>
9474 <li> item 2</li></ul>
9475 <ul><li> item 0</li>
9478 <li> item 2</li></ul>
9483 List interrupted by empty line or heading
9491 <ul><li> foo</li></ul>
9492 <ul><li><ul><li> bar</li></ul></li></ul>
9493 <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>
9494 <ul><li> Another list item</li></ul>
9499 Multiple list tags generated by templates
9520 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9523 <!--This line will NOT split the list-->
9525 <!--This line will NOT split the list either-->
9527 <!--foo--> <!----> <!--This line NOT split the list either-->
9538 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9541 <!--This line will NOT split the list-->
9543 <!--This line will NOT split the list either-->
9545 <!--foo--> <!----> <!--This line NOT split the list
9558 (The PHP parser relies on Tidy for the hack)
9560 parsoid=wt2html,wt2wt
9564 * {{echo|<li>templated li-hack}}
9565 * <!--foo--> <li> unsupported li-hack with preceding comments
9568 <li><li>not a li-hack
9575 <li>templated li-hack</li>
9576 <li>unsupported li-hack with preceding comments</li>
9579 <li>not a li-hack</li>
9584 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9611 Parsoid: Test of whitespace serialization with Templated bullets
9618 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9622 # ------------------------------------------------------------------------
9623 # The next set of tests are about Parsoid's ability to handle badly nested
9624 # tags (parse, minimize scope of fixup, and roundtrip back)
9625 # ------------------------------------------------------------------------
9628 Unbalanced closing block tags break a list
9629 (php parser relies on Tidy to fix up)
9647 # Parsoid fails this test, but it might be tricky to support properly.
9650 Unbalanced closing non-block tags don't break a list
9651 (php parser relies on Tidy to fix up)
9658 <li><span>a</span></li>
9659 <li><span>b</span></li>
9673 Unclosed formatting tags that straddle lists are closed and reopened
9674 (php parser relies on Tidy to fix up)
9676 parsoid=wt2html,wt2wt,html2html
9686 <ol><li> <s> a</s></li>
9687 <li><s> b </s></li></ol>
9692 1. List embedded in a formatting tag
9699 <li><small>foo</small></li>
9709 ## Ugly Parsoid output here
9710 ## Not sure what the right output is.
9712 2. List embedded in a formatting tag
9719 <li><small>a</small></li>
9720 <li><small>b</small></li>
9727 <li><small>b</small></li>
9731 # Ugly Parsoid and PHP parser output here
9732 # Not sure if we want to make this a test!
9735 ## 3. Unclosed formatting tags in list elements
9741 ## <li><small>a</small></li>
9742 ## <li><small><small>b</small></small></li>
9746 ## <li><small>a</small></li>
9748 ## <li><small>b</small></li>
9752 # This is a bug in the PHP parser + tidy combination.
9753 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9754 # and then fostered out of the table by tidy.)
9755 # We believe the Parsoid output to be correct.
9757 Table with missing opening <tr> tag
9759 parsoid=wt2html,wt2wt
9777 # Note that the current date is hard-coded as
9778 # 1970-01-01T00:02:03Z (a Thursday)
9779 # when running parser tests. The timezone is also fixed to GMT, so
9780 # local date will be identical to current date.
9783 Magic Word: {{CURRENTDAY}}
9792 Magic Word: {{CURRENTDAY2}}
9801 Magic Word: {{CURRENTDAYNAME}}
9810 Magic Word: {{CURRENTDOW}}
9819 Magic Word: {{CURRENTMONTH}}
9828 Magic Word: {{CURRENTMONTH1}}
9837 Magic Word: {{CURRENTMONTHABBREV}}
9839 {{CURRENTMONTHABBREV}}
9846 Magic Word: {{CURRENTMONTHNAME}}
9848 {{CURRENTMONTHNAME}}
9855 Magic Word: {{CURRENTMONTHNAMEGEN}}
9857 {{CURRENTMONTHNAMEGEN}}
9864 Magic Word: {{CURRENTTIME}}
9873 Magic Word: {{CURRENTHOUR}}
9882 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9891 Magic Word: {{CURRENTYEAR}}
9900 Magic Word: {{CURRENTTIMESTAMP}}
9902 {{CURRENTTIMESTAMP}}
9909 Magic Words LOCAL (UTC)
9913 * {{LOCALMONTHNAME}}
9914 * {{LOCALMONTHNAMEGEN}}
9915 * {{LOCALMONTHABBREV}}
9924 * {{LOCALTIMESTAMP}}
9939 <li> 19700101000203</li></ul>
9944 Magic Word: {{FULLPAGENAME}}
9946 title=[[User:Ævar Arnfjörð Bjarmason]]
9950 <p>User:Ævar Arnfjörð Bjarmason
9955 Magic Word: {{FULLPAGENAMEE}}
9957 title=[[User:Ævar Arnfjörð Bjarmason]]
9961 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9966 Magic Word: {{TALKSPACE}}
9968 title=[[User:Ævar Arnfjörð Bjarmason]]
9977 Magic Word: {{TALKSPACE}}, same namespace
9979 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9988 Magic Word: {{TALKSPACE}}, main namespace
9990 title=[[Parser Test]]
9999 Magic Word: {{TALKSPACEE}}
10001 title=[[User:Ævar Arnfjörð Bjarmason]]
10010 Magic Word: {{SUBJECTSPACE}}
10012 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10021 Magic Word: {{SUBJECTSPACE}}, same namespace
10023 title=[[User:Ævar Arnfjörð Bjarmason]]
10032 Magic Word: {{SUBJECTSPACE}}, main namespace
10034 title=[[Parser Test]]
10042 Magic Word: {{SUBJECTSPACEE}}
10044 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10053 Magic Word: {{NAMESPACE}}
10055 title=[[User:Ævar Arnfjörð Bjarmason]]
10064 Magic Word: {{NAMESPACEE}}
10066 title=[[User:Ævar Arnfjörð Bjarmason]]
10075 Magic Word: {{NAMESPACENUMBER}}
10077 title=[[User:Ævar Arnfjörð Bjarmason]]
10079 {{NAMESPACENUMBER}}
10086 Magic Word: {{SUBPAGENAME}}
10088 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10097 Magic Word: {{SUBPAGENAMEE}}
10099 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10108 Magic Word: {{ROOTPAGENAME}}
10110 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10114 <p>Ævar Arnfjörð Bjarmason
10119 Magic Word: {{ROOTPAGENAMEE}}
10121 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10125 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10130 Magic Word: {{BASEPAGENAME}}
10132 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10136 <p>Ævar Arnfjörð Bjarmason
10141 Magic Word: {{BASEPAGENAMEE}}
10143 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10147 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10152 Magic Word: {{TALKPAGENAME}}
10154 title=[[User:Ævar Arnfjörð Bjarmason]]
10158 <p>User talk:Ævar Arnfjörð Bjarmason
10163 Magic Word: {{TALKPAGENAMEE}}
10165 title=[[User:Ævar Arnfjörð Bjarmason]]
10169 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10174 Magic Word: {{SUBJECTPAGENAME}}
10176 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10178 {{SUBJECTPAGENAME}}
10180 <p>User:Ævar Arnfjörð Bjarmason
10185 Magic Word: {{SUBJECTPAGENAMEE}}
10187 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10189 {{SUBJECTPAGENAMEE}}
10191 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10196 Magic Word: {{NUMBEROFFILES}}
10205 Magic Word: {{PAGENAME}}
10207 title=[[User:Ævar Arnfjörð Bjarmason]]
10211 <p>Ævar Arnfjörð Bjarmason
10216 Magic Word: {{PAGENAME}} with metacharacters
10218 title=[['foo & bar = baz']]
10222 <p><i>'foo & bar = baz'</i>
10225 <p><i>'foo & bar = baz'</i></p>
10229 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10231 title=[[*RFC 1234 http://example.com/]]
10235 <p>*RFC 1234 http://example.com/
10238 <p>*RFC 1234 http://example.com/</p>
10242 Magic Word: {{PAGENAMEE}}
10244 title=[[User:Ævar Arnfjörð Bjarmason]]
10248 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10253 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10255 title=[[*RFC 1234 http://example.com/]]
10259 <p>*RFC_1234_http://example.com/
10262 <p>*RFC_1234_http://example.com/</p>
10266 Magic Word: {{REVISIONID}}
10275 Magic Word: {{SCRIPTPATH}}
10283 Magic Word: {{STYLEPATH}}
10292 Magic Word: {{SERVER}}
10296 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10301 Magic Word: {{SERVERNAME}}
10310 Magic Word: {{SITENAME}}
10319 Magic Word: {{PAGELANGUAGE}}
10330 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10339 Case-sensitive magic words, when cased differently, should just be template transclusions
10346 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10347 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10348 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10349 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10354 Case-insensitive magic words should still work with weird casing.
10364 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10368 # From plwiki:PLOS_ONE
10370 Parsoid: Page property magic word with magic word contents
10372 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10374 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt2\" 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>"}]]}'/>
10378 Parsoid: Template-generated DISPLAYTITLE
10380 {{{{echo|DISPLAYTITLE}}:Foo}}
10382 <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}}]}'/>
10386 Namespace 1 {{ns:1}}
10395 Namespace 1 {{ns:01}}
10404 Namespace 0 {{ns:0}} (bug 4783)
10412 Namespace 0 {{ns:00}} (bug 4783)
10420 Namespace -1 {{ns:-1}}
10429 Namespace User {{ns:User}}
10438 Namespace User talk {{ns:User_talk}}
10447 Namespace User talk {{ns:uSeR tAlK}}
10456 Namespace File {{ns:File}}
10465 Namespace File {{ns:Image}}
10474 Namespace (lang=de) Benutzer {{ns:User}}
10485 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10491 <p>Benutzer Diskussion
10498 {{urlencode:hi world?!}}
10499 {{urlencode:hi world?!|WIKI}}
10500 {{urlencode:hi world?!|PATH}}
10501 {{urlencode:hi world?!|QUERY}}
10511 Magic Word: prioritize type info over data-parsoid
10515 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10521 Magic Word: serialize on separate line (parsoid)
10523 parsoid=wt2wt,html2wt
10529 foo<meta property="mw:PageProp/notoc"/>bar
10533 Magic Word: rt non-english wikis
10540 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10544 __proto__ is treated as normal wikitext (T105997)
10556 Magic links: internal link to RFC (bug 479)
10560 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10563 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10567 Magic links: RFC (bug 479)
10571 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10574 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10578 Magic links: RFC (bug 65278)
10580 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10582 <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.
10585 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10589 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10591 RFC      822
10595 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10600 <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>
10606 Magic links: ISBN (bug 1937)
10610 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10613 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10617 Magic links: ISBN (bug 65278)
10619 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10621 <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.
10624 <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>
10628 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10630 ISBN      978 0 316 09811 3
10636 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10643 <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>
10651 Magic links: PMID incorrectly converts space to underscore
10655 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10658 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10662 Magic links: PMID (bug 65278)
10664 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10666 <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.
10669 <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>
10673 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10675 PMID      1234
10679 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10684 <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>
10689 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10690 # since these are ExtLinkText, not MagicLinkText
10692 Magic links: use appropriate serialization for "almost" magic links.
10694 X[[Special:BookSources/0978739256|foo]]
10696 X[//tools.ietf.org/html/rfc1234 foo]
10698 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10699 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10702 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10703 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10707 Magic links: All disabled (T47942)
10709 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10715 <p>ISBN 0-306-40615-2
10726 Nonexistent template
10728 {{thistemplatedoesnotexist}}
10730 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10735 Template with invalid target containing tags
10737 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10739 <p>{{a<b>b</b>|foo|a=b|a = b}}
10744 Template with invalid target containing unclosed tag
10746 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10748 <p>{{a<b>|foo|a=b|a = b}}</b>
10753 Template with invalid target containing wikilink
10757 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10760 <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>
10764 Template with just whitespace in it, bug #68421
10768 <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>
10774 This is a test template
10782 <p>This is a test template
10787 Template with explicit namespace
10791 <p>This is a test template
10799 This is a test template with parameter {{{param}}}
10805 {{paramtest|param=foo}}
10807 <p>This is a test template with parameter foo
10812 Template:paramtestnum
10814 [[{{{1}}}|{{{2}}}]]
10818 Template unnamed parameter
10820 {{paramtestnum|Main Page|the main page}}
10822 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10827 Template:templatesimple
10833 Template:templateredirect
10835 #redirect [[Template:templatesimple]]
10839 Template:templateasargtestnum
10845 Template:templateasargtest
10847 {{template{{{templ}}}}}
10851 Template:templateasargtest2
10857 Template with template name as unnamed argument
10859 {{templateasargtestnum|templatesimple}}
10866 Template with template name as argument
10868 {{templateasargtest|templ=simple}}
10875 Template with template name as argument (2)
10877 {{templateasargtest2|templ=templatesimple}}
10884 Template:templateasargtestdefault
10886 {{{{{templ|templatesimple}}}}}
10896 Template with default value
10898 {{templateasargtestdefault}}
10905 Template with default value (value set)
10907 {{templateasargtestdefault|templ=templa}}
10916 {{templateredirect}}
10921 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10925 Template with argument in separate line
10927 {{ templateasargtest |
10935 Template with complex template as argument
10938 param ={{ templateasargtest |
10939 templ = simple }}}}
10941 <p>This is a test template with parameter (test)
10946 Template with thumb image (with link in description)
10948 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10950 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>
10953 <p>This is a test template with parameter</p>
10954 <div class="thumb tright">
10955 <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>
10956 <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>
10960 <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>
10964 Template:complextemplate
10966 {{{1}}} {{paramtest|
10967 param ={{{param}}}}}
10971 Template with complex arguments
10974 param ={{ templateasargtest |
10975 templ = simple }}|[[Template:complextemplate|link]]}}
10977 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10982 BUG 553: link with two variables in a piped link
10985 |[[{{{1}}}|{{{2}}}]]
10990 <td>[[{{{1}}}|{{{2}}}]]
10995 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11001 Abort table cell attribute parsing on wikilink
11004 | testing [[one|two]] | three || four
11005 | testing one two | three || four
11006 | testing="[[one|two]]" | three || four
11011 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11017 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11023 <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>
11024 <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>
11025 <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>
11030 Don't abort table cell attribute parsing if wikilink is found in template arg
11033 | Test {{#tag:ref|One two "[[three]]" four}}
11037 <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>
11042 Magic variable as template parameter
11044 {{paramtest|param={{SITENAME}}}}
11046 <p>This is a test template with parameter MediaWiki
11053 [[{{{param}}}|link]]
11057 Template parameter as link source
11059 {{linktest|param=Main Page}}
11061 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11066 Template:paramtest2
11068 including another template, {{paramtest|param={{{arg}}}}}
11072 Template passing argument to another template
11074 {{paramtest2|arg='hmm'}}
11076 <p>including another template, This is a test template with parameter 'hmm'
11087 Template as link source
11091 [[{{linktest2}}|Main Page]]
11093 [[{{linktest2}}]]Page
11095 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11096 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11097 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11115 Template infinite loop
11119 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11124 Template from main namespace
11143 BUG 529: Template with table, not included at beginning of line
11162 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11182 BUG 41: Template parameters shown as broken links
11191 Template with targets containing wikilinks
11195 {{[[{{echo|foo}}]]}}
11197 {{{{echo|[[foo}}]]}}
11199 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11200 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11212 Templates: Double quotes as template target
11219 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11223 ## This test is about making sure Parsoid's data-mw is well formed in the
11224 ## face of multiple templates with intersecting and overlapping ranges. The
11225 ## wikitext itself is wretched.
11227 Templates with intersecting and overlapping ranges
11252 <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":""}]]}'>
11254 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11256 <tbody><tr><td>hi</td></tr>
11261 Template:MSGNW test
11263 ''None'' of '''this''' should be
11265 but rather passed unmodified
11273 # hmm, fix this or just deprecate msgnw and document its behavior?
11277 {{msgnw:MSGNW test}}
11279 <p>''None'' of '''this''' should be
11281  but rather passed unmodified
11282 {{test}}
11286 <!-- comment -->
11293 {{int:youhavenewmessages|lots of money|not!}}
11295 <p>You have lots of money (not!).
11300 int keyword - non-existing message
11311 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11315 <includeonly> and <noinclude> being included
11326 <onlyinclude>Foo</onlyinclude>bar
11330 <onlyinclude> being included
11342 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11346 <onlyinclude> and <includeonly> being included
11355 <includeonly> and <noinclude> on a page
11357 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11364 Un-closed <noinclude>
11371 <onlyinclude> on a page
11373 <onlyinclude>Foo</onlyinclude>bar
11380 Un-closed <onlyinclude>
11387 Self-closed noinclude, includeonly, onlyinclude tags
11398 Unbalanced includeonly and noinclude tags
11402 |b</noinclude></noinclude>
11403 |c</noinclude></includeonly>
11404 |d</includeonly></includeonly>
11413 <td>c</includeonly>
11415 <td>d</includeonly></includeonly>
11421 Template:Includeonly section
11424 ==Includeonly section==
11430 Bug 6563: Edit link generation for section shown by <includeonly>
11432 {{includeonly section}}
11434 <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>
11435 <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>
11439 # Uses same input as the contents of [[Template:Includeonly section]]
11441 Bug 6563: Section extraction for section shown by <includeonly>
11446 ==Includeonly section==
11454 Bug 6563: Edit link generation for section suppressed by <includeonly>
11457 ==Includeonly section==
11461 <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>
11466 Bug 6563: Section extraction for section suppressed by <includeonly>
11471 ==Includeonly section==
11479 Un-closed <includeonly>
11484 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11487 ## We used to, but no longer wt2wt this test since the default serializer
11488 ## will normalize the include directives to serialize on their own line.
11489 ## Selser will take care of preserving formatting in scenarios where they
11490 ## intermingled with other wikitext.
11492 Includes and comments at SOL
11494 parsoid=wt2html,html2html
11496 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11500 </noinclude>* stuff
11503 <includeonly>can have stuff</includeonly>=== here ===
11506 <h2><span class="mw-headline" id="hu">hu</span></h2>
11509 <ul><li> stuff</li>
11510 <li> here</li></ul>
11511 <h3><span class="mw-headline" id="here">here</span></h3>
11514 <!-- 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>
11516 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11518 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11519 <li> here</li></ul>
11521 <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>
11525 # TODO: test with DOM fragment reuse!
11527 Parsoid: DOM fragment reuse
11529 parsoid=wt2wt,wt2html
11531 a{{echo|b<table></table>c}}d
11543 <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>
11545 <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">
11546 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11547 </span><p about="#mwt2">cd</p>
11549 <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">
11551 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11553 </span><p about="#mwt3">b</p>
11557 Parsoid: Merge double tds (T52603)
11562 |{{echo|{{!}} foo}}
11566 <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>
11571 Parsoid: Merge double tds in nested transclusion content (T52603)
11577 |{{echo|{{!}} foo}}
11581 <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}}]}'>
11583 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11589 ### <includeonly> and <noinclude> in attributes
11592 0. includeonly around the entire attribute
11594 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11596 <p><span id="v2">bar</span>
11601 1. includeonly in html attr key
11603 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11605 <p><span id="foo">bar</span>
11610 2. includeonly in html attr value
11612 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11613 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11615 <p><span id="v1">bar</span>
11616 <span id="v1">bar</span>
11621 3. includeonly in part of an attr value
11623 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11625 <p><span style="color:red;">bar</span>
11630 4. includeonly in table attributes
11654 ### Token Stream Patcher tests
11656 ### These tests won't always pass wt2wt and other modes because
11657 ### on serialization, the table will be output on a new line.
11658 ### For now, we are blacklisting them, and using this to test selser.
11662 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11664 parsoid=wt2html,wt2wt
11666 {{echo|}}{| width = '100%'
11670 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11671 <tbody><tr><td>foo</td></tr>
11675 ## We used to, but no longer wt2wt this test since the default serializer
11676 ## will normalize the include directives to serialize on their own line.
11677 ## Selser will take care of preserving formatting in scenarios where they
11678 ## intermingled with other wikitext.
11680 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11684 <includeonly>a</includeonly>{| {{{b}}}
11688 <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='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
11689 <tbody><tr><td>c</td></tr>
11694 Table wikitext syntax outside wiki-tables
11698 ! not a table heading
11701 | class="foo bar" | baz
11709 ! not a table heading
11712 | class="foo bar" | baz
11721 ### Testing parsing of templates where a template arg
11722 ### has the same name as the template itself.
11728 {{{quote|{{{1}}}}}}
11732 Templates: Template Name/Arg clash: 1. Use of positional param
11741 Templates: Template Name/Arg clash: 2. Use of named param
11743 {{quote|quote=foo}}
11750 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11759 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11763 Templates: 1. Simple use
11772 Templates: 2. Inside a block tag
11774 <div>{{echo|Foo}}</div>
11775 <blockquote>{{echo|Foo}}</blockquote>
11778 <blockquote>Foo</blockquote>
11788 Templates: P-wrapping: 1a. Templates on consecutive lines
11799 Templates: P-wrapping: 1b. Templates on consecutive lines
11813 Templates: P-wrapping: 1c. Templates on consecutive lines
11816 {{echo|bar}} <div>baz</div>
11829 Templates: P-wrapping: 1d. Template preceded by comment-only line
11838 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11842 Templates: Inline Text: 1. Multiple template uses
11844 {{echo|Foo}}bar{{echo|baz}}
11851 Templates: Inline Text: 2. Back-to-back template uses
11853 {{echo|Foo}}{{echo|bar}}
11860 Templates: Block Tags: 1. Multiple template uses
11862 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11864 <div>Foo</div><div>bar</div><div>baz</div>
11869 Templates: Block Tags: 2. Back-to-back template uses
11871 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11873 <div>Foo</div><div>bar</div>
11877 # This is an edge case relating to paragraph wrapping.
11879 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11884 <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
11889 Templates: Links: 1. Simple example
11891 {{echo|[[Foo|bar]]}}
11893 <p><a href="/wiki/Foo" title="Foo">bar</a>
11898 Templates: Links: 2. Generation of link href
11900 [[{{echo|Foo}}|bar]]
11902 <p><a href="/wiki/Foo" title="Foo">bar</a>
11907 Templates: Links: 3. Generation of part of a link href
11909 [[Fo{{echo|o}}|bar]]
11911 [[Foo{{echo|bar}}]]
11913 [[Foo{{echo|bar}}baz]]
11915 [[Foo{{echo|bar}}|bar]]
11917 [[:Foo{{echo|bar}}]]
11919 [[:Foo{{echo|bar}}|bar]]
11921 <p><a href="/wiki/Foo" title="Foo">bar</a>
11922 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11923 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11924 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11925 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11926 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11931 Templates: Links: 4. Multiple templates generating link href
11933 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11935 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11940 Templates: Links: 5. Generation of link text
11942 [[Foo|{{echo|bar}}]]
11944 <p><a href="/wiki/Foo" title="Foo">bar</a>
11949 Templates: Links: 5. Nested templates (only outermost template should be marked)
11951 {{echo|[[{{echo|Foo}}|bar]]}}
11953 <p><a href="/wiki/Foo" title="Foo">bar</a>
11958 Templates: HTML Tag: 1. Generation of HTML attr. key
11960 <div {{echo|style}}="color:red;">foo</div>
11962 <div style="color:red;">foo</div>
11967 Templates: HTML Tag: 2. Generation of HTML attr. value
11969 <div style={{echo|'color:red;'}}>foo</div>
11971 <div style="color:red;">foo</div>
11976 Templates: HTML Tag: 3. Generation of HTML attr key and value
11978 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11980 <div style="color:red;">foo</div>
11985 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11987 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11989 <div title="This is a long title with just one piece templated">foo</div>
11994 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11996 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11998 <div title="This is a long title with just one piece templated">foo</div>
12003 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12005 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12007 <div title="This is a long title with just one piece templated">foo</div>
12011 # SSS FIXME: While it is great we added support for all this,
12012 # do we want to make this part of the spec? Maybe we want to
12013 # deprecate this kind of usage in the future?
12015 Templates: HTML Tag: 7. Generation of partial attribute key string
12017 <div st{{echo|yle}}="color:red;">foo</div>
12019 <div style="color:red;">foo</div>
12024 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12026 <div {{echo|1=id="v1"}}>bar</div>
12028 <div id="v1">bar</div>
12033 Templates: HTML Tag: 9. Multiple template-generated attributes
12035 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12037 <div id="v1" title="foo">bar</div>
12042 Templates: Support for templates generating attributes and content
12044 {| {{mixed_attr_content_template}}
12049 <table style="color:red;" title="T48811">
12059 <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|}"]}'>
12068 1. Entities and nowikis inside templated attributes should be handled correctly
12070 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12072 <div style="background:#f9f9f9;">foo</div>
12075 <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>
12079 2. Entities and nowikis inside templated attributes should be handled correctly
12082 |{{table_attribs_3}}
12087 <td style="background:#f9f9f9;">Foo
12092 <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>
12097 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12100 |{{table_attribs_3}}
12105 <td style="background:#f9f9f9;">Foo
12109 <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}}]}'>
12110 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12116 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12119 | {{table_attribs_6}} hi
12124 <td style="background: red;"> hi
12129 <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>
12134 Templates: HTML Tables: 1. Generating start of a HTML table
12136 {{echo|<table><tr><td>foo</td>}}</tr></table>
12138 <table><tr><td>foo</td></tr></table>
12143 Templates: HTML Tables: 2a. Generating middle of a HTML table
12145 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12147 <table><tr><td>foo</td></tr></table>
12152 Templates: HTML Tables: 2b. Generating middle of a HTML table
12154 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12156 <table><tr><td>foo</td></tr></table>
12161 Templates: HTML Tables: 3. Generating end of a HTML table
12163 <table><tr>{{echo|<td>foo</td></tr></table>}}
12165 <table><tr><td>foo</td></tr></table>
12170 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12172 {{echo|<table>}}<tr><td>foo</td></tr></table>
12174 <table><tr><td>foo</td></tr></table>
12179 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12181 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12183 <table><tr><td>foo</td></tr></table>
12188 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12190 <table><tr>{{echo|<td>}}foo</td></tr></table>
12192 <table><tr><td>foo</td></tr></table>
12197 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12199 <table><tr><td>foo{{echo|</td>}}</tr></table>
12201 <table><tr><td>foo</td></tr></table>
12206 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12208 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12210 <table><tr><td>foo</td></tr></table>
12215 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12217 <table><tr><td>foo</td></tr>{{echo|</table>}}
12219 <table><tr><td>foo</td></tr></table>
12224 Templates: HTML Tables: 5. Proper fostering of categories from inside
12226 parsoid=wt2html,wt2wt
12228 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12229 <!--Two categories (Bug 50330)-->
12230 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12232 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12233 <!--Two categories (Bug 50330)-->
12234 <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>
12238 Templates: Wiki Tables: 1a. Fostering of entire template content
12246 <tr><td></td></tr></table>
12258 Templates: Wiki Tables: 1b. Fostering of entire template content
12271 <tr><td></td></tr></table>
12285 Templates: Wiki Tables: 2. Fostering of partial template content
12295 <tr><td></td></tr></table>
12308 Templates: Wiki Tables: 3. td-content via multiple templates
12311 {{echo|{{pipe}}a}}{{echo|b}}
12322 Templates: Wiki Tables: 4. Templated tags, no content
12328 <tr><td></td></tr></table>
12333 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12347 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12360 ## This test case is very specific to Parsoid's internals
12361 ## and is hence only tested for Parsoid's code. Parsoid uses
12362 ## a <meta> marker tag for <ref> tags and they are expanded
12363 ## much later. We are verifying that this <meta> tag usage
12364 ## doesn't prevent foster parenting.
12366 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12368 {{PartialTable}}<ref>foo</ref>
12373 <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">
12377 <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>
12381 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12391 <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{{!}}}"]}'>
12392 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12396 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12401 Templates: Lists: Multi-line list-items via templates
12403 *{{echo|a {{nonexistent|
12405 *{{echo|b {{nonexistent|
12408 <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>
12409 <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>
12414 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12416 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12418 <p><i>ab</i>c<i>d</i>e
12423 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12424 (PHP parser generates misnested html)
12426 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12428 <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>
12432 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12433 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12435 parsoid=wt2html,wt2wt
12437 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12439 <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>
12440 <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>
12441 <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>
12445 Templates: Ugly nesting: 4. Divs opened/closed across templates
12447 a<div>b{{echo|c</div>d}}e
12458 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12464 |{{echo|foo</table>}}
12468 <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|}"]}'>
12472 <td>foo</td></tr></tbody></table><span about="#mwt1">
12473 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12478 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12488 <td>1. {{echo|foo </table>}}</td>
12490 <td>2. {{echo|baz </table>}}</td>
12503 <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>"]}'>
12508 <td>1. foo </td></tr></tbody></table></td>
12510 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12511 </span><span about="#mwt2">
12512 </span><span about="#mwt2">
12513 </span><span about="#mwt2">abc</span><span about="#mwt2">
12514 </span><span about="#mwt2">
12515 </span><span about="#mwt2">
12516 </span><span about="#mwt2">
12517 </span><span about="#mwt2">
12518 </span><span about="#mwt2">
12519 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12520 </span><span about="#mwt2">
12525 Templates: Ugly templates: 3. newline-only template parameter
12534 # This looks like a bug: a single newline triggers p/br for some reason.
12536 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12545 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12546 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12548 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12554 <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
12555 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12559 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12560 # that are "identical" and generate nesting cycles in the algorithm
12562 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12564 {{echo|<table><tr><td><table>}}
12568 <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"}'>
12569 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12570 </table></td></tr></tbody></table>
12574 Templates: Parameters substituted at the top-level
12576 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12580 <p><i>who</i> me? <b>never!</b>
12584 <p about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"''who'' {{echo|me}}? '''never!'''"}},"i":0}}]}'><i>who</i> me? <b>never!</b></p>
12586 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
12590 Parser Functions: 1. Simple example
12599 Parser Functions: 2. Nested use (only outermost should be marked up)
12608 ### Pre-save transform tests
12611 pre-save transform: subst:
12617 This is a test template
12621 pre-save transform: normal template
12631 pre-save transform: nonexistent template
12635 {{thistemplatedoesnotexist}}
12637 {{thistemplatedoesnotexist}}
12641 pre-save transform: subst magic variables
12650 # This is bug 89, which I fixed. -- wtm
12652 pre-save transform: subst: templates with parameters
12656 {{subst:paramtest|param="something else"}}
12658 This is a test template with parameter "something else"
12662 Template:nowikitest
12664 <nowiki>'''not wiki'''</nowiki>
12668 pre-save transform: nowiki in subst (bug 1188)
12672 {{subst:nowikitest}}
12674 <nowiki>'''not wiki'''</nowiki>
12678 Template:commenttest
12680 This template has <!-- a comment --> in it.
12684 pre-save transform: comment in subst (bug 1936)
12688 {{subst:commenttest}}
12690 This template has <!-- a comment --> in it.
12694 pre-save transform: unclosed tag
12698 <nowiki>'''not wiki'''
12700 <nowiki>'''not wiki'''
12704 pre-save transform: mixed tag case
12708 <NOwiki>'''not wiki'''</noWIKI>
12710 <NOwiki>'''not wiki'''</noWIKI>
12714 pre-save transform: unclosed comment in <nowiki>
12718 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12720 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12723 # Leading @ in this template definition works around a limitation
12724 # in parsoid's parserTests which otherwise strips the <span> from the
12725 # result (confusing it for a template wrapper)
12729 @<span onmouseover="alert('crap')">Oh no</span>
12733 (confirming safety of fix for subst bug 1936)
12735 {{Template:dangerous}}
12737 <p>@<span>Oh no</span>
12742 pre-save transform: comment containing gallery (bug 5024)
12746 <!-- <gallery>data</gallery> -->
12748 <!-- <gallery>data</gallery> -->
12752 pre-save transform: comment containing extension
12756 <!-- <tag>data</tag> -->
12758 <!-- <tag>data</tag> -->
12762 pre-save transform: comment containing nowiki
12766 <!-- <nowiki>data</nowiki> -->
12768 <!-- <nowiki>data</nowiki> -->
12772 pre-save transform: <noinclude> in subst (bug 3298)
12782 pre-save transform: <onlyinclude> in subst (bug 3298)
12786 {{subst:Includes2}}
12794 {{<includeonly>subst:</includeonly>Includes}}
12798 Template:SafeSubstTest
12800 {{<includeonly>safesubst:</includeonly>Includes}}
12804 bug 22297: safesubst: works during PST
12808 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12814 bug 22297: safesubst: works during normal parse
12823 subst: does not work during normal parse
12827 <p>{{subst:Includes}}
12832 pre-save transform: context links ("pipe trick")
12836 [[Article (context)|]]
12839 [[Bar:Article (context)|]]
12840 [[:Bar:Article (context)|]]
12842 [[|Article (context)]]
12846 [[Article (context)|Article]]
12847 [[Bar:Article|Article]]
12848 [[:Bar:Article|Article]]
12849 [[Bar:Article (context)|Article]]
12850 [[:Bar:Article (context)|Article]]
12852 [[Article (context)]]
12853 [[Bar:X (Y) Z|X (Y) Z]]
12854 [[:Bar:X (Y) Z|X (Y) Z]]
12858 pre-save transform: context links ("pipe trick") with interwiki prefix
12862 [[interwiki:Article|]]
12863 [[:interwiki:Article|]]
12864 [[interwiki:Bar:Article|]]
12865 [[:interwiki:Bar:Article|]]
12867 [[interwiki:Article|Article]]
12868 [[:interwiki:Article|Article]]
12869 [[interwiki:Bar:Article|Bar:Article]]
12870 [[:interwiki:Bar:Article|Bar:Article]]
12874 pre-save transform: context links ("pipe trick") with parens in title
12876 pst title=[[Somearticle (context)]]
12880 [[Article (context)|Article]]
12884 pre-save transform: context links ("pipe trick") with comma in title
12886 pst title=[[Someplace, Somewhere]]
12889 [[Otherplace, Elsewhere|]]
12890 [[Otherplace, Elsewhere, Anywhere|]]
12892 [[Otherplace, Somewhere|Otherplace]]
12893 [[Otherplace, Elsewhere|Otherplace]]
12894 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12898 pre-save transform: context links ("pipe trick") with parens and comma
12900 pst title=[[Someplace (IGNORED), Somewhere]]
12903 [[Otherplace (place), Elsewhere|]]
12905 [[Otherplace, Somewhere|Otherplace]]
12906 [[Otherplace (place), Elsewhere|Otherplace]]
12910 pre-save transform: context links ("pipe trick") with comma and parens
12912 pst title=[[Who, me? (context)]]
12915 [[Me, Myself, and I (1937 song)|]]
12917 [[Yes, you. (context)|Yes, you.]]
12918 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12922 pre-save transform: context links ("pipe trick") with namespace
12924 pst title=[[Ns:Somearticle]]
12928 [[Ns:Article|Article]]
12932 pre-save transform: context links ("pipe trick") with namespace and parens
12934 pst title=[[Ns:Somearticle (context)]]
12938 [[Ns:Article (context)|Article]]
12942 pre-save transform: context links ("pipe trick") with namespace and comma
12944 pst title=[[Ns:Somearticle, Context, Whatever]]
12948 [[Ns:Article, Context, Whatever|Article]]
12952 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12954 pst title=[[Ns:Somearticle, Context (context)]]
12958 [[Ns:Article (context)|Article]]
12962 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12964 pst title=[[Ns:Somearticle (IGNORED), Context]]
12968 [[Ns:Article, Context|Article]]
12972 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12976 [[Article(context)|]]
12977 [[Bar:Article(context)|]]
12978 [[:Bar:Article(context)|]]
12979 [[|Article(context)]]
12983 [[Article(context)|Article]]
12984 [[Bar:Article(context)|Article]]
12985 [[:Bar:Article(context)|Article]]
12986 [[Article(context)]]
12987 [[Bar:X(Y)Z|X(Y)Z]]
12988 [[:Bar:X(Y)Z|X(Y)Z]]
12992 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12996 [[Article (context)|]]
12997 [[Bar:Article (context)|]]
12998 [[:Bar:Article (context)|]]
12999 [[|Article (context)]]
13003 [[Article (context)|Article]]
13004 [[Bar:Article (context)|Article]]
13005 [[:Bar:Article (context)|Article]]
13006 [[Article (context)]]
13007 [[Bar:X (Y) Z|X (Y) Z]]
13008 [[:Bar:X (Y) Z|X (Y) Z]]
13012 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
13016 [[Article(context)|]]
13017 [[Bar:Article(context)|]]
13018 [[:Bar:Article(context)|]]
13019 [[|Article(context)]]
13023 [[Article(context)|Article]]
13024 [[Bar:Article(context)|Article]]
13025 [[:Bar:Article(context)|Article]]
13026 [[Article(context)]]
13027 [[Bar:X(Y)Z|X(Y)Z]]
13028 [[:Bar:X(Y)Z|X(Y)Z]]
13032 pre-save transform: context links ("pipe trick") with commas (bug 21660)
13036 [[Article (context), context|]]
13037 [[Article (context),context|]]
13038 [[Bar:Article (context), context|]]
13039 [[Bar:Article (context),context|]]
13040 [[:Bar:Article (context), context|]]
13041 [[:Bar:Article (context),context|]]
13043 [[Article (context), context|Article]]
13044 [[Article (context),context|Article]]
13045 [[Bar:Article (context), context|Article]]
13046 [[Bar:Article (context),context|Article]]
13047 [[:Bar:Article (context), context|Article]]
13048 [[:Bar:Article (context),context|Article]]
13052 pre-save transform: trim trailing empty lines
13056 Empty lines are trimmed
13062 Empty lines are trimmed
13066 pre-save transform: Signature expansion
13071 * <noinclude>~~~</noinclude>
13072 * <includeonly>~~~</includeonly>
13073 * <onlyinclude>~~~</onlyinclude>
13075 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13076 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13077 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13078 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13083 pre-save transform: Signature expansion in nowiki tags (bug 93)
13089 <nowiki>~~~~</nowiki>
13091 <includeonly><nowiki>~~~~</nowiki></includeonly>
13093 <noinclude><nowiki>~~~~</nowiki></noinclude>
13095 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13097 {{subst:Foo}} shall be converted to FOO
13099 As well as inside noinclude/onlyinclude
13100 <noinclude>{{subst:Foo}}</noinclude>
13101 <onlyinclude>{{subst:Foo}}</onlyinclude>
13103 But not inside includeonly
13104 <includeonly>{{subst:Foo}}</includeonly>
13108 <nowiki>~~~~</nowiki>
13110 <includeonly><nowiki>~~~~</nowiki></includeonly>
13112 <noinclude><nowiki>~~~~</nowiki></noinclude>
13114 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13116 FOO shall be converted to FOO
13118 As well as inside noinclude/onlyinclude
13119 <noinclude>FOO</noinclude>
13120 <onlyinclude>FOO</onlyinclude>
13122 But not inside includeonly
13123 <includeonly>{{subst:Foo}}</includeonly>
13127 Parsoid: Recognize nowiki with trailing space in tags
13131 <nowiki ><div>[[foo]]</nowiki >
13139 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13146 Parsoid: Recognize nowiki with odd capitalization
13150 <noWikI ><div>[[foo]]</Nowiki >
13152 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13157 Parsoid: Escape nowiki with trailing space in tags
13161 <p><nowiki > foo </nowiki ></p>
13162 <p>a<nowiki />b</p>
13163 <p>c<nowiki/ >d</p>
13165 <nowiki > foo </nowiki >
13173 Parsoid: Escape weird noWikI capitalizations
13177 <p><noWikI > foo </NoWikI ></p>
13179 <noWikI > foo </NoWikI >
13183 ### Message transform tests
13186 message transform: magic variables
13196 message transform: should not transform wiki markup
13206 message transform: <noinclude> in transcluded template (bug 4926)
13216 message transform: <onlyinclude> in transcluded template (bug 4926)
13226 {{#special:}} page name, known
13230 {{#special:Recentchanges}}
13232 Special:RecentChanges
13236 {{#special:}} page name with subpage, known
13240 {{#special:Recentchanges/param}}
13242 Special:RecentChanges/param
13246 {{#special:}} page name, unknown
13250 {{#special:foobar nonexistent}}
13252 Special:Foobar nonexistent
13256 {{#speciale:}} page name, known
13260 {{#speciale:Recentchanges}}
13262 Special:RecentChanges
13266 {{#speciale:}} page name with subpage, known
13270 {{#speciale:Recentchanges/param}}
13272 Special:RecentChanges/param
13276 {{#speciale:}} page name, unknown
13280 {{#speciale:foobar nonexistent}}
13282 Special:Foobar_nonexistent
13288 ### For Parsoid-specific tests, see
13289 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13294 parsoid=wt2html,wt2wt,html2html
13296 [[Image:foobar.jpg]]
13298 <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>
13301 <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>
13305 Simple image (using File: namespace, now canonical)
13307 [[File:Foobar.jpg]]
13309 <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>
13312 <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>
13316 Right-aligned image
13318 [[File:Foobar.jpg|right]]
13320 <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>
13323 <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>
13329 [[File:Foobar.jpg|right|Caption text]]
13331 <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>
13334 <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>
13338 Image with caption, bug 53312 #1
13340 [[File:Foobar.jpg|right|Caption page stuff]]
13342 <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>
13345 <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>
13349 Image with caption, bug 53312 #2
13351 [[File:Foobar.jpg|right|Caption page=]]
13353 <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>
13356 <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>
13360 Image with caption, bug 53312 #3
13362 [[File:Foobar.jpg|right|Caption page=stuff]]
13364 <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>
13367 <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>
13371 Allow empty links in image captions (Bug 60753)
13375 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13380 <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>
13383 <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>
13385 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13386 </figcaption></figure>
13390 Titles in unlinked images (T23454)
13392 [[File:Foobar.jpg|link=|stuff]]
13394 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13399 Link with empty target
13408 Image with link trail
13410 Linktrails should not work for images: [[File:Foobar.jpg]]s
13412 <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
13415 <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>
13419 Image with empty attribute
13421 parsoid=wt2html,wt2wt,html2html
13423 [[File:Foobar.jpg|right||Caption text]]
13425 <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>
13428 <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>
13432 1. Block image with individual attributes from templates
13434 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13436 <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>
13439 <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>
13443 2. Block Image with individual attributes from templates
13445 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13447 <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>
13450 <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>
13454 3. Inline image with individual attributes from templates
13456 [[File:Foobar.jpg|{{echo|50px}}]]
13458 <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>
13461 <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>
13464 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13465 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13467 Image with multiple attributes from the same template
13469 [[File:Foobar.jpg|{{image_attribs}}]]
13471 <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>
13474 <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>
13478 Image with link tails
13482 123[[File:Foobar.jpg]]456
13483 123[[File:Foobar.jpg|right]]456
13484 123[[File:Foobar.jpg|thumb]]456
13486 <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
13488 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
13489 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
13492 <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>
13494 <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>
13496 <div class="thumb tright">
13497 <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>
13498 <div class="thumbcaption">
13499 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13505 <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>
13506 <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>
13507 <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>
13511 Image with multiple captions -- only last one is accepted
13513 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13515 <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>
13518 <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>
13522 Image with multiple widths -- use last
13524 [[File:Foobar.jpg|200px|300px|caption]]
13526 <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>
13529 <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>
13533 Image with multiple alignments -- use first (bug 48664)
13537 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13539 [[File:Foobar.jpg|middle|text-top|caption]]
13541 <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>
13542 <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>
13545 <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>
13546 <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>
13550 Image with width attribute at different positions
13552 [[File:Foobar.jpg|200px|right|Caption]]
13553 [[File:Foobar.jpg|right|200px|Caption]]
13554 [[File:Foobar.jpg|right|Caption|200px]]
13556 <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>
13557 <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>
13558 <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>
13561 <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>
13562 <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>
13563 <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>
13566 # a sad bit of backward-compatibility
13568 Image with size specified with pxpx (bug 13500, 51628)
13570 parsoid=wt2html,wt2wt,html2html
13572 [[File:Foobar.jpg|20pxpx]]
13573 [[File:Foobar.jpg|200x20pxpx]]
13575 <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>
13576 <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>
13579 <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>
13583 Image with link parameter, wiki target
13585 [[File:Foobar.jpg|link=Main Page]]
13587 <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>
13590 <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>
13593 # parsoid bug 49293 (part 1)
13595 Image with link parameter, URL target
13597 [[File:Foobar.jpg|link=http://example.com/]]
13599 <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>
13602 <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>
13605 # parsoid bug 49293 (part 2)
13607 Image with link parameter, protocol-less URL target
13609 [[File:Foobar.jpg|link=//example.com/]]
13611 <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>
13614 <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>
13618 Escaping non-block captions (T107435)
13621 "modes": ["wt2wt"],
13623 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13627 [[Image:Foobar.jpg|caption]]
13629 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13632 # wgExternalLinkTarget not supported by Parsoid
13634 Image with link parameter, wgExternalLinkTarget
13636 [[Image:foobar.jpg|link=http://example.com/]]
13638 wgExternalLinkTarget='foobar'
13640 <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>
13645 Image with link parameter, wgNoFollowLinks set to false
13647 [[Image:foobar.jpg|link=http://example.com/]]
13649 wgNoFollowLinks=false
13651 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13656 Image with link parameter, wgNoFollowDomainExceptions
13658 [[Image:foobar.jpg|link=http://example.com/]]
13660 wgNoFollowDomainExceptions='example.com'
13662 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13666 # wgExternalLinkTarget not supported by Parsoid
13668 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13670 [[Image:foobar.jpg|link=http://example.com/|Title]]
13672 wgExternalLinkTarget='foobar'
13674 <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>
13679 Image with empty link parameter
13681 [[File:Foobar.jpg|link=]]
13683 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13686 <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>
13690 Image with link parameter (wiki target) and unnamed parameter
13692 [[File:Foobar.jpg|link=Main_Page|Title]]
13694 <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>
13697 <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>
13701 Image with link parameter (URL target) and unnamed parameter
13703 [[File:Foobar.jpg|link=http://example.com/|Title]]
13705 <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>
13708 <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>
13712 Thumbnail image with link parameter
13715 parsoid=wt2html,wt2wt,html2html
13717 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13719 <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>
13722 <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>
13726 Manually-specified thumbnail image
13730 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13732 <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>
13735 <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>
13739 Manually-specified thumbnail image with explicit link to wiki page
13742 parsoid=wt2html,wt2wt,html2html
13744 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13746 <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>
13749 <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>
13753 Manually-specified thumbnail image with explicit link to url
13756 parsoid=wt2html,wt2wt,html2html
13758 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13760 <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>
13763 <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>
13767 Manually-specified thumbnail image with explicit no link
13770 parsoid=wt2html,wt2wt,html2html
13772 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13774 <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>
13777 <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>
13781 Manually-specified thumbnail image with explicit link and alt text
13784 parsoid=wt2html,wt2wt,html2html
13786 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13788 <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>
13791 <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>
13795 Image with frame and link
13797 parsoid=wt2html,wt2wt,html2html
13799 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13801 <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>
13804 <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>
13808 Image with frame and link and explicit alt
13810 parsoid=wt2html,wt2wt,html2html
13812 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13814 <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>
13817 <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>
13821 Image with wiki markup in implicit alt
13823 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13825 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13827 <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>
13828 </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>
13831 <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>
13833 <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>
13837 Alt image option should handle most kinds of wikitext without barfing
13839 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13841 <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>
13844 <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>
13847 ###################
13848 # Conflicting image format options.
13849 # First option specified should 'win'.
13850 # All three cases in each test should be identical.
13853 Image with 'frameless' first.
13855 parsoid=wt2html,wt2wt,html2html
13857 [[File:Foobar.jpg|frameless|caption]]
13859 [[File:Foobar.jpg|frameless|frame|caption]]
13861 [[File:Foobar.jpg|frameless|thumb|caption]]
13863 <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>
13864 </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>
13865 </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>
13868 <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>
13869 <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>
13870 <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>
13874 Image with 'frame' first.
13876 parsoid=wt2html,wt2wt,html2html
13878 [[File:Foobar.jpg|frame|caption]]
13879 [[File:Foobar.jpg|frame|frameless|caption]]
13880 [[File:Foobar.jpg|frame|thumb|caption]]
13882 <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>
13883 <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>
13884 <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>
13887 <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>
13888 <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>
13889 <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>
13893 Image with 'thumb' first.
13895 parsoid=wt2html,wt2wt,html2html
13897 [[File:Foobar.jpg|thumb|caption]]
13898 [[File:Foobar.jpg|thumb|frameless|caption]]
13899 [[File:Foobar.jpg|thumb|frame|caption]]
13901 <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>
13902 <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>
13903 <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>
13906 <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>
13907 <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>
13908 <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>
13911 ###################
13913 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13914 # and https://phabricator.wikimedia.org/T64258
13915 # Foobar has actual size of 1941x220
13916 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13917 # a scalable format.
13918 # 2. Framed images always ignore size options; always render at default size.
13919 # 3. "Unspecified format" and border are the only types which can be
13923 Image: "unspecified format" and border enlarge
13925 parsoid=wt2html,wt2wt,html2html
13927 [[File:Foobar.jpg|2000px]]
13929 [[File:Foobar.jpg|border|2000px]]
13931 <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>
13932 </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>
13935 <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>
13936 <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>
13940 Image: "unspecified format" and border reduce
13942 parsoid=wt2html,wt2wt,html2html
13944 [[File:Foobar.jpg|1000px]]
13946 [[File:Foobar.jpg|border|1000px]]
13948 <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>
13949 </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>
13952 <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>
13953 <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>
13957 Image: thumbs reduce
13959 parsoid=wt2html,wt2wt,html2html
13961 [[File:Foobar.jpg|thumb|50px]]
13963 <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>
13966 <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>
13970 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13972 parsoid=wt2html,wt2wt,html2html
13974 [[File:Foobar.jpg|thumb|2000px]]
13976 [[File:Foobar.svg|thumb|2000px]]
13978 <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>
13979 <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>
13982 <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>
13983 <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>
13987 Image: frameless can reduce in size
13989 parsoid=wt2html,wt2wt,html2html
13991 [[File:Foobar.jpg|frameless|50px]]
13993 <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>
13996 <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>
14000 Image: bitmap frameless can't be enlarged past original size, but vector can
14002 parsoid=wt2html,wt2wt,html2html
14004 [[File:Foobar.jpg|frameless|2000px]]
14006 [[File:Foobar.svg|frameless|2000px]]
14008 <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>
14009 </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>
14012 <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>
14013 <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>
14017 Image: framed images are always unscaled.
14019 parsoid=wt2html,wt2wt,html2html
14021 [[File:Foobar.jpg|frame]]
14023 [[File:Foobar.jpg|frame|50px]]
14025 [[File:Foobar.jpg|frame|50x50px]]
14027 [[File:Foobar.jpg|frame|2000px]]
14029 <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>
14030 <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>
14031 <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>
14032 <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>
14035 <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>
14036 <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>
14037 <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>
14038 <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>
14041 ###################
14044 Link to image page- image page normally doesn't exists, hence edit link
14045 Add test with existing image page
14046 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14050 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14055 bug 18784 Link to non-existent image page with caption should use caption as link text
14057 [[:Image:test|caption]]
14059 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14064 Frameless image caption with a free URL
14066 [[File:Foobar.jpg|http://example.com]]
14068 <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>
14071 <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>
14075 Thumbnail image caption with a free URL
14079 [[File:Foobar.jpg|thumb|http://example.com]]
14081 <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>
14084 <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>
14088 Thumbnail image caption with a free URL and explicit alt
14091 parsoid=wt2html,wt2wt,html2html
14093 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14095 <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>
14098 <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>
14102 SVG thumbnails with no language set
14105 [[File:Foobar.svg|thumb|caption]]
14107 <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>
14110 <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>
14114 SVG thumbnails with language de
14116 parsoid=wt2html,wt2wt,html2html
14118 [[File:Foobar.svg|thumb|caption|lang=de]]
14120 <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>
14123 <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>
14127 SVG thumbnails with invalid language code
14129 parsoid=wt2html,wt2wt,html2html
14131 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14133 <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>
14136 <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>
14140 BUG 1887: A ISBN with a thumbnail
14142 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14144 <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>
14147 <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>
14151 BUG 1887: A RFC with a thumbnail
14153 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14155 <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>
14158 <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>
14162 BUG 1887: A mailto link with a thumbnail
14164 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14166 <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>
14169 <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>
14172 # Pending resolution to bug 368
14174 BUG 648: Frameless image caption with a link
14176 [[File:Foobar.jpg|text with a [[link]] in it]]
14178 <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>
14181 <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>
14185 BUG 648: Frameless image caption with a link (suffix)
14187 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14189 <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>
14192 <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>
14196 BUG 648: Frameless image caption with an interwiki link
14198 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14200 <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>
14203 <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>
14207 BUG 648: Frameless image caption with a piped interwiki link
14209 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14211 <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>
14214 <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>
14218 T107474: Frameless image caption with <nowiki>
14220 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14222 <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>
14226 Escape HTML special chars in image alt text
14228 [[File:Foobar.jpg|& < > "]]
14230 <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>
14233 <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>
14237 Escape HTML special chars in image alt text with LanguageConverter
14241 [[File:Foobar.jpg|& < > "]]
14243 <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>
14246 <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>
14250 Entities in file name and attributes
14252 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14254 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14257 <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>
14261 BUG 499: Alt text should have Ӓ, not &1234;
14263 [[File:Foobar.jpg|♀]]
14265 <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>
14268 <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>
14272 Broken image caption with link
14274 parsoid=wt2html,wt2wt,html2html
14276 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14278 <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.
14281 <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>
14285 Image caption containing another image
14287 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14289 <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>
14292 <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>
14296 Image: caption containing a newline
14298 [[File:Foobar.jpg|This
14301 <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>
14304 <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>
14308 Image: caption containing leading space
14309 (The leading space should not trigger nowiki escaping in wt2wt mode)
14311 [[File:Foobar.jpg|thumb| bar]]
14313 <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>
14316 <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>
14320 Image: caption containing a table
14322 parsoid=wt2html,wt2wt,html2html
14324 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14330 and some more text.]]
14332 <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>
14335 <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
14338 <tr><th>Foo </th><th>Bar</th></tr>
14341 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14345 Bug 3090: External links other than http: in image captions
14347 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14349 <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>
14352 <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>
14358 parsoid=wt2html,wt2wt,html2html
14360 [[Image:foobar.jpg|a|class=b]]
14362 <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>
14365 <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>
14369 Localized image handling (1).
14371 parsoid=wt2html,wt2wt,html2html
14374 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14376 <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>
14379 <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>
14383 Localized image handling (2).
14386 parsoid=wt2html,wt2wt,html2html
14389 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14391 <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>
14394 <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>
14398 Localized image handling (3).
14403 <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>
14405 [[File:Foobar.jpg|بندانگشتی]]
14409 "border", "frameless" and "class" attributes on an image.
14412 parsoid=wt2html,wt2wt,html2html
14414 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14416 <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>
14419 <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>
14422 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14424 Invalid image attributes (bug 62500)
14427 parsoid=wt2html,wt2wt,html2html
14429 [[File:Foobar.jpg|thumb|float|left|caption]]
14431 [[File:Foobar.jpg|thumb|righ|caption]]
14433 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14435 <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>
14436 <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>
14437 <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>
14440 <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>
14441 <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>
14442 <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>
14448 #REDIRECT [[File:Barfoo.jpg]]
14451 # FIXME: Parsoid should run this test -- but we'd need to teach the
14452 # mockAPI about the redirected Barfoo.jpg image.
14456 [[Image:Barfoo.jpg]]
14458 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14463 Missing image with uploads disabled
14467 [[File:Foobaz.jpg]]
14469 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14472 <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>
14475 # Parsoid-specific testing for images
14476 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14477 # Currently imperfect due to a flaw in the Parsoid testrunner
14479 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14483 Parsoid-specific image handling - simple image with size and middle alignment
14485 [[File:Foobar.jpg|middle|50px]]
14487 <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>
14491 Parsoid-specific image handling - simple image with size, middle alignment,
14492 non-standard namespace alias
14494 parsoid=wt2wt,wt2html,html2html
14496 [[Image:Foobar.jpg|middle|50px]]
14498 <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>
14502 Parsoid-specific image handling - simple image with size and middle alignment
14505 [[File:Foobar.jpg|50px|middle]]
14507 <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>
14511 Parsoid-specific image handling - simple image with size and middle alignment
14512 and non-standard namespace name
14514 parsoid=wt2html,wt2wt,html2html
14516 [[Image:Foobar.jpg|50px|middle]]
14518 <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>
14522 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14524 [[File:Foobar.jpg|500x10px|baseline|caption]]
14526 <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>
14530 Parsoid-specific image handling - simple image with border and size spec
14532 [[File:Foobar.jpg|50px|border|caption]]
14534 <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>
14538 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14540 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14542 <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>
14546 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14549 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14551 <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>
14555 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14557 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14559 <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>
14563 Parsoid-specific image handling - thumbnail with specific size, halign,
14564 valign, and caption (existing content)
14566 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14568 <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>
14572 Parsoid-specific image handling - framed image with specific size and caption
14575 parsoid=wt2html,wt2wt,html2html
14577 [[File:Foobar.jpg|frame|500x50px|caption]]
14579 <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>
14583 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14586 parsoid=wt2html,wt2wt,html2html
14588 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14590 <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>
14594 Parsoid-specific image handling - frameless image with specific size, border, and caption
14596 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14598 <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>
14602 Parsoid-specific image handling - simple image with a formatted caption
14604 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14606 <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>
14610 Parsoid-specific image handling - caption with a template in it
14612 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14614 <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>
14618 Parsoid-specific image handling - caption with unbalanced tags in it
14620 parsoid=wt2html,wt2wt,html2html
14623 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14627 <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>
14632 Parsoid-specific image handling - empty caption (1)
14634 parsoid=wt2html,wt2wt
14636 [[File:Foobar.jpg|thumb|]]
14638 <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>
14641 # empty captions don't get serialized unless we're in the "round trip" case
14643 Parsoid-specific image handling - empty caption (2)
14647 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14648 <a href="./File:Foobar.jpg">
14649 <img resource="./File:Foobar.jpg"
14650 src="//example.com/images/3/3a/Foobar.jpg"
14651 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14652 height="25" width="220"/>
14654 <figcaption></figcaption>
14657 [[File:Foobar.jpg|thumb]]
14661 Parsoid-specific image handling - whitespace caption
14663 [[File:Foobar.jpg|thumb| ]]
14665 <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>
14669 Parsoid-specific image handling - lang option
14672 [[File:Foobar.svg|lang=de|caption]]
14676 <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>
14680 ## Edge case bugs in Parsoid from T93580
14682 T93580: 1. Templated <ref> inside block images
14684 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14688 <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>
14690 <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>
14694 T93580: 2. <ref> inside inline images
14696 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14700 <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>
14702 <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>
14706 T93580: 3. Templated <ref> inside inline images
14708 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14712 <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>
14714 <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>
14721 Subpage test/subpage
14729 subpage title=[[Subpage test]]
14733 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14738 Subpage noslash link
14740 subpage title=[[Subpage test]]
14744 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14749 Subpage test/1/2/subpage
14755 Relative subpage noslash link
14757 parsoid=wt2wt,wt2html,html2html
14758 subpage title=[[Subpage test/1/2/3/4]]
14764 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14765 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14768 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14769 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14773 Parsoid: dot-slash prefixed wikilinks
14783 </p><p>[[././baz/]]
14788 </p><p>[[././baz/]]
14793 Render invalid page names as plain text (bug 51090)
14806 [[{{echo|./../foo}}|bar]]
14807 [[{{echo|foo/.}}|bar]]
14808 [[{{echo|foo/..}}|bar]]
14809 [[{{echo|foo~~~~bar}}]]
14810 [[{{echo|foo>bar}}]]
14811 [[{{echo|foo././bar}}]]
14812 [[{{echo|foo{bar}}]]
14813 [[{{echo|foo}bar}}]]
14814 [[{{echo|foo[bar}}]]
14815 [[{{echo|foo]bar}}]]
14816 [[{{echo|foo<bar}}]]
14818 <p>[[./../foo|bar]]
14828 </p><p>[[./../foo|bar]]
14841 <p>[[./../foo|bar]]
14852 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14853 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14854 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14855 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14856 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14857 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14858 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14859 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14860 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14861 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14862 [[<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>
14870 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14875 BUG 561: {{/Subpage}}
14877 subpage title=[[Page]]
14881 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14889 Category:MediaWiki User's Guide
14897 [[:Category:MediaWiki User's Guide]]
14899 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14908 [[Category:MediaWiki User's Guide]]
14910 cat=MediaWiki_User's_Guide sort=
14912 <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"}}'/>
14916 PAGESINCATEGORY invalid title fatal (r33546 fix)
14918 {{PAGESINCATEGORY:<bogus>}}
14925 Category with different sort key
14929 [[Category:MediaWiki User's Guide|Foo]]
14931 cat=MediaWiki_User's_Guide sort=Foo
14933 <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"}}'/>
14937 Category with identical sort key
14941 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14943 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14945 <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"}}'/>
14949 Category with empty sort key
14954 [[Category:MediaWiki User's Guide|]]
14956 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14960 Category with empty sort key and parentheses
14965 [[Category:Foo (bar)|]]
14967 [[Category:Foo (bar)|Foo]]
14971 Category with link tail
14976 123[[Category:Foo]]456
14978 123[[Category:Foo]]456
14982 Category with template
14987 [[Category:{{echo|Foo}}]]
14989 [[Category:{{echo|Foo}}]]
14993 Category with template in sort key
14998 [[Category:Foo|{{echo|Bar}}]]
15000 [[Category:Foo|{{echo|Bar}}]]
15004 Category with template in sort key and title
15009 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15011 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15014 ## We used to, but no longer wt2wt this test since the default serializer
15015 ## will normalize all categories to serialize on their own line.
15016 ## This wikitext usage is going to be fairly uncommon in production and
15017 ## selser will take care of preserving formatting in those scenarios.
15019 Category / paragraph interactions
15023 Foo [[Category:Baz]] Bar
15025 Foo [[Category:Baz]]
15033 [[Category:Baz]] Bar
15046 {{echo|[[Category:Baz]]}}
15059 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15060 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15061 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15062 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15063 <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>
15064 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15067 ## We used to, but no longer wt2wt this test since the default serializer
15068 ## will normalize all categories to serialize on their own line.
15069 ## This wikitext usage is going to be fairly uncommon in production and
15070 ## selser will take care of preserving formatting in those scenarios.
15072 ## The whitespace on the empty line is part of the test. Please do not delete
15074 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15080 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15082 {{echo|[[Category:Foo]] and so should this!}}
15084 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15089 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15091 <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>
15094 ## Parsoid will not try to wt2wt this while preserving newlines because
15095 ## it suppresses excess newlines within list items -- and we don't want to
15096 ## introduce a special case just for categories, which is, in reality somewhat
15097 ## odd behavior -- categories are unlikely to be used in list items like this
15098 ## in top-level pages and are only likely to show up in template-generated
15099 ## list items where this RT-ing is a non-issue.
15101 ## The whitespace on the empty line is part of the test. Please do not delete
15103 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15109 [[Category:Foo]] and this should be part of the same list item
15112 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15114 <ul><li>This and this should be part of the same list item</li>
15115 <li>So should this and this should be part of the same list item</li></ul>
15118 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15119 <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>
15123 ## Newlines and categories that follow the last item of a list
15124 ## are treated differently because this (list followed by categories)
15125 ## is an extremely common pattern on wikis.
15127 3. Categories and newlines: newline suppression for last list item should RT properly
15140 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15142 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15143 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15147 4. Categories and newlines: newline suppression for last list item should RT properly
15155 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15157 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15160 ## only wt2html for this to make sure the algo only applies to the rightmost path
15162 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15175 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15177 <ul><li> d</li></ul></li></ul>
15178 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15181 ## We used to, but no longer wt2wt this test since the default serializer
15182 ## will normalize all categories to serialize on their own line.
15183 ## This wikitext usage is going to be fairly uncommon in production and
15184 ## selser will take care of preserving formatting in those scenarios.
15186 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15190 * a [[Category:Foo]]
15192 <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>
15195 # This test also demonstrates because of newline+category tunneling
15196 # through the list hander, template wrapping doesn't expand to the
15197 # containing list when the list item swallows the category.
15199 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15204 <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
15205 </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>
15209 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15213 {{echo|[[Category:Foo]]
15217 <ul><li> a</li></ul>
15219 <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">
15220 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15221 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15225 Category links with multiple namespaces
15227 [[Category:Project:Foo]]
15229 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15233 Parsoid: Serialize link to category page with colon escape
15239 [[:Category:Foo|Bar]]
15242 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15243 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15247 # We used to, but no longer wt2wt this test since the default serializer
15248 # will normalize all categories to serialize on their own line.
15249 # This wikitext usage is going to be fairly uncommon in production and
15250 # selser will take care of preventing whitespace insertion if this
15251 # occurs in an article.
15253 # html2html disabled for the same reason (whitespace insertion between
15256 # html2wt disabled because it localizes the "Category" namespace.
15258 Link prefix/suffixes aren't applied to category links
15268 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15272 Parsoid: Serialize link to file page with colon escape
15278 [[:File:Foo.png|Bar]]
15281 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15282 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15287 Parsoid: Serialize a genuine category link without colon escape
15292 [[Category:Foo|Bar]]
15294 <link rel="mw:PageProp/Category" href="./Category:Foo">
15295 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15299 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15303 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15305 [[Category:Toxine bactérienne]]
15309 Parsoid: Defaultsort
15311 {{DEFAULTSORT:Foo}}
15313 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15317 Parsoid: Defaultsort (template-generated)
15319 {{{{echo|DEFAULTSORT}}:Foo}}
15321 <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}}]}'/>
15325 ### Inter-language links
15328 Interlanguage links
15336 es:Alimento fr:Nourriture zh:食品
15338 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15339 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15340 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15344 Duplicate interlanguage links (bug 24502)
15355 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15356 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15357 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15358 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15365 Basic section headings
15372 ===Smaller headline===
15375 <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>
15378 <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>
15381 <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>
15387 Section headings with TOC
15390 === Subheadline 1 ===
15391 ===== Skipping a level =====
15392 ====== Skipping a level ======
15396 ===Another headline===
15398 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15400 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15402 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15404 <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>
15406 <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>
15413 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15415 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15421 <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>
15422 <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>
15423 <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>
15424 <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>
15425 <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>
15428 <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>
15433 TOC anchors don't collide
15441 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15443 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15444 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15445 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15446 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15450 <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>
15451 <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>
15452 <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>
15453 <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>
15457 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15459 Handling of sections up to level 6 and beyond
15462 == Level 2 Heading==
15463 === Level 3 Heading===
15464 ==== Level 4 Heading====
15465 ===== Level 5 Heading=====
15466 ====== Level 6 Heading======
15467 ======= Level 7 Heading=======
15468 ======== Level 8 Heading========
15469 ========= Level 9 Heading=========
15470 ========== Level 10 Heading==========
15472 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15474 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15476 <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>
15478 <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>
15480 <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>
15482 <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>
15484 <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>
15485 <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>
15486 <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>
15487 <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>
15488 <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>
15502 <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>
15503 <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>
15504 <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>
15505 <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>
15506 <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>
15507 <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>
15508 <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>
15509 <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>
15510 <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>
15511 <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>
15516 TOC regression (T11764)
15520 ==== title 1.1.1 ====
15525 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15527 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15529 <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>
15531 <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>
15534 <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>
15537 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15539 <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>
15545 <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>
15546 <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>
15547 <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>
15548 <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>
15549 <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>
15550 <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>
15555 TOC for heading containing <span id="..."></span> (T96153)
15558 ==<span id="old-anchor"></span>New title==
15560 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15562 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15566 <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>
15571 TOC with wgMaxTocLevel=3 (bug 6204)
15577 ==== title 1.1.1 ====
15582 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15584 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15586 <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>
15587 <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>
15590 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15592 <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>
15598 <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>
15599 <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>
15600 <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>
15601 <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>
15602 <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>
15603 <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>
15608 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15614 ====Section 1.1.1====
15615 ====Section 1.1.1.1====
15618 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15620 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15622 <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>
15625 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15629 <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>
15630 <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>
15631 <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>
15632 <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>
15633 <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>
15639 Resolving duplicate section names
15644 <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>
15645 <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>
15650 Resolving duplicate section names with differing case (bug 10721)
15655 <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>
15656 <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>
15668 Template with sections, __NOTOC__
15675 <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>
15676 <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>
15677 <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>
15678 <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>
15683 __NOEDITSECTION__ keyword
15689 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15690 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15695 Link inside a section heading
15697 ==Section with a [[Main Page|link]] in it==
15699 <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>
15704 TOC regression (T14077)
15711 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15713 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15715 <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>
15718 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15722 <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>
15723 <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>
15724 <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>
15729 BUG 1219 URL next to image (good)
15731 http://example.com [[File:Foobar.jpg]]
15733 <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>
15736 <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>
15740 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15743 The line above must have a trailing space!
15746 But just in case it doesn't...
15748 <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>
15749 <p>The line above must have a trailing space!
15751 <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>
15752 <p>But just in case it doesn't...
15757 Header with special characters (bug 25462)
15759 The tooltips shall not show entities to the user (ie. be double escaped)
15776 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15778 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15780 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15781 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15782 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15783 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15784 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15788 <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>
15791 <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>
15794 <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>
15797 <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>
15800 <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>
15806 Header with space, plus and underscore as entity
15808 Id should not contain + for spaces
15810 == Space between Text ==
15813 == Space-Entity between Text ==
15816 == Plus+between+Text ==
15819 == Plus-Entity+between+Text ==
15822 == Underscore_between_Text ==
15825 == Underscore-Entity_between_Text ==
15828 [[#Space between Text]]
15829 [[#Space-Entity between Text]]
15830 [[#Plus+between+Text]]
15831 [[#Plus-Entity+between+Text]]
15832 [[#Underscore_between_Text]]
15833 [[#Underscore-Entity_between_Text]]
15835 <p>Id should not contain + for spaces
15837 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15839 <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>
15840 <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>
15841 <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>
15842 <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>
15843 <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>
15844 <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>
15848 <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>
15851 <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>
15854 <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>
15857 <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>
15860 <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>
15863 <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>
15865 </p><p><a href="#Space_between_Text">#Space between Text</a>
15866 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15867 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15868 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15869 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15870 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15875 Headers with excess '=' characters
15876 (Are similar tests necessary beyond the 1st level?)
15880 =''italic'' heading==
15881 ==''italic'' heading=
15883 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15885 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15886 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15887 <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>
15888 <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>
15892 <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>
15893 <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>
15894 <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>
15895 <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>
15900 HTML headers vs TOC (bug 23393)
15901 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15913 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15915 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15917 <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>
15918 <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>
15921 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15923 <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>
15924 <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>
15930 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15931 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15932 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15933 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15934 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15935 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15940 Single-line or multiline-comments can follow headings
15942 parsoid=wt2html,wt2wt
15950 <h2><span class="mw-headline" id="foo">foo</span></h2>
15951 <h2><span class="mw-headline" id="bar">bar</span></h2>
15952 <h2><span class="mw-headline" id="baz">baz</span></h2>
15957 BUG 1219 URL next to image (broken)
15959 http://example.com[[File:Foobar.jpg]]
15961 <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>
15964 <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>
15968 Bug 1186 news: in the middle of text
15970 http://en.wikinews.org/wiki/Wikinews:Workplace
15972 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15978 Namespaced link must have a title
15987 Namespaced link must have a title (bad fragment version)
15989 [[Project:#fragment]]
15991 <p>[[Project:#fragment]]
15997 ### HTML tags and HTML attributes
16001 div with no attributes
16003 <div>HTML rocks</div>
16005 <div>HTML rocks</div>
16010 div with double-quoted attribute
16012 <div id="rock">HTML rocks</div>
16014 <div id="rock">HTML rocks</div>
16019 div with single-quoted attribute
16021 <div id='rock'>HTML rocks</div>
16023 <div id="rock">HTML rocks</div>
16028 div with unquoted attribute
16030 <div id=rock>HTML rocks</div>
16032 <div id="rock">HTML rocks</div>
16037 div with illegal double attributes
16039 <div id="a" id="b">HTML rocks</div>
16041 <div id="b">HTML rocks</div>
16046 div with empty attribute value, space before equals
16048 parsoid=wt2html,html2html
16050 <div class =>HTML rocks</div>
16052 <div class="">HTML rocks</div>
16055 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16059 div with multiple empty attribute values
16061 parsoid=wt2html,html2html
16063 <div id= title=>HTML rocks</div>
16065 <div id="title.3D">HTML rocks</div>
16068 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16072 table with multiple empty attribute values
16074 parsoid=wt2html,html2html
16080 <table title="id=">
16086 <table title="id=">
16087 <tbody><tr><td> hi</td></tr>
16092 div with braces in attribute value
16094 <div title="{}">Foo</div>
16096 <div title="{}">Foo</div>
16099 <div title="{}">Foo</div>
16103 div with empty attribute value, no space before equals
16105 parsoid=wt2html,html2html
16107 <div class=>HTML rocks</div>
16109 <div class="">HTML rocks</div>
16112 <div class="">HTML rocks</div>
16116 HTML multiple attributes correction
16118 <p class="error" class="awesome">Awesome!</p>
16120 <p class="awesome">Awesome!</p>
16125 Table multiple attributes correction
16128 !+ class="error" class="awesome"| status
16133 <th class="awesome"> status
16141 <DIV ID="x">HTML ROCKS</DIV>
16143 <div id="x">HTML ROCKS</div>
16148 Non-ASCII pseudo-tags are rendered as text
16157 Pseudo-tag with URL 'name' renders as url link
16159 <http://example.com/>
16161 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16166 text with amp in the middle of nowhere
16170 <p>Remember AT&T?
16175 text with character entity: eacute
16177 I always thought é was a cute letter.
16179 <p>I always thought é was a cute letter.
16182 <p>I always thought é was a cute letter.</p>
16186 text with entity-escaped character entity-like string: eacute
16188 I always thought &eacute; was a cute letter.
16190 <p>I always thought &eacute; was a cute letter.
16195 text with undefined character entity: xacute
16197 I always thought &xacute; was a cute letter.
16199 <p>I always thought &xacute; was a cute letter.
16206 <data value="5">five</data>
16207 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16208 <mark>This highlighted text</mark>
16210 <p><data value="5">five</data>
16211 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16212 <mark>This highlighted text</mark>
16217 HTML tag with leading space is parsed as text
16221 <p>< div>foo< /div>
16226 ### Nesting tests (see bug 41545, 50604, 51081)
16229 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16230 # Note that html2wt is considerably more difficult if we use <b> in
16231 # the test case, instead of <big>
16233 Ensure that HTML adoption agency algorithm is properly implemented.
16235 <big>X<big>Y</big>Z</big>
16237 <p><big>X<big>Y</big>Z</big>
16241 # This was bug 41545 in the PHP parser.
16242 # Note that tidy doesn't handle this correctly.
16246 <kbd>X<kbd>Y</kbd>Z</kbd>
16248 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16252 # The following cases were bug 51081 in the PHP parser.
16253 # Note that there are some other nestable tags (b, i, etc) which are
16254 # not covered; see bug 51081 for discussion.
16256 # Note that tidy doesn't handle this correctly.
16260 <em>X<em>Y</em>Z</em>
16262 <p><em>X<em>Y</em>Z</em>
16266 # Note that tidy doesn't handle this correctly.
16268 Nesting of <strong>
16270 <strong>X<strong>Y</strong>Z</strong>
16272 <p><strong>X<strong>Y</strong>Z</strong>
16281 <p><q>X<q>Y</q>Z</q></p>
16284 # Note that tidy doesn't handle this correctly.
16288 <ruby>X<ruby>Y</ruby>Z</ruby>
16290 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16294 # Note that tidy doesn't handle this correctly.
16298 <bdo>X<bdo>Y</bdo>Z</bdo>
16300 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16312 [[Media:Foobar.jpg]]
16314 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16319 Media link with text
16321 [[Media:Foobar.jpg|A neat file to look at]]
16323 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16327 # FIXME: this is still bad HTML tag nesting
16328 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16330 Media link with nasty text
16332 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16334 <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>
16337 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16338 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16342 Media link to nonexistent file (bug 1702)
16344 [[Media:No such.jpg]]
16346 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16351 Image link to nonexistent file (bug 1850 - good)
16353 [[File:No_such.jpg]]
16355 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16358 <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>
16362 :Image link to nonexistent file (bug 1850 - bad)
16364 [[:Image:No such.jpg]]
16366 <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>
16369 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16375 Character reference normalization in link text (bug 1938)
16377 [[Main Page|this&that]]
16379 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16386 Test for unicode normalization
16388 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16392 (bug 19451) Links should refer to the normalized form.
16400 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16401 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16402 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16403 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16404 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16409 Empty attribute crash test (bug 2067)
16411 <font color="">foo</font>
16413 <p><font color="">foo</font>
16418 Empty attribute crash test single-quotes (bug 2067)
16420 <font color=''>foo</font>
16422 <p><font color="">foo</font>
16427 Attribute test: equals, then nothing
16429 parsoid=wt2html,html2html
16431 <font color=>foo</font>
16433 <p><font color="">foo</font>
16436 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16440 Attribute test: unquoted value
16442 parsoid=wt2html,html2html
16444 <font color=x>foo</font>
16446 <p><font color="x">foo</font>
16449 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16453 Attribute test: unquoted but illegal value (hash)
16455 <font color=#x>foo</font>
16457 <p><font color="#x">foo</font>
16461 # Parsoid does not serialize to empty attribute syntax,
16462 # so wt2wt and html2wt cases are skipped
16464 Attribute test: no value (T54330)
16466 parsoid=wt2html,html2html
16468 <font color>foo</font>
16470 <p><font color="">foo</font>
16473 <p><font color="">foo</font></p>
16477 Bug 2095: link with three closing brackets
16481 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16484 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16488 Bug 2095: link with pipe and three closing brackets
16490 [[Main Page|link]]]
16492 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16495 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16499 Bug 2095: link with pipe and three closing brackets, version 2
16501 [[Main Page|[http://example.com/]]]
16503 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16506 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16515 Template:Dangerous attribute
16517 " onmouseover="alert(document.cookie)
16521 Template:Dangerous style attribute
16523 border-size: expression(alert(document.cookie))
16529 <div style="float: right; {{{1}}}">Magic div</div>
16533 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16535 <div title="{{test}}"></div>
16537 <div title="This is a test template"></div>
16540 <div title="This is a test template" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"This is a test template"},"sa":{"title":"{{test}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,20,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"test\",\"href\":\"./Template:Test\"},\"params\":{},\"i\":0}}]}'>This is a test template</span>"}]]}'></div>
16543 # Parsoid has enough context to handle this case
16545 Bug 2304: HTML attribute safety (dangerous template; 2309)
16547 <div title="{{dangerous attribute}}"></div>
16549 <div title=""></div>
16552 <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>
16556 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16558 <div style="{{dangerous style attribute}}"></div>
16560 <div style="/* insecure input */"></div>
16563 <div style="/* insecure input */" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"{{dangerous style attribute}}"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,41,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}'>border-size: expression(alert(document.cookie))</span>"}]]}'></div>
16567 Bug 2304: HTML attribute safety (safe parameter; 2309)
16569 {{div style|width: 200px}}
16571 <div style="float: right; width: 200px">Magic div</div>
16574 <div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
16578 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16580 {{div style|width: expression(alert(document.cookie))}}
16582 <div style="/* insecure input */">Magic div</div>
16585 <div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
16588 ## Parsoid output here differs; needs investigation.
16590 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16592 {{div style|"><script>alert(document.cookie)</script>}}
16594 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16598 ## Parsoid output here differs; needs investigation.
16600 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16602 {{div style|" ><script>alert(document.cookie)</script>}}
16604 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16609 Bug 2304: HTML attribute safety (link)
16611 <div title="[[Main Page]]"></div>
16613 <div title="[[Main Page]]"></div>
16618 Bug 2304: HTML attribute safety (italics)
16620 <div title="''foobar''"></div>
16622 <div title="''foobar''"></div>
16627 Bug 2304: HTML attribute safety (bold)
16629 <div title="'''foobar'''"></div>
16631 <div title="'''foobar'''"></div>
16636 Bug 2304: HTML attribute safety (ISBN)
16638 <div title="ISBN 1234567890"></div>
16640 <div title="ISBN 1234567890"></div>
16645 Bug 2304: HTML attribute safety (RFC)
16647 <div title="RFC 1234"></div>
16649 <div title="RFC 1234"></div>
16654 Bug 2304: HTML attribute safety (PMID)
16656 <div title="PMID 1234567890"></div>
16658 <div title="PMID 1234567890"></div>
16663 Bug 2304: HTML attribute safety (web link)
16665 <div title="http://example.com/"></div>
16667 <div title="http://example.com/"></div>
16672 Bug 2304: HTML attribute safety (named web link)
16674 <div title="[http://example.com/ link]"></div>
16676 <div title="[http://example.com/ link]"></div>
16681 Bug 3244: HTML attribute safety (extension; safe)
16683 <div style="<nowiki>background:blue</nowiki>"></div>
16685 <div style="background:blue"></div>
16688 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
16692 Bug 3244: HTML attribute safety (extension; unsafe)
16694 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16696 <div style="/* insecure input */"></div>
16699 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
16702 # More MSIE fun discovered by Tom Gilder
16705 MSIE CSS safety test: spurious slash
16707 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16709 <div style="/* insecure input */">evil</div>
16712 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
16716 MSIE CSS safety test: hex code
16718 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16720 <div style="/* insecure input */">evil</div>
16723 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
16727 MSIE CSS safety test: comment in url
16729 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16731 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16734 <div style="background-image:u rl(javascript:alert('boo'))" data-parsoid='{"stx":"html","a":{"style":"background-image:u rl(javascript:alert('boo'))"},"sa":{"style":"background-image:u/**/rl(javascript:alert('boo'))"}}'>evil</div>
16738 MSIE CSS safety test: comment in expression
16740 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16742 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16745 <div style="background-image:expres sion(alert('boo4'))" data-parsoid='{"stx":"html","a":{"style":"background-image:expres sion(alert('boo4'))"},"sa":{"style":"background-image:expres/**/sion(alert('boo4'))"}}'>evil4</div>
16749 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16751 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16753 <p style="/* invalid control char */">A</p>
16756 <p style="/* invalid control char */" data-parsoid='{"stx":"html","a":{"style":"/* invalid control char */"},"sa":{"style":"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)"}}'>A</p>
16760 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16762 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16763 <div style="top:EXPRESSION(alert())">B</div>
16765 <p style="/* insecure input */">A</p>
16766 <div style="/* insecure input */">B</div>
16769 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
16770 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
16774 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16776 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16777 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16779 <div style="/* insecure input */">A</div>
16780 <p style="/* insecure input */">B</p>
16783 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
16784 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')"}}'>B</p>
16788 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16790 <div style="background-image:url⁽javascript:alert())">A</div>
16791 <div style="background-image:url₍javascript:alert())">B</div>
16792 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16794 <div style="/* insecure input */">A</div>
16795 <div style="/* insecure input */">B</div>
16796 <p style="/* insecure input */">C</p>
16799 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
16800 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
16801 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
16807 parsoid=wt2html,html2html
16810 title="data:text/html,<img src=1 onerror=alert(1)>"
16811 style="-o-link:attr(title);-o-link-source:current">X</div>
16813 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16816 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */" data-parsoid='{"stx":"html","a":{"title":"data:text/html,<img src=1 onerror=alert(1)>","style":"/* insecure input */"},"sa":{"title":"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;","style":"-o-link:attr(title);-o-link-source:current"}}'>X</div>
16820 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16822 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16823 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16824 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16825 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16826 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16827 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16828 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16830 <p style="/* insecure input */">A</p>
16831 <p style="/* insecure input */">B</p>
16832 <p style="/* insecure input */">C</p>
16833 <p style="/* insecure input */">D</p>
16834 <p style="/* insecure input */">E</p>
16835 <p style="/* insecure input */">F</p>
16836 <p style="/* insecure input */">G</p>
16839 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title='XSSed'),'red')"}}'>A</p>
16840 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title='XSSed'),'red')"}}'>B</p>
16841 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>C</p>
16842 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresヽion((title='XSSed'),'red')"}}'>D</p>
16843 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹽion((title='XSSed'),'red')"}}'>E</p>
16844 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹼion((title='XSSed'),'red')"}}'>F</p>
16845 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>G</p>
16849 Table attribute legitimate extension
16852 !+ style="<nowiki>color:blue</nowiki>"| status
16857 <th style="color:blue"> status
16863 Table attribute safety
16866 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16871 <th style="/* insecure input */"> status
16877 CSS line continuation 1
16879 <div style="background-image: u\ rl(test.jpg);"></div>
16881 <div style="/* insecure input */"></div>
16886 CSS line continuation 2
16888 <div style="background-image: u\ rl(test.jpg); "></div>
16890 <div style="/* invalid control char */"></div>
16901 Expansion of multi-line templates in attribute values (bug 6255)
16903 <div style="background: {{identity|#00FF00}}">-</div>
16905 <div style="background: #00FF00">-</div>
16910 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16912 <div style="background:
16915 <div style="background: #00FF00">-</div>
16918 <div style="background:
16923 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16925 <div style="background: #00FF00">-</div>
16927 <div style="background: #00FF00">-</div>
16932 Tags which are hidden from Tidy cannot pass through the Sanitizer
16934 <mw:toc><script>alert();</script></mw:toc>
16936 <p><mw:toc><script>alert();</script></mw:toc></p>
16940 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16944 Parser hook: empty input
16955 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16958 ## Don't expect parsoid to rt this form.
16960 Parser hook: empty input using terminated empty elements
16962 parsoid=wt2html,html2html
16973 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16977 Parser hook: empty input using terminated empty elements (space before)
16988 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16992 Parser hook: basic input
17003 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17006 ## Don't expect parsoid to rt this form.
17008 Parser hook: case insensitive
17010 parsoid=wt2html,html2html
17021 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17024 ## Don't expect parsoid to rt this form.
17026 Parser hook: case insensitive, redux
17028 parsoid=wt2html,html2html
17039 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17043 Parser hook: nested tags
17045 <tag><tag></tag></tag>
17054 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17058 Parser hook: basic arguments
17060 <tag width="200" height="100" depth="50" square=""></tag>
17073 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17076 ## Don't expect parsoid to rt this form.
17078 Parser hook: basic arguments, variations
17080 parsoid=wt2html,html2html
17082 <tag width=200 height = "100" depth = '50' square></tag>
17095 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17099 Parser hook: argument containing a forward slash (bug 5344)
17101 <tag filename="/tmp/bla"></tag>
17106 'filename' => '/tmp/bla',
17111 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17114 ## Don't expect parsoid to rt this form.
17116 Parser hook: empty input using terminated empty elements (bug 2374)
17118 parsoid=wt2html,html2html
17130 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17133 ## </tag> should be output literally since there is no matching tag that begins it
17134 ## Don't expect parsoid to rt this form.
17136 Parser hook: basic arguments using terminated empty elements (bug 2374)
17140 <tag width=200 height = "100" depth = '50' square/>
17157 <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
17161 ## Don't expect parsoid to rt this form.
17163 Parser hook: Don't allow unclosed extension tags
17169 this is a '''test'''
17171 <p>test <tag>123
17172 </p><p>this is a <b>test</b>
17175 <p>test <tag>123</p>
17177 <p>this is a <b>test</b></p>
17181 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17185 Parser hook: static parser hook not inside a comment
17187 <statictag>hello, world</statictag>
17189 <statictag action="flush" />
17195 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17196 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17200 Parser hook: static parser hook inside a comment
17202 <!-- <statictag>hello, world</statictag> -->
17203 <statictag action="flush" />
17208 <!-- <statictag>hello, world</statictag> -->
17209 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17212 # Nested template calls; this case was broken by Parser.php rev 1.506,
17216 Template:One-parameter
17218 (My parameter is: {{{1}}})
17222 Template:Map-one-parameter
17224 {{{{{1}}}|{{{2}}}}}
17228 Nested template calls
17230 {{Map-one-parameter|One-parameter|param}}
17232 <p>(My parameter is: param)
17241 # HTML+Tidy effectively strips out the empty tags completely
17242 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17243 # which Tidy would have done for the PHP parser had there been content inside it.
17245 Sanitizer: Closing of open tags
17247 <s></s><table></table>
17249 <s></s><table></table>
17252 <p><s></s></p><table></table>
17256 Sanitizer: Closing of open but not closed tags
17265 Sanitizer: Closing of closed but not open tags
17275 Sanitizer: Closing of closed but not open table tags
17279 Table not started</td></tr></table>
17281 <p>Table not started</p>
17283 <p>Table not started</p>
17287 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17289 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17291 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17294 <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>
17297 # In HTML5, the restrictions are that id must contain at least one character,
17298 # and must not contain any space characters.
17300 Sanitizer: Validating the contents of the id attribute (bug 4515)
17304 <br id="" /><br id="a space" />
17309 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17311 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17315 <br id="foo" /><br id="foo" />
17317 Something need to be done. foo-2 ?
17321 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17324 <meta itemprop="hello" content="world">
17325 <meta http-equiv="refresh" content="5">
17326 <meta itemprop="hello" http-equiv="refresh" content="5">
17327 <link itemprop="hello" href="{{SERVER}}">
17328 <link rel="stylesheet" href="{{SERVER}}">
17329 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17333 <p> <meta itemprop="hello" content="world" />
17334 <meta http-equiv="refresh" content="5">
17335 <meta itemprop="hello" content="5" />
17337 <link itemprop="hello" href="http://example.org" />
17338 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17339 <link itemprop="hello" href="http://example.org" />
17345 Language converter: output gets cut off unexpectedly (bug 5757)
17349 this bit is safe: }-
17351 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17353 then we get cut off here: }-
17355 all additional text is vanished
17357 <p>this bit is safe: }-
17358 </p><p>but if we add a conversion instance: xxx
17359 </p><p>then we get cut off here: }-
17360 </p><p>all additional text is vanished
17365 Self closed html pairs (bug 5487)
17368 <center><font id="bug" />Centered text</center>
17369 <div><font id="bug2" />In div text</div>
17371 <center><font id="bug" />Centered text</center>
17372 <div><font id="bug2" />In div text</div>
17381 Punctuation: nbsp before exclamation
17385 <p>C'est grave !
17390 Punctuation: CSS !important (bug 11874)
17392 <div style="width:50% !important">important</div>
17394 <div style="width:50% !important">important</div>
17399 Punctuation: CSS ! important (bug 11874; with space after)
17401 <div style="width:50% ! important">important</div>
17403 <div style="width:50% ! important">important</div>
17408 HTML bullet list, closed tags (bug 5497)
17421 <ul data-parsoid='{"stx":"html"}'>
17422 <li data-parsoid='{"stx":"html"}'>One</li>
17423 <li data-parsoid='{"stx":"html"}'>Two</li>
17429 HTML bullet list, unclosed tags (bug 5497)
17441 <ul data-parsoid='{"stx":"html"}'>
17442 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17443 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17449 HTML ordered list, closed tags (bug 5497)
17462 <ol data-parsoid='{"stx":"html"}'>
17463 <li data-parsoid='{"stx":"html"}'>One</li>
17464 <li data-parsoid='{"stx":"html"}'>Two</li>
17470 HTML ordered list, unclosed tags (bug 5497)
17483 <ol data-parsoid='{"stx":"html"}'>
17484 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17485 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17491 HTML nested bullet list, closed tags (bug 5497)
17514 <ul data-parsoid='{"stx":"html"}'>
17515 <li data-parsoid='{"stx":"html"}'>One</li>
17516 <li data-parsoid='{"stx":"html"}'>Two:
17517 <ul data-parsoid='{"stx":"html"}'>
17518 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17519 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17526 HTML nested bullet list, open tags (bug 5497)
17563 HTML nested ordered list, closed tags (bug 5497)
17588 HTML nested ordered list, open tags (bug 5497)
17625 HTML ordered list item with parameters oddity
17627 <ol><li id="fragment">One</li>
17630 <ol><li id="fragment">One</li>
17635 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17637 bug 5918: autonumbering
17639 [http://first/] [http://second] [ftp://ftp]
17643 [mailto:enclosed@mail.tld With target]
17645 [mailto:enclosed@mail.tld]
17647 mailto:inline@mail.tld
17649 <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>
17650 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17651 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17652 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17653 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17656 <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>
17657 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17658 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17659 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17660 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17665 # Security and HTML correctness
17666 # From Nick Jenkins' fuzz testing
17670 Fuzz testing: Parser13
17685 Fuzz testing: Parser14
17690 <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>
17691 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17693 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17699 <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>
17701 <div id="toc" class="toc">
17702 <div id="toctitle">
17706 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17713 Fuzz testing: Parser14-table
17715 parsoid=wt2html,html2html
17720 <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>
17721 <table style="__TOC__">
17726 <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>
17727 <table style="__TOC__">
17734 <table style="__TOC__"></table>
17737 # Known to produce bogus xml (extra </td>)
17739 Fuzz testing: Parser16
17766 Fuzz testing: Parser21
17769 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17774 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17784 Fuzz testing: Parser22
17786 http://===r:::https://b
17790 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17798 # Known to produce bad XML for now
17800 Fuzz testing: Parser24
17807 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17808 <br style="onmouseover='alert(document.cookie);' " />
17810 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17815 <u class="|">}}}} >
17816 <br style="onmouseover='alert(document.cookie);'" />
17818 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17826 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
17827 <u class="|" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":""},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}","html":"{<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[21,79,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->&lt;noinclude>\"},\"params\":{},\"i\":0}}]}'>{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}</span>}"},{"html":""}]]}'>
17828 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":""},"autoInsertedEnd":true,"autoInsertedStart":true}' data-mw='{"attribs":[[{"txt":"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}","html":"{<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[21,79,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->&lt;noinclude>\"},\"params\":{},\"i\":0}}]}'>{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}</span>}"},{"html":""}]]}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
17832 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
17835 # Note: the current result listed for this is not what the original one was,
17836 # but the original bug was JavaScript injection, which is fixed in any case.
17837 # It's not clear that the original result listed was any more correct than the
17838 # current one. Original result:
17841 # <li class="||">
17842 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17844 Fuzz testing: Parser25 (bug 6055)
17850 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17852 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17855 <span about="#mwt1" typeof="mw:Param" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"},{"k":"3"}]]}' data-mw='{"parts":[{"templatearg":{"target":{"wt":"\n"},"params":{"1":{"wt":" \n<LI CLASS="},"2":{"wt":""},"3":{"wt":"\n >\n"}},"i":0}},"blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE"]}'>
17856 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
17860 Fuzz testing: URL adjacent extension (with space, clean)
17862 http://example.com <nowiki>junk</nowiki>
17864 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17867 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17871 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17873 http://example.com<nowiki>junk</nowiki>
17875 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17878 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17882 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17884 http://example.com<pre>junk</pre>
17886 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17889 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17894 <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>
17898 Fuzz testing: image with bogus manual thumbnail
17900 [[Image:foobar.jpg|thumbnail= ]]
17902 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17905 <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>
17909 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17911 <pre dir=" "></pre>
17913 <pre dir=" "></pre>
17918 Parsing optional HTML elements (Bug 6171)
17923 <td> Some tabular data</td>
17924 <td> More tabular data ...
17925 <td> And yet som tabular data</td>
17931 <td> Some tabular data</td>
17932 <td> More tabular data ...
17933 </td><td> And yet som tabular data</td>
17940 Correct handling of <td>, <tr> (Bug 6171)
17945 <td> Some tabular data</td>
17946 <td> More tabular data ...</td>
17947 <td> And yet som tabular data</td>
17953 <td> Some tabular data</td>
17954 <td> More tabular data ...</td>
17955 <td> And yet som tabular data</td>
17963 Parsing crashing regression (fr:JavaScript)
17967 <p></body></x>
17972 Inline wiki vs wiki block nesting
17978 <p><b>Bold paragraph</b>
17979 </p><p>New wiki paragraph
17983 # FIXME: The current php output is documented
17984 # and desired output is the parsoid target.
17986 Inline HTML vs wiki block nesting
17992 <p><b>Bold paragraph
17993 </p><p>New wiki paragraph</b>
17996 <p><b>Bold paragraph</b>
17997 </p><p>New wiki paragraph
18001 # Original result was this:
18002 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18004 # While that might be marginally more intuitive, maybe, the six-apostrophe
18005 # construct is clearly pathological and the result stated here (which is what
18006 # the parser actually does) is about as reasonable as anything.
18008 Mixing markup for italics and bold
18011 '''bold''''''bold''bolditalics'''''
18013 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18021 Article for special page transclusion test
18025 Special page transclusion
18028 {{Special:Prefixindex/Xyzzyx}}
18030 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18036 Special page transclusion twice (bug 5021)
18039 {{Special:Prefixindex/Xyzzyx}}
18040 {{Special:Prefixindex/Xyzzyx}}
18042 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18044 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18050 Transclusion of default MediaWiki message
18052 {{MediaWiki:Mainpage}}
18059 Transclusion of nonexistent MediaWiki message
18061 {{MediaWiki:Mainpagexxx}}
18063 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18068 Transclusion of MediaWiki message with underscore
18070 {{MediaWiki:history_short}}
18077 Transclusion of MediaWiki message with space
18079 {{MediaWiki:history short}}
18086 Invalid header with following text
18096 Section extraction test (section 0)
18116 Section extraction test (section 1)
18138 Section extraction test (section 2)
18159 Section extraction test (section 3)
18179 Section extraction test (section 4)
18203 Section extraction test (section 5)
18223 Section extraction test (section 6)
18244 Section extraction test (section 7)
18264 Section extraction test (section 8)
18284 Section extraction test (section 9)
18305 Section extraction test (section 10)
18325 Section extraction test (nonexistent section 11)
18344 Section extraction test with bogus heading (section 1)
18349 ==bogus== not a legal section
18353 ==bogus== not a legal section
18357 Section extraction test with bogus heading (section 2)
18362 ==bogus== not a legal section
18369 Section extraction test with comment after heading (section 1)
18381 Section extraction test with comment after heading (section 2)
18393 Section extraction test with bogus <nowiki> heading (section 1)
18398 ==bogus== <nowiki>not a legal section</nowiki>
18402 ==bogus== <nowiki>not a legal section</nowiki>
18406 Section extraction test with bogus <nowiki> heading (section 2)
18411 ==bogus== <nowiki>not a legal section</nowiki>
18417 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18418 # instead of respecting commented sections
18420 Section extraction prefixed by comment (section 1)
18431 Section extraction prefixed by comment (section 2)
18441 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18442 # instead of respecting HTML-style headings
18444 Section extraction, mixed wiki and html (section 1)
18460 Section extraction, mixed wiki and html (section 2)
18476 # Formerly testing for bug 3342
18478 Section extraction, heading surrounded by <noinclude>
18482 <noinclude>==unmarked==</noinclude>
18488 # Test behavior of bug 19910
18490 Sectiion with all-equals
18495 The line above must have a trailing space
18498 But just in case it doesn't...
18502 But just in case it doesn't...
18506 Section replacement test (section 0)
18537 Section replacement test (section 1)
18566 Section replacement test (section 2)
18596 Section replacement test (section 3)
18627 Section replacement test (section 4)
18654 Section replacement test (section 5)
18685 Section replacement test (section 6)
18715 Section replacement test (section 7)
18746 Section replacement test (section 8)
18777 Section replacement test (section 9)
18806 Section replacement test (section 10)
18836 Section replacement test with initial whitespace (bug 13728)
18840 Preformatted initial line
18844 Preformatted initial line
18851 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18863 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18876 Section extraction, <pre> around bogus header (bug 10309)
18893 Section replacement, <pre> around bogus header (bug 10309)
18914 Handling of 
 in URLs
18918 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18921 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul></li></ul>
18925 Handling of %0A in URLs
18929 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18932 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18935 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18937 5 quotes, code coverage +1 line
18944 <p><b><i></i></b></p>
18947 # same html as previous, but wikitext adjusted to match parsoid html2wt
18948 # note that wt2html and html2html will put the <i> before the <b>
18950 5 quotes, code coverage +1 line w/ nowiki (1)
18952 parsoid=wt2wt,html2wt
18954 '''''<nowiki/>'''''
18959 <p><b><i></i></b></p>
18962 # same as previous, just swapping the <i> and <b>
18964 5 quotes, code coverage +1 line w/ nowiki (2)
18966 '''''<nowiki/>'''''
18971 <p><i><b></b></i></p>
18975 Special:Search page linking.
18979 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18984 {{!}} is a magic word
18986 {{!}} is a magic word there and {{!}} is still a magic word here
18987 | is not a magic word here but {{!}} is still a magic word here
18989 <p>| is a magic word there and | is still a magic word here
18990 | is not a magic word here but | is still a magic word here
18993 <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
18994 | 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>
19001 title=[[Parser test]]
19006 * {{FULLPAGENAMEE}}
19008 * {{BASEPAGENAMEE}}
19012 * {{ROOTPAGENAMEE}}
19014 * {{TALKPAGENAMEE}}
19015 * {{SUBJECTPAGENAME}}
19016 * {{SUBJECTPAGENAMEE}}
19019 * {{NAMESPACENUMBER}}
19023 * {{SUBJECTSPACEE}}
19024 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19026 <ul><li> Parser test</li>
19027 <li> Parser_test</li>
19028 <li> Parser test</li>
19029 <li> Parser_test</li>
19030 <li> Parser test</li>
19031 <li> Parser_test</li>
19032 <li> Parser test</li>
19033 <li> Parser_test</li>
19034 <li> Parser test</li>
19035 <li> Parser_test</li>
19036 <li> Talk:Parser test</li>
19037 <li> Talk:Parser_test</li>
19038 <li> Parser test</li>
19039 <li> Parser_test</li>
19047 <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>
19050 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19052 ## Parsoid thinks the "centre" here is a property, not a caption.
19057 "modes": ["wt2html"],
19058 "nativeGallery": true
19066 image4 |300px| centre
19067 image5.svg| http://///////
19072 <ul class="gallery mw-gallery-traditional">
19073 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19074 <div class="thumb" style="height: 150px;">Image1.png</div>
19075 <div class="gallerytext">
19078 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19079 <div class="thumb" style="height: 150px;">Image2.gif</div>
19080 <div class="gallerytext">
19083 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19084 <div class="thumb" style="height: 150px;">Image3</div>
19085 <div class="gallerytext">
19088 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19089 <div class="thumb" style="height: 150px;">Image4</div>
19090 <div class="gallerytext">
19095 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19096 <div class="thumb" style="height: 150px;">Image5.svg</div>
19097 <div class="gallerytext">
19098 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19102 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19103 <div class="thumb" style="height: 150px;">* image6</div>
19104 <div class="gallerytext">
19110 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19111 <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>
19112 <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>
19113 <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>
19114 <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>
19115 <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>
19116 <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>
19121 Gallery (with options, html)
19124 "modes": ["wt2html", "html2html"],
19125 "nativeGallery": true
19128 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19129 File:Nonexistent.jpg|caption
19130 File:Nonexistent.jpg
19131 image:foobar.jpg|some '''caption''' [[Main Page]]
19133 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19136 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19137 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19138 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19139 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19140 <div class="gallerytext">
19145 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19146 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19147 <div class="gallerytext">
19150 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19151 <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>
19152 <div class="gallerytext">
19153 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19157 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19158 <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>
19159 <div class="gallerytext">
19162 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19163 <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>
19164 <div class="gallerytext">
19172 <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":{}}'>
19173 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19174 <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>
19175 <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>
19176 <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>
19177 <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>
19178 <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>
19183 Gallery (with options, extsrc)
19186 "nativeGallery": false
19189 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19190 File:Nonexistent.jpg|caption
19191 File:Nonexistent.jpg
19192 image:foobar.jpg|some '''caption''' [[Main Page]]
19194 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19197 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19198 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19199 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19200 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19201 <div class="gallerytext">
19206 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19207 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19208 <div class="gallerytext">
19211 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19212 <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>
19213 <div class="gallerytext">
19214 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19218 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19219 <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>
19220 <div class="gallerytext">
19223 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19224 <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>
19225 <div class="gallerytext">
19233 <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"}}'>
19234 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19235 <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>
19236 <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>
19237 <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>
19238 <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>
19239 <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>
19244 Gallery with link that has fragment
19247 "modes": ["wt2html", "html2html"],
19248 "nativeGallery": true
19252 image:foobar.jpg|link=Main_Page
19253 image:foobar.jpg|link=Main_Page#section
19254 image:foobar.jpg|link=Main Page#section|caption
19257 <ul class="gallery mw-gallery-traditional">
19258 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19259 <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>
19260 <div class="gallerytext">
19263 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19264 <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>
19265 <div class="gallerytext">
19268 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19269 <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>
19270 <div class="gallerytext">
19278 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19279 <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>
19280 <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>
19281 <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>
19285 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19287 Gallery with template inside caption
19290 "nativeGallery": true
19293 <gallery caption="{{echo|hi}}">
19294 File:Foobar.jpg|{{echo|ho}}
19297 <ul class="gallery mw-gallery-traditional">
19298 <li class='gallerycaption'>{{echo|hi}}</li>
19299 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19300 <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>
19301 <div class="gallerytext">
19309 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19310 <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>
19311 <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>
19316 Gallery with wikitext inside caption
19319 "nativeGallery": true
19323 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19324 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19327 <ul class="gallery mw-gallery-traditional">
19328 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19329 <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>
19330 <div class="gallerytext">
19331 <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>
19335 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19336 <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>
19337 <div class="gallerytext">
19338 <p>This is a test template
19345 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19346 <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>
19347 <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>
19352 Gallery (with showfilename option)
19355 "nativeGallery": true
19358 <gallery showfilename="">
19359 File:Nonexistent.jpg|caption
19360 File:Nonexistent.jpg
19361 File:Foobar.jpg|some '''caption''' [[Main Page]]
19365 <ul class="gallery mw-gallery-traditional">
19366 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19367 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19368 <div class="gallerytext">
19369 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19374 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19375 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19376 <div class="gallerytext">
19377 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19381 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19382 <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>
19383 <div class="gallerytext">
19384 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19385 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19389 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19390 <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>
19391 <div class="gallerytext">
19392 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19399 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19400 <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>
19401 <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>
19402 <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>
19403 <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>
19407 ## Should Parsoid be preserving these variations?
19409 Gallery (with namespace-less filenames)
19412 "modes": ["wt2html", "html2html"],
19413 "nativeGallery": true
19417 File:Nonexistent.jpg
19423 <ul class="gallery mw-gallery-traditional">
19424 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19425 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19426 <div class="gallerytext">
19429 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19430 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19431 <div class="gallerytext">
19434 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19435 <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>
19436 <div class="gallerytext">
19439 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19440 <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>
19441 <div class="gallerytext">
19447 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19448 <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>
19449 <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>
19450 <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>
19451 <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>
19456 Gallery override link with WikiLink (T36852)
19459 "nativeGallery": true
19463 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19466 <ul class="gallery mw-gallery-traditional">
19467 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19468 <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>
19469 <div class="gallerytext">
19475 <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":{}}'>
19476 <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>
19481 Gallery override link with absolute external link (T36852)
19484 "nativeGallery": true
19488 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19491 <ul class="gallery mw-gallery-traditional">
19492 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19493 <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>
19494 <div class="gallerytext">
19500 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19501 <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>
19506 Gallery override link with absolute external link with LanguageConverter
19511 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19514 <ul class="gallery mw-gallery-traditional">
19515 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19516 <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>
19517 <div class="gallerytext">
19527 Gallery override link with malicious javascript (T36852)
19530 "modes": ["wt2html", "html2html"],
19531 "nativeGallery": true
19535 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19538 <ul class="gallery mw-gallery-traditional">
19539 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19540 <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>
19541 <div class="gallerytext">
19547 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19548 <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="./%22_onclick=%22alert('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>
19553 Gallery with invalid title as link (T45964)
19556 "modes": ["wt2html", "html2html"],
19557 "nativeGallery": true
19561 File:Foobar.jpg|link=<
19564 <ul class="gallery mw-gallery-traditional">
19565 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19566 <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>
19567 <div class="gallerytext">
19573 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19574 <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>
19579 Serialize gallery without attrs in data-mw
19582 "modes": ["html2wt"],
19583 "nativeGallery": true
19586 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
19587 <li class="gallerycaption">123</li>
19588 <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:Test.png</span></div><div class="gallerytext"></div></li>
19591 <gallery caption="123">
19597 HTML Hex character encoding (spells the word "JavaScript")
19599 parsoid=wt2html,wt2wt,html2html
19601 JavaScript
19603 <p>JavaScript
19608 <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>
19612 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19616 <p>&#xsee;&#XSEE;
19619 <p>&#xsee;&#XSEE;</p>
19623 HTML Hex character encoding mixed case
19625 parsoid=wt2html,wt2wt,html2html
19634 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19637 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19638 # Note that U+000C (form feed) is not a valid XML character, so
19639 # it is banned even though allowed in HTML5.
19641 Illegal character references (T106578)
19646 ; Control (low): 
19647 ; Control (high):  Ÿ
19648 ; Surrogate: ��
19649 ; This is an okay astral character: 💩
19658 <dt>Control (low)</dt>
19660 <dt>Control (high)</dt>
19661 <dd>&#x7F; &#x9F;</dd>
19663 <dd>&#xD83D;&#xDCA9;</dd>
19664 <dt>This is an okay astral character</dt>
19670 __FORCETOC__ override
19682 ISBN 978-0-1234-56 789
19684 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19687 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19689 <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>
19693 ISBN followed by 5 spaces
19704 ISBN ISBN 1234567890
19706 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19709 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19712 # Uppercase X and lowercase x as well
19723 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19724 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19725 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19726 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19727 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19728 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19731 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19732 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19733 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19734 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19735 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19736 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19740 ISBN with empty prefix (parsoid test)
19744 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19747 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19751 Bug 22905: <abbr> followed by ISBN followed by </a>
19753 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19755 <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>
19758 <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>
19766 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19771 Double RFC with a wiki link
19775 <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>
19784 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19787 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19791 Centre-aligned image
19793 [[Image:foobar.jpg|centre]]
19795 <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>
19802 [[Image:foobar.jpg|none]]
19804 <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>
19809 Width + Height sized image (using px) (height is ignored)
19811 [[Image:foobar.jpg|640x480px]]
19813 <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>
19818 Width-sized image (using px, no following whitespace)
19820 [[Image:foobar.jpg|640px]]
19822 <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>
19827 Width-sized image (using px, with following whitespace - test regression from r39467)
19829 [[Image:foobar.jpg|640px ]]
19831 <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>
19836 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19838 [[Image:foobar.jpg| 640px]]
19840 <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>
19845 Image with page parameter
19849 [[File:LoremIpsum.djvu|page=2]]
19851 <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>
19854 <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>
19858 Another italics / bold test
19866 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19872 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19875 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19879 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19881 Images with the "|" character in the comment
19883 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19885 <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>
19888 <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=%7Cleft%7C&param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&param2=|x"}}'>external</a> URL</figcaption></figure>
19892 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19894 <html><script>alert(1);</script></html>
19896 <p><html><script>alert(1);</script></html>
19901 HTML with raw HTML ($wgRawHtml==true)
19905 <html><script>alert(1);</script></html>
19907 <p><script>alert(1);</script>
19912 Parents of subpages, one level up
19914 subpage title=[[Subpage test/L1/L2/L3]]
19918 <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>
19924 Parents of subpages, one level up, not named
19926 subpage title=[[Subpage test/L1/L2/L3]]
19930 <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>
19937 Parents of subpages, two levels up
19939 subpage title=[[Subpage test/L1/L2/L3]]
19945 <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
19946 </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>
19951 Parents of subpages, two levels up, without trailing slash or name.
19953 subpage title=[[Subpage test/L1/L2/L3]]
19962 Parents of subpages, two levels up, with lots of extra trailing slashes.
19964 subpage title=[[Subpage test/L1/L2/L3]]
19968 <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>
19973 Subpage test/L1/L2/L3Sibling
19979 Transclusion of a sibling page (one level up)
19981 subpage title=[[Subpage test/L1/L2/L3]]
19990 Transclusion of a child page
19992 subpage title=[[Subpage test/L1/L2]]
20000 # This is wt2html only in Parsoid because we add <nowiki>
20001 # because of {{..}} and we don't expect to fix that to
20002 # eliminate the nowikis selective for {{..}} markup.
20004 Non-transclusion because of too many up levels
20006 subpage title=[[Subpage test/L1/L2/L3]]
20009 {{../../../../More than parent}}
20011 <p>{{../../../../More than parent}}
20014 <p>{{../../../../More than parent}}</p>
20018 Definition list code coverage
20024 <dl><dt> title  </dt>
20026 <dt> title </dt>
20032 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20033 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20034 <dt>title</dt><dd> def</dd></dl>
20038 Don't fall for the self-closing div
20040 <div>hello world</div/>
20042 <div>hello world</div>
20051 <p>[[:Template:Msg]]
20060 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20064 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20066 Always escape literal '>' in output, not just after '<'
20080 <p>This is a test template
20081 This is a test template
20093 Inclusion of !userCanEdit() content
20097 <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>
20103 Out-of-order TOC heading levels
20112 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20114 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20116 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20117 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20120 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20122 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20123 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20129 <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>
20130 <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>
20131 <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>
20132 <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>
20133 <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>
20134 <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>
20140 ISBN with a dummy number
20150 ISBN with space-delimited number
20154 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20160 ISBN with multiple spaces, no number
20179 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20180 </p><p>ISBN 12345678901
20186 ISBN with trailing year (bug 8110)
20188 ISBN 1-234-56789-0 - 2006
20190 ISBN 1 234 56789 0 - 2006
20192 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20193 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20201 {{anchorencode:foo bar©#%n}}
20203 <p>foo_bar.C2.A9.23.25n
20208 anchorencode trims spaces
20210 {{anchorencode: __pretty__please__}}
20217 anchorencode deals with links
20219 {{anchorencode: [[hello|world]] [[hi]]}}
20226 anchorencode deals with templates
20228 {{anchorencode: {{Foo}} }}
20235 anchorencode encodes like the TOC generator: (bug 18431)
20237 === _ +:.3A%3A&&]] ===
20238 {{anchorencode: _ +:.3A%3A&&]] }}
20241 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20242 <p>.2B:.3A.253A.26.26.5D.5D
20247 Bug 6200: blockquotes and paragraph formatting
20268 Bug 8293: Use of center tag ruins paragraph formatting
20289 Parsing of overlapping (improperly nested) inline html tags
20291 <span><s>x</span></s>
20293 <p><span><s>x</span></s></span>
20296 <p><span><s>x</s></span>
20301 ### Language variants related tests
20304 Self-link in language variants
20306 title=[[Dunav]] language=sr
20308 Both [[Dunav]] and [[Дунав]] are names for this river.
20310 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
20321 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20323 title=[[Duna]] language=sr
20325 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20327 <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.
20332 Link to a section of a variant of this title shouldn't be parsed as self-link
20334 title=[[Duna]] language=sr
20336 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20338 <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.
20343 Link to pages in language variants
20347 Main Page can be written as [[Маин Паге]]
20349 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20355 Multiple links to pages in language variants
20359 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20361 <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>.
20367 Simple template in language variants
20373 <p>This is a test template
20379 Template with explicit namespace in language variants
20385 <p>This is a test template
20391 Basic test for template parameter in language variants
20395 {{парамтест|param=foo}}
20397 <p>This is a test template with parameter foo
20402 Simple category in language variants
20406 [[Category:МедиаWики Усер'с Гуиде]]
20408 cat=МедиаWики_Усер'с_Гуиде sort=
20410 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20425 ## We used to, but no longer wt2wt this test since the default serializer
20426 ## will normalize all categories to serialize on their own line.
20427 ## This wikitext usage is going to be fairly uncommon in production and
20428 ## selser will take care of preserving formatting in those scenarios.
20430 Don't convert blue categorylinks to another variant (bug 33210)
20436 [[A]][[Category:分类]]
20440 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
20441 <link rel="mw:PageProp/Category" href="./Category:分类"/>
20445 Stripping -{}- tags (language variants)
20449 Latin proverb: -{Ne nuntium necare}-
20451 <p>Latin proverb: Ne nuntium necare
20457 Prevent conversion with -{}- tags (language variants)
20459 language=sr variant=sr-ec
20461 Latinski: -{Ne nuntium necare}-
20463 <p>Латински: Ne nuntium necare
20469 Prevent conversion of text with -{}- tags (language variants)
20471 language=sr variant=sr-ec
20473 Latinski: -{Ne nuntium necare}-
20475 <p>Латински: Ne nuntium necare
20481 Prevent conversion of links with -{}- tags (language variants)
20483 language=sr variant=sr-ec
20487 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20493 -{}- tags within headlines (within html for parserConvert())
20495 language=sr variant=sr-ec
20499 <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>
20505 Explicit definition of language variant alternatives
20507 language=zh variant=zh-tw
20509 -{zh:China;zh-tw:Taiwan}-, not China
20511 <p>Taiwan, not China
20517 Conversion around HTML tags
20519 language=sr variant=sr-ec
20521 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20522 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20525 <span title="ЛаCтин">ски</span>
20531 Explicit session-wise language variant mapping (A flag and - flag)
20533 language=zh variant=zh-tw
20535 Taiwan is not China.
20536 But -{A|zh:China;zh-tw:Taiwan}- is China,
20537 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20538 and -{China}- is China.
20540 <p>Taiwan is not China.
20541 But Taiwan is Taiwan,
20542 (This should be stripped!)
20543 and China is China.
20548 Explicit session-wise language variant mapping (H flag for hide)
20550 language=zh variant=zh-tw
20552 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20555 <p>(This should be stripped!)
20561 Adding explicit conversion rule for title (T flag)
20563 language=zh variant=zh-tw showtitle
20565 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20568 <p>Should be stripped!
20573 Testing that changing the language variant here in the tests actually works
20575 language=zh variant=zh showtitle
20577 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20580 <p>Should be stripped!
20585 Recursive conversion of alt and title attrs shouldn't clear converter state
20587 language=zh variant=zh-cn showtitle
20589 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20590 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20594 Should be stripped<span title="Exclamation">!</span>
20599 Bug 24072: more test on conversion rule for title
20601 language=zh variant=zh-tw showtitle
20603 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20604 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20607 <p>This should be stripped!
20608 This won't take interferes with the title rule.
20613 Partly disable title conversion if variant == main language code
20615 language=zh variant=zh title=[[ZH]] showtitle
20617 -{T|zh-cn:CN;zh-tw:TW}-
20625 Partly disable title conversion if variant == main language code, more
20627 language=zh variant=zh title=[[ZH]] showtitle
20637 Raw output of variant escape tags (R flag)
20639 language=zh variant=zh-tw
20641 Raw: -{R|zh:China;zh-tw:Taiwan}-
20643 <p>Raw: zh:China;zh-tw:Taiwan
20648 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20650 language=zh variant=zh-cn
20652 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20659 Conversion rules from [numeric-only string] to [something else] (T48634)
20661 language=zh variant=zh-cn
20663 -{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
20670 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20672 language=zh variant=zh-cn
20674 -{H|zh-cn:foo;zh-tw:;}-foobar
20681 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20683 language=zh variant=zh-cn
20685 -{H|=>zh-cn:foo;}-foobar
20692 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20694 language=zh variant=zh-cn
20703 Nested using of manual convert syntax
20705 language=zh variant=zh-hk
20707 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20709 <p>Nested: Hello Hong Kong!
20713 # Since Parsoid is starting to emit canonical wikitext for links,
20714 # [http://example.com http://example.com] will not RT back to that
20717 Proper conversion of text in external links
20719 language=sr variant=sr-ec
20722 http://www.google.com
20723 gopher://www.google.com
20724 [http://www.google.com http://www.google.com]
20725 [gopher://www.google.com gopher://www.google.com]
20726 [https://www.google.com irc://www.google.com]
20727 [ftp://www.google.com www.google.com/ftp://dir]
20728 [//www.google.com www.google.com]
20730 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20731 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20732 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20733 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20734 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20735 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20736 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20739 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20740 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20741 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20742 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20743 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20744 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20745 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20749 Do not convert roman numbers to language variants
20751 language=sr variant=sr-ec
20755 <p>Фридрих IV је цар.
20760 Unclosed language converter markup "-{"
20771 Don't convert raw rule "-{R|=>}-" to "=>"
20782 Don't break link parsing if language converter markup is in the caption.
20784 language=sr variant=sr-ec
20786 [[Main Page|-{R|main page}-]]
20788 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20792 # FIXME: This test is currently broken in the PHP parser T153761
20794 T146304: Don't break template parsing if language converter markup is in the parameter.
20796 language=sr variant=sr-ec
20806 T146305: Don't break image parsing if language converter markup is in the caption.
20810 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
20812 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0: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/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећај"></a></div>caption:</div></div></div>
20815 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./Датотека:Foobar.jpg"><img resource="./Датотека: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><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"caption:"}'></span></figcaption></figure>
20819 T146305: Don't break image parsing if nested language converter markup is in the caption.
20821 language=zh variant=zh-cn
20823 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
20825 <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="放大"></a></div>blog (hk: WEBJOURNAL, tw: WEBLOG)</div></div></div>
20828 <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><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"blog (hk: <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[42,64,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"WEBJOURNAL\"}'></span>, tw: <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[70,88,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"WEBLOG\"}'></span>)"}],"show":true}'></span></figcaption></figure>
20832 Don't break gallery if language converter markup is inside.
20837 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
20838 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
20841 <ul class="gallery mw-gallery-traditional">
20842 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20843 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="bat" 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>
20844 <div class="gallerytext">
20845 <p><a href="/wiki/File:Foobar.jpg" class="image" title="bar"><img alt="foo" 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>
20849 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20850 <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>
20851 <div class="gallerytext">
20852 <p>This is a test template
20860 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20862 Don't break list handling if language converter markup is in the item.
20864 language=zh variant=zh-cn
20866 ;-{zh-cn:AAA;zh-tw:BBB}-
20868 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20876 T153140: Don't break table handling if language converter markup is in the cell.
20878 language=sr variant=sr-ec
20901 Bug 529: Uncovered bullet
20910 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20911 # Templates in Wikipedia rely on this behavior, as tidy has always been
20912 # enabled there. These tests are normally run *without* tidy, so specify the
20913 # full output here.
20914 # To test realistic parsing behavior, apply a tidy-like transformation to both
20915 # the expected output and your parser's output.
20917 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20919 ******* Foo {{bullet}}
20921 <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>
20927 Bug 529: Uncovered table already at line-start
20950 Bug 529: Uncovered bullet in parser function result
20952 * Foo {{lc:{{bullet}} }}
20960 Bug 5678: Double-parsed template argument
20962 {{lc:{{{1}}}|hello}}
20969 Bug 5678: Double-parsed template invocation
20971 {{lc:{{paramtest {{!}} param = hello }} }}
20973 <p>{{paramtest | param = hello }}
20978 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20981 title=[[Main Page]]
20983 {{PRVNÍVELKÉ:ěščř}}
20984 {{prvnívelké:ěščř}}
21004 Morwen/13: Unclosed link followed by heading
21011 <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>
21016 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21023 <h1><span class="mw-headline" id="heading">heading</span></h1>
21028 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21035 <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>
21050 Paragraphs inside divs (no extra line breaks)
21062 Paragraphs inside divs (extra line break on open)
21077 Paragraphs inside divs (extra line break on close)
21092 Paragraphs inside divs (extra line break on open and close)
21109 Nesting tags, paragraphs on lines which begin with <div>
21111 <div></div><strong>A
21114 <p><strong>A</strong></p>
21115 <p><strong>B</strong></p>
21123 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
21125 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
21127 <blockquote>Line one
21129 Line two</blockquote>
21131 <blockquote>Line one
21132 Line two</blockquote>
21136 <p>Line one Line two</p>
21141 Bug 6200: paragraphs inside blockquotes (extra line break on open)
21146 Line two</blockquote>
21151 Line two</blockquote>
21156 Line two</blockquote>
21160 Bug 6200: paragraphs inside blockquotes (extra line break on close)
21162 <blockquote>Line one
21167 <blockquote>Line one
21180 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
21202 Paragraphs inside blockquotes/divs (no extra line breaks)
21204 <blockquote><div>Line one
21206 Line two</div></blockquote>
21208 <blockquote><div>Line one
21209 Line two</div></blockquote>
21214 Paragraphs inside blockquotes/divs (extra line break on open)
21219 Line two</div></blockquote>
21224 Line two</div></blockquote>
21229 Paragraphs inside blockquotes/divs (extra line break on close)
21231 <blockquote><div>Line one
21234 </div></blockquote>
21236 <blockquote><div>Line one
21239 </div></blockquote>
21244 Paragraphs inside blockquotes/divs (extra line break on open and close)
21250 </div></blockquote>
21256 </div></blockquote>
21261 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21263 wgLinkHolderBatchSize=0
21269 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21270 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21271 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21276 Free external link invading image caption
21278 [[Image:Foobar.jpg|thumb|http://x|hello]]
21280 <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>
21285 Bug 15196: localised external link numbers
21289 [http://en.wikipedia.org/]
21291 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21294 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21298 Multibyte character in padleft
21300 {{padleft:-Hello|7|Æ}}
21307 Multibyte character in padright
21309 {{padright:Hello-|7|Æ}}
21316 formatdate parser function
21318 {{#formatdate:2009-03-24}}
21320 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21325 formatdate parser function, with default format
21327 {{#formatdate:2009-03-24|mdy}}
21329 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21334 Spacing of numbers in formatted dates
21336 {{#formatdate:January 15}}
21338 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21343 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
21345 language=nl title=[[MediaWiki:Common.css]]
21347 {{#formatdate:2009-03-24|dmy}}
21349 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21362 Edit comment with link
21366 I like the [[Main Page]] a lot
21368 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21372 Edit comment with link and link text
21376 I like the [[Main Page|best pages]] a lot
21378 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21382 Edit comment with link and link text with suffix
21386 I like the [[Main Page|best page]]s a lot
21388 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21392 Edit comment with section link (non-local, eg in history list)
21394 comment title=[[Main Page]]
21396 /* External links */ removed bogus entries
21398 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21402 Edit comment with section link and text before it (non-local, eg in history list)
21404 comment title=[[Main Page]]
21406 pre-comment text /* External links */ removed bogus entries
21408 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>
21412 Edit comment with section link (local, eg in diff view)
21414 comment local title=[[Main Page]]
21416 /* External links */ removed bogus entries
21418 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21422 Edit comment with subpage link (bug 14080)
21426 title=[[Subpage test]]
21428 Poked at a [[/subpage]] here...
21430 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21434 Edit comment with subpage link and link text (bug 14080)
21438 title=[[Subpage test]]
21440 Poked at a [[/subpage|neat little page]] here...
21442 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21446 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
21449 title=[[Subpage test]]
21451 Poked at a [[/subpage]] here...
21453 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21457 Edit comment with bare anchor link (local, as on diff)
21461 title=[[Main Page]]
21465 <a href="#section">#section</a>
21469 Edit comment with bare anchor link (non-local, as on history)
21472 title=[[Main Page]]
21476 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21480 Anchor starting with underscore
21486 <p><a href="#_ref">One</a>
21489 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21493 Id starting with underscore
21495 <div id="_ref"></div>
21497 <div id="_ref"></div>
21502 Edit comment with link with more than one pipe (T99346)
21506 [[Main Page|Many|pipes]]
21508 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21512 Complex edit comment with link with more than one pipe (T99346)
21516 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21518 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..."
21522 Space normalisation on autocomment (bug 22784)
21525 title=[[Main Page]]
21527 /* __hello__world__ */
21529 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21533 percent-encoding and + signs in comments (Bug 26410)
21537 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21539 <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>
21542 # Parsoid doesn't support this yet: see bug 73581
21543 # but it *should* omit the 'src' attribute if the image is bad.
21544 # PHP side of tests was disabled in
21545 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21546 # because of issues in the PHP parserTests infrastructure
21547 # (but the output below is indeed what the PHP side emits)
21549 Bad images - basic functionality
21552 !! DISABLED/html/php
21554 <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>
21558 Bad images - bug 16039: text after bad image disappears
21563 !! DISABLED/html/php
21569 <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>
21574 Verify that displaytitle works (bug #22501) no displaytitle
21578 wgAllowDisplayTitle=true
21579 wgRestrictDisplayTitle=false
21581 this is not the the title
21584 <p>this is not the the title
21589 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21594 wgAllowDisplayTitle=true
21595 wgRestrictDisplayTitle=false
21597 this is not the the title
21598 {{DISPLAYTITLE:whatever}}
21601 <p>this is not the the title
21606 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21611 wgAllowDisplayTitle=true
21612 wgRestrictDisplayTitle=true
21614 this is not the the title
21615 {{DISPLAYTITLE:whatever}}
21618 <p>this is not the the title
21623 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21628 wgAllowDisplayTitle=true
21629 wgRestrictDisplayTitle=true
21631 this is not the the title
21632 {{DISPLAYTITLE:screen}}
21635 <p>this is not the the title
21640 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21645 wgAllowDisplayTitle=false
21647 this is not the the title
21648 {{DISPLAYTITLE:screen}}
21651 <p>this is not the the title
21652 <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>
21657 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21662 wgAllowDisplayTitle=false
21664 this is not the the title
21667 <p>this is not the the title
21672 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21677 wgAllowDisplayTitle=true
21678 wgRestrictDisplayTitle=true
21680 this is not the the title
21681 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21683 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21684 <p>this is not the the title
21689 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21694 wgAllowDisplayTitle=true
21695 wgRestrictDisplayTitle=true
21697 this is not the the title
21698 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21700 <span style="color: red;">s</span>creen
21701 <p>this is not the the title
21706 Page status indicators: Empty name is invalid
21710 <indicator name=" "></indicator>
21711 <indicator></indicator>
21713 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21714 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21719 Page status indicators: Weird syntaxes that are okay
21723 <indicator name="empty" />
21724 <indicator name="name"></indicator>
21733 Page status indicators: Torture test
21737 <indicator name="01">hello world</indicator>
21738 <indicator name="02">[[Main Page]]</indicator>
21739 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21740 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21741 <indicator name="05">* foo
21743 <indicator name="06"><nowiki>foo</nowiki></indicator>
21744 <indicator name="07"> Preformatted</indicator>
21745 <indicator name="08"><div>Broken tag</indicator>
21746 <indicator name="09">{| class=wikitable
21749 <indicator name="10">Two
21751 paragraphs</indicator>
21754 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21755 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" />
21756 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>
21757 05=<ul><li> foo</li>
21761 07=<pre>Preformatted
21763 08=<div>Broken tag</div>
21765 09=<table class="wikitable">
21782 preload: check <noinclude> and <includeonly>
21786 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21792 preload: check <onlyinclude>
21796 Goodbye <onlyinclude>Hello world</onlyinclude>
21802 preload: can pass tags through if we want to
21806 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21808 <includeonly>Hello world</includeonly>
21812 preload: check that it doesn't try to do tricks
21816 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21818 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21822 Play a bit with r67090 and bug 3158
21824 <div style="width:50% !important"> </div>
21825 <div style="width:50% !important"> </div>
21826 <div style="width:50% !important"> </div>
21827 <div style="border : solid;"> </div>
21829 <div style="width:50% !important"> </div>
21830 <div style="width:50% !important"> </div>
21831 <div style="width:50% !important"> </div>
21832 <div style="border : solid;"> </div>
21835 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21836 <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>
21837 <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>
21838 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21843 HTML5 data attributes
21845 <span data-foo="bar">Baz</span>
21846 <p data-abc-def_hij="">Quuz</p>
21848 <p><span data-foo="bar">Baz</span>
21850 <p data-abc-def_hij="">Quuz</p>
21853 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21854 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21858 Strip reserved data attributes
21860 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21862 <div data-ok="fred">d</div>
21865 <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>
21869 percent-encoding and + signs in internal links (Bug 26410)
21871 [[User:+%]] [[Page+title%]]
21872 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21873 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21874 [[%33%45]] [[%33%45+]]
21876 <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>
21877 <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>
21878 <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>
21879 <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>
21882 <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>
21883 <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>
21884 <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>
21885 <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>
21889 Special characters in embedded file links (bug 27679)
21891 [[File:Contains & ampersand.jpg]]
21892 [[File:Does not exist.jpg|Title with & ampersand]]
21894 <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>
21895 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21898 <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>
21899 <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>
21903 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21905 Text's been normalized?
21907 <p>Text's been normalized?
21912 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21914 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21916 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21921 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21923 [http://www.example.org/ ideograms]
21925 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21930 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21932 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21934 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21958 Bug 31098 Template which includes system messages which includes the template
21962 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21963 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21968 Bug31490 Turkish: ucfirst 'blah'
21979 Bug31490 Turkish: ucfirst 'ix'
21990 Bug31490 Turkish: lcfirst 'BLAH'
22001 Bug31490 Turkish: ucfırst (with a dotless i)
22007 <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>
22012 Bug31490 ucfırst (with a dotless i) with English language
22018 <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>
22023 Bug 26375: TOC with italics
22025 title=[[Main Page]]
22028 == ''Lost'' episodes ==
22030 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22032 <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>
22036 <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>
22041 Bug 26375: TOC with bold
22043 title=[[Main Page]]
22046 == '''should be bold''' then normal text ==
22048 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22050 <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>
22054 <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>
22059 Bug 33845: Headings become cursive in TOC when they contain an image
22061 title=[[Main Page]]
22064 == Image [[Image:foobar.jpg]] ==
22066 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22068 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22072 <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>
22077 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
22079 title=[[Main Page]]
22082 == <blockquote>Quote</blockquote> ==
22084 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22086 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22090 <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>
22094 <div id="toc" class="toc">
22095 <div id="toctitle">
22099 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22103 <h2><span class="mw-headline" id="Quote"></span></h2>
22105 <p><span class="mw-headline" id="Quote">Quote</span></p>
22107 <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>
22111 Unclosed tags in TOC
22113 title=[[Main Page]]
22117 <small>Hanc marginis exiguitas non caperet.</small>
22120 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22122 <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>
22126 <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>
22127 <p><small>Hanc marginis exiguitas non caperet.</small>
22133 Multiple tags in TOC
22136 == <i>Foo</i> <b>Bar</b> ==
22138 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22140 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22142 <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>
22143 <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>
22147 <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>
22148 <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>
22152 <div id="toc" class="toc">
22153 <div id="toctitle">
22157 <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>
22158 <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>
22162 <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>
22163 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22165 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22167 <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>
22170 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22171 # html5 tag parsing.
22173 Tags with parameters in TOC
22178 == <sup class="in-h2">Hello</sup> ==
22180 == <sup class="a > b">Evilbye</sup> ==
22182 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22184 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22185 <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>
22189 <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>
22190 <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>
22193 <meta property="mw:PageProp/toc" />
22194 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22196 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22200 span tags with directionality in TOC
22203 == <span dir="ltr">C++</span> ==
22205 == <span dir="rtl">זבנג!</span> ==
22207 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22209 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22211 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22213 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22215 <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>
22216 <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>
22217 <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>
22218 <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>
22219 <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>
22223 <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>
22224 <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>
22225 <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>
22226 <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>
22227 <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>
22232 Bug 72884: bdi element in ToC
22235 == <bdi>test</bdi> ==
22237 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22239 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22243 <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>
22248 T35715: s/strike element in ToC
22251 == <s>test</s> test <strike>test</strike> ==
22253 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22255 <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>
22259 <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>
22263 # Note that the html output does not have the <p></p>, but the
22264 # html+tidy output *does*. This is because the empty <p></p> is
22265 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22267 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22272 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22274 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22278 <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>
22282 <div id="toc" class="toc">
22283 <div id="toctitle">
22287 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22291 <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>
22297 == {{int:headline_sample}} ==
22301 Bug 32057: Title needed when expanding <h> nodes.
22303 title=[[Main Page]]
22307 <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>
22312 Strip marker in urlencode
22314 {{urlencode:x<nowiki/>y}}
22315 {{urlencode:x<nowiki/>y|wiki}}
22316 {{urlencode:x<nowiki/>y|path}}
22317 {{urlencode:x<pre id="one">two</pre>y}}
22345 Strip marker in formatNum
22347 {{formatnum:1<nowiki/>2}}
22348 {{formatnum:1<nowiki/>2|R}}
22356 Check noCommafy in formatNum
22360 {{formatnum:123456.78}}
22361 {{formatnum:123456.78|NOSEP}}
22369 Wrong option for formatNum (bug 56199)
22371 {{formatnum:1,234.56|Random}}
22372 {{formatnum:1,234.56|EVERYTHING}}
22373 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22382 Strip marker in grammar
22386 {{grammar:elative|foo<nowiki/>bar}}
22393 Strip marker in padleft
22395 {{padleft:|2|x<nowiki/>y}}
22402 Strip marker in padright
22404 {{padright:|2|x<nowiki/>y}}
22411 Strip marker in anchorencode
22413 {{anchorencode:x<nowiki/>y}}
22420 nowiki inside link inside heading (bug 18295)
22422 ==[[foo|x<nowiki>y</nowiki>z]]==
22424 <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>
22429 new support for bdi element (bug 31817)
22431 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22433 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22438 Ignore pipe between table row attributes
22442 |- id=foo | style='color: red'
22450 <tr id="foo" style="color: red">
22457 Gallery override link with WikiLink (bug 34852)
22460 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
22463 <ul class="gallery mw-gallery-traditional">
22464 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22465 <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>
22466 <div class="gallerytext">
22476 Language parser function
22485 Padleft and padright as substr
22487 {{padleft:|3|abcde}}
22488 {{padright:|3|abcde}}
22496 Special parser function
22498 {{#special:RandomPage}}
22499 {{#special:BaDtItLe}}
22500 {{#special:Foobar}}
22509 Bug 34939 - Case insensitive link parsing ([HttP://])
22511 [HttP://MediaWiki.Org/]
22513 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22516 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22520 Bug 34939 - Case insensitive link parsing ([HttP:// title])
22522 [HttP://MediaWiki.Org/ MediaWiki]
22524 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22529 Bug 34939 - Case insensitive link parsing (HttP://)
22531 HttP://MediaWiki.Org/
22533 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22536 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22554 <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>
22555 <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>
22556 <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>
22557 <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>
22558 <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>
22564 ### Parsoid-specific tests
22565 ### Parsoid-PHP parser incompatibilities
22568 1. SOL-sensitive wikitext tokens as template-args
22570 parsoid=wt2html,wt2wt
22576 <span about="#mwt1" typeof="mw:Transclusion">
22577 </span><ul about="#mwt1"><li>a</li>
22579 <span about="#mwt2" typeof="mw:Transclusion">
22580 </span><ol about="#mwt2"><li>a</li>
22582 <span about="#mwt3" typeof="mw:Transclusion">
22583 </span><dl about="#mwt3"><dd>a</dd>
22587 #### -----------------------------------------------------------------
22588 #### Parsoid-specific functionality tests
22589 #### -----------------------------------------------------------------
22591 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22592 # We know wt2wt will fail, but we expect selser to pass.
22593 # Due to the nature of our testing, wt2wt and selser tests will enter the
22594 # blacklist and we'll catch selser regressions based on changes to the
22595 # blacklist entries for selser tests.
22597 1. Bad treebuilder fixup of formatting elt is cleaned up
22599 parsoid=wt2html,wt2wt
22604 [[Image:Foobar.jpg|right|Test]]
22611 <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>
22618 2. Bad treebuilder fixup of formatting elt is cleaned up
22620 parsoid=wt2html,wt2wt
22622 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22624 <small>[[Image:Foobar.jpg|right|300px]]</small>
22628 <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>
22630 <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>
22634 3. Bad treebuilder fixup of formatting elt is cleaned up
22636 parsoid=wt2html,wt2wt
22638 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22640 <p><small><b>foo</b></small></p>
22641 <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>
22642 <p><small><b>bar</b></small></p>
22646 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22648 parsoid=wt2html,wt2wt
22650 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22652 <p><b><small></small></b></p>
22653 <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>
22657 #### ----------------------------------------------------------------
22658 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22659 #### tags. Parsoid's output for these tags differs from that of the
22661 #### ----------------------------------------------------------------
22664 Ref: 1. ref-location should be replaced with an index span
22667 B <ref name="x">foo</ref>
22671 <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>
22672 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>
22673 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>
22674 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22675 <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>
22676 <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>
22677 <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>
22682 Ref: 2. ref-tags with identical names should all get the same index
22684 A <ref name="x">foo</ref>
22688 <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>
22689 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>
22690 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22691 <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>
22696 Ref: 3. spaces in ref-names should be ignored
22698 A <ref name="x">foo</ref>
22699 B <ref name=" x " />
22703 <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>
22704 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>
22705 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>
22706 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22707 <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>
22711 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22713 Ref: 4. 'constructor' should be accepted as a valid ref-name
22715 A <ref name="constructor">foo</ref>
22718 <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>
22719 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22720 <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>
22725 Ref: 5. body should accept generic wikitext
22728 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22733 <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>
22735 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22736 <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>
22742 Ref: 6. indent-pres should not be output in ref-body
22752 <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>
22754 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22755 <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
22763 Ref: 7. No p-wrapping in ref-body
22780 <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>
22782 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22783 <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
22798 Ref: 8. transclusion wikitext has lower precedence
22800 A <ref> foo {{echo|</ref> B C}}
22804 <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>
22805 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22806 <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>
22811 Ref: 9. unclosed comments should not leak out of ref-body
22813 A <ref> foo <!--</ref> B C
22816 <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>
22817 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22818 <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>
22823 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22825 A <ref> <b> foo </ref> B C
22829 <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>
22832 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22833 <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>
22838 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22844 <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
22845 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>
22846 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22847 <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>
22848 <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>
22853 Ref: 12. ref-tags act as trailing newline migration barrier
22855 <!--the newline at the end of this line moves out of the p tag-->a
22857 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22863 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22866 <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>
22867 <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>
22870 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22871 <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>
22872 <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>
22876 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22883 <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
22884 <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>
22885 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22886 <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>
22887 <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
22892 ## Roundtripping fails because of nowiki'ing
22894 Ref: 14. A nested ref-tag should be emitted as plain text
22898 <ref>foo <ref>bar</ref> baz</ref>
22902 <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>
22904 <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>
22908 Ref: 15. ref-tags with identical names should get identical indexes
22910 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22911 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22915 <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>
22916 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>
22918 <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>
22922 ## We don't bother wt2wt-ing non-standard whitespace
22924 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22932 <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>
22933 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22934 <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>
22938 Ref: 17. Generate valid HTML5 id/about attributes
22940 <ref name="a b">foo</ref>
22941 <ref name=":0">ve-created name</ref>
22945 <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>
22946 <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>
22948 <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>
22953 Ref: 18. T58916: Extension attributes should be parsed as plain text
22955 <ref name="{{echo|a}}">foo</ref>
22959 <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>
22962 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22963 <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>
22968 Ref: 19. ref-tags with identical name encodings should get identical indexes
22970 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22974 <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>
22976 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22977 <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>
22982 Ref: 20. ref-tags with identical names but different content should keep it
22984 A <ref name="foo">Foo one</ref>
22985 B <ref name="foo">Foo two</ref>
22986 C <ref name="foo" />
22990 <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>
22991 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>
22992 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>
22994 <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>
22999 References: 1. references tag without any refs should be handled properly
23003 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
23007 References: 2. references tag with group only outputs references from that group
23009 A <ref group="a">foo</ref>
23010 B <ref group="b">bar</ref>
23013 <references group="a" />
23015 <references group="b" />
23017 <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>
23018 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>
23019 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>
23021 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
23022 <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>
23024 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
23025 <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>
23027 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
23028 <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>
23033 References: 3. ref list should be cleared after processing references
23043 <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>
23045 <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>
23048 <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>
23050 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
23051 <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>
23056 References: 4. only referenced group should be cleared after processing references
23058 A <ref group="a">afoo</ref>
23061 <references group="a" />
23067 <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>
23068 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>
23070 <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>
23073 <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>
23075 <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>
23079 ## Don't expect this to rt since we're dropping content
23081 References: 5. ref tags in references should be processed while ignoring all other content
23083 parsoid=wt2html,html2html
23086 B <ref name="b">bar</ref>
23089 <ref name="a">foo</ref>
23090 This should just get lost.
23093 <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>
23094 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>
23097 <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>
23102 References: 6. <references /> from a transclusion
23104 <ref>Foo</ref> {{echo|<references />}}
23106 <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>
23111 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
23113 A <ref>foo bar for a</ref>
23114 B <ref group="X" name="b" />
23118 <references group="X">
23119 <ref name="b">foo</ref>
23122 <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>
23123 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>
23126 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
23127 <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>
23130 <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"}}'>
23131 <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>
23136 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
23138 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
23141 <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>
23142 <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>
23146 # This test only works in wt2html now as the <references /> are always generated
23147 # unless selser is active. Once T72722 is fixed, we should add a changes test
23148 # here to ensure that unrelated changes don't add the new <references />
23149 # when selser is active.
23151 References: 9. Generate missing references list at the end
23154 B <ref group="inexistent">bar</ref>
23156 <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>
23157 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
23158 <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>
23160 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
23161 <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>
23166 References: 10. New <references/> shouldn't be added for unrelated edits.
23169 "modes": ["selser"],
23170 "changes": [["#x", "remove"]],
23174 Unrelated text<span id="x"> that's going to disappear</span>.
23182 Entities in ref name
23184 <ref name="test & me">hi</ref>
23187 <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>
23188 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23189 <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>
23193 ## The output here may look funny, but it's what the php parser will do. The
23194 ## unclosed references tag becomes escaped text, and then a new references
23195 ## tag is auto-generated. The test is wt2html only because it roundtrips with
23196 ## nowiki tags, and the auto-generated references tag is only dropped in
23199 Generate references for unclosed references tag
23207 <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>
23209 <p><references></p>
23210 <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>
23214 New reference serializes on its own line
23216 parsoid=wt2wt,html2wt
23221 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
23224 #### ----------------------------------------------------------------
23225 #### Parsoid-only testing of Parsoid's impl of LST
23226 #### Not implemented yet, see
23227 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
23228 #### ----------------------------------------------------------------
23230 ## We still need to support serializing the older format while content is stored.
23232 LST Sections: Backwards compatibility
23235 "suppressErrors": true,
23236 "modes": ["html2wt"]
23239 <section begin="2011-05-16" />
23240 <section end="2014-04-10 (MW 1.23wmf22)" />
23242 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
23243 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
23246 ## The unconventional output is the result of `usePHPPreProcessor` being
23247 ## disabled in parserTests.js. This test is mainly just to show <section> is
23248 ## recognized as an extension tag w/o a native handler.
23250 LST Sections: Newfangled approach
23252 parsoid={ "suppressErrors": true }
23254 <section begin="2011-05-16" />
23255 <section end="2014-04-10 (MW 1.23wmf22)" />
23257 <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>
23258 <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>
23261 #--------- Test stripping of empty nodes in template content ----------
23263 Empty LI and TR nodes should be stripped from template content
23268 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23272 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23285 Empty LI and TR nodes should not be stripped from top-level content
23312 Empty TR nodes should not be stripped if they have any attributes set
23314 {{EmptyTRWithHTMLAttrTest}}
23316 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23317 <tr align="center"></tr>
23318 <tr><td>foo</td></tr>
23319 <tr align="center"></tr>
23320 <tr><td>bar</td></tr>
23324 #### ----------------------------------------------------------------
23325 #### The following section of tests are primarily to test
23326 #### wikitext escaping capabilities of Parsoid. Given that
23327 #### escaping can be done any number of ways, the wikitext (input)
23328 #### is always adjusted to reflect how Parsoid adds nowiki
23331 #### We are marking several tests as parsoid-only since the
23332 #### HTML in the result section is different from what the
23333 #### PHP parser generates for it.
23334 #### ----------------------------------------------------------------
23337 #### --------------- Headings ---------------
23339 #### 1. Nested inside html <h1>=foo=</h1>
23340 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23341 #### 3. Nested inside html with wikitext split by html tags
23342 #### 4. No escape needed
23343 #### 5. Empty headings <h1></h1>
23344 #### 6. Heading chars in SOL context
23345 #### ----------------------------------------
23347 Headings: 0. Unnested
23357 <p>=foo<i>a</i>=</p>
23359 <nowiki>=foo=</nowiki>
23361 <nowiki> </nowiki>=foo=
23363 <nowiki>=foo=</nowiki>
23365 =foo''a''<nowiki>=</nowiki>
23368 # New headings and existing headings are handled differently
23370 Headings: 1. Nested inside html
23378 <h1 data-parsoid=''>=foo=</h1>
23379 <h2 data-parsoid=''>=foo=</h2>
23380 <h3 data-parsoid=''>=foo=</h3>
23381 <h4 data-parsoid=''>=foo=</h4>
23382 <h5 data-parsoid=''>=foo=</h5>
23383 <h6 data-parsoid=''>=foo=</h6>
23391 =<nowiki>=foo=</nowiki>=
23392 ==<nowiki>=foo=</nowiki>==
23393 ===<nowiki>=foo=</nowiki>===
23394 ====<nowiki>=foo=</nowiki>====
23395 =====<nowiki>=foo=</nowiki>=====
23396 ======<nowiki>=foo=</nowiki>======
23401 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23410 <nowiki>*</nowiki>bar
23416 <nowiki>=bar=</nowiki>
23420 Headings: 3. Nested inside html with wikitext split by html tags
23424 <h1>=<b>bold</b>foo=</h1>
23426 = ='''bold'''foo= =
23430 Headings: 4a. No escaping needed (testing just h1 and h2)
23441 <h1><i>=</i>foo=</h1>
23461 Headings: 4b. No escaping needed (inside p-tags)
23476 Headings: 5. Empty headings
23480 <h1 data-parsoid='{}'></h1>
23482 <h2 data-parsoid='{}'></h2>
23484 <h3 data-parsoid='{}'></h3>
23486 <h4 data-parsoid='{}'></h4>
23488 <h5 data-parsoid='{}'></h5>
23490 <h6 data-parsoid='{}'></h6>
23500 =====<nowiki/>=====
23502 ======<nowiki/>======
23506 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23516 <nowiki>=a=</nowiki>
23518 <nowiki>=a=</nowiki>
23520 <nowiki>=a=</nowiki>
23524 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23537 <nowiki>=a=</nowiki>
23540 <nowiki>=a=</nowiki>
23543 <nowiki>=a=</nowiki>
23548 Headings: 6c. Heading chars in SOL context (leading newline break)
23556 <nowiki>=b=</nowiki>
23560 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23564 <!--c0--><p>=a=</p>
23566 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23568 <!--c0--><nowiki>=a=</nowiki>
23570 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23574 Headings: 6d. Heading chars in SOL context (No escaping needed)
23584 Headings: 7. Insert a newline between new content and headings
23590 <h2 data-parsoid='{}'>A</h2>
23591 <p data-parsoid='{}'>a</p>
23601 #### --------------- Lists ---------------
23602 #### 0. Outside nests (*foo, etc.)
23603 #### 1. Nested inside html <ul><li>*foo</li></ul>
23604 #### 2. Inside definition lists
23605 #### 3. Only bullets at start should be escaped
23606 #### 4. No escapes needed
23607 #### 5. No unnecessary escapes
23608 #### 6. Escape bullets in SOL position
23609 #### 7. Escape bullets in a multi-line context
23610 #### ----------------------------------------
23613 Lists: 0. Outside nests
23623 <nowiki>*</nowiki>foo
23625 <nowiki>#</nowiki>foo
23627 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23630 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23631 ## to test wikitext escaping, and insignificant whitespace diffs
23632 ## cause PHP parser tests to barf
23634 Lists: 1. Nested inside html (No unnecessary escapes)
23643 <li data-parsoid='{}'>*foo</li>
23644 <li data-parsoid='{}'>#foo</li>
23645 <li data-parsoid='{}'>:foo</li>
23646 <li data-parsoid='{}'>;foo</li>
23654 <li data-parsoid='{}'>*foo</li>
23655 <li data-parsoid='{}'>#foo</li>
23656 <li data-parsoid='{}'>:foo</li>
23657 <li data-parsoid='{}'>;foo</li>
23664 *<nowiki>*foo</nowiki>
23665 *<nowiki>#foo</nowiki>
23666 *<nowiki>:foo</nowiki>
23667 *<nowiki>;foo</nowiki>
23673 #<nowiki>*foo</nowiki>
23674 #<nowiki>#foo</nowiki>
23675 #<nowiki>:foo</nowiki>
23676 #<nowiki>;foo</nowiki>
23680 Lists: 2. Inside definition lists
23684 <dl><dt>;foo</dt></dl>
23685 <dl><dt>:foo</dt></dl>
23688 <dl><dd>:foo</dd></dl>
23692 ; <nowiki>:foo</nowiki>
23694 ; <nowiki>:foo</nowiki>
23701 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23707 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23711 *<nowiki>*foo</nowiki>''it''*bar
23715 Lists: 4. No escapes needed
23728 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23732 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23746 Lists: 5. No unnecessary escapes
23750 <ul><li> bar <span>[[foo]]</span></li></ul>
23751 <ul><li> =bar <span>[[foo]]</span></li></ul>
23752 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23753 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23754 <ul><li> =bar <span>foo]]</span>=</li></ul>
23755 <ul><li> <s></s>: a</li></ul>
23756 <ul><li> <i>* foo</i></li></ul>
23759 * bar <span><nowiki>[[foo]]</nowiki></span>
23761 * =bar <span><nowiki>[[foo]]</nowiki></span>
23763 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23765 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23767 * =bar <span>foo]]</span>=
23775 Lists: 6. Escape bullets in SOL position
23779 <p><!--cmt-->*foo</p>
23781 <!--cmt--><nowiki>*</nowiki>foo
23785 Lists: 7. Escape bullets in a multi-line context
23794 <nowiki>*</nowiki>b
23798 Lists: 8. Escape colons only if not present in tags
23802 <dl><dt>a:b<i>c:d</i></dt></dl>
23804 ; <nowiki>a:b</nowiki>''c:d''
23807 #### --------------- HRs ---------------
23808 #### 1. Single line
23809 #### -----------------------------------
23812 HRs: 1. Single line
23820 ----<nowiki>----</nowiki>
23825 #### --------------- Tables ---------------
23826 #### 1a. Simple example
23827 #### 1b. No escaping needed (!foo)
23828 #### 1c. No escaping needed (|foo)
23829 #### 1d. No escaping needed (|}foo)
23831 #### 2a. Nested in td (<td>foo|bar</td>)
23832 #### 2b. Nested in td (<td>foo||bar</td>)
23833 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23835 #### 3a. Nested in th (<th>foo!bar</th>)
23836 #### 3b. Nested in th (<th>foo!!bar</th>)
23837 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23841 #### 4c. No escaping needed
23842 #### --------------------------------------
23845 Tables: 1a. Simple example
23853 <nowiki>{|</nowiki>
23858 Tables: 1b. No escaping needed
23869 Tables: 1c. No escaping needed
23880 Tables: 1d. No escaping needed
23891 Tables: 2a. Nested in td
23896 <td>foo|bar</td></tr>
23897 <tr><td>x<div>a|b</div></td>
23901 |<nowiki>foo|bar</nowiki>
23903 |x<div><nowiki>a|b</nowiki></div>
23919 Tables: 2b. Nested in td
23925 <td>a<i>b||c</i></td>
23926 <td>a<i><div>b||c</div></i></td>
23927 </tr></tbody></table>
23930 |<nowiki>foo||bar</nowiki>
23931 |a''<nowiki>b||c</nowiki>''
23932 |a''<div><nowiki>b||c</nowiki></div>''
23941 <td>a<i><div>b||c</div></i>
23947 Tables: 2c. Nested in td -- no escaping needed
23963 Tables: 3a. Nested in th
23979 Tables: 3b. Nested in th
23984 <tr><th>foo!!bar</th>
23985 <th><i>foo|bar</i></th>
23986 <th><i>foo!!bar</i></th>
23987 <th><i><span>foo!!bar</span></i></th>
23988 </tr></tbody></table>
23991 !<nowiki>foo!!bar</nowiki>
23992 !''<nowiki>foo|bar</nowiki>''
23993 !''<nowiki>foo!!bar</nowiki>''
23994 !''<span><nowiki>foo!!bar</nowiki></span>''
24003 <th><i>foo!!bar</i>
24005 <th><i><span>foo!!bar</span></i>
24011 Tables: 3c. Nested in th
24016 <tr><th>foo||bar</th>
24017 <th><span typeof="mw:Nowiki">foo||bar</span></th>
24018 </tr></tbody></table>
24021 !<nowiki>foo||bar</nowiki>
24022 !<nowiki>foo||bar</nowiki>
24035 Tables: 4a. Escape -
24051 |<nowiki>-bar</nowiki>
24056 Tables: 4b. Escape +
24072 |<nowiki>+bar</nowiki>
24077 Tables: 4c. No escaping needed
24082 <tr><td>foo-bar</td><td>foo+bar</td></tr>
24083 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
24089 <div>a|b</div></td>
24134 Tables: 4d. No escaping needed
24139 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
24140 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
24141 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
24152 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
24162 T97430: Don't emit empty nowiki pairs around marker meta tags
24166 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24167 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
24169 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24170 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
24174 Unclosed xmlish element in table line shouldn't eat end delimiters
24179 <tbody><tr><td> <foo</td>
24180 <td> bar></td></tr>
24197 #### --------------- Links ----------------
24198 #### 1. Quote marks in link text
24199 #### 2. Wikilinks: Escapes needed
24200 #### 3. Wikilinks: No escapes needed
24201 #### 4. Extlinks: Escapes needed
24202 #### 5. Extlinks: No escapes needed
24203 #### --------------------------------------
24205 Links 1. WikiLinks: No escapes needed
24209 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
24210 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
24211 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
24215 [[Foo|x [Foobar] x]]
24217 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
24218 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
24219 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
24224 Links 2. WikiLinks: Escapes needed
24228 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
24229 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
24230 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
24231 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
24232 <a href="Foo" rel="mw:WikiLink">|Bar</a>
24233 <a href="Foo" rel="mw:WikiLink">]]bar</a>
24234 <a href="Foo" rel="mw:WikiLink">[[bar</a>
24235 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
24236 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
24237 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
24239 [[Foo|<nowiki>Foobar]</nowiki>]]
24240 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
24241 [[Foo|<nowiki>[[Bar]]</nowiki>]]
24242 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
24243 [[Foo|<nowiki>|Bar</nowiki>]]
24244 [[Foo|<nowiki>]]bar</nowiki>]]
24245 [[Foo|<nowiki>[[bar</nowiki>]]
24246 [[Foo|<nowiki>x [[ y</nowiki>]]
24247 [[Foo|<nowiki>x ]] y</nowiki>]]
24248 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
24250 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
24251 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
24252 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
24253 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24254 <a href="/wiki/Foo" title="Foo">|Bar</a>
24255 <a href="/wiki/Foo" title="Foo">]]bar</a>
24256 <a href="/wiki/Foo" title="Foo">[[bar</a>
24257 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24258 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24259 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24264 Links 3. WikiLinks: No escapes needed
24268 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24269 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24274 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24275 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24280 Links 4. ExtLinks: Escapes needed
24284 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24285 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
24286 <p>[http://google.com]</p>
24287 <p>[http://google.com google]</p>
24288 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24289 <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>
24291 [http://google.com <nowiki>[google]</nowiki>]
24292 [http://google.com <nowiki>google]</nowiki>]
24294 <nowiki>[http://google.com]</nowiki>
24296 <nowiki>[http://google.com google]</nowiki>
24298 [http://google.com<nowiki>]</nowiki>
24300 [{{echo|http://google.com}}<nowiki>]</nowiki>
24302 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24303 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24304 </p><p>[http://google.com]
24305 </p><p>[http://google.com google]
24306 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24307 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24312 Links 5. ExtLinks: No escapes needed
24316 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24317 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24319 [http://google.com [google]
24321 [[http://google.com]]
24323 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24324 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24329 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
24333 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24334 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24335 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24336 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24337 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24338 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24339 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24340 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24341 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24342 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24343 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24344 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24345 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24348 x<nowiki/>http://example.com<nowiki/>y
24349 http://example.com<nowiki/>?x
24350 http://example.com<nowiki/>&x
24351 http://example.com<nowiki/>'x
24352 http://example.com<nowiki/>,x
24353 http://example.com<nowiki/>.x
24354 http://example.com<nowiki/>;x
24355 http://example.com<nowiki/>:x
24356 http://example.com<nowiki/>;x
24357 http://example.com<nowiki/>!x
24358 http://example.com<nowiki/>=x
24359 http://example.com<nowiki/>(x)
24360 http://example.com(x<nowiki/>)
24364 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24369 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24371 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24372 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24373 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24374 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24375 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24381 "http://example.com"
24382 (http://example.com)
24383 (http://example.com) foo
24384 http://example.com,
24385 http://example.com, foo
24388 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24390 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24391 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24392 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24393 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24394 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24399 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24403 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24404 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24406 http://example.com.,;:!?\
24407 -http://example.com:
24409 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24410 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24415 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
24419 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24420 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24421 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24425 X<nowiki/>RFC 123<nowiki/>y
24429 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
24433 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24434 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24435 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24442 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24443 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24444 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24449 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
24453 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24454 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24455 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24459 X<nowiki/>PMID 123<nowiki/>y
24463 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
24467 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24468 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24469 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24476 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24477 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24478 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24483 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
24487 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24488 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24489 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24492 ISBN 1234567890<nowiki/>1
24493 ISBN 1234567890<nowiki/>x
24494 a<nowiki/>ISBN 1234567890<nowiki/>b
24498 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
24502 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24506 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24511 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24515 <p>this is not a link: http://example.com
24518 this is not a link: <nowiki>http://example.com</nowiki>
24522 Links 15. Link trails can't become link prefixes.
24527 <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>
24529 [[Söfnuður]]-[[00]]
24531 <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>
24535 #### --------------- Quotes ---------------
24536 #### 1. Quotes inside <b> and <i>
24537 #### 2. Link fragments separated by <i> and <b> tags
24538 #### 3. Link fragments inside <i> and <b>
24539 #### 4. No escaping needed
24540 #### --------------------------------------
24542 1a. Quotes inside <b> and <i>
24553 <b>foo'<i>bar'</i>baz</b>
24562 <i>fools'<span> errand</span></i>
24563 <i><span>fool</span>'s errand</i>
24564 '<i>foo</i> bar '<i>baz</i>
24565 a|!*#-:;+-~[]{}b'<i>x</i>
24569 ''<nowiki>''foo''</nowiki>''
24570 ''<nowiki>'''foo'''</nowiki>''
24572 '''<nowiki/>'foo''''
24573 '''<nowiki>''foo''</nowiki>'''
24574 '''<nowiki>'''foo'''</nowiki>'''
24575 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24576 '''foo'''<nowiki/>'s
24582 '''foo'''<nowiki/>'
24583 ''''foo'''<nowiki/>'
24584 ''fools'<span> errand</span>''
24585 ''<span>fool</span>'s errand''
24586 '<nowiki/>''foo'' bar '''baz''
24587 a|!*#-:;+-~[]{}b'''x''
24591 1b. Quotes inside <b> and <i> with other tags on same line
24595 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24596 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24597 <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>
24598 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24599 '<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>
24600 '<i>foo</i> <div title="name">test</div>
24601 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24602 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24603 <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>
24606 '''a'' foo ''[[bar]]''
24607 ''a''' foo ''[[bar]]''
24608 ''a''' foo '''{{echo|[[bar]]}}'''
24609 [[foo]] x'''[[bar]]''
24610 '''foo'' <ref>test</ref>
24611 '''foo'' <div title="name">test</div>
24612 '''foo'' and <br> bar
24617 2. Link fragments separated by <i> and <b> tags
24621 <p>[[<i>foo</i>hello]]</p>
24622 <p>[[<b>foo</b>hello]]</p>
24624 [[''foo''<nowiki>hello]]</nowiki>
24626 [['''foo'''<nowiki>hello]]</nowiki>
24629 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24630 # this is one of the shortcomings of this format
24632 3. Link fragments inside <i> and <b>
24636 <p><i>[[foo</i>]]</p>
24637 <p><b>[[foo</b>]]</p>
24639 ''[[foo''<nowiki>]]</nowiki>
24641 '''[[foo'''<nowiki>]]</nowiki>
24645 4. No escaping needed
24649 <p>'<span><i>bar</i></span>'
24650 '<span><b>bar</b></span>'
24654 '<span>''bar''</span>'
24655 '<span>'''bar'''</span>'
24659 #### ----------- Paragraphs ---------------
24660 #### 1. No unnecessary escapes
24661 #### --------------------------------------
24664 1. No unnecessary escapes
24668 <p>bar <span>[[foo]]</span>
24669 </p><p>=bar <span>[[foo]]</span>
24670 </p><p>[[bar <span>[[foo]]</span>
24671 </p><p>]]bar <span>[[foo]]</span>
24672 </p><p>=bar <span>foo]]</span>=
24675 bar <span><nowiki>[[foo]]</nowiki></span>
24677 =bar <span><nowiki>[[foo]]</nowiki></span>
24679 [[bar <span><nowiki>[[foo]]</nowiki></span>
24681 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24683 =bar <span>foo]]</span><nowiki>=</nowiki>
24686 #### ----------------------- PRE --------------------------
24687 #### 1. Leading whitespace in SOL context should be escaped
24688 #### ------------------------------------------------------
24690 1. Leading whitespace in SOL context should be escaped
24713 <nowiki> </nowiki>a
24715 <nowiki> </nowiki> a
24719 <nowiki> </nowiki> a
24721 <nowiki> </nowiki>a
24724 <nowiki> </nowiki>b
24747 2. Leading whitespace in non-indent-pre contexts should not be escaped
24751 <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>
24752 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24753 <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>
24763 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24782 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24786 <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>
24788 [[File:Foobar.jpg|thumb|caption]]
24792 5. Nowiki escaping should account for indent-pres
24802 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24815 #### --------------- Behavior Switches --------------------
24818 1. Valid behavior switches should be escaped
24825 <nowiki>__TOC__</nowiki>
24826 ''<nowiki>__TOC__</nowiki>''
24830 2. Invalid behavior switches should not be escaped
24841 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24843 Behavior switches should be SOL-transparent
24847 <meta property="mw:PageProp/toc" />
24849 <!-- this one's bogus -->
24852 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24854 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24858 <!-- this one's bogus -->
24867 #### --------------- HTML tags ---------------
24870 #### 3. multi-line html tag
24871 #### 4. extension tags
24872 #### -----------------------------------------
24878 <a href="http://google.com">google</a>
24880 <a href="http://google.com">google</a>
24888 <ul><li> <div>foo</div></li>
24889 <li> <div style="color:red">foo</div></li>
24890 <li> <td></li></ul>
24893 * <nowiki><div>foo</div></nowiki>
24894 * <nowiki><div style="color:red">foo</div></nowiki>
24895 * <nowiki><td></nowiki>
24899 3. multi-line html tag
24918 <p><ref>foo</ref>
24919 </p><p><ref>bar
24920 </p><p>baz</ref>
24923 <nowiki><ref>foo</ref></nowiki>
24925 <nowiki><ref>bar</nowiki>
24927 baz<nowiki></ref></nowiki>
24930 #### --------------- Others ---------------
24936 <p><nowiki>foo</nowiki>
24939 <nowiki>foo</nowiki>
24942 ## The quote-char in the input is necessary for triggering the bug
24944 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24953 #----------- End of wikitext escaping tests --------------
24957 Tag-like HTML structures are passed through as text
24979 </p><p>1<d e>f
24984 HTML tag with necessary entities in attributes
24986 <span title="&amp;">foo</span>
24988 <p><span title="&amp;">foo</span>
24993 HTML tag with 'unnecessary' entity encoding in attributes
24995 <span title="&">foo</span>
24997 <p><span title="&">foo</span>
25002 HTML tag with broken attribute value quoting
25004 parsoid=wt2html,html2html
25006 <span title="Hello world>Foo</span>
25008 <p><span title="Hello world">Foo</span>
25011 <p><span title="Hello world">Foo</span></p>
25015 Self-closed tag with broken attribute value quoting
25017 parsoid=wt2html,html2html
25019 <div title="Hello world />Foo
25021 <div title="Hello world"></div>
25024 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
25028 Table with broken attribute value quoting
25030 parsoid=wt2html,html2html
25033 | title="Hello world|Foo
25038 <td title="Hello world">Foo
25044 <td title="Hello world">Foo
25050 Table with broken attribute value quoting on consecutive lines
25052 parsoid=wt2html,html2html
25055 | title="Hello world|Foo
25056 | style="color:red|Bar
25061 <td title="Hello world">Foo
25063 <td style="color:red">Bar
25069 <td title="Hello world">Foo
25070 </td><td style="color: red">Bar
25071 </td></tr></tbody></table>
25076 Accept empty td cell attribute
25079 | align="center" | foo || |
25084 <td align="center"> foo </td>
25091 Non-empty attributes in th-cells
25094 ! Foo !! style="color: red" | Bar
25100 <th style="color: red"> Bar
25106 Accept empty attributes in th-cells
25121 Empty table rows go away
25142 ### Parsoid-centric tests for testing RTing of inter-element separators
25143 ### Edge cases not tested by existing parser tests and specific to
25144 ### Parsoid-specific serialization strategies.
25148 RT-ed inter-element separators should be valid separators
25160 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
25164 # Parsoid-only since PHP parser relies on Tidy for correct output
25166 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
25180 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
25181 <p>bar</p></small></td></tr>
25185 <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>
25189 # Note that the "style" attribute is really a template parameter here.
25190 # The = would have to be {{=}} if you wanted the literal.
25192 Empty TD followed by TD with tpl-generated attribute
25197 |{{echo|style='color:red'}}|foo
25211 Indented table with an empty td
25229 ## We have some newline diffs RT-ing this edge case
25230 ## and it is not important enough -- we seem to be emitting
25231 ## at most 2 newlines after a </tr> and this is unrelated to
25232 ## the issue from T85627 that this is testing.
25234 Indented table with blank lines in between (T85627)
25253 Indented block & table
25267 <div data-parsoid='{"stx":"html"}'>foo</div>
25269 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25274 Indent and comment before table row
25289 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25290 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25294 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25296 Empty TR followed by a template-generated TR
25302 {{echo|<tr><td>foo</td></tr>}}
25308 <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}}]}'>
25313 ## PHP and parsoid output differ for this, and since this is primarily
25314 ## for testing Parsoid's serializer, marking this Parsoid only
25316 Empty TR followed by mixed-ws-comment line should RT correctly
25332 <!--c--> </tr><!--d-->
25338 Multi-line image caption generated by templates with/without trailing newlines
25340 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25341 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25343 <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>
25344 <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>
25348 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25352 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25354 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25356 <includeonly>foo</includeonly>
25364 ## PHP emits broken html for this, and since this is primarily
25365 ## a Parsoid serializer test, marking this Parsoid only
25367 Improperly nested inline or quotes tags with whitespace in between
25369 <span> <s>x</span> </s>
25372 <p><span> <s>x</s></span><s> </s>
25373 <b> <i>x</i></b><i> </i>
25378 Encapsulate protected attributes from wt
25380 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25382 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25386 <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>
25388 <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">
25389 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25393 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25394 ## Having nested or stray pre tags results in the attempt to add duplicates,
25395 ## causing an assertion fail. This test tries to prevent that situation.
25397 Ensure ParagraphWrapper can deal with stray closing pre tags
25407 1. Ensure fostered text content is wrapped in element nodes
25411 <table>hi</table><table>ho</table>
25420 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25422 parsoid=wt2html,wt2wt
25431 <tbody><tr><td> a</td></tr>
25436 Encapsulation properly handles null DSR information from foster box
25438 parsoid=wt2html,wt2wt
25440 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25442 <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>
25446 1. Encapsulate foster-parented transclusion content
25448 parsoid=wt2wt,wt2html
25450 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25452 <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>
25462 2. Encapsulate foster-parented transclusion content
25464 parsoid=wt2wt,wt2html
25466 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25468 <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>
25479 3. Encapsulate foster-parented transclusion content
25481 parsoid=wt2wt,wt2html
25483 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25485 <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>"]}">
25498 4. Encapsulate foster-parented transclusion content
25500 parsoid=wt2wt,wt2html
25502 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25504 <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>"]}">
25517 5. Encapsulate foster-parented transclusion content
25519 parsoid=wt2wt,wt2html
25521 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25523 <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>
25538 6. Encapsulate foster-parented transclusion content
25540 parsoid=wt2wt,wt2html
25542 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25544 <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>
25560 7. Encapsulate foster-parented transclusion content
25562 parsoid=wt2wt,wt2html
25564 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25566 <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>
25576 # Note that the wt is broken on purpose: the = should be {{=}} if you
25577 # don't want it to be a template parameter key.
25579 8. Encapsulate foster-parented transclusion content
25581 parsoid=wt2wt,wt2html
25584 }}{|{{echo|style='color:red'}}
25589 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25591 <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>
25602 9. Encapsulate foster-parented transclusion content
25604 parsoid=wt2wt,wt2html
25606 <table>{{echo|hi</table>hello}}
25608 <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>
25612 Table in fosterable position
25623 <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">
25625 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25631 # Parsoid only for bug 64747
25633 Properly encapsulate empty-content transclusions in fosterable positions
25641 <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"}]]}'>
25647 Always encapsulate foster box when template range is expanded to table
25660 T115289: Unclosed table
25662 {{echo|<table>}}<!--c-->[[Category:Two]]
25664 <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>
25668 T115289: Don't migrate newlines out of tables with fostered content
25670 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25672 <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>
25676 T73074: More fostering fun
25678 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25680 <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>
25684 Support <object> element with .data attribute
25688 <object data="test.swf"></object>
25690 <object data="test.swf"></object>
25694 Don't block XML namespace declaration
25696 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25698 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25701 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25704 # -----------------------------------------------------------------
25705 # The following section of tests are primarily to spec requirements
25706 # around Parsoid's serialization (old, new, edited content)
25708 # All these tests are marked Parsoid html2wt and html2html only
25709 # ----------------------------------------------------------------
25712 Ignore rel attribute in a-tags during serialization to url-links
25716 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25717 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25718 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25720 http://en.wikipedia.org/wiki/Foobar
25721 http://en.wikipedia.org/wiki/Foobar
25722 http://en.wikipedia.org/wiki/Foobar
25725 # 'mi' is a localinterwiki prefix as well as a language
25727 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25731 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25738 New wikilinks should be serialized properly
25742 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25743 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25744 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25745 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25746 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25750 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25751 http://en.wikipedia.org/wiki/Foo
25752 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25756 New wiki links (href variations)
25760 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25761 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25762 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25763 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25768 [[Toxine bactérienne]]
25772 New wiki links (content string variations)
25776 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25777 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25778 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25782 [[Foo_bar|./Foo_bar]]
25786 New category links (href variations)
25790 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25791 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25792 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25794 [[Category:Toxine bactérienne]]
25795 [[Category:Toxine bactérienne]]
25796 [[Category:Toxine bactérienne]]
25800 New sol transparent links don't need indent-pre nowiki protection
25805 <link rel="mw:PageProp/redirect" href="./Main_Page">
25806 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25807 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25809 #WEITERLEITUNG [[Main Page]]
25810 <!-- this is good --> [[Category:Good]]
25811 <!-- this is great --> [[Kategorie:Great]]
25815 New interlanguage links (href variations)
25819 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25820 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25821 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25823 [[es:Toxine bactérienne]]
25824 [[es:Toxine_bactérienne]]
25825 [[es:Toxine_bactérienne]]
25829 Image: Modifying size of an image (1)
25832 "modes": ["wt2wt"],
25834 ["img[height]", "attr", "height", "22"],
25835 ["img[width]", "attr", "width", "200"]
25839 [[Image:Foobar.jpg|230x230px]]
25841 [[Image:Foobar.jpg|200x200px]]
25845 Image: Modifying size of an image (2)
25848 "modes": ["wt2wt"],
25850 ["img[height]", "attr", "height", "100"],
25851 ["img[width]", "attr", "width", "500"]
25855 [[Image:Foobar.jpg|230x230px]]
25857 [[Image:Foobar.jpg|500x500px]]
25860 # Change in size is ignored so long as class='mw-default-size'
25862 Image: Modifying size of an image (3)
25865 "modes": ["wt2wt"],
25867 ["figure[class]", "removeClass", "mw-default-size"],
25868 ["figure img", "attr", "height", "19"],
25869 ["figure img", "attr", "width", "170"]
25873 [[Image:Foobar.jpg|thumb]]
25875 [[Image:Foobar.jpg|thumb|170x170px]]
25879 Image: Modifying alignment of an image (bug 48665)
25882 "modes": ["wt2wt"],
25884 ["figure[class]", "removeClass", "mw-halign-right"],
25885 ["figure[class]", "addClass", "mw-halign-left"]
25889 [[Image:Foobar.jpg|thumb|caption|right]]
25891 [[Image:Foobar.jpg|thumb|caption|left]]
25895 Image: Modifying mw-default-size of an frameless image (bug 62805)
25898 "modes": ["wt2wt"],
25900 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25904 [[Image:Foobar.jpg|frameless|right]]
25906 [[Image:Foobar.jpg|frameless|right|220x220px]]
25910 Image: Modifying valign of an image (bug 49221)
25913 "modes": ["wt2wt"],
25915 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25916 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25920 [[File:Foobar.jpg|20px|middle]]
25922 [[File:Foobar.jpg|20px|text-top]]
25926 Image: Modifying alt attribute of an image (bug 56400)
25929 "modes": ["wt2wt"],
25931 ["img[alt]", "attr", "alt", "some alternate edited text"]
25935 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25937 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25941 Image: Modifying caption of an image
25944 "modes": ["wt2wt"],
25946 ["figcaption", "text", "new caption"]
25950 [[Image:Foobar.jpg|thumb|original caption]]
25952 [[Image:Foobar.jpg|thumb|new caption]]
25956 Image: empty alt attribute (bug 48924)
25960 [[File:Foobar.jpg|thumb|alt=|bar]]
25962 <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>
25966 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25972 <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>
25974 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25978 Image: Block level image should have \n before and after
25981 [[File:Foobar.jpg|right|thumb|150x150px]]
25985 <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>
25990 Image: New block level image should have \n before and after (existing content)
25993 [[File:Foobar.jpg|right|thumb|150x150px]]
25997 <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>
26002 Image: upright option (parsoid)
26004 [[File:Foobar.jpg|thumb|upright|caption]]
26005 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
26006 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
26008 <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>
26009 <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>
26010 <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>
26014 Image: upright option is ignored on inline and frame images (parsoid)
26016 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
26018 <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>
26022 Image: from basic HTML (1)
26026 <span typeof="mw:Image">
26027 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26030 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26034 Image: from basic HTML (2)
26038 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26040 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26044 Image: from basic HTML (3)
26048 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
26050 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
26054 Image: from basic HTML (4)
26058 <img src="./File:Foobar.jpg">
26060 [[File:Foobar.jpg|link=]]
26064 Image: Invalid title as link
26066 [[File:Foobar.jpg|link=<]]
26068 <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>
26071 <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>
26075 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
26080 <li><p>foo</p></li>
26087 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
26091 <ul> <li>foo</li></ul>
26097 Don't strip leading whitespace when handling indent-pre suppressing tags
26102 <tr><td> indented row</td></tr>
26105 <b>This is very bold of you!</b>
26108 indented cell (no pre-wrapping!)
26118 '''This is very bold of you!'''
26122 indented cell (no pre-wrapping!)
26130 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
26152 <nowiki> </nowiki></span>bar2
26155 <nowiki> </nowiki><span>bar</span>
26158 <nowiki> </nowiki><span>foo</span>
26163 Lists: Dont insert newlines in a serialized list item.
26167 <ul><li>a<br>b</li><li>c</li></ul>
26174 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
26177 "modes": ["html2wt"],
26178 "scrubWikitext": false
26181 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26182 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26184 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26185 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26187 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
26189 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26191 == hello there [[Category:A1]] ==
26193 == [[Category:A2]] hi pal ==
26195 == <!--foo--> [[Category:A3]] how goes it ==
26197 == it goes well [[Category:A4]] <!--bar--> ==
26199 ==howdy [[Category:A5]]==
26205 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
26208 "modes": ["html2wt"],
26209 "scrubWikitext": true
26212 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26213 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26215 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26216 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26218 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26226 <!--foo--> [[Category:A3]]
26231 [[Category:A4]] <!--bar-->
26239 Headings: Don't hoist metas that come from templates
26242 "modes": ["html2wt"],
26243 "scrubWikitext": true
26246 <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>
26248 == {{echo|foo [[Category:Foo]]}} ==
26252 Headings: Category in ref isn't hoisted
26255 "modes": ["html2wt"],
26256 "scrubWikitext": true
26259 <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>
26261 <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>
26264 [[Category:Baz]] </ref> ==
26270 Parsoid: Serialize positional parameters with = in them as named parameter
26274 <p about="#mwt1" typeof="mw:Transclusion"
26275 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26277 <p about="#mwt1" typeof="mw:Transclusion"
26278 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26280 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26281 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26282 <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>
26286 {{echo|1=f=oo|2=bar}}
26288 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26289 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26290 {{echo|<nowiki>f=oo</nowiki>|bar}}
26294 Parsoid: Serialize positional parameters with = in extlink as named parameter
26298 <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>
26300 {{echo|1=http://stuff?is=ok}}
26304 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26308 <div>a<p>b</p></div>
26329 Substrings resembling wikitext in hrefs should not get nowiki escapes
26333 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26339 Enforce single-line context in the serializer
26346 <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">
26347 </span><span about="#mwt1">you</span> </h2>
26349 <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>
26351 <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
26352 there</span></li></ol>
26364 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26371 </tbody></table></dd></dl>
26375 == hi {{bogus|there
26386 * foo '''bar''' baz
26398 Serialize new placeholder space without spans
26402 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26404 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26406 <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>
26412 <ref>foo : bar</ref>ok
26416 #-----------------------
26417 # Tag minimization tests
26418 #-----------------------
26421 1. I/B quote minimization: wikitext-only tags should be combined
26425 <p><i>A</i><i>B</i></p>
26426 <p><b>A</b><b>B</b></p>
26427 <p><i>A</i><b><i>B</i></b></p>
26428 <p><b>A</b><i><b>B</b></i></p>
26429 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26430 <p><i><b>A</b></i><i><b>B</b></i></p>
26431 <p><i><b>A</b></i><b><i>B</i></b></p>
26432 <p><b><i>A</i></b><i><b>B</b></i></p>
26452 2. I/B quote minimization: wikitext and html tags should not be combined
26456 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26457 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26461 ''A''<nowiki/>'''<i>B</i>'''
26465 3. I/B quote minimization: templated content stops minimization
26469 <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>
26470 <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>
26472 ''A''{{echo|''B''}}
26474 ''A''{{echo|'''''B'''''}}
26478 4. I/B quote minimization: new content should be mimimized with adjacent old content
26482 <p><i>A</i><i>B</i></p>
26483 <p><b>A</b><b>B</b></p>
26484 <p><i>A</i><b><i>B</i></b></p>
26494 5a. Merge adjacent quote nodes if they've been edited
26497 "modes": ["wt2wt", "selser"],
26499 ["p", "contents", "remove", ":contains('b')"]
26509 5b. Merge adjacent quote nodes if they've been edited
26512 "modes": ["wt2wt", "selser"],
26518 ''a''<span id="x">b</span>''c''
26524 1. Merge adjacent link nodes as long as at least one element is new
26527 "modes": ["html2wt"],
26528 "scrubWikitext": true
26531 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26532 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26533 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26537 [[Football|Foot]][[Football|ball]]
26541 2. Merge adjacent link nodes and enable additional normalizations
26544 "modes": ["html2wt"],
26545 "scrubWikitext": true
26548 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26550 [[Football|''Football'']]
26554 3. Don't merge adjacent link nodes if scrubWikitext is false
26557 "modes": ["html2wt"],
26558 "scrubWikitext": false
26561 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26563 [[Football|Foot]][[Football|ball]]
26566 #------------------------------
26567 # End of tag minimization tests
26568 #------------------------------
26571 Bug 54262: New entities
26575 <span typeof="mw:Entity"> </span>
26580 ## Note that there is no wikitext output for 'unknownproperty' ##
26581 ## Unknown magic words are silently dropped ##
26588 <meta property='mw:PageProp/toc' />
26589 <meta property='mw:PageProp/notoc' />
26590 <meta property='mw:PageProp/forcetoc' />
26591 <meta property='mw:PageProp/index' />
26592 <meta property='mw:PageProp/noindex' />
26593 <meta property='mw:PageProp/nogallery' />
26594 <meta property='mw:PageProp/noeditsection' />
26595 <meta property='mw:PageProp/notitleconvert' />
26596 <meta property='mw:PageProp/nocontentconvert' />
26597 <meta property='mw:PageProp/unknownproperty' />
26607 __NOCONTENTCONVERT__
26611 Consecutive <pre>s should not get merged
26613 parsoid=html2wt,html2html
26615 <pre>a</pre><pre>b</pre>
26643 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26647 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26649 [[Special:BookSources/1234567890|ISBN 1234567895]]
26653 Edited RFC links not serializable as RFC links should serialize as extlinks
26657 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26659 [//tools.ietf.org/html/rfc123 New RFC]
26663 Edited PMID links not serializable as PMID links should serialize as extlinks
26667 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26669 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26673 WTS of autolinks with trailing/surrounding context
26677 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26678 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26679 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26680 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26681 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26682 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26684 http://cscott.net'''foo'''
26686 http://cscott.net<b>foo</b>
26688 '''http://cscott.net'''
26690 '''http://cscott.net '''
26692 '''http://cscott.net<nowiki/>x'''
26694 http://cscott.net<nowiki/>x
26698 WTS of autolinks with nowikis (round-trip)
26700 x<nowiki/>http://cscott.net<nowiki/>x
26702 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26705 # this is the "easy" test because it leaves in place all the
26706 # data-parsoid information indicating this is an autolink
26708 WTS of autolinks with escapes (editing)
26711 "modes": ["wt2wt"],
26713 [ "meta", "remove" ]
26717 x<nowiki/>http://cscott.net<nowiki/>x
26719 x<nowiki/>http://cscott.net<nowiki/>x
26723 WTS of edited autolink-like text (T103364)
26726 "modes": ["wt2wt"],
26728 [ "span[typeof]", "removeAttr", "typeof" ]
26732 Not a link: <nowiki>http://example.com</nowiki>.
26734 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26738 WTS of newly-authored autolink-like text (T103364)
26742 <p>http://example.com is not a link.</p>
26744 <nowiki>http://example.com</nowiki> is not a link.
26748 WTS of autolink-like text after an autolink (T108563)
26752 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26754 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26758 Magic links inside links (not autolinked)
26760 [[Foo|http://example.com]]
26763 [[Foo|ISBN 123456789x]]
26765 [http://foo.com http://example.com]
26766 [http://foo.com RFC 1234]
26767 [http://foo.com PMID 1234]
26768 [http://foo.com ISBN 123456789x]
26770 <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>
26771 <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>
26773 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26774 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26775 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26776 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26778 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26779 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26780 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26781 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26785 Magic links inside image captions (autolinked)
26787 [[File:Foobar.jpg|thumb|http://example.com]]
26788 [[File:Foobar.jpg|thumb|RFC 1234]]
26789 [[File:Foobar.jpg|thumb|PMID 1234]]
26790 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26792 <div class="thumb tright">
26793 <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>
26794 <div class="thumbcaption">
26795 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26796 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26799 <div class="thumb tright">
26800 <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>
26801 <div class="thumbcaption">
26802 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26803 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26806 <div class="thumb tright">
26807 <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>
26808 <div class="thumbcaption">
26809 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26810 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26813 <div class="thumb tright">
26814 <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>
26815 <div class="thumbcaption">
26816 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26817 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26821 <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>
26822 <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>
26823 <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>
26824 <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>
26828 WTS of magic word text (T109371)
26833 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26834 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26836 <nowiki>RFC 1234</nowiki>
26838 [http://foo.com RFC 1234]
26844 Edited Redirect link should emit a non-piped wikitext link
26848 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26854 T75121: Infer extension name from typeOf if data-mw is not present
26856 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26858 <div typeOf="mw:Extension/foo"></div>
26863 # Note that the <p> wrapping isn't present in PHP parser output
26864 # The important thing for this test is that P-wrapping doesn't
26865 # interfere with the <nowiki> protection for leading - in <td>
26866 # (which isn't necessary for <th>).
26868 T88318: p-wrapped dash in table.
26870 parsoid=html2wt,wt2wt
26873 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26874 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26875 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26882 |<nowiki>-</nowiki>
26883 |<nowiki>- </nowiki>
26902 <td><small>-</small></td>
26914 T149209: WTS: Handle newlines in table cells properly
26922 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26924 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26930 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26932 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26954 T149209: Selser: Handle newlines in table cells properly
26957 "modes": ["selser"],
26959 [ "#h1", "html", "a\nb\n" ],
26960 [ "#h2", "html", "a\nb\n" ],
26961 [ "#c1", "html", "a\nb\n" ],
26962 [ "#c2", "html", "<p>a</p>" ],
26963 [ "#c3", "html", "<p>a</p>" ],
26964 [ "#c4", "html", "edit-me<p>a</p>" ]
26969 ! id="h1" |edit-me!!1
26971 ! id="h2" |edit-me||2
26973 | id="c1" |edit-me||3
26975 | id="c2" |edit-me||4
26977 | id="c3" |edit-me||p||q||r
26979 | id="c4" |edit-me||p||q||r
27008 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
27013 <td id='mwAc'>foo</td>
27014 <td id='serialize-this'>bar</td>
27019 | id="serialize-this" |bar
27024 Parsoid-like element ids should not be serialized to wikitext unless shadowed
27028 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
27030 <div id="hello">ok</div>
27037 "modes": ["wt2wt"],
27039 [ "#xyz", "before", "<b>before</b> stuff " ],
27040 [ "#xyz", "after", " stuff <i>after</i>" ],
27041 [ "#xyz", "html", "x <b>y</b> z" ]
27045 <span id="xyz">hello</span>
27047 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
27051 Never serialize a-tag as html, regardless of what data-parsoid has to say
27053 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27055 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
27060 ## SSS FIXME: This is broken output nevertheless.
27061 ## What might be a reasonable non-broken output for this?
27062 ## This is an edge case unlikely to be seen in production
27063 ## that I am not wasting more time on this right now.
27065 Never serialize a-tag as html, no matter what attributes it has
27067 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27069 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
27071 [http://boo.org http://boohoo.org]
27074 # Misnested is an indication that selser can reuse the source but these have
27075 # shown to sneak through on occasion. See T101768.
27076 # The original wikitext here is: [http://test.com [[one]] two three]
27078 Strip span tags added to mark misnested links
27082 <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>
27084 [http://test.com][[one]] two three
27088 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
27092 <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|}"]}'>
27104 ## This test verifies the presence and computation of this attribute indirectly
27105 ## by making an edit and ensuring that the serialization is correct (which it would be
27106 ## only if firstWikitextNode is properly set).
27108 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
27111 "modes": ["wt2wt"],
27113 [ "div#x", "remove" ],
27114 [ "div", "before", "<div>new</div>" ]
27118 <div id="x">foo</div>
27120 {{echo|<div>boo</div>
27128 {{echo|<div>boo</div>
27134 # --------------------------------------------
27135 # Tests spec'ing wikitext serialization norms |
27136 # --------------------------------------------
27139 1. Categories should always be serialized on their own line
27143 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
27151 2. Categories that are part of templates should not introduce a line break
27153 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
27155 <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>
27158 # Careful while editing these next 2 tests. There are \u200f characters
27159 # before and after the <link> tags in the HTML and following some
27160 # of the categories in wikitext
27161 # Do not remove these characters in edits.
27163 # As part of the serialization, these bidi characters will get stripped.
27165 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
27168 "modes": ["html2wt"],
27169 "scrubWikitext": true
27172 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
27173 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
27176 [[קטגוריה: שיטות משפט]]
27180 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
27183 "modes": ["html2wt"],
27184 "scrubWikitext": true
27187 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
27194 Lists: Add space after bullets
27201 <li><span> baz</span></li>
27206 * <span> baz</span>
27210 1. Headings: Add space before/after == (T53744)
27217 <h2><span> baz</span></h2>
27225 == <span> baz</span> ==
27229 2. Headings: Add space before/after == even after hoisted content
27232 "modes": ["html2wt"],
27233 "scrubWikitext": true
27236 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
27244 1. Headings: suppress newly created empty headings
27247 "modes": ["html2wt"],
27248 "scrubWikitext": true
27256 2. Headings: don't suppress empty headings if scrubWikitext is false
27266 3. Headings: suppress empty headings on edits
27269 "modes": ["selser"],
27270 "scrubWikitext": true,
27276 ==<span id="x">foo</span>==
27281 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27284 "modes": ["html2wt"],
27285 "scrubWikitext": true
27288 <h2>foo<br/>bar</h2>
27289 <h2>foo <span><br/>bar</span> baz</h2>
27293 == foo <span> bar</span> baz ==
27297 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27300 "modes": ["html2wt"],
27301 "scrubWikitext": false
27304 <h2>foo<br/>bar</h2>
27310 1. WT Quote Tags: suppress newly created empty style tags
27313 "modes": ["html2wt"],
27314 "scrubWikitext": true
27322 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27328 ''<nowiki/>'''''<nowiki/>'''
27332 3. WT Quote Tags: suppress empty style tags on edits
27335 "modes": ["selser"],
27336 "scrubWikitext": true,
27342 '''<span id="x">foo</span>'''
27347 1. Anchors: suppress newly created empty anchors
27350 "modes": ["html2wt"],
27351 "scrubWikitext": true
27354 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27359 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27362 "modes": ["html2wt"],
27363 "scrubWikitext": false
27366 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27372 3. Anchors: suppress empty anchors on edits
27375 "modes": ["selser"],
27376 "scrubWikitext": true,
27382 [[Test|<span id="x">foo</span>]]
27387 3a. Anchors: do not suppress numbered extlinks
27390 "modes": ["wt2wt"],
27391 "scrubWikitext": true
27396 <a rel="mw:ExtLink" href="http://foo.com"></a>
27400 3b. Anchors: do not suppress numbered extlinks
27403 "modes": ["wt2wt"],
27404 "scrubWikitext": true,
27410 [http://foo.com <span id="x">foo</span>]
27416 Normalizations should be restricted to edited content
27419 "modes": ["selser"],
27420 "scrubWikitext": true,
27422 [ "h1", "before", "<i></i>"]
27436 1. Multiple normalizations (html2wt)
27439 "modes": ["html2wt"],
27440 "scrubWikitext": true
27444 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27445 </a><b><i></i></b>x</p>
27454 2. Multiple normalizations (selser)
27457 "modes": ["selser"],
27458 "scrubWikitext": true,
27460 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27464 <span id="x">foo</span>
27466 <span id="x">foo</span>
27472 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27475 "modes": ["html2wt"],
27476 "scrubWikitext": true
27488 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27495 <nowiki> </nowiki>hi
27497 <nowiki> </nowiki> hello
27501 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27504 "modes": ["html2wt"],
27505 "scrubWikitext": true
27514 baz bang</td></tr></table>
27520 bar<span>boo</span></p>
27536 bar<span>boo</span>
27540 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27543 "modes": ["selser"],
27544 "scrubWikitext": true,
27546 [ "p", "html", " a\n b" ]
27557 1. New links that end in spaces
27560 "modes": ["html2wt"],
27561 "scrubWikitext": false
27564 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27565 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27566 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27568 [[Berlin ]]<nowiki/>is the capital of Germany.
27572 [[Boston ]] is a city.
27576 2. New links that end in spaces
27579 "modes": ["html2wt"],
27580 "scrubWikitext": true
27583 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27584 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27585 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27587 [[Berlin]] is the capital of Germany.
27591 [[Boston]] is a city.
27595 1. Table cells with escapable prefixes
27598 "modes": ["html2wt"],
27599 "scrubWikitext": false
27603 <tr><td>a</td></tr>
27604 <tr><td>-</td></tr>
27605 <tr><td>+</td></tr>
27611 |<nowiki>-</nowiki>
27613 |<nowiki>+</nowiki>
27618 2. Table cells with escapable prefixes
27621 "modes": ["html2wt"],
27622 "scrubWikitext": true
27626 <tr><td>a</td></tr>
27627 <tr><td>-</td></tr>
27628 <tr><td>+</td></tr>
27641 3a. Table cells with escapable prefixes after edits
27644 "modes": ["selser"],
27645 "scrubWikitext": true,
27647 [ "table tbody tr:first-child td:first-child", "remove"]
27661 3b. Table cells with escapable prefixes after edits
27664 "modes": ["selser"],
27665 "scrubWikitext": true,
27667 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27674 |<span id="x">foo</span>+
27683 # FIXME: This test will fail because
27684 # normalization doesn't realize that the id attribute
27685 # will eliminate the escapable scenario
27687 4a. Table cells without escapable prefixes after edits
27690 "modes": ["selser"],
27691 "scrubWikitext": true,
27693 [ "#x", "html", "-" ]
27706 ## This tests normalizer's ability to discriminate between
27707 ## cells having identical content.
27709 4b. Table cells without escapable prefixes after edits
27712 "modes": ["selser"],
27713 "scrubWikitext": true,
27715 [ "td", "html", "-" ]
27728 ## This tests normalizer's ability to not be tripped by
27729 ## comments (and whitespace)
27731 4c. Table cells without escapable prefixes after edits
27734 "modes": ["selser"],
27735 "scrubWikitext": true,
27737 [ "table tbody tr td:first-child", "remove" ]
27752 ## This tests normalizer's ability to handle HTML cells
27754 4d. Table cells without escapable prefixes after edits
27757 "modes": ["selser"],
27758 "scrubWikitext": true,
27760 [ "td", "html", "-" ]
27765 <tr><td>a</td></tr>
27769 <tr><td>-</td></tr>
27773 ## T111151 Remove font elements without attributes
27775 5a. font tags without attributes should be dropped in scrubWikitext mode
27778 "modes": ["html2wt"],
27779 "scrubWikitext": true
27783 <font><font>bar</font></font>
27784 <font class="x">boo</font>
27788 <font class="x">boo</font>
27792 5b. font tags should not be dropped without scrubWikitext being enabled
27795 "modes": ["html2wt"],
27796 "scrubWikitext": false
27805 Escape nowiki DOM elements
27809 <nowiki><i>foo</i></nowiki>
27811 <nowiki>''foo''</nowiki>
27814 # This is meant to be an interim fix while we go about figuring out
27815 # how to not introduce these trailing <nowiki/>s in the first place.
27817 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27821 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27823 <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>
27824 <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>
27837 # ---------------------------------------------------
27838 # End of tests spec'ing wikitext serialization norms |
27839 # ---------------------------------------------------
27843 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27851 <td><b>c</b><p>d</p></td>
27869 # -----------------------------------------------------------------
27870 # End of section for Parsoid-only html2wt tests for serialization
27872 # -----------------------------------------------------------------
27874 # -----------------------------------------------------------------
27875 # The following section of tests are primarily to spec behavior of
27876 # the selective serializer. All these tests have manual selser
27877 # changes. The automated selser changes for all tests handle the
27878 # wide variation of changes, but these tests here capture specs
27879 # deterministically.
27880 # ----------------------------------------------------------------
27884 Selser: New comments should not be lost
27887 "modes": ["selser"],
27889 [ "#a", "after", "<!--c1-->" ],
27890 [ "#b", "before", "<!--c2-->" ]
27894 <span id="a">a</span>
27896 <span id="b">b</span>
27898 <span id="a">a</span><!--c1-->
27900 <!--c2--><span id="b">b</span>
27905 Selser: Check for validity of DSR before using it
27908 "modes": ["selser"],
27910 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27914 <span id="a">a</span>
27916 {{DISPLAYTITLE:foo}}
27917 <span id="a">a</span>
27921 1. DOMDiff: Changes to <ref> content should be looked up using id
27924 "modes": ["selser"],
27926 ["#X", "after", "bar"],
27927 ["#Y", "after", "baz"]
27931 X <ref><span id="X">foo</span></ref>
27934 <ref name="a"><span id="Y">foo</span></ref>
27937 X <ref><span id="X">foo</span>bar</ref>
27940 <ref name="a"><span id="Y">foo</span>baz</ref>
27945 2. DOMDiff: Changes to <ref> content should be looked up using id
27948 "modes": ["selser"],
27950 ["#Z", "after", "bar"]
27954 A <ref>foo bar for a</ref>
27955 B <ref group="X" name="b" />
27959 <references group="X">
27960 <ref name="b"><span id="Z">foo</span></ref>
27963 A <ref>foo bar for a</ref>
27964 B <ref group="X" name="b" />
27968 <references group="X">
27969 <ref name="b"><span id="Z">foo</span>bar</ref>
27974 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27977 "modes": ["selser"],
27979 [ "div:first-child", "text", "bar" ]
27983 <div style="{{1x|color:red;}}%">foo</div>
27985 <div style="{{1x|color:red;}}%">bar</div>
27998 <li class="mw-empty-elt"></li>
27999 <li class="mw-empty-elt"></li>
28007 [[File:Thumb.png|thumb]]
28009 <div class="thumb tright">
28010 <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>
28011 <div class="thumbcaption">
28012 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
28019 unclosed internal link XSS (T137264)
28021 [[#%3Cscript%3Ealert(1)%3C/script%3E|
28023 <p>[[#<script>alert(1)</script>|
28026 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>