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 Definition lists: ignore colons inside tags
3688 ;one <b>two : tag <i>fun:</i>:</b>: def
3690 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3696 Definition lists: excess closed tags
3698 ;one</b>two : bad tag fun
3701 <dt>onetwo </dt>
3702 <dd>bad tag fun</dd>
3707 <dd>bad tag fun</dd>
3712 Bug 11748: Literal closing tags
3716 <dd>test test test test test</dd>
3718 <dd>test test test test test</dd>
3723 <dd>test test test test test</dd>
3725 <dd>test test test test test</dd>
3731 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3734 ; term : description
3739 <dl><dt> term </dt>
3740 <dd> description</dd></dl>
3741 <ul><li> unordered</li></ul>
3747 Definition list with empty definition and following paragraph
3759 Nested definition lists using html syntax
3772 Definition Lists: No nesting: Multiple dd's
3785 Definition Lists: Indentation: Regular
3793 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3798 Definition Lists: Indentation: Missing 1st level
3804 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3809 Definition Lists: Indentation: Multi-level indent
3813 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3818 Definition Lists: Hacky use to indent tables
3825 should be left alone
3827 <dl><dd><dl><dd><table>
3832 </td></tr></table></dd></dl></dd></dl>
3834 should be left alone
3839 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3847 should be left alone
3850 <dl><dd><dl><dd><table><tr>
3853 </tr></table><!-- bar --></dd></dl></dd></dl>
3855 should be left alone</p>
3859 Definition Lists: Hacky use to indent tables, with comment before table
3865 <dl><dd><dl><dd><!-- foo --><table><tr>
3867 </tr></table></dd></dl></dd></dl>
3870 # The trailing whitespace in this test is to catch a regression in
3871 # Parsoid after T54473.
3873 Definition Lists: Hacky use to indent tables (WS-insensitive)
3882 </td></tr></table></dd></dl>
3886 <tbody><tr><td>a</td></tr>
3887 </tbody></table> </dd></dl>
3890 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3891 ## as an empty dt item. It also ignores all but the last ";" when followed
3892 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3893 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3896 ## Ex: ";;t2 ::d2" is transformed into:
3908 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3909 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3920 ## All Parsoid only definition list tests have this difference.
3922 ## See also: https://phabricator.wikimedia.org/T8569
3923 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3926 Table / list interaction: indented table with lists in table contents
3941 <ul><li> b</li></ul>
3945 <ul><li> d</li></ul>
3946 </td></tr></table></dd></dl>
3951 Table / list interaction: lists nested in tables nested in indented lists
3974 </td></tr></table></dd></dl>
3981 Definition Lists: Nesting: Multi-level (Parsoid only)
4011 Definition Lists: Nesting: Test 2 (Parsoid only)
4038 Definition Lists: Nesting: Test 3 (Parsoid only)
4081 Definition Lists: Nesting: Test 4
4086 <dl><dd><dl><dd><dl><dt>t3</dt>
4087 <dd>d3</dd></dl></dd></dl></dd></dl>
4092 ## The Parsoid team believes the following three test exposes a
4093 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4094 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4095 ## It also exposes a "misfeature" in tidy, which doesn't like
4096 ## <dl> tags with a single <dt> child; it converts the <dt> into
4097 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4099 Definition Lists: Mixed Lists: Test 1
4105 <dl><dd><dl><dt><ul><li> foo</li>
4106 <li> bar</li></ul></dt></dl>
4107 <dl><dt> baz</dt></dl></dd></dl>
4142 Definition Lists: Mixed Lists: Test 2
4147 <ul><li><dl><dd> d1</dd>
4148 <dd> d2</dd></dl></li></ul>
4154 Definition Lists: Mixed Lists: Test 3
4159 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4160 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4166 Definition Lists: Mixed Lists: Test 4
4171 <ul><li><dl><dt>d1 </dt>
4174 <dd>d4</dd></dl></li></ul>
4180 Definition Lists: Mixed Lists: Test 5
4186 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4192 Definition Lists: Mixed Lists: Test 6
4197 <ol><li><ul><li><dl><dd>d1
4198 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4204 Definition Lists: Mixed Lists: Test 7
4209 <dl><dd><ul><li> d1</li>
4210 <li> d2</li></ul></dd></dl>
4216 Definition Lists: Mixed Lists: Test 8
4221 <dl><dd><ul><li> d1</li></ul>
4222 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4228 Definition Lists: Mixed Lists: Test 9
4232 <ul><li><dl><dt>foo </dt>
4233 <dd>bar</dd></dl></li></ul>
4239 Definition Lists: Mixed Lists: Test 10
4243 <ul><li><ol><li><dl><dt>foo </dt>
4244 <dd>bar</dd></dl></li></ol></li></ul>
4248 # The Parsoid team disagrees with the PHP parser's seemingly-random
4249 # rules regarding dd/dt on the next two tests. Parsoid is more
4250 # consistent, and recognizes the shared nesting and keeps the
4251 # still-open tags around until the nesting is complete.
4252 # (And tidy again converts <dt> to <dd> before 'bar'.)
4255 Definition Lists: Mixed Lists: Test 11
4260 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4261 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4262 <dl><dt>boo </dt>
4263 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4318 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4319 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4323 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4324 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4333 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4335 # * The test is wrong, there are two colons where there should be :;
4336 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4338 Definition Lists: Weird Ones: Test 1
4340 *#;*::;; foo : bar (who uses this?)
4342 <ul><li><ol><li><dl><dt> foo </dt>
4343 <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>
4362 <dt>bar (who uses this?)</dt>
4394 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4395 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4407 Definition Lists: colons occurring in tags
4425 <dt><span>a:b</span></dt>
4452 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4454 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4455 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4456 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4457 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4459 <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>
4460 <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>
4461 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4465 Definition Lists: colons and tables 1
4477 </td></tr></table></dd></dl>
4481 </td></tr></table></dd></dl>
4485 # Parsoid's output (as documented below) differs from php's in this case.
4486 # This is probably a bug. If we fixup parsoid to match php's output, the
4487 # above test should pass and the below test case can be removed. It is
4488 # unclear which output is more desirable.
4491 Definition Lists: colons and tables 2
4503 </td></tr></table></dd>
4507 </td></tr></table></dd></dl>
4511 Definition Lists: template interaction
4513 ::{{definition_list}}
4516 ::{{definition_list}}
4521 <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">
4522 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4524 <dl><dd data-parsoid='{}'>one
4525 <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">
4526 </span><dd about="#mwt2">two
4528 <dd>three</dd></dl></dd>
4529 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4537 External links: non-bracketed
4539 Non-bracketed: http://example.com
4541 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4545 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4547 External links: numbered
4549 Numbered: [http://example.com]
4550 Numbered: [http://example.net]
4551 Numbered: [http://example.com]
4553 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4554 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4555 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4558 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4559 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4560 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4564 External links: specified text
4566 Specified text: [http://example.com link]
4568 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4573 External links: trail
4575 Linktrails should not work for external links: [http://example.com link]s
4577 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4582 External links: dollar sign in URL
4584 http://example.com/1$2345
4586 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4590 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4592 External links: dollar sign in URL (autonumber)
4594 [http://example.com/1$2345]
4596 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4599 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4603 External links: open square bracket forbidden in URL (bug 4377)
4605 parsoid=wt2html,wt2wt,html2html
4607 http://example.com/1[2345
4609 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4612 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4616 External links: open square bracket forbidden in URL (named) (bug 4377)
4618 parsoid=wt2html,html2html
4620 [http://example.com/1[2345]
4622 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4625 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4628 # parsoid adds a space before the link name
4630 External links: open square bracket forbidden in URL (named) (bug 4377)
4633 [http://example.com/1 [2345]
4635 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4640 External links: nowiki in URL link text (bug 6230)
4642 [http://example.com/ <nowiki>''example site''</nowiki>]
4644 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4649 External links: newline forbidden in text (bug 6230 regression check)
4651 [http://example.com/ first
4654 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4660 External links: Pipe char between url and text
4662 [http://example.com | link]
4664 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4669 External links: protocol-relative URL in brackets
4671 [//example.com/ Test]
4673 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4677 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4679 External links: protocol-relative URL in brackets without text
4683 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4686 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4690 External links: protocol-relative URL in free text is left alone
4694 <p>//example.com/Foo
4699 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4701 foo//example.com/Foo
4703 <p>foo//example.com/Foo
4708 External links: with no contents
4710 [http://en.wikipedia.org/wiki/Foo]
4712 [[wikipedia:Foo|Bar]]
4714 [[wikipedia:Foo|<span>Bar</span>]]
4716 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4717 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4718 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4721 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4722 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4723 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4727 External links: Free with trailing punctuation
4737 http://example.com/url_with_(brackets)
4738 (http://example.com/url_without_brackets)
4739 http://example.com/url_with_entity&
4740 http://example.com/url_with_entity&
4741 http://example.com/url_with_entity&
4742 http://example.com/url_with_entity
4743 http://example.com/url_with_entity 
4744 http://example.com/url_with_entity 
4745 http://example.com/url_with_entity<
4746 http://example.com/url_with_entity<
4747 http://example.com/url_with_entity<
4749 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4750 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4751 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4752 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4753 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4754 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4755 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4756 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4757 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4758 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4759 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4760 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4761 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4762 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4763 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4764 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4765 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4766 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4767 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4770 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4771 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4772 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4773 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4774 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4775 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4776 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4777 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4778 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4779 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4780 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4781 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4782 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4783 <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>
4784 <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>
4785 <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>
4786 <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>
4787 <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>
4788 <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>
4792 External links: tricky Parsoid html2html case
4794 parsoid=wt2html,wt2wt,html2html
4796 http://example.com/url_with_entity&amp;
4798 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4801 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4805 External links: Free with trailing quotes (T113666)
4807 '''News:''' Stuff here
4811 <p><b>News:</b> Stuff here
4812 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4815 <p><b>News:</b> Stuff here</p>
4816 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4820 External links: with entity
4822 [http:// www.librarieswithoutborders.org Libraries without borders]
4824 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4827 <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>
4831 External links: Lone protocols are never linked (T105697)
4850 External links: No preceding word characters allowed (bug 65278)
4852 NOPEhttp://example.com
4853 N0http://example.com
4854 ok:http://example.com
4855 ok-http://example.com
4857 <p>NOPEhttp://example.com
4858 N0http://example.com
4859 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4860 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4865 External links: nofollow domain exception
4867 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4869 <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>.
4876 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4878 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4883 External image from https
4885 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4887 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4892 External image (when not allowed)
4894 wgAllowExternalImages=0
4896 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4898 <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>
4903 Link to non-http image, no img tag
4905 Link to non-http image, no img tag: ftp://example.com/test.jpg
4907 <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>
4912 External links: terminating separator
4914 Terminating separator: http://example.com/thing,
4916 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4921 External links: intervening separator
4923 Intervening separator: http://example.com/1,2,3
4925 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4930 External links: old bug with URL in query
4932 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4934 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4939 External links: old URL-in-URL bug, mixed protocols
4941 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4943 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4947 # Since Parsoid is starting to emit canonical wikitext for links,
4948 # [http://example.com http://example.com] will not RT back to that
4951 External links: URL in text
4955 URL in text: [http://example.com http://example.com]
4957 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4960 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4964 External links: Clickable images
4966 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4968 <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>
4971 <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>
4975 External links: raw ampersand
4977 Old & use: http://x&y
4979 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4984 External links: encoded ampersand
4986 Old & use: http://x&y
4988 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4991 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4995 External links: encoded equals (bug 6102)
4997 http://example.com/?foo=bar
4999 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5002 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5006 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5007 ## does it number them. As discussed in bug 53505, we can identify
5008 ## autonumbered links via CSS.
5012 External links: [raw ampersand]
5014 Old & use: [http://x&y]
5016 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5019 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5022 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5023 # mode will return the [raw ampersand] wikitext
5025 External links: [encoded ampersand]
5027 parsoid=wt2html,wt2wt,html2html
5029 Old & use: [http://x&y]
5031 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5034 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5038 External links: [raw equals]
5040 [http://example.com/?foo=bar]
5042 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5045 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5048 # note that parsoid html is identical to [raw equals] case; so html2wt
5049 # mode will return the [raw equals] wikitext
5051 External links: [encoded equals] (bug 6102)
5053 parsoid=wt2html,wt2wt,html2html
5055 [http://example.com/?foo=bar]
5057 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5060 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5063 # xxx parsoid strips the IDN character, so the round-trip tests will
5064 # obviously fail and are disabled. --cscott
5066 External links: [IDN ignored character reference in hostname; strip it right off]
5068 parsoid=wt2html,wt2wt,html2html
5070 [http://e‌xample.com/]
5072 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5075 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5078 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5079 # Where an external link could easily circumvent the sanitization of the text of
5080 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5081 # test demands a higher standard. That's a bit strange.
5085 # http://example.com -> [http://example.com|http://example.com]
5086 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5088 # The first example is sanitized, but the second is not. Any security benefits
5089 # from this production are trivial to circumvent. Either remove this test and
5090 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5091 # the test accordingly.
5095 # xxx parsoid strips the IDN character, so the round-trip tests will
5096 # obviously fail and are disabled. --cscott
5098 External links: IDN ignored character reference in hostname; strip it right off
5100 parsoid=wt2html,html2html
5102 http://e‌xample.com/
5104 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5107 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5111 External links: www.jpeg.org (bug 554)
5115 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5119 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5121 External links: URL within URL (original bug 2)
5123 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5125 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5128 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5132 BUG 361: URL inside bracketed URL
5134 [http://www.example.com/foo http://www.example.com/bar]
5136 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5141 BUG 361: URL within URL, not bracketed
5143 http://www.example.com/foo?=http://www.example.com/bar
5145 <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>
5150 BUG 289: ">"-token in URL-tail
5152 http://www.example.com/<hello>
5154 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5159 BUG 289: literal ">"-token in URL-tail
5161 http://www.example.com/<b>html</b>
5163 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5166 <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>
5170 BUG 289: ">"-token in bracketed URL
5172 [http://www.example.com/<hello> stuff]
5174 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5179 BUG 289: literal ">"-token in bracketed URL
5181 [http://www.example.com/<b>html</b> stuff]
5183 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5188 BUG 289: literal double quote at end of URL
5190 http://www.example.com/"hello"
5192 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5197 BUG 289: literal double quote in bracketed URL
5199 [http://www.example.com/"hello" stuff]
5201 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5206 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5208 [http://www.example.com test]
5210 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5215 External links: link text with spaces
5217 [http://www.example.com a b c]
5218 [http://www.example.com ''a'' ''b'']
5220 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5221 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5226 External links: wiki links within external link (Bug 3695)
5228 parsoid=wt2html,html2html
5230 [http://example.com [[wikilink]] embedded in ext link]
5232 <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>
5235 <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>
5239 BUG 787: Links with one slash after the url protocol are invalid
5243 [http:/example.com title]
5245 <p>http:/example.com
5246 </p><p>[http:/example.com title]
5251 Bracketed external links with template-generated invalid target
5253 [{{echo|http:/example.com}} title]
5255 <p>[http:/example.com title]
5260 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5262 ''[http://example.com text'']
5263 [http://example.com '''text]'''
5264 ''Something [http://example.com in italic'']
5265 ''Something [http://example.com mixed''''', even bold]'''
5266 '''''Now [http://example.com both''''']
5268 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5269 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5270 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5271 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5272 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5278 Bug 4781: %26 in URL
5280 http://www.example.com/?title=AT%26T
5282 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5285 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5288 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5289 # % is actually legal in HTML5. Any change in output would need testing though.
5291 Bug 4781, 5267: %25 in URL
5293 http://www.example.com/?title=100%25_Bran
5295 <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>
5298 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5302 Bug 4781, 5267: %28, %29 in URL
5304 http://www.example.com/?title=Ben-Hur_%281959_film%29
5306 <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>
5309 <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>
5314 Bug 4781: %26 in autonumber URL
5316 [http://www.example.com/?title=AT%26T]
5318 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5321 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5325 Bug 4781, 5267: %26 in autonumber URL
5327 [http://www.example.com/?title=100%25_Bran]
5329 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5332 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5336 Bug 4781, 5267: %28, %29 in autonumber URL
5338 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5340 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5343 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5348 Bug 4781: %26 in bracketed URL
5350 [http://www.example.com/?title=AT%26T link]
5352 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5355 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5359 Bug 4781, 5267: %25 in bracketed URL
5361 [http://www.example.com/?title=100%25_Bran link]
5363 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5368 Bug 4781, 5267: %28, %29 in bracketed URL
5370 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5372 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5375 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5379 External link containing a period in the anchor. (bug 63947)
5381 [//foo.org/bar#baz. bang]
5383 [//foo.org/bar. bang]
5385 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5386 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5389 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5390 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5394 External link containing a single quote. (bug 63947)
5398 [//foo.org/bar'baz bang]
5400 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5401 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5404 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5405 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5409 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5411 Some [http://example.com/ pretty ''italics'' and stuff]!
5413 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5418 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5420 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5422 <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>
5427 External link containing double-single-quotes with no space separating the url from text in italics
5429 [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]].]
5431 <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>
5434 <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>
5436 <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>
5440 External link with comments in link text
5442 [http://www.google.com Google <!-- comment -->]
5444 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5447 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5451 External link to bare IPv4 address
5453 [http://192.168.0.1 Link]
5455 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5458 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5462 URL-encoding in URL functions (single parameter)
5464 {{localurl:Some page|amp=&}}
5466 <p>/index.php?title=Some_page&amp=&
5471 URL-encoding in URL functions (multiple parameters)
5473 {{localurl:Some page|q=?&=&}}
5475 <p>/index.php?title=Some_page&q=?&amp=&
5482 http://example.com/index.php?foozoid%5B%5D=bar
5484 http://example.com/index.php?foozoid[]=bar
5486 <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>
5487 </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>
5490 <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>
5492 <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>
5496 IPv6 urls, autolink format (T23261)
5498 http://[2404:130:0:1000::187:2]/index.php
5500 Examples from RFC 2373, section 2.2:
5501 * http://[1080::8:800:200C:417A]/unicast
5502 * http://[FF01::101]/multicast
5503 * http://[::1]/loopback
5504 * http://[::]/unspecified
5505 * http://[::13.1.68.3]/ipv4compat
5506 * http://[::FFFF:129.144.52.38]/ipv4compat
5508 Examples from RFC 2732, section 2:
5509 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5510 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5511 * http://[3ffe:2a00:100:7031::1]
5512 * http://[1080::8:800:200C:417A]/foo
5513 * http://[::192.9.5.5]/ipng
5514 * http://[::FFFF:129.144.52.38]:80/index.html
5515 * http://[2010:836B:4179::836B:4179]
5518 <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>
5519 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5521 <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>
5522 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5523 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5524 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5525 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5526 <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>
5527 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5529 <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>
5530 <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>
5531 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5532 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5533 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5534 <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>
5535 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5538 <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>
5540 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5541 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5542 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5543 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5544 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5545 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5546 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5548 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5549 <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>
5550 <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>
5551 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5552 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5553 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5554 <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>
5555 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5559 IPv6 urls, bracketed format (T23261)
5561 [http://[2404:130:0:1000::187:2]/index.php test]
5563 Examples from RFC 2373, section 2.2:
5564 * [http://[1080::8:800:200C:417A] unicast]
5565 * [http://[FF01::101] multicast]
5566 * [http://[::1]/ loopback]
5567 * [http://[::] unspecified]
5568 * [http://[::13.1.68.3] ipv4compat]
5569 * [http://[::FFFF:129.144.52.38] ipv4compat]
5571 Examples from RFC 2732, section 2:
5572 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5573 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5574 * [http://[3ffe:2a00:100:7031::1] 3]
5575 * [http://[1080::8:800:200C:417A]/foo 4]
5576 * [http://[::192.9.5.5]/ipng 5]
5577 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5578 * [http://[2010:836B:4179::836B:4179] 7]
5581 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5582 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5584 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5585 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5586 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5587 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5588 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5589 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5590 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5592 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5593 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5594 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5595 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5596 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5597 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5598 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5601 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5603 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5604 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5605 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5606 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5607 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5608 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5609 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5611 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5612 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5613 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5614 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5615 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5616 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5617 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5618 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5622 Non-extlinks in brackets
5631 [{{echo|foo}} ''bar'']
5632 [{{echo|foo}}l's] errand
5633 [{{echo|foo}}l's errand]
5635 [url=http://example.com]
5636 [http:// bare protocols don't count]
5649 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5650 [http:// bare protocols don't count]
5658 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5659 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5660 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5661 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5662 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5663 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5664 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5665 [http:// bare protocols don't count]</p>
5669 Percent encoding in external links
5671 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5673 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5676 <p><a rel="mw:ExtLink"
5677 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5681 Use url link syntax for links where the content is equal the link target
5685 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5688 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5692 Parenthesis in external links, especially URL links
5696 http://example.com/test)
5698 http://example.com/(test)
5700 http://example.com/((test)
5702 (http://example.com/(test))
5704 (http://example.com/(test)))))
5706 http://example.com/a)b
5708 [http://example.com) foo]
5710 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5711 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5712 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5713 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5714 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5715 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5716 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5717 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5720 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5721 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5722 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5723 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5724 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5725 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5726 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5727 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5731 Parenthesis in external links, w/ transclusion or comment
5733 (http://example.com/{{echo|hi}})
5735 (http://example.com<!-- hi -->)
5737 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5738 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5741 <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>
5743 <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>
5747 Serialize <a> tags with invalid link targets as plain text
5749 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5751 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5752 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5753 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5754 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5757 <nowiki>*</nowiki>text
5758 <nowiki>[[foo]]</nowiki>
5759 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5763 mw:ExtLink -vs- mw:WikiLink (T94723)
5767 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5768 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5769 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5770 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5772 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5773 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5778 [[wikipedia:Foo|Bar]]
5779 [[wikipedia:Foo|Bar]]
5781 [[wikipedia:European_Robin|European Robin]]
5782 [[wikipedia:European_Robin|European Robin]]
5786 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5790 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5792 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5803 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5805 Normal text. '''''Bold italic text.''''' Normal text.
5807 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5808 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5813 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5814 # parser strips. The wikitext contains just the first half of the bold
5817 Unclosed and unmatched quotes
5819 '''''Bold italic text '''with bold deactivated''' in between.'''''
5821 '''''Bold italic text ''with italic deactivated'' in between.'''''
5825 ..spanning two paragraphs (should not work).'''
5827 '''Bold tag left open
5829 ''Italic tag left open
5833 <!-- Unmatching number of opening, closing tags: -->
5834 '''This year''''s election ''should'' beat '''last year''''s.
5836 ''Tom'''s car is bigger than ''Susan'''s.
5838 Plain ''italic'''s plain
5840 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5841 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5842 </p><p><b>Bold text..</b>
5843 </p><p>..spanning two paragraphs (should not work).
5844 </p><p><b>Bold tag left open</b>
5845 </p><p><i>Italic tag left open</i>
5847 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5848 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5849 </p><p>Plain <i>italic'</i>s plain
5852 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5853 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5854 </p><p><b>Bold text..</b>
5855 </p><p>..spanning two paragraphs (should not work).<b></b>
5856 </p><p><b>Bold tag left open</b>
5857 </p><p><i>Italic tag left open</i>
5860 <!-- Unmatching number of opening, closing tags: -->
5861 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5862 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5863 </p><p>Plain <i>italic'</i>s plain
5870 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5873 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5874 # is the bare minimum required by the spec, see:
5875 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5876 # Parsoid team replies: empty table tags are legal in HTML5
5878 A table with no data.
5891 A table with stray table end tags on start tag line (wt2html)
5895 {|style="color: red;"|}
5897 {|style="color: red;" |}
5901 {|style="color: red;"|} id="foo"
5905 {|style="color: red;" |} id="foo"
5909 <table style="color: red;"></table>
5911 <table style="color: red;">
5917 <table style="color: red;" id="foo">
5923 <table style="color: red;" id="foo">
5932 A table with no data (take 2)
5940 # A table with nothing but a caption is invalid XHTML, we might want to render
5941 # this as <p>caption</p>
5942 # Parsoid team replies: table with only a caption is legal in HTML5
5944 A table with nothing but a caption
5952 </caption><tr><td></td></tr></table>
5955 <table><caption> caption</caption></table>
5959 A table with caption with default-spaced attributes and a table row
5962 |+ style="color: red;" | caption1
5968 <caption style="color: red;"> caption1
5977 A table with captions with non-default spaced attributes and a table row
5980 |+style="color: red;"|caption2
5981 |+ style="color: red;"| caption3
5987 <caption style="color: red;">caption2
5989 <caption style="color: red;"> caption3
5998 Table td-cell syntax variations
6002 | foo bar foo || baz
6003 | style='color:red;' | baz
6004 | style='color:red;' || baz
6011 <td> foo bar foo </td>
6014 <td style="color:red;"> baz
6016 <td> style='color:red;' </td>
6044 Simple table but with multiple dashes for row wikitext
6063 Multiplication table
6065 {| border="1" cellpadding="2"
6066 |+Multiplication table
6068 ! × !! 1 !! 2 !! 3
6086 <table border="1" cellpadding="2">
6087 <caption>Multiplication table
6134 Accept "||" in table headings
6149 Accept "!!" in table data
6163 <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>
6168 Accept "||" in indented table headings
6178 </th></tr></table></dd></dl>
6183 Accept "!!" in templates
6197 <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>
6201 Accept "!!" in table headings after newline
6218 <p>b!!c</p></th></tr>
6223 Accept "!!" in table data of mixed wikitext / html syntax
6227 <tr><td>b!!c</td></tr>
6240 <tbody><tr><th>a</th></tr>
6241 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6246 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6263 Accept "| !" at start of line in tables (ignore !-attribute)
6267 | !style="color:red" | bar
6279 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 +/-
6283 |style='color:red;'|+1
6284 |style='color:blue;'|-1
6296 <td style="color:red;">+1
6298 <td style="color:blue;">-1
6322 |rowspan=2| Cell 2, row 1 (and 2)
6333 <td rowspan="2"> Cell 2, row 1 (and 2)
6351 {| bgcolor=#ABCDEF border=2
6356 |the original table again
6364 <table bgcolor="#ABCDEF" border="2">
6372 <td>the original table again
6378 Invalid attributes in table cell (bug 1830)
6392 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6396 | title="foo<nowiki>|</nowiki>" |bar
6397 | title="foo<nowiki>|</nowiki>" bar
6404 <td title="foo|">bar
6406 <td> title="foo|" bar
6411 <tbody><tr><td title="foo">bar</td>
6412 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6413 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6417 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6418 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6419 # *2wt modes will fail.
6421 Table security: embedded pipes
6423 parsoid=wt2html,html2html
6426 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6430 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6431 <td>]" onmouseover="alert(document.cookie)">test
6439 <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>
6443 Element attributes with double ! should not be broken up by <th>
6446 ! hi <div class="!!">ha</div> ho
6451 <th> hi <div class="!!">ha</div> ho
6456 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6461 ! and || in element attributes should not be parsed as <th>/<td>
6464 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6469 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6474 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6478 # FIXME: The output seems broken. Filed as T110268.
6480 ! and || in td attributes should not be parsed as <th>/<td>
6485 | style="color: red !important;" data-contrived="put this here ||" | foo
6490 <td> style="color: red !important;" data-contrived="put this here </td>
6496 <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>
6501 Break on | in element attribute in template
6503 parsoid=wt2html,html2html
6505 {{echo|1=<div class="hi|ho">ha</div>}}
6507 <p>ho">ha</div>
6510 <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>
6514 Break on | in element attribute name in template
6516 {{echo|<div cla|ss="hiho">ha</div>}}
6518 <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>
6522 Don't break on | in extension attribute in template
6524 {{echo|<ref name="hi|ho">ha</ref>}}
6528 <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>
6530 <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>
6533 ## We don't support roundtripping of these attributes in Parsoid.
6534 ## Selective serialization takes care of preventing dirty diffs.
6535 ## But, on edits, we dirty-diff the invalid attribute text.
6537 Invalid text in table attributes should be discarded
6541 {| <span>boo</span> style='border:1px solid black'
6542 | <span>boo</span> style='color:blue' | 1
6543 |<span>boo</span> style='color:blue'| 2
6546 <table style="border:1px solid black">
6548 <td style="color:blue"> 1
6550 <td style="color:blue"> 2
6554 <table style="border:1px solid black">
6556 <td style="color:blue"> 1</td>
6557 <td style="color:blue"> 2</td>
6563 Invalid text in table attributes should be preserved by selective serializer
6566 "modes": ["selser"],
6568 ["td:first-child", "text", "abc"],
6569 ["td + td", "text", "xyz"]
6573 {| <span>boo</span> style='border:1px solid black'
6574 | <span>boo</span> style='color:blue' | 1
6575 |<span>boo</span> style='color:blue'| 2
6578 {| <span>boo</span> style='border:1px solid black'
6579 | <span>boo</span> style='color:blue' |abc
6580 |<span>boo</span> style='color:blue'|xyz
6585 1. Template-generated table cell attributes and cell content
6590 || {{table_attribs_5}}
6591 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6592 |align=center {{table_attribs}}
6593 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6598 <td style="color:red;">Foo
6600 <td style="color:red;">Foo
6602 <td> style="color:red;"</td>
6605 <td style="color:red;">Foo
6607 <td align="center" style="color:red;">Foo
6609 <td align="center" style="color:red;">Foo
6615 2. Template-generated table cell attributes and cell content
6618 |{{table_attribs_2}}
6623 <td style="color:red;">Foo
6631 <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>
6632 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6637 3. Template-generated table cell attributes and cell content
6640 !align=center {{table_header_cells}}
6642 |align=center {{table_cells}}
6647 <th align="center" style="color:red;">Foo</th>
6648 <th style="color:red;"><i>Bar</i></th>
6649 <th style="color:brown;"><i>Foo</i> and Baz
6652 <td align="center" style="color:red;">Foo</td>
6653 <td style="color:red;"><i>Bar</i></td>
6654 <td style="color:brown;"><i>Foo</i> and Baz
6659 <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>
6660 <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>
6665 4. Template-generated table cell attributes and cell content inside a templated table
6668 !align=center {{table_header_cells}}
6670 |align=center {{table_cells}}
6675 <th align="center" style="color:red;">Foo</th>
6676 <th style="color:red;"><i>Bar</i></th>
6677 <th style="color:brown;"><i>Foo</i> and Baz
6680 <td align="center" style="color:red;">Foo</td>
6681 <td style="color:red;"><i>Bar</i></td>
6682 <td style="color:brown;"><i>Foo</i> and Baz
6686 <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}}]}'>
6687 <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>
6689 <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>
6693 ## Edge case fix to prevent future regressions
6695 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6698 |{{table_attribs_7}}
6703 <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>
6705 <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>
6709 Table with row followed by newlines and table heading
6711 parsoid=wt2html,html2html
6729 Table with empty line following the start tag
6731 parsoid=wt2html,html2html
6749 Table attributes with empty value
6751 parsoid=wt2html,html2html
6764 <tbody><tr><td style=""> hello</td></tr>
6769 Wikitext table with a lot of comments
6792 Wikitext table comments represented in parsoid dom
6794 {|<!--c1--><!--c2-->
6805 <table><!--c1--><!--c2-->
6806 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6807 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6812 Wikitext table with double-line table cell
6829 Table cell with a single comment
6846 Table-cell after a comment-only-empty-line
6863 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6865 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6871 Build table with {{!}}
6873 {{{!}} class="wikitable"
6876 {{!}}- style="color:red;"
6877 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6880 <table class="wikitable">
6886 <tr style="color:red;">
6888 <td style="color:red;"> second data
6894 Build table with pipe as data
6896 {| class="wikitable"
6899 |- style="color:red;"
6900 | data || style="color:red;" | second data
6902 | style="color:red;" | data with | || style="color:red;" | second data with |
6904 || data with | ||| second data with |
6907 <table class="wikitable">
6913 <tr style="color:red;">
6915 <td style="color:red;"> second data
6918 <td style="color:red;"> data with | </td>
6919 <td style="color:red;"> second data with |
6922 <td> data with | </td>
6923 <td> second data with |
6929 Build table with wikilink
6931 {| class="wikitable"
6932 ! header || second header
6933 |- style="color:red;"
6934 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6936 | data || second data [[Main Page|link|text with pipe]]
6939 <table class="wikitable">
6944 <tr style="color:red;">
6945 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6946 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6950 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6955 # The expected HTML structure in this test is debatable. The PHP parser does
6956 # not parse this kind of table at all. The main focus for Parsoid is on
6957 # round-tripping, so this output is ok for now. TODO: revisit!
6959 Wikitext table with html-syntax row
6969 <td>foo</td></tr></tbody></table>
6972 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6973 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6974 ## PHP parser, which tidy then compounds by fostering the content
6975 ## entirely out of the table. Parsoid recognizes the table context
6976 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6977 ## depends on PHP's treatment of broken table markup!
6979 Implicit <td> after a |-
6981 parsoid=wt2html,html2html
7001 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
7003 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
7005 parsoid=wt2html,html2html
7038 <tr><td><pre>a</pre></td></tr>
7039 <tr><td> b</td></tr>
7044 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
7045 # Parsoid generates the missing <td>, so wt2wt won't succeed.
7047 Lists should be recognized in an implicit <td> context
7049 parsoid=wt2html,html2html
7076 Table cells not properly parsed in an implicit-td context
7080 {{table_attribs_4}} || a || b
7085 <td style="background-color:#DC241f;" width="10px"></td>
7092 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7093 <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>
7098 Parsoid: Round-trip tables directly followed by content (bug 51219)
7100 parsoid=wt2html,wt2wt
7125 Parsoid: Default to a newline after tables in new content (bug 51219)
7130 <tr><td>foo</td></tr></tbody></table> bar
7132 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7137 <nowiki> </nowiki>bar
7145 Parsoid: newline inducing block nodes don't suppress <nowiki>
7157 Parsoid: Row-syntax table headings followed by comment & table cells
7159 parsoid=wt2html,wt2wt
7163 <!-- foo --> || baz || quux
7177 <tbody><tr><th> foo </th><th> bar
7178 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7183 Parsoid: Recover better from broken table attributes
7203 <p>foo</p></td></tr>
7208 Tables: Digest broken attributes on table and tr tag
7224 # T137406: Whitespace in the HTML
7226 1. Generate correct wikitext for tables with thead/tbody/tfoot
7231 <caption>Test</caption>
7272 <caption>Test</caption>
7292 # T137406: No whitespace in the HTML
7294 2. Generate correct wikitext for tables with thead/tbody/tfoot
7298 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7308 Testing serialization after deletion in references
7317 hi <ref><div id="x">ho</div></ref>
7327 Testing serialization after deletion of table cells
7330 "modes": ["wt2wt", "selser"],
7338 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7348 Testing selser after addition of new row before first row (T125419)
7351 "modes": ["wt2wt", "selser"],
7353 [ "tr", "before", "<tr><td>X</td></tr>" ]
7369 Serialize new table rows in a HTML table using HTML tags
7372 "modes": ["wt2wt", "selser"],
7374 [ "tr", "before", "<tr><td>X</td></tr>" ]
7378 <table><tr><td>a</td></tr></table>
7380 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7384 Serialize new table cells in a HTML row using HTML tags
7387 "modes": ["wt2wt", "selser"],
7389 [ "td", "before", "<td>X</td>" ]
7393 <table><tr><td>a</td></tr></table>
7395 <table><tr><td>X</td><td>a</td></tr></table>
7399 Wikitext tables can be nested inside HTML tables
7403 <table data-parsoid='{"stx":"html"}'>
7406 <tr><td>foo</td></tr>
7421 Serialize wikitext list items as HTML list items when embedded in a HTML list
7425 <ul data-parsoid='{"stx": "html"}'>
7426 <li data-parsoid='{}'>a</li>
7436 # SSS FIXME: Is this actually a good thing given the
7437 # odd nested list output that is generated by MW?
7438 # <ul><li>foo<ul>..</ul></li></ul> instead of
7439 # <ul><li>foo</li><ul>..</ul></ul>
7441 Wikitext lists can be nested inside HTML lists
7445 <ul data-parsoid='{"stx": "html"}'>
7446 <li data-parsoid='{"stx": "html"}'>a
7451 <ul data-parsoid='{"stx": "html"}'>
7474 Plain link, capitalized
7478 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7483 Plain link, uncapitalized
7487 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7494 [[Main Page|The Main Page]]
7496 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7501 Piped link with comment in link text
7503 [[Main Page|The Main<!--front--> Page]]
7505 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7510 Piped link with multiple pipe characters in link text
7512 [[Main Page||The|Main|Page|]]
7514 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7517 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7521 Piped link with no link text
7523 [[Thomas Bek (bishop of St David's)|]]
7525 <p>[[Thomas Bek (bishop of St David's)|]]
7528 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7532 Piped link with empty link text
7534 [[Main Page|<nowiki />]] - empty nowiki
7535 [[Main Page| ]] - empty space
7536 [[Main Page| ]] - empty non breaking space
7538 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7539 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7540 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7543 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki />"}'/></a> - empty nowiki
7544 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7545 <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>
7553 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7558 Broken link with fragment
7560 [[Zigzagzogzagzig#zug]]
7562 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7567 Special page link with fragment
7569 [[Special:Version#anchor]]
7571 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7576 Nonexistent special page link with fragment
7578 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7580 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7587 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7589 <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>
7596 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7598 <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>!!!
7609 Bug 43661: Piped links with identical prefixes
7611 [[prefixed article|prefixed articles with spaces]]
7613 [[prefixed article|prefixed articlesaoeu]]
7615 [[Main Page|Main Page test]]
7617 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7618 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7619 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7625 Link with HTML entity in suffix / tail
7627 [[Main Page]]", [[Main Page]]a
7629 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7632 <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>
7636 Link with 3 brackets
7647 Link with 4 brackets
7651 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7656 Piped link with 3 brackets
7658 [[[main page|the main page]]]
7660 <p>[[[main page|the main page]]]
7665 Piped link with extlink-like text
7668 [[Main Page|This is a [bar]]]
7670 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7671 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7674 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7675 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7679 Link with multiple pipes
7681 [[Main Page|The|Main|Page]]
7683 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7688 Anchor containing a #. (bug 63430)
7690 [[Main Page#And#Link]]
7692 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7695 <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>
7701 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7703 <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>
7708 Link with space in namespace
7710 [[User talk:Foo bar]]
7712 <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>
7717 MemoryAlpha:AlphaTest
7719 This is an article in the MemoryAlpha namespace
7720 (which shadows the memoryalpha interwiki link).
7724 Namespace takes precedence over interwiki link (bug 51680)
7726 [[MemoryAlpha:AlphaTest]]
7728 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7732 # The previous test doesn't work correctly in html2*, due to not recognizing the
7733 # link as an internal one. This one checks for the correct behavior.
7735 Link to namespace preferred over interwiki with correct rel attribute
7737 parsoid=html2wt,html2html
7739 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7741 [[MemoryAlpha:AlphaTest]]
7745 Piped link to namespace
7747 [[Meta:Disclaimers|The disclaimers]]
7749 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7756 [[Usually caused by a typo (oops}]]
7758 <p>[[Usually caused by a typo (oops}]]
7765 Just a test of an article title containing a percent.
7769 Link containing % (not as a hex sequence)
7772 [[7% Solution|7%25 Solution]]
7774 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7775 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7778 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7779 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7782 # note that the parsoid HTML is identical to the previous test output,
7783 # so the previous test ensures that the html2wt mode will generate the
7784 # "not as a hex sequence" wikitext.
7786 Link containing % as a single hex sequence interpreted to char
7788 parsoid=wt2wt,wt2html,html2html
7791 [[7%25 Solution|7%25 Solution]]
7793 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7794 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7797 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7798 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7802 Link containing % as a double hex sequence interpreted to hex sequence
7806 <p>[[7%2525 Solution]]
7810 ## Example for such a section: == < ==
7812 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7814 [[%23%3c]][[%23%3e]]
7816 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7819 <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>
7823 Link containing "<#" and ">#" as a hex sequences
7825 [[%3c%23]][[%3e%23]]
7827 <p>[[%3c%23]][[%3e%23]]
7832 Link containing an equals sign
7834 [[Special:BookSources/isbn=4-00-026157-6]]
7836 <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>
7839 <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>
7845 Just a test of an article title containing a tilde.
7848 # note that links containing signatures, like [[Foo~~~~]], are
7849 # massaged by the pre-save transform (PST) and so the tildes are never
7850 # seen by the parser.
7852 Link containing a tilde
7856 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7859 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7863 Link containing double-single-quotes '' (bug 4598)
7865 [[Lista d''e paise d''o munno]]
7867 <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>
7870 <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>
7874 Link containing double quotes and spaces
7878 <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>
7881 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7885 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7887 Some [[Link|pretty ''italics'' and stuff]]!
7889 <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>!
7892 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7896 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7898 ''Some [[Link|pretty ''italics'' and stuff]]!''
7900 <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>
7905 Link with double quotes in title part (literal) and alternate part (interpreted)
7907 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7911 [[''Pentecoste''|Pentecoste]]
7913 [[''Pentecoste''|''Pentecoste'']]
7915 <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>
7916 </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>
7917 </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>
7918 </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>
7921 <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>
7922 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7923 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7924 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7928 Broken image links with HTML captions (bug 39700)
7930 [[File:Nonexistent|<script></script>]]
7931 [[File:Nonexistent|100x100px|<script></script>]]
7932 [[File:Nonexistent|<]]
7933 [[File:Nonexistent|a<i>b</i>c]]
7935 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7936 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7937 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7938 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7941 <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>
7942 <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>
7943 <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>
7944 <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>
7950 [[http://www.example.com]]
7952 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7955 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7959 Plain link to URL with link text
7961 [[http://www.example.com Link text]]
7963 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7968 Plain link to protocol-relative URL
7970 [[//www.example.com]]
7972 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7975 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7979 Plain link to protocol-relative URL with link text
7981 [[//www.example.com Link text]]
7983 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7988 Plain link to page with question mark in title
7994 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7995 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8000 # I'm fairly sure the expected result here is wrong.
8001 # We want these to be URL links, not pseudo-pages with URLs for titles....
8002 # However the current output is also pretty screwy.
8005 # I'm changing it to match the current output--it arguably makes more
8006 # sense in the light of the test above. Old expected result was:
8007 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8009 # But I think this test is bordering on "garbage in, garbage out" anyway.
8014 Piped link to URL: [[http://www.example.com|an example URL]]
8016 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8019 <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>
8023 BUG 2: [[page|http://url/]] should link to page, not http://url/
8025 [[Main Page|http://url/]]
8027 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8030 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8033 # Parsoid does not mark self-links, by design.
8035 BUG 337: Escaped self-links should be bold
8039 [[Bug462]] [[Bug462]]
8041 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
8044 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
8046 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8050 Self-link to section should not be bold
8054 [[Main Page#section]]
8056 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8067 Self-link to numeric title
8073 <p><strong class="selflink">0</strong>
8078 Link to numeric-equivalent title
8084 <p><a href="/wiki/00" title="00">00</a>
8089 <nowiki> inside a link
8091 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8093 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8098 Non-breaking spaces in title
8100 [[ Main Page ]]
8102 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8107 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
8113 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8118 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8124 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8129 Internal link with en linktrail: no apostrophes (bug 27473)
8135 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8140 Internal link with ca linktrail with apostrophes (bug 27473)
8146 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8151 Internal link with kaa linktrail with apostrophes (bug 27473)
8157 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8162 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8164 [[User:Foo/Test/63636:Bar|Test]]
8166 <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>
8169 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8172 ## Mainly a sanity check for Parsoid
8174 Handle title parsing for subpages
8194 Link to a subpage from a namespace other than main
8201 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8204 <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>
8208 Ensure that transclusion titles are not url-decoded
8210 subpage title=[[Test]]
8213 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8215 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8218 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8222 Purely hash wikilink
8224 title=[[User:Test/123]]
8229 <p><a href="#a">b</a>
8232 <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>
8236 1. Interaction of linktrail and template encapsulation
8240 <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>
8244 2. Interaction of linktrail and template encapsulation
8248 {{echo|Some [[Fool]]}}s
8250 <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>
8254 3. Interaction of linktrail and template encapsulation
8258 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8260 <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>
8270 Internal link with is link prefix
8274 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8276 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8287 Internal link with is link trail and link prefix
8291 [[mótmælendatrú|xxx]]ar
8293 mótmælenda[[söfnuður]]
8294 mótmælenda[[söfnuður|söfnuðir]]
8295 mótmælenda[[söfnuður|söfnuðir]]xxx
8297 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8298 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8299 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8300 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8301 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8306 Parsoid link trail escaping
8308 parsoid=html2wt,html2html
8310 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8316 Parsoid link prefix escaping
8319 parsoid=html2wt,html2html
8321 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8323 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8327 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8335 [http://wp.org ''foo'']
8337 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8338 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8339 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8340 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8345 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8347 [[Foo|{{echo|a}} b {{echo|c}}]]
8349 <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>
8353 Link with angle bracket after anchor
8357 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8360 <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>
8364 ### Interwiki links (see maintenance/interwiki.sql)
8368 Inline interwiki link
8370 parsoid=wt2html,wt2wt,html2html
8372 [[MeatBall:SoftSecurity]]
8374 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8377 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8381 Inline interwiki link with empty title (bug 2372)
8383 parsoid=wt2html,wt2wt,html2html
8387 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8390 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8394 Interwiki link encoding conversion (bug 1636)
8396 *[[Wikipedia:ro:Olteniţa]]
8397 *[[Wikipedia:ro:Olteniţa]]
8399 <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>
8400 <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>
8404 <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>
8405 <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>
8410 Interwiki link with fragment (bug 2130)
8412 [[MeatBall:SoftSecurity#foo]]
8414 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8419 Link scenarios with escaped fragments
8422 [[Foo#Is this great?]]
8423 [[meatball:Foo#Is this great?]]
8425 <p><a href="#Is_this_great.3F">#Is this great?</a>
8426 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8427 <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>
8430 <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>
8431 <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>
8432 <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>
8435 # Ideally the wikipedia: prefix here should be proto-relative too
8436 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8437 # define the 'en' prefix, and originally the test used 'wikipedia',
8438 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8441 Different interwiki prefixes mapping to the same URL
8449 [[:wikipedia:Foo|Foo]]
8451 [[wikipedia:en:Foo]]
8453 [[:wikipedia:en:Foo]]
8457 <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>
8459 <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>
8461 <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>
8463 <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>
8465 <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>
8467 <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>
8469 <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>
8473 Interwiki links that cannot be represented in wiki syntax
8476 [[meatball:ok#foo|ok with fragment]]
8477 [[meatball:ok_as_well?|ok ending with ? mark]]
8478 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8479 [http://de.wikipedia.org/wiki/#foo is just fragment]
8482 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8483 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8484 <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>
8485 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8486 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8489 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8490 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8491 <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>
8492 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8493 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8497 Interwiki links: trail
8499 [[wikipedia:Foo|Ba]]r
8501 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8504 <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>
8508 Local interwiki link
8510 parsoid=wt2html,wt2wt,html2html
8512 [[local:Template:Foo]]
8514 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8517 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8520 # Parsoid does not mark self-links, by design.
8522 Local interwiki link: self-link to current page
8525 parsoid=wt2html,wt2wt,html2html
8529 <p><strong class="selflink">local:Main Page</strong>
8532 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8536 Local interwiki link: prefix only (bug 64167)
8538 parsoid=wt2html,wt2wt,html2html
8542 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8545 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8549 Local interwiki link: with additional interwiki prefix (bug 61357)
8551 parsoid=wt2html,wt2wt,html2html
8553 [[local:meatball:Hello]]
8555 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8558 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8562 Multiple local interwiki link prefixes
8564 [[local:local:local:local:mi:local:Foo]]
8566 parsoid=wt2html,wt2wt,html2html
8568 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8571 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8575 ### Interlanguage links
8576 ### Language links (so that searching for '### language' matches..)
8588 <p>Blah blah blah</p>
8589 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8592 ## parsoid html2wt will lose the space variations
8594 Interlanguage link with spacing
8596 parsoid=wt2html,wt2wt,html2html
8604 <p>Blah blah blah</p>
8605 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8609 Double interlanguage link
8618 <p>Blah blah blah</p>
8619 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8620 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8623 ## parsoid html2wt will lose the space variations
8625 Interlanguage link variations
8627 parsoid=wt2html,wt2wt,html2html
8637 <p>Blah blah blah</p>
8638 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8639 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8640 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8644 Escaping of interlanguage links
8648 [[ : zh : Chinese ]]
8651 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8652 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8655 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8656 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8659 ## parsoid html2wt will normalize the space to _
8661 Space and question mark encoding in interlanguage links (T95473)
8663 parsoid=wt2html,wt2wt,html2html
8671 <p>Blah blah blah</p>
8672 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8676 Interlanguage link, with prefix links
8686 <p>Blah blah blah</p>
8687 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8691 Double interlanguage link, with prefix links (bug 8897)
8702 <p>Blah blah blah</p>
8703 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8704 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8708 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8716 <p>Blah blah blah</p>
8717 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8720 ## PHP parser tests script needs an update
8721 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8723 Language links render as inline links if $wgInterwikiMagic=false
8725 wgInterwikiMagic=false
8726 parsoid=wt2html,wt2wt,html2html
8731 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8734 ## PHP parser tests script needs an update
8735 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8737 Language links render as inline links in the Talk namespace
8740 parsoid=wt2html,wt2wt,html2html
8745 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8749 Parsoid-specific test: Wikilinks with should RT properly
8755 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8760 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8762 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8764 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8765 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8767 He&nbsp;llo [[Foo|He&nbsp;llo]]
8769 He&nbsp;llo He&nbsp;llo
8771 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8772 </p><p>He&nbsp;llo He&nbsp;llo
8776 # html2wt will fail because of title normalization without data-parsoid
8778 Parsoid: handle constructor well
8780 parsoid=wt2html,wt2wt
8786 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8787 </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>
8790 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8792 <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>
8801 # Note that `ko` isn't a known interlanguage prefix
8803 Parsoid: recognize interlanguage links without a target page
8813 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8815 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8818 # Note that `ko` isn't a known interwiki prefix
8820 Parsoid: recognize interwiki links without a target page
8822 parsoid=wt2html,wt2wt,html2html
8828 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8829 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8832 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8833 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8837 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8841 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8844 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8848 Interlanguage link with preceding local interwiki link (bug 68085)
8850 parsoid=wt2html,wt2wt,html2html
8853 [[local:es:Spanish]]
8856 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8860 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8864 Looks like an interlanguage link, but is actually a local interwiki
8866 parsoid=wt2html,wt2wt,html2html
8872 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8876 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8880 ### Redirects, Parsoid-only
8884 1. Simple redirect to page
8886 #REDIRECT [[Main Page]]
8888 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8892 2. Other redirect variants
8894 #REDIRECT [[Main_Page]]
8896 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8899 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8900 # This tests the Parsoid bail-out code.
8902 3. Other redirect variants
8904 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8906 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8910 4. Redirect to a templated destination
8912 #REDIRECT [[{{echo|Foo}}bar]]
8914 <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"}]]}'/>
8920 parsoid=wt2html,wt2wt
8925 <li>REDIRECT [[]]</li></ol>
8929 Optional colon in #REDIRECT
8931 # the colon is archaic syntax. we support it for wt2html, but we
8932 # don't care that it roundtrips back to the modern syntax.
8933 parsoid=wt2html,html2html
8935 #REDIRECT:[[Main Page]]
8937 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8941 Whitespace in #REDIRECT with optional colon
8943 # the colon and gratuitous whitespace is archaic syntax. we support
8944 # it for wt2html, but we don't care that it roundtrips back to the
8945 # modern syntax (without extra whitespace)
8946 parsoid=wt2html,html2html
8953 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8957 Piped link in #REDIRECT
8959 # content after piped link is ignored. we support this syntax,
8960 # but don't care that the piped link is lost when we roundtrip this.
8963 #REDIRECT [[Main Page|bar]]
8965 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8969 Redirect to category (T104502)
8971 parsoid=wt2html,wt2wt
8973 #REDIRECT [[Category:Foo]]
8975 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8979 Redirect to category with URL encoding (T104502)
8983 #REDIRECT [[Category%3AFoo]]
8985 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8989 Redirect to category page
8991 #REDIRECT [[:Category:Foo]]
8993 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8997 Redirect to image page (1)
8999 #REDIRECT [[File:Wiki.png]]
9001 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9005 Redirect to image page (2)
9007 #REDIRECT [[Image:Wiki.png]]
9009 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9012 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9013 # Next test confirms this.
9015 Redirect to language (1) (T104918)
9017 parsoid=wt2html,wt2wt,html2html
9019 #REDIRECT [[en:File:Wiki.png]]
9021 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9025 Redirect to language (2) (T104918)
9027 #REDIRECT [[:en:File:Wiki.png]]
9029 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9033 Redirect to interwiki (T104918)
9035 #REDIRECT [[meatball:File:Wiki.png]]
9037 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9041 Non-English #REDIRECT
9045 #TILVÍSUN [[Main Page]]
9047 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9051 Redirect syntax under text isn't considered a redirect
9054 #redirect [[Main Page]]
9057 <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>
9060 # FIXME: Should hoist the redirect to the top of the page and ensure there
9067 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9087 Broken br tag sanitization
9095 # TODO: Fix html2html mode (bug 51055)!
9097 Parsoid: Broken br tag recognition
9110 Incorrecly removing closing slashes from correctly formed XHTML
9112 <br style="clear:both;" />
9114 <p><br style="clear:both;" />
9119 Failing to transform badly formed HTML into correct XHTML
9121 <br style="clear: left;">
9122 <br style="clear: right;">
9123 <br style="clear: both;">
9125 <p><br style="clear: left;" />
9126 <br style="clear: right;" />
9127 <br style="clear: both;" />
9131 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9132 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9134 Handling html with a div self-closing tag
9143 <p><div title />
9147 <p><div title=bar />
9148 <div title=bar/>
9150 <div title="bar/"></div>
9154 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9155 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9156 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9157 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9158 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9159 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9163 Handling html with a br self-closing tag
9190 Horizontal ruler (should it add that extra space?)
9205 Horizontal ruler -- 4+ dashes render hr
9214 Horizontal ruler -- eats additional dashes on the same line
9223 Horizontal ruler -- does not collapse dashes on consecutive lines
9234 Horizontal ruler -- <4 dashes render as plain text
9243 Horizontal ruler -- Supports content following dashes on same line
9255 ### Block-level elements
9264 <ul><li>Common list</li>
9266 <li>item 3</li></ul>
9277 <ol><li>Numbered list</li>
9279 <li> item 3</li></ol>
9293 ***#Number on level 4
9295 **#Number on level 3
9296 **#Number on level 3
9300 #** Level 3, but ordered
9303 <ol><li> with numbers</li></ol>
9304 <ul><li> and bullets</li></ul>
9305 <ol><li> and numbers</li></ol></li>
9307 <ul><li>bullet level 2
9308 <ul><li>bullet level 3
9309 <ol><li>Number on level 4</li></ol></li></ul></li>
9311 <ol><li>Number on level 3</li>
9312 <li>Number on level 3</li></ol></li></ul>
9313 <ol><li>number level 2</li></ol></li>
9315 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9316 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9321 1. Nested mixed wikitext and html list
9324 * <ul><li>ho</li></ul>
9329 <li> <ul><li>ho</li></ul></li>
9331 <ul><li> ho</li></ul></li></ul>
9335 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9337 <ul><li> ho</li></ul></li></ul>
9341 2. Nested mixed wikitext and html list (incompatible)
9344 : {{echo|<li>ho</li>}}
9347 <dd> <li>ho</li></dd></dl>
9351 <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>
9361 <ul><li>bar</li></ul></li></ul>
9371 <ul><li><ul><li>foo</li></ul></li>
9377 Nested lists 3 (first element empty)
9383 <ul><li>bar</li></ul></li></ul>
9388 Nested lists 4 (first element empty)
9393 <ul><li><ul><li></li></ul></li>
9399 Nested lists 5 (both elements empty)
9404 <ul><li><ul><li></li></ul></li>
9410 Nested lists 6 (both elements empty)
9416 <ul><li></li></ul></li></ul>
9421 Nested lists 7 (skip initial nesting levels)
9425 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9430 Nested lists 8 (multiple nesting transitions)
9438 <ul><li><ul><li> bar</li></ul></li>
9439 <li> baz</li></ul></li>
9445 Nested lists 9 (extension interaction)
9451 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9455 1. Lists with start-of-line-transparent tokens before bullets: Comments
9468 2. Lists with start-of-line-transparent tokens before bullets: Template close
9473 <ul><li>foo bar</li>
9479 List items are not parsed correctly following a <pre> block (bug 785)
9485 <ul><li> <pre>foo</pre></li>
9486 <li> <pre>bar</pre></li>
9490 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9491 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9496 List items from template
9507 * notSOL{{inner list}}
9510 <ul><li> item 1</li>
9511 <li> item 2</li></ul>
9512 <ul><li> item 0</li>
9514 <li> item 2</li></ul>
9515 <ul><li> item 0</li>
9518 <li> item 2</li></ul>
9523 List interrupted by empty line or heading
9531 <ul><li> foo</li></ul>
9532 <ul><li><ul><li> bar</li></ul></li></ul>
9533 <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>
9534 <ul><li> Another list item</li></ul>
9539 Multiple list tags generated by templates
9560 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9563 <!--This line will NOT split the list-->
9565 <!--This line will NOT split the list either-->
9567 <!--foo--> <!----> <!--This line NOT split the list either-->
9578 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9581 <!--This line will NOT split the list-->
9583 <!--This line will NOT split the list either-->
9585 <!--foo--> <!----> <!--This line NOT split the list
9598 (The PHP parser relies on Tidy for the hack)
9600 parsoid=wt2html,wt2wt
9604 * {{echo|<li>templated li-hack}}
9605 * <!--foo--> <li> unsupported li-hack with preceding comments
9608 <li><li>not a li-hack
9615 <li>templated li-hack</li>
9616 <li>unsupported li-hack with preceding comments</li>
9619 <li>not a li-hack</li>
9624 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9651 Parsoid: Test of whitespace serialization with Templated bullets
9658 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9662 # ------------------------------------------------------------------------
9663 # The next set of tests are about Parsoid's ability to handle badly nested
9664 # tags (parse, minimize scope of fixup, and roundtrip back)
9665 # ------------------------------------------------------------------------
9668 Unbalanced closing block tags break a list
9669 (php parser relies on Tidy to fix up)
9687 # Parsoid fails this test, but it might be tricky to support properly.
9690 Unbalanced closing non-block tags don't break a list
9691 (php parser relies on Tidy to fix up)
9698 <li><span>a</span></li>
9699 <li><span>b</span></li>
9713 Unclosed formatting tags that straddle lists are closed and reopened
9714 (php parser relies on Tidy to fix up)
9716 parsoid=wt2html,wt2wt,html2html
9726 <ol><li> <s> a</s></li>
9727 <li><s> b </s></li></ol>
9732 1. List embedded in a formatting tag
9739 <li><small>foo</small></li>
9749 ## Ugly Parsoid output here
9750 ## Not sure what the right output is.
9752 2. List embedded in a formatting tag
9759 <li><small>a</small></li>
9760 <li><small>b</small></li>
9767 <li><small>b</small></li>
9771 # Ugly Parsoid and PHP parser output here
9772 # Not sure if we want to make this a test!
9775 ## 3. Unclosed formatting tags in list elements
9781 ## <li><small>a</small></li>
9782 ## <li><small><small>b</small></small></li>
9786 ## <li><small>a</small></li>
9788 ## <li><small>b</small></li>
9792 # This is a bug in the PHP parser + tidy combination.
9793 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9794 # and then fostered out of the table by tidy.)
9795 # We believe the Parsoid output to be correct.
9797 Table with missing opening <tr> tag
9799 parsoid=wt2html,wt2wt
9817 # Note that the current date is hard-coded as
9818 # 1970-01-01T00:02:03Z (a Thursday)
9819 # when running parser tests. The timezone is also fixed to GMT, so
9820 # local date will be identical to current date.
9823 Magic Word: {{CURRENTDAY}}
9832 Magic Word: {{CURRENTDAY2}}
9841 Magic Word: {{CURRENTDAYNAME}}
9850 Magic Word: {{CURRENTDOW}}
9859 Magic Word: {{CURRENTMONTH}}
9868 Magic Word: {{CURRENTMONTH1}}
9877 Magic Word: {{CURRENTMONTHABBREV}}
9879 {{CURRENTMONTHABBREV}}
9886 Magic Word: {{CURRENTMONTHNAME}}
9888 {{CURRENTMONTHNAME}}
9895 Magic Word: {{CURRENTMONTHNAMEGEN}}
9897 {{CURRENTMONTHNAMEGEN}}
9904 Magic Word: {{CURRENTTIME}}
9913 Magic Word: {{CURRENTHOUR}}
9922 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9931 Magic Word: {{CURRENTYEAR}}
9940 Magic Word: {{CURRENTTIMESTAMP}}
9942 {{CURRENTTIMESTAMP}}
9949 Magic Words LOCAL (UTC)
9953 * {{LOCALMONTHNAME}}
9954 * {{LOCALMONTHNAMEGEN}}
9955 * {{LOCALMONTHABBREV}}
9964 * {{LOCALTIMESTAMP}}
9979 <li> 19700101000203</li></ul>
9984 Magic Word: {{FULLPAGENAME}}
9986 title=[[User:Ævar Arnfjörð Bjarmason]]
9990 <p>User:Ævar Arnfjörð Bjarmason
9995 Magic Word: {{FULLPAGENAMEE}}
9997 title=[[User:Ævar Arnfjörð Bjarmason]]
10001 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10006 Magic Word: {{TALKSPACE}}
10008 title=[[User:Ævar Arnfjörð Bjarmason]]
10017 Magic Word: {{TALKSPACE}}, same namespace
10019 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10028 Magic Word: {{TALKSPACE}}, main namespace
10030 title=[[Parser Test]]
10039 Magic Word: {{TALKSPACEE}}
10041 title=[[User:Ævar Arnfjörð Bjarmason]]
10050 Magic Word: {{SUBJECTSPACE}}
10052 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10061 Magic Word: {{SUBJECTSPACE}}, same namespace
10063 title=[[User:Ævar Arnfjörð Bjarmason]]
10072 Magic Word: {{SUBJECTSPACE}}, main namespace
10074 title=[[Parser Test]]
10082 Magic Word: {{SUBJECTSPACEE}}
10084 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10093 Magic Word: {{NAMESPACE}}
10095 title=[[User:Ævar Arnfjörð Bjarmason]]
10104 Magic Word: {{NAMESPACEE}}
10106 title=[[User:Ævar Arnfjörð Bjarmason]]
10115 Magic Word: {{NAMESPACENUMBER}}
10117 title=[[User:Ævar Arnfjörð Bjarmason]]
10119 {{NAMESPACENUMBER}}
10126 Magic Word: {{SUBPAGENAME}}
10128 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10137 Magic Word: {{SUBPAGENAMEE}}
10139 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10148 Magic Word: {{ROOTPAGENAME}}
10150 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10154 <p>Ævar Arnfjörð Bjarmason
10159 Magic Word: {{ROOTPAGENAMEE}}
10161 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10165 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10170 Magic Word: {{BASEPAGENAME}}
10172 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10176 <p>Ævar Arnfjörð Bjarmason
10181 Magic Word: {{BASEPAGENAMEE}}
10183 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10187 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10192 Magic Word: {{TALKPAGENAME}}
10194 title=[[User:Ævar Arnfjörð Bjarmason]]
10198 <p>User talk:Ævar Arnfjörð Bjarmason
10203 Magic Word: {{TALKPAGENAMEE}}
10205 title=[[User:Ævar Arnfjörð Bjarmason]]
10209 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10214 Magic Word: {{SUBJECTPAGENAME}}
10216 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10218 {{SUBJECTPAGENAME}}
10220 <p>User:Ævar Arnfjörð Bjarmason
10225 Magic Word: {{SUBJECTPAGENAMEE}}
10227 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10229 {{SUBJECTPAGENAMEE}}
10231 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10236 Magic Word: {{NUMBEROFFILES}}
10245 Magic Word: {{PAGENAME}}
10247 title=[[User:Ævar Arnfjörð Bjarmason]]
10251 <p>Ævar Arnfjörð Bjarmason
10256 Magic Word: {{PAGENAME}} with metacharacters
10258 title=[['foo & bar = baz']]
10262 <p><i>'foo & bar = baz'</i>
10265 <p><i>'foo & bar = baz'</i></p>
10269 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10271 title=[[*RFC 1234 http://example.com/]]
10275 <p>*RFC 1234 http://example.com/
10278 <p>*RFC 1234 http://example.com/</p>
10282 Magic Word: {{PAGENAMEE}}
10284 title=[[User:Ævar Arnfjörð Bjarmason]]
10288 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10293 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10295 title=[[*RFC 1234 http://example.com/]]
10299 <p>*RFC_1234_http://example.com/
10302 <p>*RFC_1234_http://example.com/</p>
10306 Magic Word: {{REVISIONID}}
10315 Magic Word: {{SCRIPTPATH}}
10323 Magic Word: {{STYLEPATH}}
10332 Magic Word: {{SERVER}}
10336 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10341 Magic Word: {{SERVERNAME}}
10350 Magic Word: {{SITENAME}}
10359 Magic Word: {{PAGELANGUAGE}}
10370 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10379 Case-sensitive magic words, when cased differently, should just be template transclusions
10386 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10387 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10388 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10389 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10394 Case-insensitive magic words should still work with weird casing.
10404 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10408 # From plwiki:PLOS_ONE
10410 Parsoid: Page property magic word with magic word contents
10412 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10414 <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>"}]]}'/>
10418 Parsoid: Template-generated DISPLAYTITLE
10420 {{{{echo|DISPLAYTITLE}}:Foo}}
10422 <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}}]}'/>
10426 Namespace 1 {{ns:1}}
10435 Namespace 1 {{ns:01}}
10444 Namespace 0 {{ns:0}} (bug 4783)
10452 Namespace 0 {{ns:00}} (bug 4783)
10460 Namespace -1 {{ns:-1}}
10469 Namespace User {{ns:User}}
10478 Namespace User talk {{ns:User_talk}}
10487 Namespace User talk {{ns:uSeR tAlK}}
10496 Namespace File {{ns:File}}
10505 Namespace File {{ns:Image}}
10514 Namespace (lang=de) Benutzer {{ns:User}}
10525 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10531 <p>Benutzer Diskussion
10538 {{urlencode:hi world?!}}
10539 {{urlencode:hi world?!|WIKI}}
10540 {{urlencode:hi world?!|PATH}}
10541 {{urlencode:hi world?!|QUERY}}
10551 Magic Word: prioritize type info over data-parsoid
10555 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10561 Magic Word: serialize on separate line (parsoid)
10563 parsoid=wt2wt,html2wt
10569 foo<meta property="mw:PageProp/notoc"/>bar
10573 Magic Word: rt non-english wikis
10580 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10584 __proto__ is treated as normal wikitext (T105997)
10596 Magic links: internal link to RFC (bug 479)
10600 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10603 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10607 Magic links: RFC (bug 479)
10611 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10614 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10618 Magic links: RFC (bug 65278)
10620 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10622 <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.
10625 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10629 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10631 RFC      822
10635 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10640 <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>
10646 Magic links: ISBN (bug 1937)
10650 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10653 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10657 Magic links: ISBN (bug 65278)
10659 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10661 <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.
10664 <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>
10668 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10670 ISBN      978 0 316 09811 3
10676 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10683 <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>
10691 Magic links: PMID incorrectly converts space to underscore
10695 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10698 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10702 Magic links: PMID (bug 65278)
10704 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10706 <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.
10709 <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>
10713 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10715 PMID      1234
10719 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10724 <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>
10729 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10730 # since these are ExtLinkText, not MagicLinkText
10732 Magic links: use appropriate serialization for "almost" magic links.
10734 X[[Special:BookSources/0978739256|foo]]
10736 X[//tools.ietf.org/html/rfc1234 foo]
10738 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10739 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10742 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10743 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10747 Magic links: All disabled (T47942)
10749 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10755 <p>ISBN 0-306-40615-2
10766 Nonexistent template
10768 {{thistemplatedoesnotexist}}
10770 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10775 Template with invalid target containing tags
10777 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10779 <p>{{a<b>b</b>|foo|a=b|a = b}}
10784 Template with invalid target containing unclosed tag
10786 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10788 <p>{{a<b>|foo|a=b|a = b}}</b>
10793 Template with invalid target containing wikilink
10797 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10800 <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>
10804 Template with just whitespace in it, bug #68421
10808 <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>
10814 This is a test template
10822 <p>This is a test template
10827 Template with explicit namespace
10831 <p>This is a test template
10839 This is a test template with parameter {{{param}}}
10845 {{paramtest|param=foo}}
10847 <p>This is a test template with parameter foo
10852 Template:paramtestnum
10854 [[{{{1}}}|{{{2}}}]]
10858 Template unnamed parameter
10860 {{paramtestnum|Main Page|the main page}}
10862 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10867 Template:templatesimple
10873 Template:templateredirect
10875 #redirect [[Template:templatesimple]]
10879 Template:templateasargtestnum
10885 Template:templateasargtest
10887 {{template{{{templ}}}}}
10891 Template:templateasargtest2
10897 Template with template name as unnamed argument
10899 {{templateasargtestnum|templatesimple}}
10906 Template with template name as argument
10908 {{templateasargtest|templ=simple}}
10915 Template with template name as argument (2)
10917 {{templateasargtest2|templ=templatesimple}}
10924 Template:templateasargtestdefault
10926 {{{{{templ|templatesimple}}}}}
10936 Template with default value
10938 {{templateasargtestdefault}}
10945 Template with default value (value set)
10947 {{templateasargtestdefault|templ=templa}}
10956 {{templateredirect}}
10961 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10965 Template with argument in separate line
10967 {{ templateasargtest |
10975 Template with complex template as argument
10978 param ={{ templateasargtest |
10979 templ = simple }}}}
10981 <p>This is a test template with parameter (test)
10986 Template with thumb image (with link in description)
10988 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10990 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>
10993 <p>This is a test template with parameter</p>
10994 <div class="thumb tright">
10995 <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>
10996 <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>
11000 <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>
11004 Template:complextemplate
11006 {{{1}}} {{paramtest|
11007 param ={{{param}}}}}
11011 Template with complex arguments
11014 param ={{ templateasargtest |
11015 templ = simple }}|[[Template:complextemplate|link]]}}
11017 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11022 BUG 553: link with two variables in a piped link
11025 |[[{{{1}}}|{{{2}}}]]
11030 <td>[[{{{1}}}|{{{2}}}]]
11035 <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>
11041 Abort table cell attribute parsing on wikilink
11044 | testing [[one|two]] | three || four
11045 | testing one two | three || four
11046 | testing="[[one|two]]" | three || four
11051 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11057 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11063 <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>
11064 <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>
11065 <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>
11070 Don't abort table cell attribute parsing if wikilink is found in template arg
11073 | Test {{#tag:ref|One two "[[three]]" four}}
11077 <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>
11082 Magic variable as template parameter
11084 {{paramtest|param={{SITENAME}}}}
11086 <p>This is a test template with parameter MediaWiki
11093 [[{{{param}}}|link]]
11097 Template parameter as link source
11099 {{linktest|param=Main Page}}
11101 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11106 Template:paramtest2
11108 including another template, {{paramtest|param={{{arg}}}}}
11112 Template passing argument to another template
11114 {{paramtest2|arg='hmm'}}
11116 <p>including another template, This is a test template with parameter 'hmm'
11127 Template as link source
11131 [[{{linktest2}}|Main Page]]
11133 [[{{linktest2}}]]Page
11135 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11136 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11137 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11155 Template infinite loop
11159 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11164 Template from main namespace
11183 BUG 529: Template with table, not included at beginning of line
11202 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11222 BUG 41: Template parameters shown as broken links
11231 Template with targets containing wikilinks
11235 {{[[{{echo|foo}}]]}}
11237 {{{{echo|[[foo}}]]}}
11239 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11240 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11252 Templates: Double quotes as template target
11259 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11263 ## This test is about making sure Parsoid's data-mw is well formed in the
11264 ## face of multiple templates with intersecting and overlapping ranges. The
11265 ## wikitext itself is wretched.
11267 Templates with intersecting and overlapping ranges
11292 <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":""}]]}'>
11294 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11296 <tbody><tr><td>hi</td></tr>
11301 Template:MSGNW test
11303 ''None'' of '''this''' should be
11305 but rather passed unmodified
11313 # hmm, fix this or just deprecate msgnw and document its behavior?
11317 {{msgnw:MSGNW test}}
11319 <p>''None'' of '''this''' should be
11321  but rather passed unmodified
11322 {{test}}
11326 <!-- comment -->
11333 {{int:youhavenewmessages|lots of money|not!}}
11335 <p>You have lots of money (not!).
11340 int keyword - non-existing message
11351 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11355 <includeonly> and <noinclude> being included
11366 <onlyinclude>Foo</onlyinclude>bar
11370 <onlyinclude> being included
11382 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11386 <onlyinclude> and <includeonly> being included
11395 <includeonly> and <noinclude> on a page
11397 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11404 Un-closed <noinclude>
11411 <onlyinclude> on a page
11413 <onlyinclude>Foo</onlyinclude>bar
11420 Un-closed <onlyinclude>
11427 Self-closed noinclude, includeonly, onlyinclude tags
11438 Unbalanced includeonly and noinclude tags
11442 |b</noinclude></noinclude>
11443 |c</noinclude></includeonly>
11444 |d</includeonly></includeonly>
11453 <td>c</includeonly>
11455 <td>d</includeonly></includeonly>
11461 Template:Includeonly section
11464 ==Includeonly section==
11470 Bug 6563: Edit link generation for section shown by <includeonly>
11472 {{includeonly section}}
11474 <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>
11475 <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>
11479 # Uses same input as the contents of [[Template:Includeonly section]]
11481 Bug 6563: Section extraction for section shown by <includeonly>
11486 ==Includeonly section==
11494 Bug 6563: Edit link generation for section suppressed by <includeonly>
11497 ==Includeonly section==
11501 <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>
11506 Bug 6563: Section extraction for section suppressed by <includeonly>
11511 ==Includeonly section==
11519 Un-closed <includeonly>
11524 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11527 ## We used to, but no longer wt2wt this test since the default serializer
11528 ## will normalize the include directives to serialize on their own line.
11529 ## Selser will take care of preserving formatting in scenarios where they
11530 ## intermingled with other wikitext.
11532 Includes and comments at SOL
11534 parsoid=wt2html,html2html
11536 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11540 </noinclude>* stuff
11543 <includeonly>can have stuff</includeonly>=== here ===
11546 <h2><span class="mw-headline" id="hu">hu</span></h2>
11549 <ul><li> stuff</li>
11550 <li> here</li></ul>
11551 <h3><span class="mw-headline" id="here">here</span></h3>
11554 <!-- 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>
11556 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11558 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11559 <li> here</li></ul>
11561 <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>
11565 # TODO: test with DOM fragment reuse!
11567 Parsoid: DOM fragment reuse
11569 parsoid=wt2wt,wt2html
11571 a{{echo|b<table></table>c}}d
11583 <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>
11585 <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">
11586 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11587 </span><p about="#mwt2">cd</p>
11589 <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">
11591 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11593 </span><p about="#mwt3">b</p>
11597 Parsoid: Merge double tds (T52603)
11602 |{{echo|{{!}} foo}}
11606 <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>
11611 Parsoid: Merge double tds in nested transclusion content (T52603)
11617 |{{echo|{{!}} foo}}
11621 <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}}]}'>
11623 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11629 ### <includeonly> and <noinclude> in attributes
11632 0. includeonly around the entire attribute
11634 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11636 <p><span id="v2">bar</span>
11641 1. includeonly in html attr key
11643 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11645 <p><span id="foo">bar</span>
11650 2. includeonly in html attr value
11652 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11653 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11655 <p><span id="v1">bar</span>
11656 <span id="v1">bar</span>
11661 3. includeonly in part of an attr value
11663 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11665 <p><span style="color:red;">bar</span>
11670 4. includeonly in table attributes
11694 ### Token Stream Patcher tests
11696 ### These tests won't always pass wt2wt and other modes because
11697 ### on serialization, the table will be output on a new line.
11698 ### For now, we are blacklisting them, and using this to test selser.
11702 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11704 parsoid=wt2html,wt2wt
11706 {{echo|}}{| width = '100%'
11710 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11711 <tbody><tr><td>foo</td></tr>
11715 ## We used to, but no longer wt2wt this test since the default serializer
11716 ## will normalize the include directives to serialize on their own line.
11717 ## Selser will take care of preserving formatting in scenarios where they
11718 ## intermingled with other wikitext.
11720 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11724 <includeonly>a</includeonly>{| {{{b}}}
11728 <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":""}]]}'>
11729 <tbody><tr><td>c</td></tr>
11734 Table wikitext syntax outside wiki-tables
11738 ! not a table heading
11741 | class="foo bar" | baz
11749 ! not a table heading
11752 | class="foo bar" | baz
11761 ### Testing parsing of templates where a template arg
11762 ### has the same name as the template itself.
11768 {{{quote|{{{1}}}}}}
11772 Templates: Template Name/Arg clash: 1. Use of positional param
11781 Templates: Template Name/Arg clash: 2. Use of named param
11783 {{quote|quote=foo}}
11790 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11799 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11803 Templates: 1. Simple use
11812 Templates: 2. Inside a block tag
11814 <div>{{echo|Foo}}</div>
11815 <blockquote>{{echo|Foo}}</blockquote>
11818 <blockquote>Foo</blockquote>
11828 Templates: P-wrapping: 1a. Templates on consecutive lines
11839 Templates: P-wrapping: 1b. Templates on consecutive lines
11853 Templates: P-wrapping: 1c. Templates on consecutive lines
11856 {{echo|bar}} <div>baz</div>
11869 Templates: P-wrapping: 1d. Template preceded by comment-only line
11878 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11882 Templates: Inline Text: 1. Multiple template uses
11884 {{echo|Foo}}bar{{echo|baz}}
11891 Templates: Inline Text: 2. Back-to-back template uses
11893 {{echo|Foo}}{{echo|bar}}
11900 Templates: Block Tags: 1. Multiple template uses
11902 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11904 <div>Foo</div><div>bar</div><div>baz</div>
11909 Templates: Block Tags: 2. Back-to-back template uses
11911 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11913 <div>Foo</div><div>bar</div>
11917 # This is an edge case relating to paragraph wrapping.
11919 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11924 <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
11929 Templates: Links: 1. Simple example
11931 {{echo|[[Foo|bar]]}}
11933 <p><a href="/wiki/Foo" title="Foo">bar</a>
11938 Templates: Links: 2. Generation of link href
11940 [[{{echo|Foo}}|bar]]
11942 <p><a href="/wiki/Foo" title="Foo">bar</a>
11947 Templates: Links: 3. Generation of part of a link href
11949 [[Fo{{echo|o}}|bar]]
11951 [[Foo{{echo|bar}}]]
11953 [[Foo{{echo|bar}}baz]]
11955 [[Foo{{echo|bar}}|bar]]
11957 [[:Foo{{echo|bar}}]]
11959 [[:Foo{{echo|bar}}|bar]]
11961 <p><a href="/wiki/Foo" title="Foo">bar</a>
11962 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11963 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11964 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11965 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11966 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11971 Templates: Links: 4. Multiple templates generating link href
11973 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11975 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11980 Templates: Links: 5. Generation of link text
11982 [[Foo|{{echo|bar}}]]
11984 <p><a href="/wiki/Foo" title="Foo">bar</a>
11989 Templates: Links: 5. Nested templates (only outermost template should be marked)
11991 {{echo|[[{{echo|Foo}}|bar]]}}
11993 <p><a href="/wiki/Foo" title="Foo">bar</a>
11998 Templates: HTML Tag: 1. Generation of HTML attr. key
12000 <div {{echo|style}}="color:red;">foo</div>
12002 <div style="color:red;">foo</div>
12007 Templates: HTML Tag: 2. Generation of HTML attr. value
12009 <div style={{echo|'color:red;'}}>foo</div>
12011 <div style="color:red;">foo</div>
12016 Templates: HTML Tag: 3. Generation of HTML attr key and value
12018 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12020 <div style="color:red;">foo</div>
12025 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12027 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12029 <div title="This is a long title with just one piece templated">foo</div>
12034 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12036 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12038 <div title="This is a long title with just one piece templated">foo</div>
12043 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12045 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12047 <div title="This is a long title with just one piece templated">foo</div>
12051 # SSS FIXME: While it is great we added support for all this,
12052 # do we want to make this part of the spec? Maybe we want to
12053 # deprecate this kind of usage in the future?
12055 Templates: HTML Tag: 7. Generation of partial attribute key string
12057 <div st{{echo|yle}}="color:red;">foo</div>
12059 <div style="color:red;">foo</div>
12064 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12066 <div {{echo|1=id="v1"}}>bar</div>
12068 <div id="v1">bar</div>
12073 Templates: HTML Tag: 9. Multiple template-generated attributes
12075 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12077 <div id="v1" title="foo">bar</div>
12082 Templates: Support for templates generating attributes and content
12084 {| {{mixed_attr_content_template}}
12089 <table style="color:red;" title="T48811">
12099 <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|}"]}'>
12108 1. Entities and nowikis inside templated attributes should be handled correctly
12110 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12112 <div style="background:#f9f9f9;">foo</div>
12115 <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>
12119 2. Entities and nowikis inside templated attributes should be handled correctly
12122 |{{table_attribs_3}}
12127 <td style="background:#f9f9f9;">Foo
12132 <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>
12137 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12140 |{{table_attribs_3}}
12145 <td style="background:#f9f9f9;">Foo
12149 <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}}]}'>
12150 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12156 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12159 | {{table_attribs_6}} hi
12164 <td style="background: red;"> hi
12169 <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>
12174 Templates: HTML Tables: 1. Generating start of a HTML table
12176 {{echo|<table><tr><td>foo</td>}}</tr></table>
12178 <table><tr><td>foo</td></tr></table>
12183 Templates: HTML Tables: 2a. Generating middle of a HTML table
12185 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12187 <table><tr><td>foo</td></tr></table>
12192 Templates: HTML Tables: 2b. Generating middle of a HTML table
12194 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12196 <table><tr><td>foo</td></tr></table>
12201 Templates: HTML Tables: 3. Generating end of a HTML table
12203 <table><tr>{{echo|<td>foo</td></tr></table>}}
12205 <table><tr><td>foo</td></tr></table>
12210 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12212 {{echo|<table>}}<tr><td>foo</td></tr></table>
12214 <table><tr><td>foo</td></tr></table>
12219 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12221 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12223 <table><tr><td>foo</td></tr></table>
12228 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12230 <table><tr>{{echo|<td>}}foo</td></tr></table>
12232 <table><tr><td>foo</td></tr></table>
12237 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12239 <table><tr><td>foo{{echo|</td>}}</tr></table>
12241 <table><tr><td>foo</td></tr></table>
12246 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12248 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12250 <table><tr><td>foo</td></tr></table>
12255 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12257 <table><tr><td>foo</td></tr>{{echo|</table>}}
12259 <table><tr><td>foo</td></tr></table>
12264 Templates: HTML Tables: 5. Proper fostering of categories from inside
12266 parsoid=wt2html,wt2wt
12268 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12269 <!--Two categories (Bug 50330)-->
12270 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12272 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12273 <!--Two categories (Bug 50330)-->
12274 <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>
12278 Templates: Wiki Tables: 1a. Fostering of entire template content
12286 <tr><td></td></tr></table>
12298 Templates: Wiki Tables: 1b. Fostering of entire template content
12311 <tr><td></td></tr></table>
12325 Templates: Wiki Tables: 2. Fostering of partial template content
12335 <tr><td></td></tr></table>
12348 Templates: Wiki Tables: 3. td-content via multiple templates
12351 {{echo|{{pipe}}a}}{{echo|b}}
12362 Templates: Wiki Tables: 4. Templated tags, no content
12368 <tr><td></td></tr></table>
12373 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12387 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12400 ## This test case is very specific to Parsoid's internals
12401 ## and is hence only tested for Parsoid's code. Parsoid uses
12402 ## a <meta> marker tag for <ref> tags and they are expanded
12403 ## much later. We are verifying that this <meta> tag usage
12404 ## doesn't prevent foster parenting.
12406 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12408 {{PartialTable}}<ref>foo</ref>
12413 <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">
12417 <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>
12421 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12431 <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{{!}}}"]}'>
12432 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12436 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12441 Templates: Lists: Multi-line list-items via templates
12443 *{{echo|a {{nonexistent|
12445 *{{echo|b {{nonexistent|
12448 <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>
12449 <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>
12454 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12456 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12458 <p><i>ab</i>c<i>d</i>e
12463 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12464 (PHP parser generates misnested html)
12466 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12468 <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>
12472 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12473 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12475 parsoid=wt2html,wt2wt
12477 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12479 <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>
12480 <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>
12481 <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>
12485 Templates: Ugly nesting: 4. Divs opened/closed across templates
12487 a<div>b{{echo|c</div>d}}e
12498 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12504 |{{echo|foo</table>}}
12508 <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|}"]}'>
12512 <td>foo</td></tr></tbody></table><span about="#mwt1">
12513 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12518 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12528 <td>1. {{echo|foo </table>}}</td>
12530 <td>2. {{echo|baz </table>}}</td>
12543 <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>"]}'>
12548 <td>1. foo </td></tr></tbody></table></td>
12550 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12551 </span><span about="#mwt2">
12552 </span><span about="#mwt2">
12553 </span><span about="#mwt2">abc</span><span about="#mwt2">
12554 </span><span about="#mwt2">
12555 </span><span about="#mwt2">
12556 </span><span about="#mwt2">
12557 </span><span about="#mwt2">
12558 </span><span about="#mwt2">
12559 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12560 </span><span about="#mwt2">
12565 Templates: Ugly templates: 3. newline-only template parameter
12574 # This looks like a bug: a single newline triggers p/br for some reason.
12576 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12585 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12586 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12588 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12594 <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
12595 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12599 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12600 # that are "identical" and generate nesting cycles in the algorithm
12602 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12604 {{echo|<table><tr><td><table>}}
12608 <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"}'>
12609 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12610 </table></td></tr></tbody></table>
12614 Templates: Parameters substituted at the top-level
12616 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12620 <p><i>who</i> me? <b>never!</b>
12624 <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>
12626 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
12630 Parser Functions: 1. Simple example
12639 Parser Functions: 2. Nested use (only outermost should be marked up)
12648 ### Pre-save transform tests
12651 pre-save transform: subst:
12657 This is a test template
12661 pre-save transform: normal template
12671 pre-save transform: nonexistent template
12675 {{thistemplatedoesnotexist}}
12677 {{thistemplatedoesnotexist}}
12681 pre-save transform: subst magic variables
12690 # This is bug 89, which I fixed. -- wtm
12692 pre-save transform: subst: templates with parameters
12696 {{subst:paramtest|param="something else"}}
12698 This is a test template with parameter "something else"
12702 Template:nowikitest
12704 <nowiki>'''not wiki'''</nowiki>
12708 pre-save transform: nowiki in subst (bug 1188)
12712 {{subst:nowikitest}}
12714 <nowiki>'''not wiki'''</nowiki>
12718 Template:commenttest
12720 This template has <!-- a comment --> in it.
12724 pre-save transform: comment in subst (bug 1936)
12728 {{subst:commenttest}}
12730 This template has <!-- a comment --> in it.
12734 pre-save transform: unclosed tag
12738 <nowiki>'''not wiki'''
12740 <nowiki>'''not wiki'''
12744 pre-save transform: mixed tag case
12748 <NOwiki>'''not wiki'''</noWIKI>
12750 <NOwiki>'''not wiki'''</noWIKI>
12754 pre-save transform: unclosed comment in <nowiki>
12758 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12760 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12763 # Leading @ in this template definition works around a limitation
12764 # in parsoid's parserTests which otherwise strips the <span> from the
12765 # result (confusing it for a template wrapper)
12769 @<span onmouseover="alert('crap')">Oh no</span>
12773 (confirming safety of fix for subst bug 1936)
12775 {{Template:dangerous}}
12777 <p>@<span>Oh no</span>
12782 pre-save transform: comment containing gallery (bug 5024)
12786 <!-- <gallery>data</gallery> -->
12788 <!-- <gallery>data</gallery> -->
12792 pre-save transform: comment containing extension
12796 <!-- <tag>data</tag> -->
12798 <!-- <tag>data</tag> -->
12802 pre-save transform: comment containing nowiki
12806 <!-- <nowiki>data</nowiki> -->
12808 <!-- <nowiki>data</nowiki> -->
12812 pre-save transform: <noinclude> in subst (bug 3298)
12822 pre-save transform: <onlyinclude> in subst (bug 3298)
12826 {{subst:Includes2}}
12834 {{<includeonly>subst:</includeonly>Includes}}
12838 Template:SafeSubstTest
12840 {{<includeonly>safesubst:</includeonly>Includes}}
12844 bug 22297: safesubst: works during PST
12848 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12854 bug 22297: safesubst: works during normal parse
12863 subst: does not work during normal parse
12867 <p>{{subst:Includes}}
12872 pre-save transform: context links ("pipe trick")
12876 [[Article (context)|]]
12879 [[Bar:Article (context)|]]
12880 [[:Bar:Article (context)|]]
12882 [[|Article (context)]]
12886 [[Article (context)|Article]]
12887 [[Bar:Article|Article]]
12888 [[:Bar:Article|Article]]
12889 [[Bar:Article (context)|Article]]
12890 [[:Bar:Article (context)|Article]]
12892 [[Article (context)]]
12893 [[Bar:X (Y) Z|X (Y) Z]]
12894 [[:Bar:X (Y) Z|X (Y) Z]]
12898 pre-save transform: context links ("pipe trick") with interwiki prefix
12902 [[interwiki:Article|]]
12903 [[:interwiki:Article|]]
12904 [[interwiki:Bar:Article|]]
12905 [[:interwiki:Bar:Article|]]
12907 [[interwiki:Article|Article]]
12908 [[:interwiki:Article|Article]]
12909 [[interwiki:Bar:Article|Bar:Article]]
12910 [[:interwiki:Bar:Article|Bar:Article]]
12914 pre-save transform: context links ("pipe trick") with parens in title
12916 pst title=[[Somearticle (context)]]
12920 [[Article (context)|Article]]
12924 pre-save transform: context links ("pipe trick") with comma in title
12926 pst title=[[Someplace, Somewhere]]
12929 [[Otherplace, Elsewhere|]]
12930 [[Otherplace, Elsewhere, Anywhere|]]
12932 [[Otherplace, Somewhere|Otherplace]]
12933 [[Otherplace, Elsewhere|Otherplace]]
12934 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12938 pre-save transform: context links ("pipe trick") with parens and comma
12940 pst title=[[Someplace (IGNORED), Somewhere]]
12943 [[Otherplace (place), Elsewhere|]]
12945 [[Otherplace, Somewhere|Otherplace]]
12946 [[Otherplace (place), Elsewhere|Otherplace]]
12950 pre-save transform: context links ("pipe trick") with comma and parens
12952 pst title=[[Who, me? (context)]]
12955 [[Me, Myself, and I (1937 song)|]]
12957 [[Yes, you. (context)|Yes, you.]]
12958 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12962 pre-save transform: context links ("pipe trick") with namespace
12964 pst title=[[Ns:Somearticle]]
12968 [[Ns:Article|Article]]
12972 pre-save transform: context links ("pipe trick") with namespace and parens
12974 pst title=[[Ns:Somearticle (context)]]
12978 [[Ns:Article (context)|Article]]
12982 pre-save transform: context links ("pipe trick") with namespace and comma
12984 pst title=[[Ns:Somearticle, Context, Whatever]]
12988 [[Ns:Article, Context, Whatever|Article]]
12992 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12994 pst title=[[Ns:Somearticle, Context (context)]]
12998 [[Ns:Article (context)|Article]]
13002 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13004 pst title=[[Ns:Somearticle (IGNORED), Context]]
13008 [[Ns:Article, Context|Article]]
13012 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese 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 full-width parens and space (Japanese and Chinese style, bug 30149)
13036 [[Article (context)|]]
13037 [[Bar:Article (context)|]]
13038 [[:Bar:Article (context)|]]
13039 [[|Article (context)]]
13043 [[Article (context)|Article]]
13044 [[Bar:Article (context)|Article]]
13045 [[:Bar:Article (context)|Article]]
13046 [[Article (context)]]
13047 [[Bar:X (Y) Z|X (Y) Z]]
13048 [[:Bar:X (Y) Z|X (Y) Z]]
13052 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
13056 [[Article(context)|]]
13057 [[Bar:Article(context)|]]
13058 [[:Bar:Article(context)|]]
13059 [[|Article(context)]]
13063 [[Article(context)|Article]]
13064 [[Bar:Article(context)|Article]]
13065 [[:Bar:Article(context)|Article]]
13066 [[Article(context)]]
13067 [[Bar:X(Y)Z|X(Y)Z]]
13068 [[:Bar:X(Y)Z|X(Y)Z]]
13072 pre-save transform: context links ("pipe trick") with commas (bug 21660)
13076 [[Article (context), context|]]
13077 [[Article (context),context|]]
13078 [[Bar:Article (context), context|]]
13079 [[Bar:Article (context),context|]]
13080 [[:Bar:Article (context), context|]]
13081 [[:Bar:Article (context),context|]]
13083 [[Article (context), context|Article]]
13084 [[Article (context),context|Article]]
13085 [[Bar:Article (context), context|Article]]
13086 [[Bar:Article (context),context|Article]]
13087 [[:Bar:Article (context), context|Article]]
13088 [[:Bar:Article (context),context|Article]]
13092 pre-save transform: trim trailing empty lines
13096 Empty lines are trimmed
13102 Empty lines are trimmed
13106 pre-save transform: Signature expansion
13111 * <noinclude>~~~</noinclude>
13112 * <includeonly>~~~</includeonly>
13113 * <onlyinclude>~~~</onlyinclude>
13115 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13116 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13117 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13118 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13123 pre-save transform: Signature expansion in nowiki tags (bug 93)
13129 <nowiki>~~~~</nowiki>
13131 <includeonly><nowiki>~~~~</nowiki></includeonly>
13133 <noinclude><nowiki>~~~~</nowiki></noinclude>
13135 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13137 {{subst:Foo}} shall be converted to FOO
13139 As well as inside noinclude/onlyinclude
13140 <noinclude>{{subst:Foo}}</noinclude>
13141 <onlyinclude>{{subst:Foo}}</onlyinclude>
13143 But not inside includeonly
13144 <includeonly>{{subst:Foo}}</includeonly>
13148 <nowiki>~~~~</nowiki>
13150 <includeonly><nowiki>~~~~</nowiki></includeonly>
13152 <noinclude><nowiki>~~~~</nowiki></noinclude>
13154 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13156 FOO shall be converted to FOO
13158 As well as inside noinclude/onlyinclude
13159 <noinclude>FOO</noinclude>
13160 <onlyinclude>FOO</onlyinclude>
13162 But not inside includeonly
13163 <includeonly>{{subst:Foo}}</includeonly>
13167 Parsoid: Recognize nowiki with trailing space in tags
13171 <nowiki ><div>[[foo]]</nowiki >
13179 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13186 Parsoid: Recognize nowiki with odd capitalization
13190 <noWikI ><div>[[foo]]</Nowiki >
13192 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13197 Parsoid: Escape nowiki with trailing space in tags
13201 <p><nowiki > foo </nowiki ></p>
13202 <p>a<nowiki />b</p>
13203 <p>c<nowiki/ >d</p>
13205 <nowiki > foo </nowiki >
13213 Parsoid: Escape weird noWikI capitalizations
13217 <p><noWikI > foo </NoWikI ></p>
13219 <noWikI > foo </NoWikI >
13223 ### Message transform tests
13226 message transform: magic variables
13236 message transform: should not transform wiki markup
13246 message transform: <noinclude> in transcluded template (bug 4926)
13256 message transform: <onlyinclude> in transcluded template (bug 4926)
13266 {{#special:}} page name, known
13270 {{#special:Recentchanges}}
13272 Special:RecentChanges
13276 {{#special:}} page name with subpage, known
13280 {{#special:Recentchanges/param}}
13282 Special:RecentChanges/param
13286 {{#special:}} page name, unknown
13290 {{#special:foobar nonexistent}}
13292 Special:Foobar nonexistent
13296 {{#speciale:}} page name, known
13300 {{#speciale:Recentchanges}}
13302 Special:RecentChanges
13306 {{#speciale:}} page name with subpage, known
13310 {{#speciale:Recentchanges/param}}
13312 Special:RecentChanges/param
13316 {{#speciale:}} page name, unknown
13320 {{#speciale:foobar nonexistent}}
13322 Special:Foobar_nonexistent
13328 ### For Parsoid-specific tests, see
13329 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13334 parsoid=wt2html,wt2wt,html2html
13336 [[Image:foobar.jpg]]
13338 <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>
13341 <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>
13345 Simple image (using File: namespace, now canonical)
13347 [[File:Foobar.jpg]]
13349 <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>
13352 <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>
13356 Right-aligned image
13358 [[File:Foobar.jpg|right]]
13360 <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>
13363 <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>
13369 [[File:Foobar.jpg|right|Caption text]]
13371 <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>
13374 <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>
13378 Image with caption, bug 53312 #1
13380 [[File:Foobar.jpg|right|Caption page stuff]]
13382 <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>
13385 <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>
13389 Image with caption, bug 53312 #2
13391 [[File:Foobar.jpg|right|Caption page=]]
13393 <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>
13396 <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>
13400 Image with caption, bug 53312 #3
13402 [[File:Foobar.jpg|right|Caption page=stuff]]
13404 <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>
13407 <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>
13411 Allow empty links in image captions (Bug 60753)
13415 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13420 <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>
13423 <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>
13425 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13426 </figcaption></figure>
13430 Titles in unlinked images (T23454)
13432 [[File:Foobar.jpg|link=|stuff]]
13434 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13439 Link with empty target
13448 Image with link trail
13450 Linktrails should not work for images: [[File:Foobar.jpg]]s
13452 <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
13455 <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>
13459 Image with empty attribute
13461 parsoid=wt2html,wt2wt,html2html
13463 [[File:Foobar.jpg|right||Caption text]]
13465 <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>
13468 <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>
13472 1. Block image with individual attributes from templates
13474 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13476 <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>
13479 <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>
13483 2. Block Image with individual attributes from templates
13485 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13487 <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>
13490 <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>
13494 3. Inline image with individual attributes from templates
13496 [[File:Foobar.jpg|{{echo|50px}}]]
13498 <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>
13501 <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>
13504 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13505 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13507 Image with multiple attributes from the same template
13509 [[File:Foobar.jpg|{{image_attribs}}]]
13511 <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>
13514 <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>
13518 Image with link tails
13522 123[[File:Foobar.jpg]]456
13523 123[[File:Foobar.jpg|right]]456
13524 123[[File:Foobar.jpg|thumb]]456
13526 <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
13528 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
13529 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
13532 <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>
13534 <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>
13536 <div class="thumb tright">
13537 <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>
13538 <div class="thumbcaption">
13539 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13545 <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>
13546 <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>
13547 <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>
13551 Image with multiple captions -- only last one is accepted
13553 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13555 <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>
13558 <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>
13562 Image with multiple widths -- use last
13564 [[File:Foobar.jpg|200px|300px|caption]]
13566 <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>
13569 <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>
13573 Image with multiple alignments -- use first (bug 48664)
13577 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13579 [[File:Foobar.jpg|middle|text-top|caption]]
13581 <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>
13582 <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>
13585 <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>
13586 <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>
13590 Image with width attribute at different positions
13592 [[File:Foobar.jpg|200px|right|Caption]]
13593 [[File:Foobar.jpg|right|200px|Caption]]
13594 [[File:Foobar.jpg|right|Caption|200px]]
13596 <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>
13597 <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>
13598 <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>
13601 <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>
13602 <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>
13603 <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>
13606 # a sad bit of backward-compatibility
13608 Image with size specified with pxpx (bug 13500, 51628)
13610 parsoid=wt2html,wt2wt,html2html
13612 [[File:Foobar.jpg|20pxpx]]
13613 [[File:Foobar.jpg|200x20pxpx]]
13615 <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>
13616 <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>
13619 <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>
13623 Image with link parameter, wiki target
13625 [[File:Foobar.jpg|link=Main Page]]
13627 <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>
13630 <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>
13633 # parsoid bug 49293 (part 1)
13635 Image with link parameter, URL target
13637 [[File:Foobar.jpg|link=http://example.com/]]
13639 <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>
13642 <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>
13645 # parsoid bug 49293 (part 2)
13647 Image with link parameter, protocol-less URL target
13649 [[File:Foobar.jpg|link=//example.com/]]
13651 <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>
13654 <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>
13658 Escaping non-block captions (T107435)
13661 "modes": ["wt2wt"],
13663 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13667 [[Image:Foobar.jpg|caption]]
13669 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13672 # wgExternalLinkTarget not supported by Parsoid
13674 Image with link parameter, wgExternalLinkTarget
13676 [[Image:foobar.jpg|link=http://example.com/]]
13678 wgExternalLinkTarget='foobar'
13680 <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>
13685 Image with link parameter, wgNoFollowLinks set to false
13687 [[Image:foobar.jpg|link=http://example.com/]]
13689 wgNoFollowLinks=false
13691 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13696 Image with link parameter, wgNoFollowDomainExceptions
13698 [[Image:foobar.jpg|link=http://example.com/]]
13700 wgNoFollowDomainExceptions='example.com'
13702 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13706 # wgExternalLinkTarget not supported by Parsoid
13708 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13710 [[Image:foobar.jpg|link=http://example.com/|Title]]
13712 wgExternalLinkTarget='foobar'
13714 <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>
13719 Image with empty link parameter
13721 [[File:Foobar.jpg|link=]]
13723 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13726 <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>
13730 Image with link parameter (wiki target) and unnamed parameter
13732 [[File:Foobar.jpg|link=Main_Page|Title]]
13734 <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>
13737 <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>
13741 Image with link parameter (URL target) and unnamed parameter
13743 [[File:Foobar.jpg|link=http://example.com/|Title]]
13745 <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>
13748 <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>
13752 Thumbnail image with link parameter
13755 parsoid=wt2html,wt2wt,html2html
13757 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13759 <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>
13762 <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>
13766 Manually-specified thumbnail image
13770 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13772 <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>
13775 <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>
13779 Manually-specified thumbnail image with explicit link to wiki page
13782 parsoid=wt2html,wt2wt,html2html
13784 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13786 <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>
13789 <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>
13793 Manually-specified thumbnail image with explicit link to url
13796 parsoid=wt2html,wt2wt,html2html
13798 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13800 <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>
13803 <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>
13807 Manually-specified thumbnail image with explicit no link
13810 parsoid=wt2html,wt2wt,html2html
13812 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13814 <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>
13817 <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>
13821 Manually-specified thumbnail image with explicit link and alt text
13824 parsoid=wt2html,wt2wt,html2html
13826 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13828 <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>
13831 <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>
13835 Image with frame and link
13837 parsoid=wt2html,wt2wt,html2html
13839 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13841 <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>
13844 <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>
13848 Image with frame and link and explicit alt
13850 parsoid=wt2html,wt2wt,html2html
13852 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13854 <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>
13857 <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>
13861 Image with wiki markup in implicit alt
13863 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13865 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13867 <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>
13868 </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>
13871 <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>
13873 <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>
13877 Alt image option should handle most kinds of wikitext without barfing
13879 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13881 <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>
13884 <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>
13887 ###################
13888 # Conflicting image format options.
13889 # First option specified should 'win'.
13890 # All three cases in each test should be identical.
13893 Image with 'frameless' first.
13895 parsoid=wt2html,wt2wt,html2html
13897 [[File:Foobar.jpg|frameless|caption]]
13899 [[File:Foobar.jpg|frameless|frame|caption]]
13901 [[File:Foobar.jpg|frameless|thumb|caption]]
13903 <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>
13904 </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>
13905 </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>
13908 <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>
13909 <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>
13910 <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>
13914 Image with 'frame' first.
13916 parsoid=wt2html,wt2wt,html2html
13918 [[File:Foobar.jpg|frame|caption]]
13919 [[File:Foobar.jpg|frame|frameless|caption]]
13920 [[File:Foobar.jpg|frame|thumb|caption]]
13922 <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>
13923 <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>
13924 <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>
13927 <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>
13928 <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>
13929 <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>
13933 Image with 'thumb' first.
13935 parsoid=wt2html,wt2wt,html2html
13937 [[File:Foobar.jpg|thumb|caption]]
13938 [[File:Foobar.jpg|thumb|frameless|caption]]
13939 [[File:Foobar.jpg|thumb|frame|caption]]
13941 <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>
13942 <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>
13943 <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>
13946 <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>
13947 <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>
13948 <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>
13951 ###################
13953 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13954 # and https://phabricator.wikimedia.org/T64258
13955 # Foobar has actual size of 1941x220
13956 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13957 # a scalable format.
13958 # 2. Framed images always ignore size options; always render at default size.
13959 # 3. "Unspecified format" and border are the only types which can be
13963 Image: "unspecified format" and border enlarge
13965 parsoid=wt2html,wt2wt,html2html
13967 [[File:Foobar.jpg|2000px]]
13969 [[File:Foobar.jpg|border|2000px]]
13971 <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>
13972 </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>
13975 <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>
13976 <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>
13980 Image: "unspecified format" and border reduce
13982 parsoid=wt2html,wt2wt,html2html
13984 [[File:Foobar.jpg|1000px]]
13986 [[File:Foobar.jpg|border|1000px]]
13988 <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>
13989 </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>
13992 <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>
13993 <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>
13997 Image: thumbs reduce
13999 parsoid=wt2html,wt2wt,html2html
14001 [[File:Foobar.jpg|thumb|50px]]
14003 <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>
14006 <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>
14010 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14012 parsoid=wt2html,wt2wt,html2html
14014 [[File:Foobar.jpg|thumb|2000px]]
14016 [[File:Foobar.svg|thumb|2000px]]
14018 <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>
14019 <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>
14022 <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>
14023 <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>
14027 Image: frameless can reduce in size
14029 parsoid=wt2html,wt2wt,html2html
14031 [[File:Foobar.jpg|frameless|50px]]
14033 <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>
14036 <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>
14040 Image: bitmap frameless can't be enlarged past original size, but vector can
14042 parsoid=wt2html,wt2wt,html2html
14044 [[File:Foobar.jpg|frameless|2000px]]
14046 [[File:Foobar.svg|frameless|2000px]]
14048 <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>
14049 </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>
14052 <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>
14053 <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>
14057 Image: framed images are always unscaled.
14059 parsoid=wt2html,wt2wt,html2html
14061 [[File:Foobar.jpg|frame]]
14063 [[File:Foobar.jpg|frame|50px]]
14065 [[File:Foobar.jpg|frame|50x50px]]
14067 [[File:Foobar.jpg|frame|2000px]]
14069 <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>
14070 <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>
14071 <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>
14072 <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>
14075 <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>
14076 <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>
14077 <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>
14078 <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>
14081 ###################
14084 Link to image page- image page normally doesn't exists, hence edit link
14085 Add test with existing image page
14086 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14090 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14095 bug 18784 Link to non-existent image page with caption should use caption as link text
14097 [[:Image:test|caption]]
14099 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14104 Frameless image caption with a free URL
14106 [[File:Foobar.jpg|http://example.com]]
14108 <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>
14111 <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>
14115 Thumbnail image caption with a free URL
14119 [[File:Foobar.jpg|thumb|http://example.com]]
14121 <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>
14124 <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>
14128 Thumbnail image caption with a free URL and explicit alt
14131 parsoid=wt2html,wt2wt,html2html
14133 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14135 <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>
14138 <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>
14142 SVG thumbnails with no language set
14145 [[File:Foobar.svg|thumb|caption]]
14147 <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>
14150 <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>
14154 SVG thumbnails with language de
14156 parsoid=wt2html,wt2wt,html2html
14158 [[File:Foobar.svg|thumb|caption|lang=de]]
14160 <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>
14163 <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>
14167 SVG thumbnails with invalid language code
14169 parsoid=wt2html,wt2wt,html2html
14171 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14173 <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>
14176 <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>
14180 BUG 1887: A ISBN with a thumbnail
14182 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14184 <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>
14187 <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>
14191 BUG 1887: A RFC with a thumbnail
14193 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14195 <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>
14198 <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>
14202 BUG 1887: A mailto link with a thumbnail
14204 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14206 <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>
14209 <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>
14212 # Pending resolution to bug 368
14214 BUG 648: Frameless image caption with a link
14216 [[File:Foobar.jpg|text with a [[link]] in it]]
14218 <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>
14221 <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>
14225 BUG 648: Frameless image caption with a link (suffix)
14227 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14229 <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>
14232 <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>
14236 BUG 648: Frameless image caption with an interwiki link
14238 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14240 <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>
14243 <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>
14247 BUG 648: Frameless image caption with a piped interwiki link
14249 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14251 <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>
14254 <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>
14258 T107474: Frameless image caption with <nowiki>
14260 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14262 <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>
14266 Escape HTML special chars in image alt text
14268 [[File:Foobar.jpg|& < > "]]
14270 <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>
14273 <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>
14277 Escape HTML special chars in image alt text with LanguageConverter
14281 [[File:Foobar.jpg|& < > "]]
14283 <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>
14286 <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>
14290 Entities in file name and attributes
14292 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14294 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14297 <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>
14301 BUG 499: Alt text should have Ӓ, not &1234;
14303 [[File:Foobar.jpg|♀]]
14305 <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>
14308 <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>
14312 Broken image caption with link
14314 parsoid=wt2html,wt2wt,html2html
14316 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14318 <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.
14321 <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>
14325 Image caption containing another image
14327 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14329 <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>
14332 <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>
14336 Image: caption containing a newline
14338 [[File:Foobar.jpg|This
14341 <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>
14344 <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>
14348 Image: caption containing leading space
14349 (The leading space should not trigger nowiki escaping in wt2wt mode)
14351 [[File:Foobar.jpg|thumb| bar]]
14353 <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>
14356 <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>
14360 Image: caption containing a table
14362 parsoid=wt2html,wt2wt,html2html
14364 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14370 and some more text.]]
14372 <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>
14375 <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
14378 <tr><th>Foo </th><th>Bar</th></tr>
14381 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14385 Bug 3090: External links other than http: in image captions
14387 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14389 <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>
14392 <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>
14398 parsoid=wt2html,wt2wt,html2html
14400 [[Image:foobar.jpg|a|class=b]]
14402 <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>
14405 <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>
14409 Localized image handling (1).
14411 parsoid=wt2html,wt2wt,html2html
14414 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14416 <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>
14419 <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>
14423 Localized image handling (2).
14426 parsoid=wt2html,wt2wt,html2html
14429 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14431 <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>
14434 <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>
14438 Localized image handling (3).
14443 <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>
14445 [[File:Foobar.jpg|بندانگشتی]]
14449 "border", "frameless" and "class" attributes on an image.
14452 parsoid=wt2html,wt2wt,html2html
14454 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14456 <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>
14459 <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>
14462 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14464 Invalid image attributes (bug 62500)
14467 parsoid=wt2html,wt2wt,html2html
14469 [[File:Foobar.jpg|thumb|float|left|caption]]
14471 [[File:Foobar.jpg|thumb|righ|caption]]
14473 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14475 <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>
14476 <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>
14477 <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>
14480 <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>
14481 <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>
14482 <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>
14488 #REDIRECT [[File:Barfoo.jpg]]
14491 # FIXME: Parsoid should run this test -- but we'd need to teach the
14492 # mockAPI about the redirected Barfoo.jpg image.
14496 [[Image:Barfoo.jpg]]
14498 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14503 Missing image with uploads disabled
14507 [[File:Foobaz.jpg]]
14509 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14512 <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>
14515 # Parsoid-specific testing for images
14516 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14517 # Currently imperfect due to a flaw in the Parsoid testrunner
14519 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14523 Parsoid-specific image handling - simple image with size and middle alignment
14525 [[File:Foobar.jpg|middle|50px]]
14527 <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>
14531 Parsoid-specific image handling - simple image with size, middle alignment,
14532 non-standard namespace alias
14534 parsoid=wt2wt,wt2html,html2html
14536 [[Image:Foobar.jpg|middle|50px]]
14538 <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>
14542 Parsoid-specific image handling - simple image with size and middle alignment
14545 [[File:Foobar.jpg|50px|middle]]
14547 <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>
14551 Parsoid-specific image handling - simple image with size and middle alignment
14552 and non-standard namespace name
14554 parsoid=wt2html,wt2wt,html2html
14556 [[Image:Foobar.jpg|50px|middle]]
14558 <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>
14562 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14564 [[File:Foobar.jpg|500x10px|baseline|caption]]
14566 <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>
14570 Parsoid-specific image handling - simple image with border and size spec
14572 [[File:Foobar.jpg|50px|border|caption]]
14574 <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>
14578 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14580 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14582 <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>
14586 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14589 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14591 <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>
14595 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14597 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14599 <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>
14603 Parsoid-specific image handling - thumbnail with specific size, halign,
14604 valign, and caption (existing content)
14606 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14608 <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>
14612 Parsoid-specific image handling - framed image with specific size and caption
14615 parsoid=wt2html,wt2wt,html2html
14617 [[File:Foobar.jpg|frame|500x50px|caption]]
14619 <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>
14623 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14626 parsoid=wt2html,wt2wt,html2html
14628 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14630 <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>
14634 Parsoid-specific image handling - frameless image with specific size, border, and caption
14636 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14638 <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>
14642 Parsoid-specific image handling - simple image with a formatted caption
14644 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14646 <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>
14650 Parsoid-specific image handling - caption with a template in it
14652 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14654 <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>
14658 Parsoid-specific image handling - caption with unbalanced tags in it
14660 parsoid=wt2html,wt2wt,html2html
14663 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14667 <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>
14672 Parsoid-specific image handling - empty caption (1)
14674 parsoid=wt2html,wt2wt
14676 [[File:Foobar.jpg|thumb|]]
14678 <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>
14681 # empty captions don't get serialized unless we're in the "round trip" case
14683 Parsoid-specific image handling - empty caption (2)
14687 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14688 <a href="./File:Foobar.jpg">
14689 <img resource="./File:Foobar.jpg"
14690 src="//example.com/images/3/3a/Foobar.jpg"
14691 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14692 height="25" width="220"/>
14694 <figcaption></figcaption>
14697 [[File:Foobar.jpg|thumb]]
14701 Parsoid-specific image handling - whitespace caption
14703 [[File:Foobar.jpg|thumb| ]]
14705 <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>
14709 Parsoid-specific image handling - lang option
14712 [[File:Foobar.svg|lang=de|caption]]
14716 <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>
14720 ## Edge case bugs in Parsoid from T93580
14722 T93580: 1. Templated <ref> inside block images
14724 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14728 <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>
14730 <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>
14734 T93580: 2. <ref> inside inline images
14736 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14740 <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>
14742 <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>
14746 T93580: 3. Templated <ref> inside inline images
14748 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14752 <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>
14754 <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>
14761 Subpage test/subpage
14769 subpage title=[[Subpage test]]
14773 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14778 Subpage noslash link
14780 subpage title=[[Subpage test]]
14784 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14789 Subpage test/1/2/subpage
14795 Relative subpage noslash link
14797 parsoid=wt2wt,wt2html,html2html
14798 subpage title=[[Subpage test/1/2/3/4]]
14804 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14805 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14808 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14809 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14813 Parsoid: dot-slash prefixed wikilinks
14823 </p><p>[[././baz/]]
14828 </p><p>[[././baz/]]
14833 Render invalid page names as plain text (bug 51090)
14846 [[{{echo|./../foo}}|bar]]
14847 [[{{echo|foo/.}}|bar]]
14848 [[{{echo|foo/..}}|bar]]
14849 [[{{echo|foo~~~~bar}}]]
14850 [[{{echo|foo>bar}}]]
14851 [[{{echo|foo././bar}}]]
14852 [[{{echo|foo{bar}}]]
14853 [[{{echo|foo}bar}}]]
14854 [[{{echo|foo[bar}}]]
14855 [[{{echo|foo]bar}}]]
14856 [[{{echo|foo<bar}}]]
14858 <p>[[./../foo|bar]]
14868 </p><p>[[./../foo|bar]]
14881 <p>[[./../foo|bar]]
14892 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14893 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14894 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14895 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14896 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14897 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14898 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14899 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14900 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14901 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14902 [[<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>
14910 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14915 BUG 561: {{/Subpage}}
14917 subpage title=[[Page]]
14921 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14929 Category:MediaWiki User's Guide
14937 [[:Category:MediaWiki User's Guide]]
14939 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14948 [[Category:MediaWiki User's Guide]]
14950 cat=MediaWiki_User's_Guide sort=
14952 <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"}}'/>
14956 PAGESINCATEGORY invalid title fatal (r33546 fix)
14958 {{PAGESINCATEGORY:<bogus>}}
14965 Category with different sort key
14969 [[Category:MediaWiki User's Guide|Foo]]
14971 cat=MediaWiki_User's_Guide sort=Foo
14973 <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"}}'/>
14977 Category with identical sort key
14981 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14983 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14985 <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"}}'/>
14989 Category with empty sort key
14994 [[Category:MediaWiki User's Guide|]]
14996 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15000 Category with empty sort key and parentheses
15005 [[Category:Foo (bar)|]]
15007 [[Category:Foo (bar)|Foo]]
15011 Category with link tail
15016 123[[Category:Foo]]456
15018 123[[Category:Foo]]456
15022 Category with template
15027 [[Category:{{echo|Foo}}]]
15029 [[Category:{{echo|Foo}}]]
15033 Category with template in sort key
15038 [[Category:Foo|{{echo|Bar}}]]
15040 [[Category:Foo|{{echo|Bar}}]]
15044 Category with template in sort key and title
15049 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15051 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15054 ## We used to, but no longer wt2wt this test since the default serializer
15055 ## will normalize all categories to serialize on their own line.
15056 ## This wikitext usage is going to be fairly uncommon in production and
15057 ## selser will take care of preserving formatting in those scenarios.
15059 Category / paragraph interactions
15063 Foo [[Category:Baz]] Bar
15065 Foo [[Category:Baz]]
15073 [[Category:Baz]] Bar
15086 {{echo|[[Category:Baz]]}}
15099 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15100 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15101 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15102 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15103 <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>
15104 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15107 ## We used to, but no longer wt2wt this test since the default serializer
15108 ## will normalize all categories to serialize on their own line.
15109 ## This wikitext usage is going to be fairly uncommon in production and
15110 ## selser will take care of preserving formatting in those scenarios.
15112 ## The whitespace on the empty line is part of the test. Please do not delete
15114 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15120 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15122 {{echo|[[Category:Foo]] and so should this!}}
15124 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15129 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15131 <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>
15134 ## Parsoid will not try to wt2wt this while preserving newlines because
15135 ## it suppresses excess newlines within list items -- and we don't want to
15136 ## introduce a special case just for categories, which is, in reality somewhat
15137 ## odd behavior -- categories are unlikely to be used in list items like this
15138 ## in top-level pages and are only likely to show up in template-generated
15139 ## list items where this RT-ing is a non-issue.
15141 ## The whitespace on the empty line is part of the test. Please do not delete
15143 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15149 [[Category:Foo]] and this should be part of the same list item
15152 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15154 <ul><li>This and this should be part of the same list item</li>
15155 <li>So should this and this should be part of the same list item</li></ul>
15158 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15159 <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>
15163 ## Newlines and categories that follow the last item of a list
15164 ## are treated differently because this (list followed by categories)
15165 ## is an extremely common pattern on wikis.
15167 3. Categories and newlines: newline suppression for last list item should RT properly
15180 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15182 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15183 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15187 4. Categories and newlines: newline suppression for last list item should RT properly
15195 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15197 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15200 ## only wt2html for this to make sure the algo only applies to the rightmost path
15202 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15215 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15217 <ul><li> d</li></ul></li></ul>
15218 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15221 ## We used to, but no longer wt2wt this test since the default serializer
15222 ## will normalize all categories to serialize on their own line.
15223 ## This wikitext usage is going to be fairly uncommon in production and
15224 ## selser will take care of preserving formatting in those scenarios.
15226 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15230 * a [[Category:Foo]]
15232 <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>
15235 # This test also demonstrates because of newline+category tunneling
15236 # through the list hander, template wrapping doesn't expand to the
15237 # containing list when the list item swallows the category.
15239 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15244 <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
15245 </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>
15249 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15253 {{echo|[[Category:Foo]]
15257 <ul><li> a</li></ul>
15259 <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">
15260 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15261 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15265 Category links with multiple namespaces
15267 [[Category:Project:Foo]]
15269 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15273 Parsoid: Serialize link to category page with colon escape
15279 [[:Category:Foo|Bar]]
15282 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15283 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15287 # We used to, but no longer wt2wt this test since the default serializer
15288 # will normalize all categories to serialize on their own line.
15289 # This wikitext usage is going to be fairly uncommon in production and
15290 # selser will take care of preventing whitespace insertion if this
15291 # occurs in an article.
15293 # html2html disabled for the same reason (whitespace insertion between
15296 # html2wt disabled because it localizes the "Category" namespace.
15298 Link prefix/suffixes aren't applied to category links
15308 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15312 Parsoid: Serialize link to file page with colon escape
15318 [[:File:Foo.png|Bar]]
15321 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15322 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15327 Parsoid: Serialize a genuine category link without colon escape
15332 [[Category:Foo|Bar]]
15334 <link rel="mw:PageProp/Category" href="./Category:Foo">
15335 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15339 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15343 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15345 [[Category:Toxine bactérienne]]
15349 Parsoid: Defaultsort
15351 {{DEFAULTSORT:Foo}}
15353 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15357 Parsoid: Defaultsort (template-generated)
15359 {{{{echo|DEFAULTSORT}}:Foo}}
15361 <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}}]}'/>
15365 ### Inter-language links
15368 Interlanguage links
15376 es:Alimento fr:Nourriture zh:食品
15378 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15379 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15380 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15384 Duplicate interlanguage links (bug 24502)
15395 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15396 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15397 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15398 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15405 Basic section headings
15412 ===Smaller headline===
15415 <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>
15418 <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>
15421 <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>
15427 Section headings with TOC
15430 === Subheadline 1 ===
15431 ===== Skipping a level =====
15432 ====== Skipping a level ======
15436 ===Another headline===
15438 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15440 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15442 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15444 <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>
15446 <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>
15453 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15455 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15461 <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>
15462 <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>
15463 <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>
15464 <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>
15465 <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>
15468 <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>
15473 TOC anchors don't collide
15481 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15483 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15484 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15485 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15486 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15490 <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>
15491 <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>
15492 <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>
15493 <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>
15497 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15499 Handling of sections up to level 6 and beyond
15502 == Level 2 Heading==
15503 === Level 3 Heading===
15504 ==== Level 4 Heading====
15505 ===== Level 5 Heading=====
15506 ====== Level 6 Heading======
15507 ======= Level 7 Heading=======
15508 ======== Level 8 Heading========
15509 ========= Level 9 Heading=========
15510 ========== Level 10 Heading==========
15512 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15514 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15516 <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>
15518 <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>
15520 <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>
15522 <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>
15524 <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>
15525 <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>
15526 <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>
15527 <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>
15528 <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>
15542 <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>
15543 <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>
15544 <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>
15545 <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>
15546 <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>
15547 <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>
15548 <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>
15549 <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>
15550 <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>
15551 <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>
15556 TOC regression (T11764)
15560 ==== title 1.1.1 ====
15565 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15567 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15569 <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>
15571 <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>
15574 <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>
15577 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15579 <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>
15585 <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>
15586 <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>
15587 <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>
15588 <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>
15589 <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>
15590 <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>
15595 TOC for heading containing <span id="..."></span> (T96153)
15598 ==<span id="old-anchor"></span>New title==
15600 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15602 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15606 <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>
15611 TOC with wgMaxTocLevel=3 (bug 6204)
15617 ==== title 1.1.1 ====
15622 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15624 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15626 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
15627 <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>
15630 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15632 <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>
15638 <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>
15639 <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>
15640 <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>
15641 <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>
15642 <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>
15643 <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>
15648 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15654 ====Section 1.1.1====
15655 ====Section 1.1.1.1====
15658 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15660 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15662 <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>
15665 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15669 <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>
15670 <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>
15671 <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>
15672 <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>
15673 <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>
15679 Resolving duplicate section names
15684 <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>
15685 <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>
15690 Resolving duplicate section names with differing case (bug 10721)
15695 <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>
15696 <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>
15708 Template with sections, __NOTOC__
15715 <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>
15716 <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>
15717 <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>
15718 <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>
15723 __NOEDITSECTION__ keyword
15729 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15730 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15735 Link inside a section heading
15737 ==Section with a [[Main Page|link]] in it==
15739 <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>
15744 TOC regression (T14077)
15751 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15753 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15755 <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>
15758 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15762 <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>
15763 <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>
15764 <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>
15769 BUG 1219 URL next to image (good)
15771 http://example.com [[File:Foobar.jpg]]
15773 <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>
15776 <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>
15780 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15783 The line above must have a trailing space!
15786 But just in case it doesn't...
15788 <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>
15789 <p>The line above must have a trailing space!
15791 <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>
15792 <p>But just in case it doesn't...
15797 Header with special characters (bug 25462)
15799 The tooltips shall not show entities to the user (ie. be double escaped)
15816 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15818 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15820 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15821 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15822 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15823 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15824 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15828 <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>
15831 <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>
15834 <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>
15837 <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>
15840 <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>
15846 Header with space, plus and underscore as entity
15848 Id should not contain + for spaces
15850 == Space between Text ==
15853 == Space-Entity between Text ==
15856 == Plus+between+Text ==
15859 == Plus-Entity+between+Text ==
15862 == Underscore_between_Text ==
15865 == Underscore-Entity_between_Text ==
15868 [[#Space between Text]]
15869 [[#Space-Entity between Text]]
15870 [[#Plus+between+Text]]
15871 [[#Plus-Entity+between+Text]]
15872 [[#Underscore_between_Text]]
15873 [[#Underscore-Entity_between_Text]]
15875 <p>Id should not contain + for spaces
15877 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15879 <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>
15880 <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>
15881 <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>
15882 <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>
15883 <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>
15884 <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>
15888 <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>
15891 <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>
15894 <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>
15897 <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>
15900 <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>
15903 <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>
15905 </p><p><a href="#Space_between_Text">#Space between Text</a>
15906 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15907 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15908 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15909 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15910 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15915 Headers with excess '=' characters
15916 (Are similar tests necessary beyond the 1st level?)
15920 =''italic'' heading==
15921 ==''italic'' heading=
15923 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15925 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15926 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15927 <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>
15928 <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>
15932 <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>
15933 <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>
15934 <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>
15935 <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>
15940 HTML headers vs TOC (bug 23393)
15941 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15953 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15955 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15957 <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>
15958 <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>
15961 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15963 <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>
15964 <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>
15970 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15971 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15972 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15973 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15974 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15975 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15980 Single-line or multiline-comments can follow headings
15982 parsoid=wt2html,wt2wt
15990 <h2><span class="mw-headline" id="foo">foo</span></h2>
15991 <h2><span class="mw-headline" id="bar">bar</span></h2>
15992 <h2><span class="mw-headline" id="baz">baz</span></h2>
15997 BUG 1219 URL next to image (broken)
15999 http://example.com[[File:Foobar.jpg]]
16001 <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>
16004 <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>
16008 Bug 1186 news: in the middle of text
16010 http://en.wikinews.org/wiki/Wikinews:Workplace
16012 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16018 Namespaced link must have a title
16027 Namespaced link must have a title (bad fragment version)
16029 [[Project:#fragment]]
16031 <p>[[Project:#fragment]]
16037 ### HTML tags and HTML attributes
16041 div with no attributes
16043 <div>HTML rocks</div>
16045 <div>HTML rocks</div>
16050 div with double-quoted attribute
16052 <div id="rock">HTML rocks</div>
16054 <div id="rock">HTML rocks</div>
16059 div with single-quoted attribute
16061 <div id='rock'>HTML rocks</div>
16063 <div id="rock">HTML rocks</div>
16068 div with unquoted attribute
16070 <div id=rock>HTML rocks</div>
16072 <div id="rock">HTML rocks</div>
16077 div with illegal double attributes
16079 <div id="a" id="b">HTML rocks</div>
16081 <div id="b">HTML rocks</div>
16086 div with empty attribute value, space before equals
16088 parsoid=wt2html,html2html
16090 <div class =>HTML rocks</div>
16092 <div class="">HTML rocks</div>
16095 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16099 div with multiple empty attribute values
16101 parsoid=wt2html,html2html
16103 <div id= title=>HTML rocks</div>
16105 <div id="title.3D">HTML rocks</div>
16108 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16112 table with multiple empty attribute values
16114 parsoid=wt2html,html2html
16120 <table title="id=">
16126 <table title="id=">
16127 <tbody><tr><td> hi</td></tr>
16132 div with braces in attribute value
16134 <div title="{}">Foo</div>
16136 <div title="{}">Foo</div>
16139 <div title="{}">Foo</div>
16143 div with empty attribute value, no space before equals
16145 parsoid=wt2html,html2html
16147 <div class=>HTML rocks</div>
16149 <div class="">HTML rocks</div>
16152 <div class="">HTML rocks</div>
16156 HTML multiple attributes correction
16158 <p class="error" class="awesome">Awesome!</p>
16160 <p class="awesome">Awesome!</p>
16165 Table multiple attributes correction
16168 !+ class="error" class="awesome"| status
16173 <th class="awesome"> status
16181 <DIV ID="x">HTML ROCKS</DIV>
16183 <div id="x">HTML ROCKS</div>
16188 Non-ASCII pseudo-tags are rendered as text
16197 Pseudo-tag with URL 'name' renders as url link
16199 <http://example.com/>
16201 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16206 text with amp in the middle of nowhere
16210 <p>Remember AT&T?
16215 text with character entity: eacute
16217 I always thought é was a cute letter.
16219 <p>I always thought é was a cute letter.
16222 <p>I always thought é was a cute letter.</p>
16226 text with entity-escaped character entity-like string: eacute
16228 I always thought &eacute; was a cute letter.
16230 <p>I always thought &eacute; was a cute letter.
16235 text with undefined character entity: xacute
16237 I always thought &xacute; was a cute letter.
16239 <p>I always thought &xacute; was a cute letter.
16246 <data value="5">five</data>
16247 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16248 <mark>This highlighted text</mark>
16250 <p><data value="5">five</data>
16251 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16252 <mark>This highlighted text</mark>
16257 HTML tag with leading space is parsed as text
16261 <p>< div>foo< /div>
16266 ### Nesting tests (see bug 41545, 50604, 51081)
16269 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16270 # Note that html2wt is considerably more difficult if we use <b> in
16271 # the test case, instead of <small>
16273 Ensure that HTML adoption agency algorithm is properly implemented.
16275 <small>X<small>Y</small>Z</small>
16277 <p><small>X<small>Y</small>Z</small>
16281 # This was bug 41545 in the PHP parser.
16282 # Note that tidy doesn't handle this correctly.
16286 <kbd>X<kbd>Y</kbd>Z</kbd>
16288 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16292 # The following cases were bug 51081 in the PHP parser.
16293 # Note that there are some other nestable tags (b, i, etc) which are
16294 # not covered; see bug 51081 for discussion.
16296 # Note that tidy doesn't handle this correctly.
16300 <em>X<em>Y</em>Z</em>
16302 <p><em>X<em>Y</em>Z</em>
16306 # Note that tidy doesn't handle this correctly.
16308 Nesting of <strong>
16310 <strong>X<strong>Y</strong>Z</strong>
16312 <p><strong>X<strong>Y</strong>Z</strong>
16321 <p><q>X<q>Y</q>Z</q></p>
16324 # Note that tidy doesn't handle this correctly.
16328 <ruby>X<ruby>Y</ruby>Z</ruby>
16330 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16334 # Note that tidy doesn't handle this correctly.
16338 <bdo>X<bdo>Y</bdo>Z</bdo>
16340 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16352 [[Media:Foobar.jpg]]
16354 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16359 Media link with text
16361 [[Media:Foobar.jpg|A neat file to look at]]
16363 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16367 # FIXME: this is still bad HTML tag nesting
16368 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16370 Media link with nasty text
16372 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16374 <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>
16377 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16378 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16382 Media link to nonexistent file (bug 1702)
16384 [[Media:No such.jpg]]
16386 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16391 Image link to nonexistent file (bug 1850 - good)
16393 [[File:No_such.jpg]]
16395 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16398 <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>
16402 :Image link to nonexistent file (bug 1850 - bad)
16404 [[:Image:No such.jpg]]
16406 <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>
16409 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16415 Character reference normalization in link text (bug 1938)
16417 [[Main Page|this&that]]
16419 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16426 Test for unicode normalization
16428 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16432 (bug 19451) Links should refer to the normalized form.
16440 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16441 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16442 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16443 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16444 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16449 Empty attribute crash test (bug 2067)
16451 <font color="">foo</font>
16453 <p><font color="">foo</font>
16458 Empty attribute crash test single-quotes (bug 2067)
16460 <font color=''>foo</font>
16462 <p><font color="">foo</font>
16467 Attribute test: equals, then nothing
16469 parsoid=wt2html,html2html
16471 <font color=>foo</font>
16473 <p><font color="">foo</font>
16476 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16480 Attribute test: unquoted value
16482 parsoid=wt2html,html2html
16484 <font color=x>foo</font>
16486 <p><font color="x">foo</font>
16489 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16493 Attribute test: unquoted but illegal value (hash)
16495 <font color=#x>foo</font>
16497 <p><font color="#x">foo</font>
16501 # Parsoid does not serialize to empty attribute syntax,
16502 # so wt2wt and html2wt cases are skipped
16504 Attribute test: no value (T54330)
16506 parsoid=wt2html,html2html
16508 <font color>foo</font>
16510 <p><font color="">foo</font>
16513 <p><font color="">foo</font></p>
16517 Bug 2095: link with three closing brackets
16521 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16524 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16528 Bug 2095: link with pipe and three closing brackets
16530 [[Main Page|link]]]
16532 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16535 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16539 Bug 2095: link with pipe and three closing brackets, version 2
16541 [[Main Page|[http://example.com/]]]
16543 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16546 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16555 Template:Dangerous attribute
16557 " onmouseover="alert(document.cookie)
16561 Template:Dangerous style attribute
16563 border-size: expression(alert(document.cookie))
16569 <div style="float: right; {{{1}}}">Magic div</div>
16573 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16575 <div title="{{test}}"></div>
16577 <div title="This is a test template"></div>
16580 <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>
16583 # Parsoid has enough context to handle this case
16585 Bug 2304: HTML attribute safety (dangerous template; 2309)
16587 <div title="{{dangerous attribute}}"></div>
16589 <div title=""></div>
16592 <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>
16596 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16598 <div style="{{dangerous style attribute}}"></div>
16600 <div style="/* insecure input */"></div>
16603 <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>
16607 Bug 2304: HTML attribute safety (safe parameter; 2309)
16609 {{div style|width: 200px}}
16611 <div style="float: right; width: 200px">Magic div</div>
16614 <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>
16618 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16620 {{div style|width: expression(alert(document.cookie))}}
16622 <div style="/* insecure input */">Magic div</div>
16625 <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>
16628 ## Parsoid output here differs; needs investigation.
16630 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16632 {{div style|"><script>alert(document.cookie)</script>}}
16634 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16638 ## Parsoid output here differs; needs investigation.
16640 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16642 {{div style|" ><script>alert(document.cookie)</script>}}
16644 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16649 Bug 2304: HTML attribute safety (link)
16651 <div title="[[Main Page]]"></div>
16653 <div title="[[Main Page]]"></div>
16658 Bug 2304: HTML attribute safety (italics)
16660 <div title="''foobar''"></div>
16662 <div title="''foobar''"></div>
16667 Bug 2304: HTML attribute safety (bold)
16669 <div title="'''foobar'''"></div>
16671 <div title="'''foobar'''"></div>
16676 Bug 2304: HTML attribute safety (ISBN)
16678 <div title="ISBN 1234567890"></div>
16680 <div title="ISBN 1234567890"></div>
16685 Bug 2304: HTML attribute safety (RFC)
16687 <div title="RFC 1234"></div>
16689 <div title="RFC 1234"></div>
16694 Bug 2304: HTML attribute safety (PMID)
16696 <div title="PMID 1234567890"></div>
16698 <div title="PMID 1234567890"></div>
16703 Bug 2304: HTML attribute safety (web link)
16705 <div title="http://example.com/"></div>
16707 <div title="http://example.com/"></div>
16712 Bug 2304: HTML attribute safety (named web link)
16714 <div title="[http://example.com/ link]"></div>
16716 <div title="[http://example.com/ link]"></div>
16721 Bug 3244: HTML attribute safety (extension; safe)
16723 <div style="<nowiki>background:blue</nowiki>"></div>
16725 <div style="background:blue"></div>
16728 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
16732 Bug 3244: HTML attribute safety (extension; unsafe)
16734 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16736 <div style="/* insecure input */"></div>
16739 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
16742 # More MSIE fun discovered by Tom Gilder
16745 MSIE CSS safety test: spurious slash
16747 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16749 <div style="/* insecure input */">evil</div>
16752 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
16756 MSIE CSS safety test: hex code
16758 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16760 <div style="/* insecure input */">evil</div>
16763 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
16767 MSIE CSS safety test: comment in url
16769 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16771 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16774 <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>
16778 MSIE CSS safety test: comment in expression
16780 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16782 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16785 <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>
16789 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16791 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16793 <p style="/* invalid control char */">A</p>
16796 <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>
16800 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16802 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16803 <div style="top:EXPRESSION(alert())">B</div>
16805 <p style="/* insecure input */">A</p>
16806 <div style="/* insecure input */">B</div>
16809 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
16810 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
16814 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16816 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16817 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16819 <div style="/* insecure input */">A</div>
16820 <p style="/* insecure input */">B</p>
16823 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
16824 <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>
16828 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16830 <div style="background-image:url⁽javascript:alert())">A</div>
16831 <div style="background-image:url₍javascript:alert())">B</div>
16832 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16834 <div style="/* insecure input */">A</div>
16835 <div style="/* insecure input */">B</div>
16836 <p style="/* insecure input */">C</p>
16839 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
16840 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
16841 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
16847 parsoid=wt2html,html2html
16850 title="data:text/html,<img src=1 onerror=alert(1)>"
16851 style="-o-link:attr(title);-o-link-source:current">X</div>
16853 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16856 <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>
16860 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16862 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16863 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16864 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16865 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16866 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16867 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16868 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16870 <p style="/* insecure input */">A</p>
16871 <p style="/* insecure input */">B</p>
16872 <p style="/* insecure input */">C</p>
16873 <p style="/* insecure input */">D</p>
16874 <p style="/* insecure input */">E</p>
16875 <p style="/* insecure input */">F</p>
16876 <p style="/* insecure input */">G</p>
16879 <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>
16880 <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>
16881 <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>
16882 <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>
16883 <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>
16884 <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>
16885 <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>
16889 Table attribute legitimate extension
16892 !+ style="<nowiki>color:blue</nowiki>"| status
16897 <th style="color:blue"> status
16903 Table attribute safety
16906 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16911 <th style="/* insecure input */"> status
16917 CSS line continuation 1
16919 <div style="background-image: u\ rl(test.jpg);"></div>
16921 <div style="/* insecure input */"></div>
16926 CSS line continuation 2
16928 <div style="background-image: u\ rl(test.jpg); "></div>
16930 <div style="/* invalid control char */"></div>
16941 Expansion of multi-line templates in attribute values (bug 6255)
16943 <div style="background: {{identity|#00FF00}}">-</div>
16945 <div style="background: #00FF00">-</div>
16950 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16952 <div style="background:
16955 <div style="background: #00FF00">-</div>
16958 <div style="background:
16963 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16965 <div style="background: #00FF00">-</div>
16967 <div style="background: #00FF00">-</div>
16972 Tags which are hidden from Tidy cannot pass through the Sanitizer
16974 <mw:toc><script>alert();</script></mw:toc>
16976 <p><mw:toc><script>alert();</script></mw:toc></p>
16980 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16984 Parser hook: empty input
16995 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16998 ## Don't expect parsoid to rt this form.
17000 Parser hook: empty input using terminated empty elements
17002 parsoid=wt2html,html2html
17013 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17017 Parser hook: empty input using terminated empty elements (space before)
17028 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17032 Parser hook: basic input
17043 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17046 ## Don't expect parsoid to rt this form.
17048 Parser hook: case insensitive
17050 parsoid=wt2html,html2html
17061 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17064 ## Don't expect parsoid to rt this form.
17066 Parser hook: case insensitive, redux
17068 parsoid=wt2html,html2html
17079 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17083 Parser hook: nested tags
17085 <tag><tag></tag></tag>
17094 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17098 Parser hook: basic arguments
17100 <tag width="200" height="100" depth="50" square=""></tag>
17113 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17116 ## Don't expect parsoid to rt this form.
17118 Parser hook: basic arguments, variations
17120 parsoid=wt2html,html2html
17122 <tag width=200 height = "100" depth = '50' square></tag>
17135 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17139 Parser hook: argument containing a forward slash (bug 5344)
17141 <tag filename="/tmp/bla"></tag>
17146 'filename' => '/tmp/bla',
17151 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17154 ## Don't expect parsoid to rt this form.
17156 Parser hook: empty input using terminated empty elements (bug 2374)
17158 parsoid=wt2html,html2html
17170 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17173 ## </tag> should be output literally since there is no matching tag that begins it
17174 ## Don't expect parsoid to rt this form.
17176 Parser hook: basic arguments using terminated empty elements (bug 2374)
17180 <tag width=200 height = "100" depth = '50' square/>
17197 <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
17201 ## Don't expect parsoid to rt this form.
17203 Parser hook: Don't allow unclosed extension tags
17209 this is a '''test'''
17211 <p>test <tag>123
17212 </p><p>this is a <b>test</b>
17215 <p>test <tag>123</p>
17217 <p>this is a <b>test</b></p>
17221 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17225 Parser hook: static parser hook not inside a comment
17227 <statictag>hello, world</statictag>
17229 <statictag action="flush" />
17235 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17236 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17240 Parser hook: static parser hook inside a comment
17242 <!-- <statictag>hello, world</statictag> -->
17243 <statictag action="flush" />
17248 <!-- <statictag>hello, world</statictag> -->
17249 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17252 # Nested template calls; this case was broken by Parser.php rev 1.506,
17256 Template:One-parameter
17258 (My parameter is: {{{1}}})
17262 Template:Map-one-parameter
17264 {{{{{1}}}|{{{2}}}}}
17268 Nested template calls
17270 {{Map-one-parameter|One-parameter|param}}
17272 <p>(My parameter is: param)
17281 # HTML+Tidy effectively strips out the empty tags completely
17282 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17283 # which Tidy would have done for the PHP parser had there been content inside it.
17285 Sanitizer: Closing of open tags
17287 <s></s><table></table>
17289 <s></s><table></table>
17292 <p><s></s></p><table></table>
17296 Sanitizer: Closing of open but not closed tags
17305 Sanitizer: Closing of closed but not open tags
17315 Sanitizer: Closing of closed but not open table tags
17319 Table not started</td></tr></table>
17321 <p>Table not started</p>
17323 <p>Table not started</p>
17327 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17329 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17331 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17334 <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>
17337 # In HTML5, the restrictions are that id must contain at least one character,
17338 # and must not contain any space characters.
17340 Sanitizer: Validating the contents of the id attribute (bug 4515)
17344 <br id="" /><br id="a space" />
17349 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17351 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17355 <br id="foo" /><br id="foo" />
17357 Something need to be done. foo-2 ?
17361 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17364 <meta itemprop="hello" content="world">
17365 <meta http-equiv="refresh" content="5">
17366 <meta itemprop="hello" http-equiv="refresh" content="5">
17367 <link itemprop="hello" href="{{SERVER}}">
17368 <link rel="stylesheet" href="{{SERVER}}">
17369 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17373 <p> <meta itemprop="hello" content="world" />
17374 <meta http-equiv="refresh" content="5">
17375 <meta itemprop="hello" content="5" />
17377 <link itemprop="hello" href="http://example.org" />
17378 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17379 <link itemprop="hello" href="http://example.org" />
17385 Language converter: output gets cut off unexpectedly (bug 5757)
17389 this bit is safe: }-
17391 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17393 then we get cut off here: }-
17395 all additional text is vanished
17397 <p>this bit is safe: }-
17398 </p><p>but if we add a conversion instance: xxx
17399 </p><p>then we get cut off here: }-
17400 </p><p>all additional text is vanished
17405 Self closed html pairs (bug 5487)
17408 <center><font id="bug" />Centered text</center>
17409 <div><font id="bug2" />In div text</div>
17411 <center><font id="bug" />Centered text</center>
17412 <div><font id="bug2" />In div text</div>
17421 Punctuation: nbsp before exclamation
17425 <p>C'est grave !
17430 Punctuation: CSS !important (bug 11874)
17432 <div style="width:50% !important">important</div>
17434 <div style="width:50% !important">important</div>
17439 Punctuation: CSS ! important (bug 11874; with space after)
17441 <div style="width:50% ! important">important</div>
17443 <div style="width:50% ! important">important</div>
17448 HTML bullet list, closed tags (bug 5497)
17461 <ul data-parsoid='{"stx":"html"}'>
17462 <li data-parsoid='{"stx":"html"}'>One</li>
17463 <li data-parsoid='{"stx":"html"}'>Two</li>
17469 HTML bullet list, unclosed tags (bug 5497)
17481 <ul data-parsoid='{"stx":"html"}'>
17482 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17483 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17489 HTML ordered list, closed tags (bug 5497)
17502 <ol data-parsoid='{"stx":"html"}'>
17503 <li data-parsoid='{"stx":"html"}'>One</li>
17504 <li data-parsoid='{"stx":"html"}'>Two</li>
17510 HTML ordered list, unclosed tags (bug 5497)
17523 <ol data-parsoid='{"stx":"html"}'>
17524 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17525 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17531 HTML nested bullet list, closed tags (bug 5497)
17554 <ul data-parsoid='{"stx":"html"}'>
17555 <li data-parsoid='{"stx":"html"}'>One</li>
17556 <li data-parsoid='{"stx":"html"}'>Two:
17557 <ul data-parsoid='{"stx":"html"}'>
17558 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17559 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17566 HTML nested bullet list, open tags (bug 5497)
17603 HTML nested ordered list, closed tags (bug 5497)
17628 HTML nested ordered list, open tags (bug 5497)
17665 HTML ordered list item with parameters oddity
17667 <ol><li id="fragment">One</li>
17670 <ol><li id="fragment">One</li>
17675 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17677 bug 5918: autonumbering
17679 [http://first/] [http://second] [ftp://ftp]
17683 [mailto:enclosed@mail.tld With target]
17685 [mailto:enclosed@mail.tld]
17687 mailto:inline@mail.tld
17689 <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>
17690 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17691 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17692 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17693 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17696 <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>
17697 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17698 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17699 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17700 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17705 # Security and HTML correctness
17706 # From Nick Jenkins' fuzz testing
17710 Fuzz testing: Parser13
17725 Fuzz testing: Parser14
17730 <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>
17731 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17733 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17739 <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>
17741 <div id="toc" class="toc">
17742 <div id="toctitle">
17746 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17753 Fuzz testing: Parser14-table
17755 parsoid=wt2html,html2html
17760 <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>
17761 <table style="__TOC__">
17766 <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>
17767 <table style="__TOC__">
17774 <table style="__TOC__"></table>
17777 # Known to produce bogus xml (extra </td>)
17779 Fuzz testing: Parser16
17806 Fuzz testing: Parser21
17809 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17814 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17824 Fuzz testing: Parser22
17826 http://===r:::https://b
17830 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17838 # Known to produce bad XML for now
17840 Fuzz testing: Parser24
17847 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17848 <br style="onmouseover='alert(document.cookie);' " />
17850 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17855 <u class="|">}}}} >
17856 <br style="onmouseover='alert(document.cookie);'" />
17858 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17866 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
17867 <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":""}]]}'>
17868 <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}'>
17872 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
17875 # Note: the current result listed for this is not what the original one was,
17876 # but the original bug was JavaScript injection, which is fixed in any case.
17877 # It's not clear that the original result listed was any more correct than the
17878 # current one. Original result:
17881 # <li class="||">
17882 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17884 Fuzz testing: Parser25 (bug 6055)
17890 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17892 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17895 <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"]}'>
17896 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
17900 Fuzz testing: URL adjacent extension (with space, clean)
17902 http://example.com <nowiki>junk</nowiki>
17904 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17907 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17911 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17913 http://example.com<nowiki>junk</nowiki>
17915 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17918 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17922 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17924 http://example.com<pre>junk</pre>
17926 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17929 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17934 <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>
17938 Fuzz testing: image with bogus manual thumbnail
17940 [[Image:foobar.jpg|thumbnail= ]]
17942 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17945 <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>
17949 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17951 <pre dir=" "></pre>
17953 <pre dir=" "></pre>
17958 Parsing optional HTML elements (Bug 6171)
17963 <td> Some tabular data</td>
17964 <td> More tabular data ...
17965 <td> And yet som tabular data</td>
17971 <td> Some tabular data</td>
17972 <td> More tabular data ...
17973 </td><td> And yet som tabular data</td>
17980 Correct handling of <td>, <tr> (Bug 6171)
17985 <td> Some tabular data</td>
17986 <td> More tabular data ...</td>
17987 <td> And yet som tabular data</td>
17993 <td> Some tabular data</td>
17994 <td> More tabular data ...</td>
17995 <td> And yet som tabular data</td>
18003 Parsing crashing regression (fr:JavaScript)
18007 <p></body></x>
18012 Inline wiki vs wiki block nesting
18018 <p><b>Bold paragraph</b>
18019 </p><p>New wiki paragraph
18023 # FIXME: The current php output is documented
18024 # and desired output is the parsoid target.
18026 Inline HTML vs wiki block nesting
18032 <p><b>Bold paragraph
18033 </p><p>New wiki paragraph</b>
18036 <p><b>Bold paragraph</b>
18037 </p><p>New wiki paragraph
18041 # Original result was this:
18042 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18044 # While that might be marginally more intuitive, maybe, the six-apostrophe
18045 # construct is clearly pathological and the result stated here (which is what
18046 # the parser actually does) is about as reasonable as anything.
18048 Mixing markup for italics and bold
18051 '''bold''''''bold''bolditalics'''''
18053 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18061 Article for special page transclusion test
18065 Special page transclusion
18068 {{Special:Prefixindex/Xyzzyx}}
18070 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18076 Special page transclusion twice (bug 5021)
18079 {{Special:Prefixindex/Xyzzyx}}
18080 {{Special:Prefixindex/Xyzzyx}}
18082 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18084 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18090 Transclusion of default MediaWiki message
18092 {{MediaWiki:Mainpage}}
18099 Transclusion of nonexistent MediaWiki message
18101 {{MediaWiki:Mainpagexxx}}
18103 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18108 Transclusion of MediaWiki message with underscore
18110 {{MediaWiki:history_short}}
18117 Transclusion of MediaWiki message with space
18119 {{MediaWiki:history short}}
18126 Invalid header with following text
18136 Section extraction test (section 0)
18156 Section extraction test (section 1)
18178 Section extraction test (section 2)
18199 Section extraction test (section 3)
18219 Section extraction test (section 4)
18243 Section extraction test (section 5)
18263 Section extraction test (section 6)
18284 Section extraction test (section 7)
18304 Section extraction test (section 8)
18324 Section extraction test (section 9)
18345 Section extraction test (section 10)
18365 Section extraction test (nonexistent section 11)
18384 Section extraction test with bogus heading (section 1)
18389 ==bogus== not a legal section
18393 ==bogus== not a legal section
18397 Section extraction test with bogus heading (section 2)
18402 ==bogus== not a legal section
18409 Section extraction test with comment after heading (section 1)
18421 Section extraction test with comment after heading (section 2)
18433 Section extraction test with bogus <nowiki> heading (section 1)
18438 ==bogus== <nowiki>not a legal section</nowiki>
18442 ==bogus== <nowiki>not a legal section</nowiki>
18446 Section extraction test with bogus <nowiki> heading (section 2)
18451 ==bogus== <nowiki>not a legal section</nowiki>
18457 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18458 # instead of respecting commented sections
18460 Section extraction prefixed by comment (section 1)
18471 Section extraction prefixed by comment (section 2)
18481 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18482 # instead of respecting HTML-style headings
18484 Section extraction, mixed wiki and html (section 1)
18500 Section extraction, mixed wiki and html (section 2)
18516 # Formerly testing for bug 3342
18518 Section extraction, heading surrounded by <noinclude>
18522 <noinclude>==unmarked==</noinclude>
18528 # Test behavior of bug 19910
18530 Sectiion with all-equals
18535 The line above must have a trailing space
18538 But just in case it doesn't...
18542 But just in case it doesn't...
18546 Section replacement test (section 0)
18577 Section replacement test (section 1)
18606 Section replacement test (section 2)
18636 Section replacement test (section 3)
18667 Section replacement test (section 4)
18694 Section replacement test (section 5)
18725 Section replacement test (section 6)
18755 Section replacement test (section 7)
18786 Section replacement test (section 8)
18817 Section replacement test (section 9)
18846 Section replacement test (section 10)
18876 Section replacement test with initial whitespace (bug 13728)
18880 Preformatted initial line
18884 Preformatted initial line
18891 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18903 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18916 Section extraction, <pre> around bogus header (bug 10309)
18933 Section replacement, <pre> around bogus header (bug 10309)
18954 Handling of 
 in URLs
18958 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18961 <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>
18965 Handling of %0A in URLs
18969 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18972 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18975 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18977 5 quotes, code coverage +1 line
18984 <p><b><i></i></b></p>
18987 # same html as previous, but wikitext adjusted to match parsoid html2wt
18988 # note that wt2html and html2html will put the <i> before the <b>
18990 5 quotes, code coverage +1 line w/ nowiki (1)
18992 parsoid=wt2wt,html2wt
18994 '''''<nowiki/>'''''
18999 <p><b><i></i></b></p>
19002 # same as previous, just swapping the <i> and <b>
19004 5 quotes, code coverage +1 line w/ nowiki (2)
19006 '''''<nowiki/>'''''
19011 <p><i><b></b></i></p>
19015 Special:Search page linking.
19019 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19024 {{!}} is a magic word
19026 {{!}} is a magic word there and {{!}} is still a magic word here
19027 | is not a magic word here but {{!}} is still a magic word here
19029 <p>| is a magic word there and | is still a magic word here
19030 | is not a magic word here but | is still a magic word here
19033 <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
19034 | 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>
19041 title=[[Parser test]]
19046 * {{FULLPAGENAMEE}}
19048 * {{BASEPAGENAMEE}}
19052 * {{ROOTPAGENAMEE}}
19054 * {{TALKPAGENAMEE}}
19055 * {{SUBJECTPAGENAME}}
19056 * {{SUBJECTPAGENAMEE}}
19059 * {{NAMESPACENUMBER}}
19063 * {{SUBJECTSPACEE}}
19064 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19066 <ul><li> Parser test</li>
19067 <li> Parser_test</li>
19068 <li> Parser test</li>
19069 <li> Parser_test</li>
19070 <li> Parser test</li>
19071 <li> Parser_test</li>
19072 <li> Parser test</li>
19073 <li> Parser_test</li>
19074 <li> Parser test</li>
19075 <li> Parser_test</li>
19076 <li> Talk:Parser test</li>
19077 <li> Talk:Parser_test</li>
19078 <li> Parser test</li>
19079 <li> Parser_test</li>
19087 <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>
19090 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19092 ## Parsoid thinks the "centre" here is a property, not a caption.
19097 "modes": ["wt2html"],
19098 "nativeGallery": true
19106 image4 |300px| centre
19107 image5.svg| http://///////
19112 <ul class="gallery mw-gallery-traditional">
19113 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19114 <div class="thumb" style="height: 150px;">Image1.png</div>
19115 <div class="gallerytext">
19118 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19119 <div class="thumb" style="height: 150px;">Image2.gif</div>
19120 <div class="gallerytext">
19123 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19124 <div class="thumb" style="height: 150px;">Image3</div>
19125 <div class="gallerytext">
19128 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19129 <div class="thumb" style="height: 150px;">Image4</div>
19130 <div class="gallerytext">
19135 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19136 <div class="thumb" style="height: 150px;">Image5.svg</div>
19137 <div class="gallerytext">
19138 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19142 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19143 <div class="thumb" style="height: 150px;">* image6</div>
19144 <div class="gallerytext">
19150 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19151 <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>
19152 <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>
19153 <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>
19154 <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>
19155 <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>
19156 <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>
19161 Gallery (with options, html)
19164 "modes": ["wt2html", "html2html"],
19165 "nativeGallery": true
19168 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19169 File:Nonexistent.jpg|caption
19170 File:Nonexistent.jpg
19171 image:foobar.jpg|some '''caption''' [[Main Page]]
19173 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19176 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19177 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19178 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19179 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19180 <div class="gallerytext">
19185 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19186 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19187 <div class="gallerytext">
19190 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19191 <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>
19192 <div class="gallerytext">
19193 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19197 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19198 <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>
19199 <div class="gallerytext">
19202 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19203 <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>
19204 <div class="gallerytext">
19212 <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":{}}'>
19213 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19214 <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>
19215 <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>
19216 <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>
19217 <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>
19218 <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>
19223 Gallery (with options, extsrc)
19226 "nativeGallery": false
19229 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19230 File:Nonexistent.jpg|caption
19231 File:Nonexistent.jpg
19232 image:foobar.jpg|some '''caption''' [[Main Page]]
19234 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19237 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19238 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19239 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19240 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19241 <div class="gallerytext">
19246 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19247 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19248 <div class="gallerytext">
19251 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19252 <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>
19253 <div class="gallerytext">
19254 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19258 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19259 <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>
19260 <div class="gallerytext">
19263 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19264 <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>
19265 <div class="gallerytext">
19273 <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"}}'>
19274 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19275 <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>
19276 <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>
19277 <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>
19278 <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>
19279 <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>
19284 Gallery with link that has fragment
19287 "modes": ["wt2html", "html2html"],
19288 "nativeGallery": true
19292 image:foobar.jpg|link=Main_Page
19293 image:foobar.jpg|link=Main_Page#section
19294 image:foobar.jpg|link=Main Page#section|caption
19297 <ul class="gallery mw-gallery-traditional">
19298 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19299 <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>
19300 <div class="gallerytext">
19303 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19304 <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>
19305 <div class="gallerytext">
19308 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19309 <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>
19310 <div class="gallerytext">
19318 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19319 <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>
19320 <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>
19321 <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>
19325 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19327 Gallery with template inside caption
19330 "nativeGallery": true
19333 <gallery caption="{{echo|hi}}">
19334 File:Foobar.jpg|{{echo|ho}}
19337 <ul class="gallery mw-gallery-traditional">
19338 <li class='gallerycaption'>{{echo|hi}}</li>
19339 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19340 <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>
19341 <div class="gallerytext">
19349 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19350 <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>
19351 <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>
19356 Gallery with wikitext inside caption
19359 "nativeGallery": true
19363 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19364 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19367 <ul class="gallery mw-gallery-traditional">
19368 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19369 <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>
19370 <div class="gallerytext">
19371 <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>
19375 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19376 <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>
19377 <div class="gallerytext">
19378 <p>This is a test template
19385 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19386 <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>
19387 <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>
19392 Gallery (with showfilename option)
19395 "nativeGallery": true
19398 <gallery showfilename="">
19399 File:Nonexistent.jpg|caption
19400 File:Nonexistent.jpg
19401 File:Foobar.jpg|some '''caption''' [[Main Page]]
19405 <ul class="gallery mw-gallery-traditional">
19406 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19407 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19408 <div class="gallerytext">
19409 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19414 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19415 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19416 <div class="gallerytext">
19417 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19421 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19422 <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>
19423 <div class="gallerytext">
19424 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19425 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19429 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19430 <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>
19431 <div class="gallerytext">
19432 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19439 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19440 <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>
19441 <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>
19442 <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>
19443 <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>
19447 ## Should Parsoid be preserving these variations?
19449 Gallery (with namespace-less filenames)
19452 "modes": ["wt2html", "html2html"],
19453 "nativeGallery": true
19457 File:Nonexistent.jpg
19463 <ul class="gallery mw-gallery-traditional">
19464 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19465 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19466 <div class="gallerytext">
19469 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19470 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19471 <div class="gallerytext">
19474 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19475 <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>
19476 <div class="gallerytext">
19479 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19480 <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>
19481 <div class="gallerytext">
19487 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19488 <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>
19489 <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>
19490 <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>
19491 <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>
19496 Gallery override link with WikiLink (T36852)
19499 "nativeGallery": true
19503 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19506 <ul class="gallery mw-gallery-traditional">
19507 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19508 <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>
19509 <div class="gallerytext">
19515 <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":{}}'>
19516 <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>
19521 Gallery override link with absolute external link (T36852)
19524 "nativeGallery": true
19528 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19531 <ul class="gallery mw-gallery-traditional">
19532 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19533 <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>
19534 <div class="gallerytext">
19540 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19541 <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>
19546 Gallery override link with absolute external link with LanguageConverter
19551 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19554 <ul class="gallery mw-gallery-traditional">
19555 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19556 <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>
19557 <div class="gallerytext">
19567 Gallery override link with malicious javascript (T36852)
19570 "modes": ["wt2html", "html2html"],
19571 "nativeGallery": true
19575 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19578 <ul class="gallery mw-gallery-traditional">
19579 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19580 <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>
19581 <div class="gallerytext">
19587 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
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 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>
19593 Gallery with invalid title as link (T45964)
19596 "modes": ["wt2html", "html2html"],
19597 "nativeGallery": true
19601 File:Foobar.jpg|link=<
19604 <ul class="gallery mw-gallery-traditional">
19605 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19606 <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>
19607 <div class="gallerytext">
19613 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19614 <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>
19619 Serialize gallery without attrs in data-mw
19622 "modes": ["html2wt"],
19623 "nativeGallery": true
19626 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
19627 <li class="gallerycaption">123</li>
19628 <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>
19631 <gallery caption="123">
19637 HTML Hex character encoding (spells the word "JavaScript")
19639 parsoid=wt2html,wt2wt,html2html
19641 JavaScript
19643 <p>JavaScript
19648 <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>
19652 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19656 <p>&#xsee;&#XSEE;
19659 <p>&#xsee;&#XSEE;</p>
19663 HTML Hex character encoding mixed case
19665 parsoid=wt2html,wt2wt,html2html
19674 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19677 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19678 # Note that U+000C (form feed) is not a valid XML character, so
19679 # it is banned even though allowed in HTML5.
19681 Illegal character references (T106578)
19686 ; Control (low): 
19687 ; Control (high):  Ÿ
19688 ; Surrogate: ��
19689 ; This is an okay astral character: 💩
19698 <dt>Control (low)</dt>
19700 <dt>Control (high)</dt>
19701 <dd>&#x7F; &#x9F;</dd>
19703 <dd>&#xD83D;&#xDCA9;</dd>
19704 <dt>This is an okay astral character</dt>
19710 __FORCETOC__ override
19722 ISBN 978-0-1234-56 789
19724 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19727 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19729 <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>
19733 ISBN followed by 5 spaces
19744 ISBN ISBN 1234567890
19746 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19749 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19752 # Uppercase X and lowercase x as well
19763 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19764 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19765 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19766 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19767 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19768 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19771 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19772 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19773 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19774 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19775 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19776 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19780 ISBN with empty prefix (parsoid test)
19784 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19787 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19791 Bug 22905: <abbr> followed by ISBN followed by </a>
19793 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19795 <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>
19798 <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>
19806 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19811 Double RFC with a wiki link
19815 <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>
19824 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19827 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19831 Centre-aligned image
19833 [[Image:foobar.jpg|centre]]
19835 <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>
19842 [[Image:foobar.jpg|none]]
19844 <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>
19849 Width + Height sized image (using px) (height is ignored)
19851 [[Image:foobar.jpg|640x480px]]
19853 <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>
19858 Width-sized image (using px, no following whitespace)
19860 [[Image:foobar.jpg|640px]]
19862 <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>
19867 Width-sized image (using px, with following whitespace - test regression from r39467)
19869 [[Image:foobar.jpg|640px ]]
19871 <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>
19876 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19878 [[Image:foobar.jpg| 640px]]
19880 <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>
19885 Image with page parameter
19889 [[File:LoremIpsum.djvu|page=2]]
19891 <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>
19894 <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>
19898 Another italics / bold test
19906 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19912 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19915 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19919 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19921 Images with the "|" character in the comment
19923 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19925 <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>
19928 <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>
19932 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19934 <html><script>alert(1);</script></html>
19936 <p><html><script>alert(1);</script></html>
19941 HTML with raw HTML ($wgRawHtml==true)
19945 <html><script>alert(1);</script></html>
19947 <p><script>alert(1);</script>
19952 Parents of subpages, one level up
19954 subpage title=[[Subpage test/L1/L2/L3]]
19958 <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>
19964 Parents of subpages, one level up, not named
19966 subpage title=[[Subpage test/L1/L2/L3]]
19970 <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>
19977 Parents of subpages, two levels up
19979 subpage title=[[Subpage test/L1/L2/L3]]
19985 <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
19986 </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>
19991 Parents of subpages, two levels up, without trailing slash or name.
19993 subpage title=[[Subpage test/L1/L2/L3]]
20002 Parents of subpages, two levels up, with lots of extra trailing slashes.
20004 subpage title=[[Subpage test/L1/L2/L3]]
20008 <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>
20013 Subpage test/L1/L2/L3Sibling
20019 Transclusion of a sibling page (one level up)
20021 subpage title=[[Subpage test/L1/L2/L3]]
20030 Transclusion of a child page
20032 subpage title=[[Subpage test/L1/L2]]
20040 # This is wt2html only in Parsoid because we add <nowiki>
20041 # because of {{..}} and we don't expect to fix that to
20042 # eliminate the nowikis selective for {{..}} markup.
20044 Non-transclusion because of too many up levels
20046 subpage title=[[Subpage test/L1/L2/L3]]
20049 {{../../../../More than parent}}
20051 <p>{{../../../../More than parent}}
20054 <p>{{../../../../More than parent}}</p>
20058 Definition list code coverage
20064 <dl><dt> title  </dt>
20066 <dt> title </dt>
20072 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20073 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20074 <dt>title</dt><dd> def</dd></dl>
20078 Don't fall for the self-closing div
20080 <div>hello world</div/>
20082 <div>hello world</div>
20091 <p>[[:Template:Msg]]
20100 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20104 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20106 Always escape literal '>' in output, not just after '<'
20120 <p>This is a test template
20121 This is a test template
20133 Inclusion of !userCanEdit() content
20137 <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>
20143 Out-of-order TOC heading levels
20152 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20154 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20156 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20157 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20160 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20162 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20163 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20169 <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>
20170 <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>
20171 <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>
20172 <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>
20173 <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>
20174 <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>
20180 ISBN with a dummy number
20190 ISBN with space-delimited number
20194 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20200 ISBN with multiple spaces, no number
20219 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20220 </p><p>ISBN 12345678901
20226 ISBN with trailing year (bug 8110)
20228 ISBN 1-234-56789-0 - 2006
20230 ISBN 1 234 56789 0 - 2006
20232 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20233 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20241 {{anchorencode:foo bar©#%n}}
20243 <p>foo_bar.C2.A9.23.25n
20248 anchorencode trims spaces
20250 {{anchorencode: __pretty__please__}}
20257 anchorencode deals with links
20259 {{anchorencode: [[hello|world]] [[hi]]}}
20266 anchorencode deals with templates
20268 {{anchorencode: {{Foo}} }}
20275 anchorencode encodes like the TOC generator: (bug 18431)
20277 === _ +:.3A%3A&&]] ===
20278 {{anchorencode: _ +:.3A%3A&&]] }}
20281 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20282 <p>.2B:.3A.253A.26.26.5D.5D
20287 Bug 6200: blockquotes and paragraph formatting
20308 Bug 8293: Use of center tag ruins paragraph formatting
20329 Parsing of overlapping (improperly nested) inline html tags
20331 <span><s>x</span></s>
20333 <p><span><s>x</span></s></span>
20336 <p><span><s>x</s></span>
20341 ### Language variants related tests
20344 Self-link in language variants
20346 title=[[Dunav]] language=sr
20348 Both [[Dunav]] and [[Дунав]] are names for this river.
20350 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
20361 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20363 title=[[Duna]] language=sr
20365 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20367 <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.
20372 Link to a section of a variant of this title shouldn't be parsed as self-link
20374 title=[[Duna]] language=sr
20376 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20378 <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.
20383 Link to pages in language variants
20387 Main Page can be written as [[Маин Паге]]
20389 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20395 Multiple links to pages in language variants
20399 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20401 <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>.
20407 Simple template in language variants
20413 <p>This is a test template
20419 Template with explicit namespace in language variants
20425 <p>This is a test template
20431 Basic test for template parameter in language variants
20435 {{парамтест|param=foo}}
20437 <p>This is a test template with parameter foo
20442 Simple category in language variants
20446 [[Category:МедиаWики Усер'с Гуиде]]
20448 cat=МедиаWики_Усер'с_Гуиде sort=
20450 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20465 ## We used to, but no longer wt2wt this test since the default serializer
20466 ## will normalize all categories to serialize on their own line.
20467 ## This wikitext usage is going to be fairly uncommon in production and
20468 ## selser will take care of preserving formatting in those scenarios.
20470 Don't convert blue categorylinks to another variant (bug 33210)
20476 [[A]][[Category:分类]]
20480 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
20481 <link rel="mw:PageProp/Category" href="./Category:分类"/>
20485 Stripping -{}- tags (language variants)
20489 Latin proverb: -{Ne nuntium necare}-
20491 <p>Latin proverb: Ne nuntium necare
20497 Prevent conversion with -{}- tags (language variants)
20499 language=sr variant=sr-ec
20501 Latinski: -{Ne nuntium necare}-
20503 <p>Латински: Ne nuntium necare
20509 Prevent conversion of text with -{}- tags (language variants)
20511 language=sr variant=sr-ec
20513 Latinski: -{Ne nuntium necare}-
20515 <p>Латински: Ne nuntium necare
20521 Prevent conversion of links with -{}- tags (language variants)
20523 language=sr variant=sr-ec
20527 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20533 -{}- tags within headlines (within html for parserConvert())
20535 language=sr variant=sr-ec
20539 <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>
20545 Explicit definition of language variant alternatives
20547 language=zh variant=zh-tw
20549 -{zh:China;zh-tw:Taiwan}-, not China
20551 <p>Taiwan, not China
20557 Conversion around HTML tags
20559 language=sr variant=sr-ec
20561 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20562 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20565 <span title="ЛаCтин">ски</span>
20571 Explicit session-wise language variant mapping (A flag and - flag)
20573 language=zh variant=zh-tw
20575 Taiwan is not China.
20576 But -{A|zh:China;zh-tw:Taiwan}- is China,
20577 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20578 and -{China}- is China.
20580 <p>Taiwan is not China.
20581 But Taiwan is Taiwan,
20582 (This should be stripped!)
20583 and China is China.
20588 Explicit session-wise language variant mapping (H flag for hide)
20590 language=zh variant=zh-tw
20592 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20595 <p>(This should be stripped!)
20601 Adding explicit conversion rule for title (T flag)
20603 language=zh variant=zh-tw showtitle
20605 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20608 <p>Should be stripped!
20613 Testing that changing the language variant here in the tests actually works
20615 language=zh variant=zh showtitle
20617 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20620 <p>Should be stripped!
20625 Recursive conversion of alt and title attrs shouldn't clear converter state
20627 language=zh variant=zh-cn showtitle
20629 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20630 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20634 Should be stripped<span title="Exclamation">!</span>
20639 Bug 24072: more test on conversion rule for title
20641 language=zh variant=zh-tw showtitle
20643 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20644 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20647 <p>This should be stripped!
20648 This won't take interferes with the title rule.
20653 Partly disable title conversion if variant == main language code
20655 language=zh variant=zh title=[[ZH]] showtitle
20657 -{T|zh-cn:CN;zh-tw:TW}-
20665 Partly disable title conversion if variant == main language code, more
20667 language=zh variant=zh title=[[ZH]] showtitle
20677 Raw output of variant escape tags (R flag)
20679 language=zh variant=zh-tw
20681 Raw: -{R|zh:China;zh-tw:Taiwan}-
20683 <p>Raw: zh:China;zh-tw:Taiwan
20688 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20690 language=zh variant=zh-cn
20692 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20699 Conversion rules from [numeric-only string] to [something else] (T48634)
20701 language=zh variant=zh-cn
20703 -{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
20710 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20712 language=zh variant=zh-cn
20714 -{H|zh-cn:foo;zh-tw:;}-foobar
20721 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20723 language=zh variant=zh-cn
20725 -{H|=>zh-cn:foo;}-foobar
20732 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20734 language=zh variant=zh-cn
20743 Nested using of manual convert syntax
20745 language=zh variant=zh-hk
20747 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20749 <p>Nested: Hello Hong Kong!
20753 # Since Parsoid is starting to emit canonical wikitext for links,
20754 # [http://example.com http://example.com] will not RT back to that
20757 HTML markups with conversion syntax in attribs, nested in other conversion blocks
20759 language=zh variant=zh-cn
20761 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
20763 <p><span title="X">A</span>
20768 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
20770 language=zh variant=zh-cn disabled
20772 -{<span title="-{X}-">A</span>}-
20774 <p><span title="X">A</span>
20779 Proper conversion of text in external links
20781 language=sr variant=sr-ec
20784 http://www.google.com
20785 gopher://www.google.com
20786 [http://www.google.com http://www.google.com]
20787 [gopher://www.google.com gopher://www.google.com]
20788 [https://www.google.com irc://www.google.com]
20789 [ftp://www.google.com www.google.com/ftp://dir]
20790 [//www.google.com www.google.com]
20792 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20793 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20794 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20795 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20796 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20797 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20798 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20801 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20802 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20803 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20804 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20805 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20806 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20807 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20811 Do not convert roman numbers to language variants
20813 language=sr variant=sr-ec
20817 <p>Фридрих IV је цар.
20822 Unclosed language converter markup "-{"
20833 Don't convert raw rule "-{R|=>}-" to "=>"
20844 Don't break link parsing if language converter markup is in the caption.
20846 language=sr variant=sr-ec
20848 [[Main Page|-{R|main page}-]]
20850 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20854 # FIXME: This test is currently broken in the PHP parser T153761
20856 T146304: Don't break template parsing if language converter markup is in the parameter.
20858 language=sr variant=sr-ec
20868 T146305: Don't break image parsing if language converter markup is in the caption.
20872 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
20874 <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>
20877 <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>
20881 T146305: Don't break image parsing if nested language converter markup is in the caption.
20883 language=zh variant=zh-cn
20885 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
20887 <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>
20890 <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>
20894 Don't break gallery if language converter markup is inside.
20899 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
20900 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
20903 <ul class="gallery mw-gallery-traditional">
20904 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20905 <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>
20906 <div class="gallerytext">
20907 <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>
20911 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20912 <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>
20913 <div class="gallerytext">
20914 <p>This is a test template
20923 T153135: Don't break list handling if language converter markup is in the item.
20925 language=zh variant=zh-cn
20927 ;-{zh-cn:AAA;zh-tw:BBB}-
20931 <dt>foo:bar</dt></dl>
20935 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}],"show":true}'></span></dt>
20936 <dt><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"foo:bar"}'></span></dt>
20940 // Note that parsoid does not protect colons unless language converter
20941 // markup is properly nested, because it is a backtracking parser.
20943 T153135: Unclosed markup in definition list (code coverage)
20945 language=zh variant=zh-cn
20950 <dl><dt><b>foo:bar</dt>
20951 <dt>-{zh-cn:AAA</b></dt></dl>
20955 <dt><b>foo:bar</b></dt>
20963 T153135: Nested language converter markup in definition list (code coverage)
20965 language=zh variant=zh-cn
20967 ;-{zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
20969 <dl><dt>AAA foo:bar bat:baz</dt>
20974 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[13,32,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"bar\"}'></span> <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"R\"],\"dsr\":[33,46,null,2]}' data-mw='{\"disabled\":true,\"show\":true,\"text\":\"bat:baz\"}'></span>"}],"show":true}'></span></dt>
20980 T153140: Don't break table handling if language converter markup is in the cell.
20982 language=sr variant=sr-ec
21005 Bug 529: Uncovered bullet
21014 # Plain MediaWiki does not remove empty lists, but tidy actually does.
21015 # Templates in Wikipedia rely on this behavior, as tidy has always been
21016 # enabled there. These tests are normally run *without* tidy, so specify the
21017 # full output here.
21018 # To test realistic parsing behavior, apply a tidy-like transformation to both
21019 # the expected output and your parser's output.
21021 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
21023 ******* Foo {{bullet}}
21025 <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>
21031 Bug 529: Uncovered table already at line-start
21054 Bug 529: Uncovered bullet in parser function result
21056 * Foo {{lc:{{bullet}} }}
21064 Bug 5678: Double-parsed template argument
21066 {{lc:{{{1}}}|hello}}
21073 Bug 5678: Double-parsed template invocation
21075 {{lc:{{paramtest {{!}} param = hello }} }}
21077 <p>{{paramtest | param = hello }}
21082 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
21085 title=[[Main Page]]
21087 {{PRVNÍVELKÉ:ěščř}}
21088 {{prvnívelké:ěščř}}
21108 Morwen/13: Unclosed link followed by heading
21115 <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>
21120 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21127 <h1><span class="mw-headline" id="heading">heading</span></h1>
21132 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21139 <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>
21154 Paragraphs inside divs (no extra line breaks)
21166 Paragraphs inside divs (extra line break on open)
21181 Paragraphs inside divs (extra line break on close)
21196 Paragraphs inside divs (extra line break on open and close)
21213 Nesting tags, paragraphs on lines which begin with <div>
21215 <div></div><strong>A
21218 <p><strong>A</strong></p>
21219 <p><strong>B</strong></p>
21227 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
21229 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
21231 <blockquote>Line one
21233 Line two</blockquote>
21235 <blockquote>Line one
21236 Line two</blockquote>
21240 <p>Line one Line two</p>
21245 Bug 6200: paragraphs inside blockquotes (extra line break on open)
21250 Line two</blockquote>
21255 Line two</blockquote>
21260 Line two</blockquote>
21264 Bug 6200: paragraphs inside blockquotes (extra line break on close)
21266 <blockquote>Line one
21271 <blockquote>Line one
21284 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
21306 Paragraphs inside blockquotes/divs (no extra line breaks)
21308 <blockquote><div>Line one
21310 Line two</div></blockquote>
21312 <blockquote><div>Line one
21313 Line two</div></blockquote>
21318 Paragraphs inside blockquotes/divs (extra line break on open)
21323 Line two</div></blockquote>
21328 Line two</div></blockquote>
21333 Paragraphs inside blockquotes/divs (extra line break on close)
21335 <blockquote><div>Line one
21338 </div></blockquote>
21340 <blockquote><div>Line one
21343 </div></blockquote>
21348 Paragraphs inside blockquotes/divs (extra line break on open and close)
21354 </div></blockquote>
21360 </div></blockquote>
21365 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21367 wgLinkHolderBatchSize=0
21373 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21374 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21375 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21380 Free external link invading image caption
21382 [[Image:Foobar.jpg|thumb|http://x|hello]]
21384 <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>
21389 Bug 15196: localised external link numbers
21393 [http://en.wikipedia.org/]
21395 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21398 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21402 Multibyte character in padleft
21404 {{padleft:-Hello|7|Æ}}
21411 Multibyte character in padright
21413 {{padright:Hello-|7|Æ}}
21420 formatdate parser function
21422 {{#formatdate:2009-03-24}}
21424 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21429 formatdate parser function, with default format
21431 {{#formatdate:2009-03-24|mdy}}
21433 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21438 Spacing of numbers in formatted dates
21440 {{#formatdate:January 15}}
21442 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21447 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
21449 language=nl title=[[MediaWiki:Common.css]]
21451 {{#formatdate:2009-03-24|dmy}}
21453 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21466 Edit comment with link
21470 I like the [[Main Page]] a lot
21472 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21476 Edit comment with link and link text
21480 I like the [[Main Page|best pages]] a lot
21482 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21486 Edit comment with link and link text with suffix
21490 I like the [[Main Page|best page]]s a lot
21492 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21496 Edit comment with section link (non-local, eg in history list)
21498 comment title=[[Main Page]]
21500 /* External links */ removed bogus entries
21502 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21506 Edit comment with section link and text before it (non-local, eg in history list)
21508 comment title=[[Main Page]]
21510 pre-comment text /* External links */ removed bogus entries
21512 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>
21516 Edit comment with section link (local, eg in diff view)
21518 comment local title=[[Main Page]]
21520 /* External links */ removed bogus entries
21522 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21526 Edit comment with subpage link (bug 14080)
21530 title=[[Subpage test]]
21532 Poked at a [[/subpage]] here...
21534 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21538 Edit comment with subpage link and link text (bug 14080)
21542 title=[[Subpage test]]
21544 Poked at a [[/subpage|neat little page]] here...
21546 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21550 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
21553 title=[[Subpage test]]
21555 Poked at a [[/subpage]] here...
21557 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21561 Edit comment with bare anchor link (local, as on diff)
21565 title=[[Main Page]]
21569 <a href="#section">#section</a>
21573 Edit comment with bare anchor link (non-local, as on history)
21576 title=[[Main Page]]
21580 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21584 Anchor starting with underscore
21590 <p><a href="#_ref">One</a>
21593 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21597 Id starting with underscore
21599 <div id="_ref"></div>
21601 <div id="_ref"></div>
21606 Edit comment with link with more than one pipe (T99346)
21610 [[Main Page|Many|pipes]]
21612 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21616 Complex edit comment with link with more than one pipe (T99346)
21620 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21622 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..."
21626 Space normalisation on autocomment (bug 22784)
21629 title=[[Main Page]]
21631 /* __hello__world__ */
21633 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21637 percent-encoding and + signs in comments (Bug 26410)
21641 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21643 <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>
21646 # Parsoid doesn't support this yet: see bug 73581
21647 # but it *should* omit the 'src' attribute if the image is bad.
21648 # PHP side of tests was disabled in
21649 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21650 # because of issues in the PHP parserTests infrastructure
21651 # (but the output below is indeed what the PHP side emits)
21653 Bad images - basic functionality
21656 !! DISABLED/html/php
21658 <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>
21662 Bad images - bug 16039: text after bad image disappears
21667 !! DISABLED/html/php
21673 <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>
21678 Verify that displaytitle works (bug #22501) no displaytitle
21682 wgAllowDisplayTitle=true
21683 wgRestrictDisplayTitle=false
21685 this is not the the title
21688 <p>this is not the the title
21693 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21698 wgAllowDisplayTitle=true
21699 wgRestrictDisplayTitle=false
21701 this is not the the title
21702 {{DISPLAYTITLE:whatever}}
21705 <p>this is not the the title
21710 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21715 wgAllowDisplayTitle=true
21716 wgRestrictDisplayTitle=true
21718 this is not the the title
21719 {{DISPLAYTITLE:whatever}}
21722 <p>this is not the the title
21727 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21732 wgAllowDisplayTitle=true
21733 wgRestrictDisplayTitle=true
21735 this is not the the title
21736 {{DISPLAYTITLE:screen}}
21739 <p>this is not the the title
21744 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21749 wgAllowDisplayTitle=false
21751 this is not the the title
21752 {{DISPLAYTITLE:screen}}
21755 <p>this is not the the title
21756 <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>
21761 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21766 wgAllowDisplayTitle=false
21768 this is not the the title
21771 <p>this is not the the title
21776 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21781 wgAllowDisplayTitle=true
21782 wgRestrictDisplayTitle=true
21784 this is not the the title
21785 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21787 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21788 <p>this is not the the title
21793 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21798 wgAllowDisplayTitle=true
21799 wgRestrictDisplayTitle=true
21801 this is not the the title
21802 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21804 <span style="color: red;">s</span>creen
21805 <p>this is not the the title
21810 Page status indicators: Empty name is invalid
21814 <indicator name=" "></indicator>
21815 <indicator></indicator>
21817 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21818 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21823 Page status indicators: Weird syntaxes that are okay
21827 <indicator name="empty" />
21828 <indicator name="name"></indicator>
21837 Page status indicators: Torture test
21841 <indicator name="01">hello world</indicator>
21842 <indicator name="02">[[Main Page]]</indicator>
21843 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21844 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21845 <indicator name="05">* foo
21847 <indicator name="06"><nowiki>foo</nowiki></indicator>
21848 <indicator name="07"> Preformatted</indicator>
21849 <indicator name="08"><div>Broken tag</indicator>
21850 <indicator name="09">{| class=wikitable
21853 <indicator name="10">Two
21855 paragraphs</indicator>
21858 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21859 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" />
21860 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>
21861 05=<ul><li> foo</li>
21865 07=<pre>Preformatted
21867 08=<div>Broken tag</div>
21869 09=<table class="wikitable">
21886 preload: check <noinclude> and <includeonly>
21890 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21896 preload: check <onlyinclude>
21900 Goodbye <onlyinclude>Hello world</onlyinclude>
21906 preload: can pass tags through if we want to
21910 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21912 <includeonly>Hello world</includeonly>
21916 preload: check that it doesn't try to do tricks
21920 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21922 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21926 Play a bit with r67090 and bug 3158
21928 <div style="width:50% !important"> </div>
21929 <div style="width:50% !important"> </div>
21930 <div style="width:50% !important"> </div>
21931 <div style="border : solid;"> </div>
21933 <div style="width:50% !important"> </div>
21934 <div style="width:50% !important"> </div>
21935 <div style="width:50% !important"> </div>
21936 <div style="border : solid;"> </div>
21939 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21940 <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>
21941 <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>
21942 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21947 HTML5 data attributes
21949 <span data-foo="bar">Baz</span>
21950 <p data-abc-def_hij="">Quuz</p>
21952 <p><span data-foo="bar">Baz</span>
21954 <p data-abc-def_hij="">Quuz</p>
21957 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21958 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21962 Strip reserved data attributes
21964 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21966 <div data-ok="fred">d</div>
21969 <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>
21973 percent-encoding and + signs in internal links (Bug 26410)
21975 [[User:+%]] [[Page+title%]]
21976 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21977 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21978 [[%33%45]] [[%33%45+]]
21980 <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>
21981 <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>
21982 <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>
21983 <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>
21986 <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>
21987 <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>
21988 <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>
21989 <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>
21993 Special characters in embedded file links (bug 27679)
21995 [[File:Contains & ampersand.jpg]]
21996 [[File:Does not exist.jpg|Title with & ampersand]]
21998 <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>
21999 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
22002 <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>
22003 <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>
22007 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
22009 Text's been normalized?
22011 <p>Text's been normalized?
22016 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
22018 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
22020 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
22025 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
22027 [http://www.example.org/ ideograms]
22029 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
22034 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
22036 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
22038 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
22062 Bug 31098 Template which includes system messages which includes the template
22066 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22067 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22072 Bug31490 Turkish: ucfirst 'blah'
22083 Bug31490 Turkish: ucfirst 'ix'
22094 Bug31490 Turkish: lcfirst 'BLAH'
22105 Bug31490 Turkish: ucfırst (with a dotless i)
22111 <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>
22116 Bug31490 ucfırst (with a dotless i) with English language
22122 <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>
22127 Bug 26375: TOC with italics
22129 title=[[Main Page]]
22132 == ''Lost'' episodes ==
22134 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22136 <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>
22140 <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>
22145 Bug 26375: TOC with bold
22147 title=[[Main Page]]
22150 == '''should be bold''' then normal text ==
22152 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22154 <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>
22158 <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>
22163 Bug 33845: Headings become cursive in TOC when they contain an image
22165 title=[[Main Page]]
22168 == Image [[Image:foobar.jpg]] ==
22170 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22172 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22176 <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>
22181 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
22183 title=[[Main Page]]
22186 == <blockquote>Quote</blockquote> ==
22188 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22190 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22194 <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>
22198 <div id="toc" class="toc">
22199 <div id="toctitle">
22203 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22207 <h2><span class="mw-headline" id="Quote"></span></h2>
22209 <p><span class="mw-headline" id="Quote">Quote</span></p>
22211 <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>
22215 Unclosed tags in TOC
22217 title=[[Main Page]]
22221 <small>Hanc marginis exiguitas non caperet.</small>
22224 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22226 <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>
22230 <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>
22231 <p><small>Hanc marginis exiguitas non caperet.</small>
22237 Multiple tags in TOC
22240 == <i>Foo</i> <b>Bar</b> ==
22242 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22244 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22246 <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>
22247 <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>
22251 <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>
22252 <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>
22256 <div id="toc" class="toc">
22257 <div id="toctitle">
22261 <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>
22262 <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>
22266 <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>
22267 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22269 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22271 <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>
22274 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22275 # html5 tag parsing.
22277 Tags with parameters in TOC
22282 == <sup class="in-h2">Hello</sup> ==
22284 == <sup class="a > b">Evilbye</sup> ==
22286 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22288 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22289 <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>
22293 <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>
22294 <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>
22297 <meta property="mw:PageProp/toc" />
22298 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22300 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22304 span tags with directionality in TOC
22307 == <span dir="ltr">C++</span> ==
22309 == <span dir="rtl">זבנג!</span> ==
22311 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22313 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22315 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22317 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22319 <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>
22320 <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>
22321 <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>
22322 <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>
22323 <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>
22327 <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>
22328 <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>
22329 <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>
22330 <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>
22331 <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>
22336 Bug 72884: bdi element in ToC
22339 == <bdi>test</bdi> ==
22341 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22343 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22347 <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>
22352 T35715: s/strike element in ToC
22355 == <s>test</s> test <strike>test</strike> ==
22357 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22359 <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>
22363 <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>
22367 # Note that the html output does not have the <p></p>, but the
22368 # html+tidy output *does*. This is because the empty <p></p> is
22369 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22371 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22376 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22378 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22382 <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>
22386 <div id="toc" class="toc">
22387 <div id="toctitle">
22391 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22395 <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>
22401 == {{int:headline_sample}} ==
22405 Bug 32057: Title needed when expanding <h> nodes.
22407 title=[[Main Page]]
22411 <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>
22416 Strip marker in urlencode
22418 {{urlencode:x<nowiki/>y}}
22419 {{urlencode:x<nowiki/>y|wiki}}
22420 {{urlencode:x<nowiki/>y|path}}
22421 {{urlencode:x<pre id="one">two</pre>y}}
22449 Strip marker in formatNum
22451 {{formatnum:1<nowiki/>2}}
22452 {{formatnum:1<nowiki/>2|R}}
22460 Check noCommafy in formatNum
22464 {{formatnum:123456.78}}
22465 {{formatnum:123456.78|NOSEP}}
22473 Wrong option for formatNum (bug 56199)
22475 {{formatnum:1,234.56|Random}}
22476 {{formatnum:1,234.56|EVERYTHING}}
22477 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22486 Strip marker in grammar
22490 {{grammar:elative|foo<nowiki/>bar}}
22497 Strip marker in padleft
22499 {{padleft:|2|x<nowiki/>y}}
22506 Strip marker in padright
22508 {{padright:|2|x<nowiki/>y}}
22515 Strip marker in anchorencode
22517 {{anchorencode:x<nowiki/>y}}
22524 nowiki inside link inside heading (bug 18295)
22526 ==[[foo|x<nowiki>y</nowiki>z]]==
22528 <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>
22533 new support for bdi element (bug 31817)
22535 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22537 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22542 Ignore pipe between table row attributes
22546 |- id=foo | style='color: red'
22554 <tr id="foo" style="color: red">
22561 Gallery override link with WikiLink (bug 34852)
22564 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
22567 <ul class="gallery mw-gallery-traditional">
22568 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22569 <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>
22570 <div class="gallerytext">
22580 Language parser function
22589 Padleft and padright as substr
22591 {{padleft:|3|abcde}}
22592 {{padright:|3|abcde}}
22600 Special parser function
22602 {{#special:RandomPage}}
22603 {{#special:BaDtItLe}}
22604 {{#special:Foobar}}
22613 Bug 34939 - Case insensitive link parsing ([HttP://])
22615 [HttP://MediaWiki.Org/]
22617 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22620 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22624 Bug 34939 - Case insensitive link parsing ([HttP:// title])
22626 [HttP://MediaWiki.Org/ MediaWiki]
22628 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22633 Bug 34939 - Case insensitive link parsing (HttP://)
22635 HttP://MediaWiki.Org/
22637 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22640 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22658 <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>
22659 <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>
22660 <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>
22661 <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>
22662 <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>
22668 ### Parsoid-specific tests
22669 ### Parsoid-PHP parser incompatibilities
22672 1. SOL-sensitive wikitext tokens as template-args
22674 parsoid=wt2html,wt2wt
22680 <span about="#mwt1" typeof="mw:Transclusion">
22681 </span><ul about="#mwt1"><li>a</li>
22683 <span about="#mwt2" typeof="mw:Transclusion">
22684 </span><ol about="#mwt2"><li>a</li>
22686 <span about="#mwt3" typeof="mw:Transclusion">
22687 </span><dl about="#mwt3"><dd>a</dd>
22691 #### -----------------------------------------------------------------
22692 #### Parsoid-specific functionality tests
22693 #### -----------------------------------------------------------------
22695 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22696 # We know wt2wt will fail, but we expect selser to pass.
22697 # Due to the nature of our testing, wt2wt and selser tests will enter the
22698 # blacklist and we'll catch selser regressions based on changes to the
22699 # blacklist entries for selser tests.
22701 1. Bad treebuilder fixup of formatting elt is cleaned up
22703 parsoid=wt2html,wt2wt
22708 [[Image:Foobar.jpg|right|Test]]
22715 <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>
22722 2. Bad treebuilder fixup of formatting elt is cleaned up
22724 parsoid=wt2html,wt2wt
22726 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22728 <small>[[Image:Foobar.jpg|right|300px]]</small>
22732 <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>
22734 <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>
22738 3. Bad treebuilder fixup of formatting elt is cleaned up
22740 parsoid=wt2html,wt2wt
22742 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22744 <p><small><b>foo</b></small></p>
22745 <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>
22746 <p><small><b>bar</b></small></p>
22750 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22752 parsoid=wt2html,wt2wt
22754 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22756 <p><b><small></small></b></p>
22757 <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>
22761 #### ----------------------------------------------------------------
22762 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22763 #### tags. Parsoid's output for these tags differs from that of the
22765 #### ----------------------------------------------------------------
22768 Ref: 1. ref-location should be replaced with an index span
22771 B <ref name="x">foo</ref>
22775 <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>
22776 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>
22777 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>
22778 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22779 <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>
22780 <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>
22781 <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>
22786 Ref: 2. ref-tags with identical names should all get the same index
22788 A <ref name="x">foo</ref>
22792 <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>
22793 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>
22794 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22795 <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>
22800 Ref: 3. spaces in ref-names should be ignored
22802 A <ref name="x">foo</ref>
22803 B <ref name=" x " />
22807 <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>
22808 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>
22809 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>
22810 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22811 <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>
22815 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22817 Ref: 4. 'constructor' should be accepted as a valid ref-name
22819 A <ref name="constructor">foo</ref>
22822 <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>
22823 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22824 <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>
22829 Ref: 5. body should accept generic wikitext
22832 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22837 <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>
22839 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22840 <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>
22846 Ref: 6. indent-pres should not be output in ref-body
22856 <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>
22858 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22859 <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
22867 Ref: 7. No p-wrapping in ref-body
22884 <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>
22886 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22887 <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
22902 Ref: 8. transclusion wikitext has lower precedence
22904 A <ref> foo {{echo|</ref> B C}}
22908 <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>
22909 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22910 <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>
22915 Ref: 9. unclosed comments should not leak out of ref-body
22917 A <ref> foo <!--</ref> B C
22920 <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>
22921 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22922 <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>
22927 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22929 A <ref> <b> foo </ref> B C
22933 <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>
22936 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22937 <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>
22942 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22948 <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
22949 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>
22950 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22951 <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>
22952 <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>
22957 Ref: 12. ref-tags act as trailing newline migration barrier
22959 <!--the newline at the end of this line moves out of the p tag-->a
22961 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22967 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22970 <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>
22971 <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>
22974 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22975 <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>
22976 <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>
22980 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22987 <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
22988 <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>
22989 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22990 <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>
22991 <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
22996 ## Roundtripping fails because of nowiki'ing
22998 Ref: 14. A nested ref-tag should be emitted as plain text
23002 <ref>foo <ref>bar</ref> baz</ref>
23006 <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>
23008 <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>
23012 Ref: 15. ref-tags with identical names should get identical indexes
23014 A1 <ref name="a">foo</ref> A2 <ref name="a" />
23015 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
23019 <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>
23020 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>
23022 <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>
23026 ## We don't bother wt2wt-ing non-standard whitespace
23028 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
23036 <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>
23037 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23038 <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>
23042 Ref: 17. Generate valid HTML5 id/about attributes
23044 <ref name="a b">foo</ref>
23045 <ref name=":0">ve-created name</ref>
23049 <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>
23050 <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>
23052 <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>
23057 Ref: 18. T58916: Extension attributes should be parsed as plain text
23059 <ref name="{{echo|a}}">foo</ref>
23063 <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>
23066 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23067 <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>
23072 Ref: 19. ref-tags with identical name encodings should get identical indexes
23074 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
23078 <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>
23080 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
23081 <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>
23086 Ref: 20. ref-tags with identical names but different content should keep it
23088 A <ref name="foo">Foo one</ref>
23089 B <ref name="foo">Foo two</ref>
23090 C <ref name="foo" />
23094 <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>
23095 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>
23096 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>
23098 <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>
23103 References: 1. references tag without any refs should be handled properly
23107 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
23111 References: 2. references tag with group only outputs references from that group
23113 A <ref group="a">foo</ref>
23114 B <ref group="b">bar</ref>
23117 <references group="a" />
23119 <references group="b" />
23121 <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>
23122 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>
23123 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>
23125 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
23126 <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>
23128 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
23129 <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>
23131 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
23132 <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>
23137 References: 3. ref list should be cleared after processing references
23147 <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>
23149 <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>
23152 <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>
23154 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
23155 <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>
23160 References: 4. only referenced group should be cleared after processing references
23162 A <ref group="a">afoo</ref>
23165 <references group="a" />
23171 <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>
23172 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>
23174 <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>
23177 <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>
23179 <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>
23183 ## Don't expect this to rt since we're dropping content
23185 References: 5. ref tags in references should be processed while ignoring all other content
23187 parsoid=wt2html,html2html
23190 B <ref name="b">bar</ref>
23193 <ref name="a">foo</ref>
23194 This should just get lost.
23197 <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>
23198 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>
23201 <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>
23206 References: 6. <references /> from a transclusion
23208 <ref>Foo</ref> {{echo|<references />}}
23210 <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>
23215 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
23217 A <ref>foo bar for a</ref>
23218 B <ref group="X" name="b" />
23222 <references group="X">
23223 <ref name="b">foo</ref>
23226 <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>
23227 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>
23230 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
23231 <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>
23234 <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"}}'>
23235 <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>
23240 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
23242 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
23245 <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>
23246 <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>
23250 # This test only works in wt2html now as the <references /> are always generated
23251 # unless selser is active. Once T72722 is fixed, we should add a changes test
23252 # here to ensure that unrelated changes don't add the new <references />
23253 # when selser is active.
23255 References: 9. Generate missing references list at the end
23258 B <ref group="inexistent">bar</ref>
23260 <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>
23261 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
23262 <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>
23264 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
23265 <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>
23270 References: 10. New <references/> shouldn't be added for unrelated edits.
23273 "modes": ["selser"],
23274 "changes": [["#x", "remove"]],
23278 Unrelated text<span id="x"> that's going to disappear</span>.
23286 Entities in ref name
23288 <ref name="test & me">hi</ref>
23291 <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>
23292 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23293 <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>
23297 ## The output here may look funny, but it's what the php parser will do. The
23298 ## unclosed references tag becomes escaped text, and then a new references
23299 ## tag is auto-generated. The test is wt2html only because it roundtrips with
23300 ## nowiki tags, and the auto-generated references tag is only dropped in
23303 Generate references for unclosed references tag
23311 <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>
23313 <p><references></p>
23314 <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>
23318 New reference serializes on its own line
23320 parsoid=wt2wt,html2wt
23325 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
23328 #### ----------------------------------------------------------------
23329 #### Parsoid-only testing of Parsoid's impl of LST
23330 #### Not implemented yet, see
23331 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
23332 #### ----------------------------------------------------------------
23334 ## We still need to support serializing the older format while content is stored.
23336 LST Sections: Backwards compatibility
23339 "suppressErrors": true,
23340 "modes": ["html2wt"]
23343 <section begin="2011-05-16" />
23344 <section end="2014-04-10 (MW 1.23wmf22)" />
23346 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
23347 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
23350 ## The unconventional output is the result of `usePHPPreProcessor` being
23351 ## disabled in parserTests.js. This test is mainly just to show <section> is
23352 ## recognized as an extension tag w/o a native handler.
23354 LST Sections: Newfangled approach
23356 parsoid={ "suppressErrors": true }
23358 <section begin="2011-05-16" />
23359 <section end="2014-04-10 (MW 1.23wmf22)" />
23361 <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>
23362 <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>
23365 #--------- Test stripping of empty nodes in template content ----------
23367 Empty LI and TR nodes should be stripped from template content
23372 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23376 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23389 Empty LI and TR nodes should not be stripped from top-level content
23416 Empty TR nodes should not be stripped if they have any attributes set
23418 {{EmptyTRWithHTMLAttrTest}}
23420 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23421 <tr align="center"></tr>
23422 <tr><td>foo</td></tr>
23423 <tr align="center"></tr>
23424 <tr><td>bar</td></tr>
23428 #### ----------------------------------------------------------------
23429 #### The following section of tests are primarily to test
23430 #### wikitext escaping capabilities of Parsoid. Given that
23431 #### escaping can be done any number of ways, the wikitext (input)
23432 #### is always adjusted to reflect how Parsoid adds nowiki
23435 #### We are marking several tests as parsoid-only since the
23436 #### HTML in the result section is different from what the
23437 #### PHP parser generates for it.
23438 #### ----------------------------------------------------------------
23441 #### --------------- Headings ---------------
23443 #### 1. Nested inside html <h1>=foo=</h1>
23444 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23445 #### 3. Nested inside html with wikitext split by html tags
23446 #### 4. No escape needed
23447 #### 5. Empty headings <h1></h1>
23448 #### 6. Heading chars in SOL context
23449 #### ----------------------------------------
23451 Headings: 0. Unnested
23461 <p>=foo<i>a</i>=</p>
23463 <nowiki>=foo=</nowiki>
23465 <nowiki> </nowiki>=foo=
23467 <nowiki>=foo=</nowiki>
23469 =foo''a''<nowiki>=</nowiki>
23472 # New headings and existing headings are handled differently
23474 Headings: 1. Nested inside html
23482 <h1 data-parsoid=''>=foo=</h1>
23483 <h2 data-parsoid=''>=foo=</h2>
23484 <h3 data-parsoid=''>=foo=</h3>
23485 <h4 data-parsoid=''>=foo=</h4>
23486 <h5 data-parsoid=''>=foo=</h5>
23487 <h6 data-parsoid=''>=foo=</h6>
23495 =<nowiki>=foo=</nowiki>=
23496 ==<nowiki>=foo=</nowiki>==
23497 ===<nowiki>=foo=</nowiki>===
23498 ====<nowiki>=foo=</nowiki>====
23499 =====<nowiki>=foo=</nowiki>=====
23500 ======<nowiki>=foo=</nowiki>======
23505 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23514 <nowiki>*</nowiki>bar
23520 <nowiki>=bar=</nowiki>
23524 Headings: 3. Nested inside html with wikitext split by html tags
23528 <h1>=<b>bold</b>foo=</h1>
23530 = ='''bold'''foo= =
23534 Headings: 4a. No escaping needed (testing just h1 and h2)
23545 <h1><i>=</i>foo=</h1>
23565 Headings: 4b. No escaping needed (inside p-tags)
23580 Headings: 5. Empty headings
23584 <h1 data-parsoid='{}'></h1>
23586 <h2 data-parsoid='{}'></h2>
23588 <h3 data-parsoid='{}'></h3>
23590 <h4 data-parsoid='{}'></h4>
23592 <h5 data-parsoid='{}'></h5>
23594 <h6 data-parsoid='{}'></h6>
23604 =====<nowiki/>=====
23606 ======<nowiki/>======
23610 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23620 <nowiki>=a=</nowiki>
23622 <nowiki>=a=</nowiki>
23624 <nowiki>=a=</nowiki>
23628 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23641 <nowiki>=a=</nowiki>
23644 <nowiki>=a=</nowiki>
23647 <nowiki>=a=</nowiki>
23652 Headings: 6c. Heading chars in SOL context (leading newline break)
23660 <nowiki>=b=</nowiki>
23664 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23668 <!--c0--><p>=a=</p>
23670 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23672 <!--c0--><nowiki>=a=</nowiki>
23674 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23678 Headings: 6d. Heading chars in SOL context (No escaping needed)
23688 Headings: 7. Insert a newline between new content and headings
23694 <h2 data-parsoid='{}'>A</h2>
23695 <p data-parsoid='{}'>a</p>
23705 #### --------------- Lists ---------------
23706 #### 0. Outside nests (*foo, etc.)
23707 #### 1. Nested inside html <ul><li>*foo</li></ul>
23708 #### 2. Inside definition lists
23709 #### 3. Only bullets at start should be escaped
23710 #### 4. No escapes needed
23711 #### 5. No unnecessary escapes
23712 #### 6. Escape bullets in SOL position
23713 #### 7. Escape bullets in a multi-line context
23714 #### ----------------------------------------
23717 Lists: 0. Outside nests
23727 <nowiki>*</nowiki>foo
23729 <nowiki>#</nowiki>foo
23731 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23734 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23735 ## to test wikitext escaping, and insignificant whitespace diffs
23736 ## cause PHP parser tests to barf
23738 Lists: 1. Nested inside html (No unnecessary escapes)
23747 <li data-parsoid='{}'>*foo</li>
23748 <li data-parsoid='{}'>#foo</li>
23749 <li data-parsoid='{}'>:foo</li>
23750 <li data-parsoid='{}'>;foo</li>
23758 <li data-parsoid='{}'>*foo</li>
23759 <li data-parsoid='{}'>#foo</li>
23760 <li data-parsoid='{}'>:foo</li>
23761 <li data-parsoid='{}'>;foo</li>
23768 *<nowiki>*foo</nowiki>
23769 *<nowiki>#foo</nowiki>
23770 *<nowiki>:foo</nowiki>
23771 *<nowiki>;foo</nowiki>
23777 #<nowiki>*foo</nowiki>
23778 #<nowiki>#foo</nowiki>
23779 #<nowiki>:foo</nowiki>
23780 #<nowiki>;foo</nowiki>
23784 Lists: 2. Inside definition lists
23788 <dl><dt>;foo</dt></dl>
23789 <dl><dt>:foo</dt></dl>
23792 <dl><dd>:foo</dd></dl>
23796 ; <nowiki>:foo</nowiki>
23798 ; <nowiki>:foo</nowiki>
23805 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23811 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23815 *<nowiki>*foo</nowiki>''it''*bar
23819 Lists: 4. No escapes needed
23832 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23836 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23850 Lists: 5. No unnecessary escapes
23854 <ul><li> bar <span>[[foo]]</span></li></ul>
23855 <ul><li> =bar <span>[[foo]]</span></li></ul>
23856 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23857 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23858 <ul><li> =bar <span>foo]]</span>=</li></ul>
23859 <ul><li> <s></s>: a</li></ul>
23860 <ul><li> <i>* foo</i></li></ul>
23863 * bar <span><nowiki>[[foo]]</nowiki></span>
23865 * =bar <span><nowiki>[[foo]]</nowiki></span>
23867 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23869 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23871 * =bar <span>foo]]</span>=
23879 Lists: 6. Escape bullets in SOL position
23883 <p><!--cmt-->*foo</p>
23885 <!--cmt--><nowiki>*</nowiki>foo
23889 Lists: 7. Escape bullets in a multi-line context
23898 <nowiki>*</nowiki>b
23902 Lists: 8. Escape colons only if not present in tags
23906 <dl><dt>a:b<i>c:d</i></dt></dl>
23908 ; <nowiki>a:b</nowiki>''c:d''
23911 #### --------------- HRs ---------------
23912 #### 1. Single line
23913 #### -----------------------------------
23916 HRs: 1. Single line
23924 ----<nowiki>----</nowiki>
23929 #### --------------- Tables ---------------
23930 #### 1a. Simple example
23931 #### 1b. No escaping needed (!foo)
23932 #### 1c. No escaping needed (|foo)
23933 #### 1d. No escaping needed (|}foo)
23935 #### 2a. Nested in td (<td>foo|bar</td>)
23936 #### 2b. Nested in td (<td>foo||bar</td>)
23937 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23939 #### 3a. Nested in th (<th>foo!bar</th>)
23940 #### 3b. Nested in th (<th>foo!!bar</th>)
23941 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23945 #### 4c. No escaping needed
23946 #### --------------------------------------
23949 Tables: 1a. Simple example
23957 <nowiki>{|</nowiki>
23962 Tables: 1b. No escaping needed
23973 Tables: 1c. No escaping needed
23984 Tables: 1d. No escaping needed
23995 Tables: 2a. Nested in td
24000 <td>foo|bar</td></tr>
24001 <tr><td>x<div>a|b</div></td>
24005 |<nowiki>foo|bar</nowiki>
24007 |x<div><nowiki>a|b</nowiki></div>
24023 Tables: 2b. Nested in td
24029 <td>a<i>b||c</i></td>
24030 <td>a<i><div>b||c</div></i></td>
24031 </tr></tbody></table>
24034 |<nowiki>foo||bar</nowiki>
24035 |a''<nowiki>b||c</nowiki>''
24036 |a''<div><nowiki>b||c</nowiki></div>''
24045 <td>a<i><div>b||c</div></i>
24051 Tables: 2c. Nested in td -- no escaping needed
24067 Tables: 3a. Nested in th
24083 Tables: 3b. Nested in th
24088 <tr><th>foo!!bar</th>
24089 <th><i>foo|bar</i></th>
24090 <th><i>foo!!bar</i></th>
24091 <th><i><span>foo!!bar</span></i></th>
24092 </tr></tbody></table>
24095 !<nowiki>foo!!bar</nowiki>
24096 !''<nowiki>foo|bar</nowiki>''
24097 !''<nowiki>foo!!bar</nowiki>''
24098 !''<span><nowiki>foo!!bar</nowiki></span>''
24107 <th><i>foo!!bar</i>
24109 <th><i><span>foo!!bar</span></i>
24115 Tables: 3c. Nested in th
24120 <tr><th>foo||bar</th>
24121 <th><span typeof="mw:Nowiki">foo||bar</span></th>
24122 </tr></tbody></table>
24125 !<nowiki>foo||bar</nowiki>
24126 !<nowiki>foo||bar</nowiki>
24139 Tables: 4a. Escape -
24155 |<nowiki>-bar</nowiki>
24160 Tables: 4b. Escape +
24176 |<nowiki>+bar</nowiki>
24181 Tables: 4c. No escaping needed
24186 <tr><td>foo-bar</td><td>foo+bar</td></tr>
24187 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
24193 <div>a|b</div></td>
24238 Tables: 4d. No escaping needed
24243 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
24244 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
24245 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
24256 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
24266 T97430: Don't emit empty nowiki pairs around marker meta tags
24270 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24271 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
24273 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24274 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
24278 Unclosed xmlish element in table line shouldn't eat end delimiters
24283 <tbody><tr><td> <foo</td>
24284 <td> bar></td></tr>
24301 #### --------------- Links ----------------
24302 #### 1. Quote marks in link text
24303 #### 2. Wikilinks: Escapes needed
24304 #### 3. Wikilinks: No escapes needed
24305 #### 4. Extlinks: Escapes needed
24306 #### 5. Extlinks: No escapes needed
24307 #### --------------------------------------
24309 Links 1. WikiLinks: No escapes needed
24313 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
24314 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
24315 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
24319 [[Foo|x [Foobar] x]]
24321 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
24322 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
24323 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
24328 Links 2. WikiLinks: Escapes needed
24332 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
24333 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
24334 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
24335 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
24336 <a href="Foo" rel="mw:WikiLink">|Bar</a>
24337 <a href="Foo" rel="mw:WikiLink">]]bar</a>
24338 <a href="Foo" rel="mw:WikiLink">[[bar</a>
24339 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
24340 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
24341 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
24343 [[Foo|<nowiki>Foobar]</nowiki>]]
24344 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
24345 [[Foo|<nowiki>[[Bar]]</nowiki>]]
24346 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
24347 [[Foo|<nowiki>|Bar</nowiki>]]
24348 [[Foo|<nowiki>]]bar</nowiki>]]
24349 [[Foo|<nowiki>[[bar</nowiki>]]
24350 [[Foo|<nowiki>x [[ y</nowiki>]]
24351 [[Foo|<nowiki>x ]] y</nowiki>]]
24352 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
24354 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
24355 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
24356 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
24357 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24358 <a href="/wiki/Foo" title="Foo">|Bar</a>
24359 <a href="/wiki/Foo" title="Foo">]]bar</a>
24360 <a href="/wiki/Foo" title="Foo">[[bar</a>
24361 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24362 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24363 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24368 Links 3. WikiLinks: No escapes needed
24372 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24373 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24378 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24379 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24384 Links 4. ExtLinks: Escapes needed
24388 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24389 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
24390 <p>[http://google.com]</p>
24391 <p>[http://google.com google]</p>
24392 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24393 <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>
24395 [http://google.com <nowiki>[google]</nowiki>]
24396 [http://google.com <nowiki>google]</nowiki>]
24398 <nowiki>[http://google.com]</nowiki>
24400 <nowiki>[http://google.com google]</nowiki>
24402 [http://google.com<nowiki>]</nowiki>
24404 [{{echo|http://google.com}}<nowiki>]</nowiki>
24406 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24407 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24408 </p><p>[http://google.com]
24409 </p><p>[http://google.com google]
24410 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24411 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24416 Links 5. ExtLinks: No escapes needed
24420 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24421 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24423 [http://google.com [google]
24425 [[http://google.com]]
24427 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24428 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24433 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
24437 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24438 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24439 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24440 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24441 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24442 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24443 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24444 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24445 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24446 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24447 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24448 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24449 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24452 x<nowiki/>http://example.com<nowiki/>y
24453 http://example.com<nowiki/>?x
24454 http://example.com<nowiki/>&x
24455 http://example.com<nowiki/>'x
24456 http://example.com<nowiki/>,x
24457 http://example.com<nowiki/>.x
24458 http://example.com<nowiki/>;x
24459 http://example.com<nowiki/>:x
24460 http://example.com<nowiki/>;x
24461 http://example.com<nowiki/>!x
24462 http://example.com<nowiki/>=x
24463 http://example.com<nowiki/>(x)
24464 http://example.com(x<nowiki/>)
24468 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24473 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24475 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24476 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24477 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24478 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24479 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24485 "http://example.com"
24486 (http://example.com)
24487 (http://example.com) foo
24488 http://example.com,
24489 http://example.com, foo
24492 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24494 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24495 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24496 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24497 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24498 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24503 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24507 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24508 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24510 http://example.com.,;:!?\
24511 -http://example.com:
24513 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24514 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24519 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
24523 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24524 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24525 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24529 X<nowiki/>RFC 123<nowiki/>y
24533 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
24537 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24538 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24539 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24546 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24547 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24548 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24553 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
24557 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24558 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24559 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24563 X<nowiki/>PMID 123<nowiki/>y
24567 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
24571 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24572 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24573 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24580 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24581 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24582 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24587 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
24591 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24592 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24593 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24596 ISBN 1234567890<nowiki/>1
24597 ISBN 1234567890<nowiki/>x
24598 a<nowiki/>ISBN 1234567890<nowiki/>b
24602 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
24606 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24610 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24615 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24619 <p>this is not a link: http://example.com
24622 this is not a link: <nowiki>http://example.com</nowiki>
24626 Links 15. Link trails can't become link prefixes.
24631 <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>
24633 [[Söfnuður]]-[[00]]
24635 <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>
24639 #### --------------- Quotes ---------------
24640 #### 1. Quotes inside <b> and <i>
24641 #### 2. Link fragments separated by <i> and <b> tags
24642 #### 3. Link fragments inside <i> and <b>
24643 #### 4. No escaping needed
24644 #### --------------------------------------
24646 1a. Quotes inside <b> and <i>
24657 <b>foo'<i>bar'</i>baz</b>
24666 <i>fools'<span> errand</span></i>
24667 <i><span>fool</span>'s errand</i>
24668 '<i>foo</i> bar '<i>baz</i>
24669 a|!*#-:;+-~[]{}b'<i>x</i>
24673 ''<nowiki>''foo''</nowiki>''
24674 ''<nowiki>'''foo'''</nowiki>''
24676 '''<nowiki/>'foo''''
24677 '''<nowiki>''foo''</nowiki>'''
24678 '''<nowiki>'''foo'''</nowiki>'''
24679 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24680 '''foo'''<nowiki/>'s
24686 '''foo'''<nowiki/>'
24687 ''''foo'''<nowiki/>'
24688 ''fools'<span> errand</span>''
24689 ''<span>fool</span>'s errand''
24690 '<nowiki/>''foo'' bar '''baz''
24691 a|!*#-:;+-~[]{}b'''x''
24695 1b. Quotes inside <b> and <i> with other tags on same line
24699 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24700 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24701 <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>
24702 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24703 '<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>
24704 '<i>foo</i> <div title="name">test</div>
24705 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24706 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24707 <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>
24710 '''a'' foo ''[[bar]]''
24711 ''a''' foo ''[[bar]]''
24712 ''a''' foo '''{{echo|[[bar]]}}'''
24713 [[foo]] x'''[[bar]]''
24714 '''foo'' <ref>test</ref>
24715 '''foo'' <div title="name">test</div>
24716 '''foo'' and <br> bar
24721 2. Link fragments separated by <i> and <b> tags
24725 <p>[[<i>foo</i>hello]]</p>
24726 <p>[[<b>foo</b>hello]]</p>
24728 [[''foo''<nowiki>hello]]</nowiki>
24730 [['''foo'''<nowiki>hello]]</nowiki>
24733 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24734 # this is one of the shortcomings of this format
24736 3. Link fragments inside <i> and <b>
24740 <p><i>[[foo</i>]]</p>
24741 <p><b>[[foo</b>]]</p>
24743 ''[[foo''<nowiki>]]</nowiki>
24745 '''[[foo'''<nowiki>]]</nowiki>
24749 4. No escaping needed
24753 <p>'<span><i>bar</i></span>'
24754 '<span><b>bar</b></span>'
24758 '<span>''bar''</span>'
24759 '<span>'''bar'''</span>'
24763 #### ----------- Paragraphs ---------------
24764 #### 1. No unnecessary escapes
24765 #### --------------------------------------
24768 1. No unnecessary escapes
24772 <p>bar <span>[[foo]]</span>
24773 </p><p>=bar <span>[[foo]]</span>
24774 </p><p>[[bar <span>[[foo]]</span>
24775 </p><p>]]bar <span>[[foo]]</span>
24776 </p><p>=bar <span>foo]]</span>=
24779 bar <span><nowiki>[[foo]]</nowiki></span>
24781 =bar <span><nowiki>[[foo]]</nowiki></span>
24783 [[bar <span><nowiki>[[foo]]</nowiki></span>
24785 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24787 =bar <span>foo]]</span><nowiki>=</nowiki>
24790 #### ----------------------- PRE --------------------------
24791 #### 1. Leading whitespace in SOL context should be escaped
24792 #### ------------------------------------------------------
24794 1. Leading whitespace in SOL context should be escaped
24817 <nowiki> </nowiki>a
24819 <nowiki> </nowiki> a
24823 <nowiki> </nowiki> a
24825 <nowiki> </nowiki>a
24828 <nowiki> </nowiki>b
24851 2. Leading whitespace in non-indent-pre contexts should not be escaped
24855 <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>
24856 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24857 <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>
24867 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24886 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24890 <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>
24892 [[File:Foobar.jpg|thumb|caption]]
24896 5. Nowiki escaping should account for indent-pres
24906 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24919 #### --------------- Behavior Switches --------------------
24922 1. Valid behavior switches should be escaped
24929 <nowiki>__TOC__</nowiki>
24930 ''<nowiki>__TOC__</nowiki>''
24934 2. Invalid behavior switches should not be escaped
24945 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24947 Behavior switches should be SOL-transparent
24951 <meta property="mw:PageProp/toc" />
24953 <!-- this one's bogus -->
24956 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24958 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24962 <!-- this one's bogus -->
24971 #### --------------- HTML tags ---------------
24974 #### 3. multi-line html tag
24975 #### 4. extension tags
24976 #### -----------------------------------------
24982 <a href="http://google.com">google</a>
24984 <a href="http://google.com">google</a>
24992 <ul><li> <div>foo</div></li>
24993 <li> <div style="color:red">foo</div></li>
24994 <li> <td></li></ul>
24997 * <nowiki><div>foo</div></nowiki>
24998 * <nowiki><div style="color:red">foo</div></nowiki>
24999 * <nowiki><td></nowiki>
25003 3. multi-line html tag
25022 <p><ref>foo</ref>
25023 </p><p><ref>bar
25024 </p><p>baz</ref>
25027 <nowiki><ref>foo</ref></nowiki>
25029 <nowiki><ref>bar</nowiki>
25031 baz<nowiki></ref></nowiki>
25034 #### --------------- Others ---------------
25040 <p><nowiki>foo</nowiki>
25043 <nowiki>foo</nowiki>
25046 ## The quote-char in the input is necessary for triggering the bug
25048 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
25057 #----------- End of wikitext escaping tests --------------
25061 Tag-like HTML structures are passed through as text
25083 </p><p>1<d e>f
25088 HTML tag with necessary entities in attributes
25090 <span title="&amp;">foo</span>
25092 <p><span title="&amp;">foo</span>
25097 HTML tag with 'unnecessary' entity encoding in attributes
25099 <span title="&">foo</span>
25101 <p><span title="&">foo</span>
25106 HTML tag with broken attribute value quoting
25108 parsoid=wt2html,html2html
25110 <span title="Hello world>Foo</span>
25112 <p><span title="Hello world">Foo</span>
25115 <p><span title="Hello world">Foo</span></p>
25119 Self-closed tag with broken attribute value quoting
25121 parsoid=wt2html,html2html
25123 <div title="Hello world />Foo
25125 <div title="Hello world"></div>
25128 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
25132 Table with broken attribute value quoting
25134 parsoid=wt2html,html2html
25137 | title="Hello world|Foo
25142 <td title="Hello world">Foo
25148 <td title="Hello world">Foo
25154 Table with broken attribute value quoting on consecutive lines
25156 parsoid=wt2html,html2html
25159 | title="Hello world|Foo
25160 | style="color:red|Bar
25165 <td title="Hello world">Foo
25167 <td style="color:red">Bar
25173 <td title="Hello world">Foo
25174 </td><td style="color: red">Bar
25175 </td></tr></tbody></table>
25180 Accept empty td cell attribute
25183 | align="center" | foo || |
25188 <td align="center"> foo </td>
25195 Non-empty attributes in th-cells
25198 ! Foo !! style="color: red" | Bar
25204 <th style="color: red"> Bar
25210 Accept empty attributes in th-cells
25225 Empty table rows go away
25246 ### Parsoid-centric tests for testing RTing of inter-element separators
25247 ### Edge cases not tested by existing parser tests and specific to
25248 ### Parsoid-specific serialization strategies.
25252 RT-ed inter-element separators should be valid separators
25264 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
25268 # Parsoid-only since PHP parser relies on Tidy for correct output
25270 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
25284 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
25285 <p>bar</p></small></td></tr>
25289 <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>
25293 # Note that the "style" attribute is really a template parameter here.
25294 # The = would have to be {{=}} if you wanted the literal.
25296 Empty TD followed by TD with tpl-generated attribute
25301 |{{echo|style='color:red'}}|foo
25315 Indented table with an empty td
25333 ## We have some newline diffs RT-ing this edge case
25334 ## and it is not important enough -- we seem to be emitting
25335 ## at most 2 newlines after a </tr> and this is unrelated to
25336 ## the issue from T85627 that this is testing.
25338 Indented table with blank lines in between (T85627)
25357 Indented block & table
25371 <div data-parsoid='{"stx":"html"}'>foo</div>
25373 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25378 Indent and comment before table row
25393 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25394 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25398 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25400 Empty TR followed by a template-generated TR
25406 {{echo|<tr><td>foo</td></tr>}}
25412 <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}}]}'>
25417 ## PHP and parsoid output differ for this, and since this is primarily
25418 ## for testing Parsoid's serializer, marking this Parsoid only
25420 Empty TR followed by mixed-ws-comment line should RT correctly
25436 <!--c--> </tr><!--d-->
25442 Multi-line image caption generated by templates with/without trailing newlines
25444 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25445 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25447 <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>
25448 <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>
25452 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25456 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25458 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25460 <includeonly>foo</includeonly>
25468 ## PHP emits broken html for this, and since this is primarily
25469 ## a Parsoid serializer test, marking this Parsoid only
25471 Improperly nested inline or quotes tags with whitespace in between
25473 <span> <s>x</span> </s>
25476 <p><span> <s>x</s></span><s> </s>
25477 <b> <i>x</i></b><i> </i>
25482 Encapsulate protected attributes from wt
25484 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25486 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25490 <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>
25492 <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">
25493 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25497 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25498 ## Having nested or stray pre tags results in the attempt to add duplicates,
25499 ## causing an assertion fail. This test tries to prevent that situation.
25501 Ensure ParagraphWrapper can deal with stray closing pre tags
25511 1. Ensure fostered text content is wrapped in element nodes
25515 <table>hi</table><table>ho</table>
25524 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25526 parsoid=wt2html,wt2wt
25535 <tbody><tr><td> a</td></tr>
25540 Encapsulation properly handles null DSR information from foster box
25542 parsoid=wt2html,wt2wt
25544 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25546 <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>
25550 1. Encapsulate foster-parented transclusion content
25552 parsoid=wt2wt,wt2html
25554 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25556 <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>
25566 2. Encapsulate foster-parented transclusion content
25568 parsoid=wt2wt,wt2html
25570 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25572 <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>
25583 3. Encapsulate foster-parented transclusion content
25585 parsoid=wt2wt,wt2html
25587 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25589 <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>"]}">
25602 4. Encapsulate foster-parented transclusion content
25604 parsoid=wt2wt,wt2html
25606 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25608 <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>"]}">
25621 5. Encapsulate foster-parented transclusion content
25623 parsoid=wt2wt,wt2html
25625 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25627 <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>
25642 6. Encapsulate foster-parented transclusion content
25644 parsoid=wt2wt,wt2html
25646 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25648 <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>
25664 7. Encapsulate foster-parented transclusion content
25666 parsoid=wt2wt,wt2html
25668 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25670 <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>
25680 # Note that the wt is broken on purpose: the = should be {{=}} if you
25681 # don't want it to be a template parameter key.
25683 8. Encapsulate foster-parented transclusion content
25685 parsoid=wt2wt,wt2html
25688 }}{|{{echo|style='color:red'}}
25693 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25695 <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>
25706 9. Encapsulate foster-parented transclusion content
25708 parsoid=wt2wt,wt2html
25710 <table>{{echo|hi</table>hello}}
25712 <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>
25716 Table in fosterable position
25727 <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">
25729 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25735 # Parsoid only for bug 64747
25737 Properly encapsulate empty-content transclusions in fosterable positions
25745 <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"}]]}'>
25751 Always encapsulate foster box when template range is expanded to table
25764 T115289: Unclosed table
25766 {{echo|<table>}}<!--c-->[[Category:Two]]
25768 <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>
25772 T115289: Don't migrate newlines out of tables with fostered content
25774 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25776 <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>
25780 T73074: More fostering fun
25782 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25784 <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>
25788 Support <object> element with .data attribute
25792 <object data="test.swf"></object>
25794 <object data="test.swf"></object>
25798 Don't block XML namespace declaration
25800 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25802 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25805 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25808 # -----------------------------------------------------------------
25809 # The following section of tests are primarily to spec requirements
25810 # around Parsoid's serialization (old, new, edited content)
25812 # All these tests are marked Parsoid html2wt and html2html only
25813 # ----------------------------------------------------------------
25816 Ignore rel attribute in a-tags during serialization to url-links
25820 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25821 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25822 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25824 http://en.wikipedia.org/wiki/Foobar
25825 http://en.wikipedia.org/wiki/Foobar
25826 http://en.wikipedia.org/wiki/Foobar
25829 # 'mi' is a localinterwiki prefix as well as a language
25831 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25835 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25842 New wikilinks should be serialized properly
25846 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25847 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25848 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25849 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25850 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25854 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25855 http://en.wikipedia.org/wiki/Foo
25856 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25860 New wiki links (href variations)
25864 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25865 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25866 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25867 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25872 [[Toxine bactérienne]]
25876 New wiki links (content string variations)
25880 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25881 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25882 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25886 [[Foo_bar|./Foo_bar]]
25890 New category links (href variations)
25894 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25895 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25896 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25898 [[Category:Toxine bactérienne]]
25899 [[Category:Toxine bactérienne]]
25900 [[Category:Toxine bactérienne]]
25904 New sol transparent links don't need indent-pre nowiki protection
25909 <link rel="mw:PageProp/redirect" href="./Main_Page">
25910 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25911 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25913 #WEITERLEITUNG [[Main Page]]
25914 <!-- this is good --> [[Category:Good]]
25915 <!-- this is great --> [[Kategorie:Great]]
25919 New interlanguage links (href variations)
25923 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25924 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25925 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25927 [[es:Toxine bactérienne]]
25928 [[es:Toxine_bactérienne]]
25929 [[es:Toxine_bactérienne]]
25933 Image: Modifying size of an image (1)
25936 "modes": ["wt2wt"],
25938 ["img[height]", "attr", "height", "22"],
25939 ["img[width]", "attr", "width", "200"]
25943 [[Image:Foobar.jpg|230x230px]]
25945 [[Image:Foobar.jpg|200x200px]]
25949 Image: Modifying size of an image (2)
25952 "modes": ["wt2wt"],
25954 ["img[height]", "attr", "height", "100"],
25955 ["img[width]", "attr", "width", "500"]
25959 [[Image:Foobar.jpg|230x230px]]
25961 [[Image:Foobar.jpg|500x500px]]
25964 # Change in size is ignored so long as class='mw-default-size'
25966 Image: Modifying size of an image (3)
25969 "modes": ["wt2wt"],
25971 ["figure[class]", "removeClass", "mw-default-size"],
25972 ["figure img", "attr", "height", "19"],
25973 ["figure img", "attr", "width", "170"]
25977 [[Image:Foobar.jpg|thumb]]
25979 [[Image:Foobar.jpg|thumb|170x170px]]
25983 Image: Modifying alignment of an image (bug 48665)
25986 "modes": ["wt2wt"],
25988 ["figure[class]", "removeClass", "mw-halign-right"],
25989 ["figure[class]", "addClass", "mw-halign-left"]
25993 [[Image:Foobar.jpg|thumb|caption|right]]
25995 [[Image:Foobar.jpg|thumb|caption|left]]
25999 Image: Modifying mw-default-size of an frameless image (bug 62805)
26002 "modes": ["wt2wt"],
26004 ["figure.mw-default-size", "removeClass", "mw-default-size"]
26008 [[Image:Foobar.jpg|frameless|right]]
26010 [[Image:Foobar.jpg|frameless|right|220x220px]]
26014 Image: Modifying valign of an image (bug 49221)
26017 "modes": ["wt2wt"],
26019 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
26020 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
26024 [[File:Foobar.jpg|20px|middle]]
26026 [[File:Foobar.jpg|20px|text-top]]
26030 Image: Modifying alt attribute of an image (bug 56400)
26033 "modes": ["wt2wt"],
26035 ["img[alt]", "attr", "alt", "some alternate edited text"]
26039 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
26041 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
26045 Image: Modifying caption of an image
26048 "modes": ["wt2wt"],
26050 ["figcaption", "text", "new caption"]
26054 [[Image:Foobar.jpg|thumb|original caption]]
26056 [[Image:Foobar.jpg|thumb|new caption]]
26060 Image: empty alt attribute (bug 48924)
26064 [[File:Foobar.jpg|thumb|alt=|bar]]
26066 <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>
26070 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
26076 <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>
26078 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
26082 Image: Block level image should have \n before and after
26085 [[File:Foobar.jpg|right|thumb|150x150px]]
26089 <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>
26094 Image: New block level image should have \n before and after (existing content)
26097 [[File:Foobar.jpg|right|thumb|150x150px]]
26101 <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>
26106 Image: upright option (parsoid)
26108 [[File:Foobar.jpg|thumb|upright|caption]]
26109 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
26110 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
26112 <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>
26113 <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>
26114 <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>
26118 Image: upright option is ignored on inline and frame images (parsoid)
26120 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
26122 <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>
26126 Image: from basic HTML (1)
26130 <span typeof="mw:Image">
26131 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26134 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26138 Image: from basic HTML (2)
26142 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26144 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26148 Image: from basic HTML (3)
26152 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
26154 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
26158 Image: from basic HTML (4)
26162 <img src="./File:Foobar.jpg">
26164 [[File:Foobar.jpg|link=]]
26168 Image: Invalid title as link
26170 [[File:Foobar.jpg|link=<]]
26172 <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>
26175 <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>
26179 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
26184 <li><p>foo</p></li>
26191 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
26195 <ul> <li>foo</li></ul>
26201 Don't strip leading whitespace when handling indent-pre suppressing tags
26206 <tr><td> indented row</td></tr>
26209 <b>This is very bold of you!</b>
26212 indented cell (no pre-wrapping!)
26222 '''This is very bold of you!'''
26226 indented cell (no pre-wrapping!)
26234 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
26256 <nowiki> </nowiki></span>bar2
26259 <nowiki> </nowiki><span>bar</span>
26262 <nowiki> </nowiki><span>foo</span>
26267 Lists: Dont insert newlines in a serialized list item.
26271 <ul><li>a<br>b</li><li>c</li></ul>
26278 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
26281 "modes": ["html2wt"],
26282 "scrubWikitext": false
26285 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26286 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26288 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26289 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26291 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
26293 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26295 == hello there [[Category:A1]] ==
26297 == [[Category:A2]] hi pal ==
26299 == <!--foo--> [[Category:A3]] how goes it ==
26301 == it goes well [[Category:A4]] <!--bar--> ==
26303 ==howdy [[Category:A5]]==
26309 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
26312 "modes": ["html2wt"],
26313 "scrubWikitext": true
26316 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26317 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26319 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26320 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26322 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26330 <!--foo--> [[Category:A3]]
26335 [[Category:A4]] <!--bar-->
26343 Headings: Don't hoist metas that come from templates
26346 "modes": ["html2wt"],
26347 "scrubWikitext": true
26350 <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>
26352 == {{echo|foo [[Category:Foo]]}} ==
26356 Headings: Category in ref isn't hoisted
26359 "modes": ["html2wt"],
26360 "scrubWikitext": true
26363 <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>
26365 <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>
26368 [[Category:Baz]] </ref> ==
26374 Parsoid: Serialize positional parameters with = in them as named parameter
26378 <p about="#mwt1" typeof="mw:Transclusion"
26379 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26381 <p about="#mwt1" typeof="mw:Transclusion"
26382 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26384 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26385 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26386 <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>
26390 {{echo|1=f=oo|2=bar}}
26392 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26393 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26394 {{echo|<nowiki>f=oo</nowiki>|bar}}
26398 Parsoid: Serialize positional parameters with = in extlink as named parameter
26402 <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>
26404 {{echo|1=http://stuff?is=ok}}
26408 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26412 <div>a<p>b</p></div>
26433 Substrings resembling wikitext in hrefs should not get nowiki escapes
26437 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26443 Enforce single-line context in the serializer
26450 <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">
26451 </span><span about="#mwt1">you</span> </h2>
26453 <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>
26455 <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
26456 there</span></li></ol>
26468 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26475 </tbody></table></dd></dl>
26479 == hi {{bogus|there
26490 * foo '''bar''' baz
26502 Serialize new placeholder space without spans
26506 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26508 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26510 <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>
26516 <ref>foo : bar</ref>ok
26520 #-----------------------
26521 # Tag minimization tests
26522 #-----------------------
26525 1. I/B quote minimization: wikitext-only tags should be combined
26529 <p><i>A</i><i>B</i></p>
26530 <p><b>A</b><b>B</b></p>
26531 <p><i>A</i><b><i>B</i></b></p>
26532 <p><b>A</b><i><b>B</b></i></p>
26533 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26534 <p><i><b>A</b></i><i><b>B</b></i></p>
26535 <p><i><b>A</b></i><b><i>B</i></b></p>
26536 <p><b><i>A</i></b><i><b>B</b></i></p>
26556 2. I/B quote minimization: wikitext and html tags should not be combined
26560 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26561 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26565 ''A''<nowiki/>'''<i>B</i>'''
26569 3. I/B quote minimization: templated content stops minimization
26573 <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>
26574 <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>
26576 ''A''{{echo|''B''}}
26578 ''A''{{echo|'''''B'''''}}
26582 4. I/B quote minimization: new content should be mimimized with adjacent old content
26586 <p><i>A</i><i>B</i></p>
26587 <p><b>A</b><b>B</b></p>
26588 <p><i>A</i><b><i>B</i></b></p>
26598 5a. Merge adjacent quote nodes if they've been edited
26601 "modes": ["wt2wt", "selser"],
26603 ["p", "contents", "remove", ":contains('b')"]
26613 5b. Merge adjacent quote nodes if they've been edited
26616 "modes": ["wt2wt", "selser"],
26622 ''a''<span id="x">b</span>''c''
26628 1. Merge adjacent link nodes as long as at least one element is new
26631 "modes": ["html2wt"],
26632 "scrubWikitext": true
26635 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26636 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26637 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26641 [[Football|Foot]][[Football|ball]]
26645 2. Merge adjacent link nodes and enable additional normalizations
26648 "modes": ["html2wt"],
26649 "scrubWikitext": true
26652 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26654 [[Football|''Football'']]
26658 3. Don't merge adjacent link nodes if scrubWikitext is false
26661 "modes": ["html2wt"],
26662 "scrubWikitext": false
26665 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26667 [[Football|Foot]][[Football|ball]]
26670 #------------------------------
26671 # End of tag minimization tests
26672 #------------------------------
26675 Bug 54262: New entities
26679 <span typeof="mw:Entity"> </span>
26684 ## Note that there is no wikitext output for 'unknownproperty' ##
26685 ## Unknown magic words are silently dropped ##
26692 <meta property='mw:PageProp/toc' />
26693 <meta property='mw:PageProp/notoc' />
26694 <meta property='mw:PageProp/forcetoc' />
26695 <meta property='mw:PageProp/index' />
26696 <meta property='mw:PageProp/noindex' />
26697 <meta property='mw:PageProp/nogallery' />
26698 <meta property='mw:PageProp/noeditsection' />
26699 <meta property='mw:PageProp/notitleconvert' />
26700 <meta property='mw:PageProp/nocontentconvert' />
26701 <meta property='mw:PageProp/unknownproperty' />
26711 __NOCONTENTCONVERT__
26715 Consecutive <pre>s should not get merged
26717 parsoid=html2wt,html2html
26719 <pre>a</pre><pre>b</pre>
26747 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26751 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26753 [[Special:BookSources/1234567890|ISBN 1234567895]]
26757 Edited RFC links not serializable as RFC links should serialize as extlinks
26761 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26763 [//tools.ietf.org/html/rfc123 New RFC]
26767 Edited PMID links not serializable as PMID links should serialize as extlinks
26771 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26773 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26777 WTS of autolinks with trailing/surrounding context
26781 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26782 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26783 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26784 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26785 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26786 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26788 http://cscott.net'''foo'''
26790 http://cscott.net<b>foo</b>
26792 '''http://cscott.net'''
26794 '''http://cscott.net '''
26796 '''http://cscott.net<nowiki/>x'''
26798 http://cscott.net<nowiki/>x
26802 WTS of autolinks with nowikis (round-trip)
26804 x<nowiki/>http://cscott.net<nowiki/>x
26806 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26809 # this is the "easy" test because it leaves in place all the
26810 # data-parsoid information indicating this is an autolink
26812 WTS of autolinks with escapes (editing)
26815 "modes": ["wt2wt"],
26817 [ "meta", "remove" ]
26821 x<nowiki/>http://cscott.net<nowiki/>x
26823 x<nowiki/>http://cscott.net<nowiki/>x
26827 WTS of edited autolink-like text (T103364)
26830 "modes": ["wt2wt"],
26832 [ "span[typeof]", "removeAttr", "typeof" ]
26836 Not a link: <nowiki>http://example.com</nowiki>.
26838 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26842 WTS of newly-authored autolink-like text (T103364)
26846 <p>http://example.com is not a link.</p>
26848 <nowiki>http://example.com</nowiki> is not a link.
26852 WTS of autolink-like text after an autolink (T108563)
26856 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26858 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26862 Magic links inside links (not autolinked)
26864 [[Foo|http://example.com]]
26867 [[Foo|ISBN 123456789x]]
26869 [http://foo.com http://example.com]
26870 [http://foo.com RFC 1234]
26871 [http://foo.com PMID 1234]
26872 [http://foo.com ISBN 123456789x]
26874 <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>
26875 <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>
26877 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26878 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26879 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26880 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26882 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26883 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26884 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26885 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26889 Magic links inside image captions (autolinked)
26891 [[File:Foobar.jpg|thumb|http://example.com]]
26892 [[File:Foobar.jpg|thumb|RFC 1234]]
26893 [[File:Foobar.jpg|thumb|PMID 1234]]
26894 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26896 <div class="thumb tright">
26897 <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>
26898 <div class="thumbcaption">
26899 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26900 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26903 <div class="thumb tright">
26904 <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>
26905 <div class="thumbcaption">
26906 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26907 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26910 <div class="thumb tright">
26911 <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>
26912 <div class="thumbcaption">
26913 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26914 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26917 <div class="thumb tright">
26918 <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>
26919 <div class="thumbcaption">
26920 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26921 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26925 <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>
26926 <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>
26927 <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>
26928 <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>
26932 WTS of magic word text (T109371)
26937 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26938 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26940 <nowiki>RFC 1234</nowiki>
26942 [http://foo.com RFC 1234]
26948 Edited Redirect link should emit a non-piped wikitext link
26952 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26958 T75121: Infer extension name from typeOf if data-mw is not present
26960 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26962 <div typeOf="mw:Extension/foo"></div>
26967 # Note that the <p> wrapping isn't present in PHP parser output
26968 # The important thing for this test is that P-wrapping doesn't
26969 # interfere with the <nowiki> protection for leading - in <td>
26970 # (which isn't necessary for <th>).
26972 T88318: p-wrapped dash in table.
26974 parsoid=html2wt,wt2wt
26977 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26978 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26979 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26986 |<nowiki>-</nowiki>
26987 |<nowiki>- </nowiki>
27006 <td><small>-</small></td>
27018 T149209: WTS: Handle newlines in table cells properly
27026 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
27028 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
27034 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
27036 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
27058 T149209: Selser: Handle newlines in table cells properly
27061 "modes": ["selser"],
27063 [ "#h1", "html", "a\nb\n" ],
27064 [ "#h2", "html", "a\nb\n" ],
27065 [ "#c1", "html", "a\nb\n" ],
27066 [ "#c2", "html", "<p>a</p>" ],
27067 [ "#c3", "html", "<p>a</p>" ],
27068 [ "#c4", "html", "edit-me<p>a</p>" ]
27073 ! id="h1" |edit-me!!1
27075 ! id="h2" |edit-me||2
27077 | id="c1" |edit-me||3
27079 | id="c2" |edit-me||4
27081 | id="c3" |edit-me||p||q||r
27083 | id="c4" |edit-me||p||q||r
27112 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
27117 <td id='mwAc'>foo</td>
27118 <td id='serialize-this'>bar</td>
27123 | id="serialize-this" |bar
27128 Parsoid-like element ids should not be serialized to wikitext unless shadowed
27132 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
27134 <div id="hello">ok</div>
27141 "modes": ["wt2wt"],
27143 [ "#xyz", "before", "<b>before</b> stuff " ],
27144 [ "#xyz", "after", " stuff <i>after</i>" ],
27145 [ "#xyz", "html", "x <b>y</b> z" ]
27149 <span id="xyz">hello</span>
27151 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
27155 Never serialize a-tag as html, regardless of what data-parsoid has to say
27157 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27159 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
27164 ## SSS FIXME: This is broken output nevertheless.
27165 ## What might be a reasonable non-broken output for this?
27166 ## This is an edge case unlikely to be seen in production
27167 ## that I am not wasting more time on this right now.
27169 Never serialize a-tag as html, no matter what attributes it has
27171 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27173 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
27175 [http://boo.org http://boohoo.org]
27178 # Misnested is an indication that selser can reuse the source but these have
27179 # shown to sneak through on occasion. See T101768.
27180 # The original wikitext here is: [http://test.com [[one]] two three]
27182 Strip span tags added to mark misnested links
27186 <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>
27188 [http://test.com][[one]] two three
27192 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
27196 <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|}"]}'>
27208 ## This test verifies the presence and computation of this attribute indirectly
27209 ## by making an edit and ensuring that the serialization is correct (which it would be
27210 ## only if firstWikitextNode is properly set).
27212 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
27215 "modes": ["wt2wt"],
27217 [ "div#x", "remove" ],
27218 [ "div", "before", "<div>new</div>" ]
27222 <div id="x">foo</div>
27224 {{echo|<div>boo</div>
27232 {{echo|<div>boo</div>
27238 # --------------------------------------------
27239 # Tests spec'ing wikitext serialization norms |
27240 # --------------------------------------------
27243 1. Categories should always be serialized on their own line
27247 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
27255 2. Categories that are part of templates should not introduce a line break
27257 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
27259 <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>
27262 # Careful while editing these next 2 tests. There are \u200f characters
27263 # before and after the <link> tags in the HTML and following some
27264 # of the categories in wikitext
27265 # Do not remove these characters in edits.
27267 # As part of the serialization, these bidi characters will get stripped.
27269 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
27272 "modes": ["html2wt"],
27273 "scrubWikitext": true
27276 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
27277 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
27280 [[קטגוריה: שיטות משפט]]
27284 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
27287 "modes": ["html2wt"],
27288 "scrubWikitext": true
27291 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
27298 Lists: Add space after bullets
27305 <li><span> baz</span></li>
27310 * <span> baz</span>
27314 1. Headings: Add space before/after == (T53744)
27321 <h2><span> baz</span></h2>
27329 == <span> baz</span> ==
27333 2. Headings: Add space before/after == even after hoisted content
27336 "modes": ["html2wt"],
27337 "scrubWikitext": true
27340 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
27348 1. Headings: suppress newly created empty headings
27351 "modes": ["html2wt"],
27352 "scrubWikitext": true
27360 2. Headings: don't suppress empty headings if scrubWikitext is false
27370 3. Headings: suppress empty headings on edits
27373 "modes": ["selser"],
27374 "scrubWikitext": true,
27380 ==<span id="x">foo</span>==
27385 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27388 "modes": ["html2wt"],
27389 "scrubWikitext": true
27392 <h2>foo<br/>bar</h2>
27393 <h2>foo <span><br/>bar</span> baz</h2>
27397 == foo <span> bar</span> baz ==
27401 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27404 "modes": ["html2wt"],
27405 "scrubWikitext": false
27408 <h2>foo<br/>bar</h2>
27414 1. WT Quote Tags: suppress newly created empty style tags
27417 "modes": ["html2wt"],
27418 "scrubWikitext": true
27426 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27432 ''<nowiki/>'''''<nowiki/>'''
27436 3. WT Quote Tags: suppress empty style tags on edits
27439 "modes": ["selser"],
27440 "scrubWikitext": true,
27446 '''<span id="x">foo</span>'''
27451 1. Anchors: suppress newly created empty anchors
27454 "modes": ["html2wt"],
27455 "scrubWikitext": true
27458 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27463 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27466 "modes": ["html2wt"],
27467 "scrubWikitext": false
27470 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27476 3. Anchors: suppress empty anchors on edits
27479 "modes": ["selser"],
27480 "scrubWikitext": true,
27486 [[Test|<span id="x">foo</span>]]
27491 3a. Anchors: do not suppress numbered extlinks
27494 "modes": ["wt2wt"],
27495 "scrubWikitext": true
27500 <a rel="mw:ExtLink" href="http://foo.com"></a>
27504 3b. Anchors: do not suppress numbered extlinks
27507 "modes": ["wt2wt"],
27508 "scrubWikitext": true,
27514 [http://foo.com <span id="x">foo</span>]
27520 Normalizations should be restricted to edited content
27523 "modes": ["selser"],
27524 "scrubWikitext": true,
27526 [ "h1", "before", "<i></i>"]
27540 1. Multiple normalizations (html2wt)
27543 "modes": ["html2wt"],
27544 "scrubWikitext": true
27548 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27549 </a><b><i></i></b>x</p>
27558 2. Multiple normalizations (selser)
27561 "modes": ["selser"],
27562 "scrubWikitext": true,
27564 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27568 <span id="x">foo</span>
27570 <span id="x">foo</span>
27576 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27579 "modes": ["html2wt"],
27580 "scrubWikitext": true
27592 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27599 <nowiki> </nowiki>hi
27601 <nowiki> </nowiki> hello
27605 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27608 "modes": ["html2wt"],
27609 "scrubWikitext": true
27618 baz bang</td></tr></table>
27624 bar<span>boo</span></p>
27640 bar<span>boo</span>
27644 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27647 "modes": ["selser"],
27648 "scrubWikitext": true,
27650 [ "p", "html", " a\n b" ]
27661 1. New links that end in spaces
27664 "modes": ["html2wt"],
27665 "scrubWikitext": false
27668 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27669 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27670 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27672 [[Berlin ]]<nowiki/>is the capital of Germany.
27676 [[Boston ]] is a city.
27680 2. New links that end in spaces
27683 "modes": ["html2wt"],
27684 "scrubWikitext": true
27687 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27688 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27689 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27691 [[Berlin]] is the capital of Germany.
27695 [[Boston]] is a city.
27699 1. Table cells with escapable prefixes
27702 "modes": ["html2wt"],
27703 "scrubWikitext": false
27707 <tr><td>a</td></tr>
27708 <tr><td>-</td></tr>
27709 <tr><td>+</td></tr>
27715 |<nowiki>-</nowiki>
27717 |<nowiki>+</nowiki>
27722 2. Table cells with escapable prefixes
27725 "modes": ["html2wt"],
27726 "scrubWikitext": true
27730 <tr><td>a</td></tr>
27731 <tr><td>-</td></tr>
27732 <tr><td>+</td></tr>
27745 3a. Table cells with escapable prefixes after edits
27748 "modes": ["selser"],
27749 "scrubWikitext": true,
27751 [ "table tbody tr:first-child td:first-child", "remove"]
27765 3b. Table cells with escapable prefixes after edits
27768 "modes": ["selser"],
27769 "scrubWikitext": true,
27771 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27778 |<span id="x">foo</span>+
27787 # FIXME: This test will fail because
27788 # normalization doesn't realize that the id attribute
27789 # will eliminate the escapable scenario
27791 4a. Table cells without escapable prefixes after edits
27794 "modes": ["selser"],
27795 "scrubWikitext": true,
27797 [ "#x", "html", "-" ]
27810 ## This tests normalizer's ability to discriminate between
27811 ## cells having identical content.
27813 4b. Table cells without escapable prefixes after edits
27816 "modes": ["selser"],
27817 "scrubWikitext": true,
27819 [ "td", "html", "-" ]
27832 ## This tests normalizer's ability to not be tripped by
27833 ## comments (and whitespace)
27835 4c. Table cells without escapable prefixes after edits
27838 "modes": ["selser"],
27839 "scrubWikitext": true,
27841 [ "table tbody tr td:first-child", "remove" ]
27856 ## This tests normalizer's ability to handle HTML cells
27858 4d. Table cells without escapable prefixes after edits
27861 "modes": ["selser"],
27862 "scrubWikitext": true,
27864 [ "td", "html", "-" ]
27869 <tr><td>a</td></tr>
27873 <tr><td>-</td></tr>
27877 ## T111151 Remove font elements without attributes
27879 5a. font tags without attributes should be dropped in scrubWikitext mode
27882 "modes": ["html2wt"],
27883 "scrubWikitext": true
27887 <font><font>bar</font></font>
27888 <font class="x">boo</font>
27892 <font class="x">boo</font>
27896 5b. font tags should not be dropped without scrubWikitext being enabled
27899 "modes": ["html2wt"],
27900 "scrubWikitext": false
27909 Escape nowiki DOM elements
27913 <nowiki><i>foo</i></nowiki>
27915 <nowiki>''foo''</nowiki>
27918 # This is meant to be an interim fix while we go about figuring out
27919 # how to not introduce these trailing <nowiki/>s in the first place.
27921 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27925 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27927 <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>
27928 <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>
27941 # ---------------------------------------------------
27942 # End of tests spec'ing wikitext serialization norms |
27943 # ---------------------------------------------------
27947 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27955 <td><b>c</b><p>d</p></td>
27973 # -----------------------------------------------------------------
27974 # End of section for Parsoid-only html2wt tests for serialization
27976 # -----------------------------------------------------------------
27978 # -----------------------------------------------------------------
27979 # The following section of tests are primarily to spec behavior of
27980 # the selective serializer. All these tests have manual selser
27981 # changes. The automated selser changes for all tests handle the
27982 # wide variation of changes, but these tests here capture specs
27983 # deterministically.
27984 # ----------------------------------------------------------------
27988 Selser: New comments should not be lost
27991 "modes": ["selser"],
27993 [ "#a", "after", "<!--c1-->" ],
27994 [ "#b", "before", "<!--c2-->" ]
27998 <span id="a">a</span>
28000 <span id="b">b</span>
28002 <span id="a">a</span><!--c1-->
28004 <!--c2--><span id="b">b</span>
28009 Selser: Check for validity of DSR before using it
28012 "modes": ["selser"],
28014 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
28018 <span id="a">a</span>
28020 {{DISPLAYTITLE:foo}}
28021 <span id="a">a</span>
28025 1. DOMDiff: Changes to <ref> content should be looked up using id
28028 "modes": ["selser"],
28030 ["#X", "after", "bar"],
28031 ["#Y", "after", "baz"]
28035 X <ref><span id="X">foo</span></ref>
28038 <ref name="a"><span id="Y">foo</span></ref>
28041 X <ref><span id="X">foo</span>bar</ref>
28044 <ref name="a"><span id="Y">foo</span>baz</ref>
28049 2. DOMDiff: Changes to <ref> content should be looked up using id
28052 "modes": ["selser"],
28054 ["#Z", "after", "bar"]
28058 A <ref>foo bar for a</ref>
28059 B <ref group="X" name="b" />
28063 <references group="X">
28064 <ref name="b"><span id="Z">foo</span></ref>
28067 A <ref>foo bar for a</ref>
28068 B <ref group="X" name="b" />
28072 <references group="X">
28073 <ref name="b"><span id="Z">foo</span>bar</ref>
28078 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
28081 "modes": ["selser"],
28083 [ "div:first-child", "text", "bar" ]
28087 <div style="{{1x|color:red;}}%">foo</div>
28089 <div style="{{1x|color:red;}}%">bar</div>
28102 <li class="mw-empty-elt"></li>
28103 <li class="mw-empty-elt"></li>
28111 [[File:Thumb.png|thumb]]
28113 <div class="thumb tright">
28114 <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>
28115 <div class="thumbcaption">
28116 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
28123 unclosed internal link XSS (T137264)
28125 [[#%3Cscript%3Ealert(1)%3C/script%3E|
28127 <p>[[#<script>alert(1)</script>|
28130 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>