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 (T49326)
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]] (T51926)
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]] (T51926)
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 (T54468)
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 (T19663, T42670, T54022)
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 (T54760)
1375 <p><s.foo>s</p>
1377 <p><s.foo>s</p>
1381 ### Special characters
1385 Bare pipe character (T54363)
1394 Bare pipe character from a template (T54363)
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>
1495 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1499 Entities inside template parameters
1505 <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>
1509 Properly escape nowiki when combined with other wiki markup
1513 <p>* </nowiki> tag</p>
1515 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1519 T93824: Put escaped HTML tags inside nowiki
1523 <p><h2>foo</h2></p>
1525 <nowiki><h2>foo</h2></nowiki>
1529 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1533 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1534 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1535 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1537 This text: L'[[Foo]]
1538 This text: L<nowiki>''</nowiki>[[Foo]]
1539 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1542 # This test fails because wikitext whitespace is not normalized before comparing.
1544 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1548 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1551 This text : L<nowiki>''</nowiki>[[Foo]]
1554 # This test and the next one are html2wt only as they test that incorrect wikitext
1555 # passed in template arguments gets escaped or wrapped in nowikis where required.
1557 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1561 <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>
1562 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1564 {{echo|foo{{!}}bar}}
1565 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1569 T53961: Output correct nowikis in template arguments
1573 <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>
1574 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1575 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1576 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1577 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1580 {{echo|<nowiki>a }} b</nowiki>}}
1581 {{echo|<nowiki>a [[ b</nowiki>}}
1582 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1583 {{echo|a <nowiki>}</nowiki>}}
1587 Cases where "!!" needs nowiki protection
1592 <tr><th>this needs protection !! here</th></tr>
1596 <tr><th>this does not need
1597 protection !! here</th></tr>
1601 !<nowiki>this needs protection !! here</nowiki>
1614 Comments and Indent-Pre
1616 <!-- comment 1 --> asdf
1618 <!-- comment 1 --> asdf
1621 <!-- comment 1 --> asdf
1622 <!-- comment 2 -->xyz
1624 <!-- comment 1 --> asdf
1625 <!-- comment 2 --> xyz
1681 asdf<!-- comment 1 -->jkl
1691 <!-- foo --> b <!-- bar -->
1705 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1711 Comment semantics and delimiters
1713 <!-- --><!----><!-----><!------>
1717 <!-- --><!----><!-----><!------>
1721 Comment semantics and delimiters, redux
1723 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1724 -- foo -- funky huh? ... -->
1728 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1729 -- foo -- funky huh? ... -->
1733 Comment semantics and delimiters: directors cut
1735 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1736 everything starting with < followed by !-- until the first -- and > we see,
1737 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1743 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1744 everything starting with < followed by !-- until the first -- and > we see,
1745 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1750 Comment semantics: nesting
1752 <!--<!-- no, we're not going to do anything fancy here -->-->
1757 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1760 # Parsoid closes the unclosed comment, even if it means a slight
1763 Comment semantics: unclosed comment at end
1765 parsoid=wt2html,html2html
1767 <!--This comment will run out to the end of the document
1771 <!--This comment will run out to the end of the document-->
1775 Comment semantics: normalize comments to play nice with XML and browsers
1777 <!-- Browsers --!> think this is closed -->
1778 <!--> This would normally be text -->
1779 <!---> As would this -->
1780 <!-- XML doesn't like trailing dashes -------->
1781 <!-- Nor doubled hyphens -- anywhere in the data -->
1782 But this is not a comment.
1784 <p>But this is not a comment.
1787 <!-- Browsers --!> think this is closed -->
1788 <!--> This would normally be text -->
1789 <!---> As would this -->
1790 <!-- XML doesn't like trailing dashes -------->
1791 <!-- Nor doubled hyphens -- anywhere in the data -->
1792 <p>But this is not a comment.</p>
1796 Comment semantics: round-trip even text which contains encoded -->
1798 <!-- hello & goodbye - > --> --&gt; --&xx -->
1800 <!-- hello & goodbye - > --> --&gt; --&xx -->
1804 Comment in template title
1813 Comment on its own line post-expand
1825 Comment on its own line post-expand with non-significant whitespace
1837 Multiple comments should still parse as SOL-transparent
1839 parsoid=wt2html,wt2wt
1842 <!--c2--><!--c3--><!--c4-->*b
1851 <!--c2--><!--c3--><!--c4-->
1858 ### paragraph wrapping tests
1873 Block tag on one line (<div>)
1889 Block tag on one line (<blockquote>)
1891 a <blockquote>foo</blockquote>
1895 a <blockquote>foo</blockquote>
1907 Block tag on both lines (<div>)
1924 Block tag on both lines (<blockquote>)
1926 a <blockquote>foo</blockquote>
1928 b <blockquote>foo</blockquote>
1930 a <blockquote>foo</blockquote>
1931 b <blockquote>foo</blockquote>
1945 Multiple lines without block tags
1969 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1970 # So, we have a separate section for Parsoid. We don't want
1971 # to mimic this stripping behavior in Parsoid. It affects
1972 # editing experience and also requires us to maintain additional
1975 Empty lines between lines with block tags
2013 <div data-parsoid='{"stx":"html"}'></div>
2016 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2019 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2021 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2024 <div data-parsoid='{"stx":"html"}'>e</div>
2027 ## PHP parser emits output which is broken
2029 Unclosed HTML p-tags should be handled properly
2042 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2047 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2048 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2051 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2055 a [[Category:A1]] [[Category:A2]]
2060 <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"/>
2064 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2070 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2074 ### Preformatted text
2083 And a [[Main Page|link]]
2089 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2094 Tabs don't trigger preformatted text
2098 This is preformatted text.
2104 <pre>This is preformatted text.
2109 preformatted text.</p>
2110 <pre>This is preformatted text.
2115 Space before tab needs nowiki pre protection
2121 <nowiki> </nowiki> a
2125 Ident preformatting with inline content
2136 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2153 Regression with preformatted in <center>
2167 T54763: Preformatted in <blockquote>
2173 indented cell (no pre-wrapping!)
2183 <p> indented cell (no pre-wrapping!)
2191 T53086: Double newlines in blockquotes should be turned into paragraphs
2208 T17491: <ins>/<del> in blockquote
2211 Foo <del>bar</del> <ins>baz</ins> quux
2215 <p>Foo <del>bar</del> <ins>baz</ins> quux
2221 # Note that the p-wrapping is newline sensitive, which could be
2222 # considered a bug: tidy will wrap only the 'Foo' in the example
2223 # below in a <p> tag. (see comment 23-25 of T8200)
2225 T17491: <ins>/<del> in blockquote (2)
2227 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2230 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2236 <del>bar</del> <ins>baz</ins> quux</blockquote>
2240 <pre> with attributes (T5202)
2242 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2244 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2249 <pre> with width attribute (T5202)
2251 <pre width="8">Narrow screen goodies</pre>
2253 <pre width="8">Narrow screen goodies</pre>
2258 <pre> with forbidden attribute (T5202)
2260 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2262 <pre width="8">Narrow screen goodies</pre>
2267 Entities inside <pre>
2276 <pre> with forbidden attribute values (T5202)
2278 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2280 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2285 <nowiki> inside <pre> (T15238)
2293 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2301 <pre><nowiki>Foo</nowiki></pre>
2306 <nowiki> inside of #tag:pre
2308 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2310 <pre>Foo →bar</pre>
2313 <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>
2316 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2317 ## aren't enclosed in nowikis.
2319 <nowiki> and <pre> preference (first one wins)
2350 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2355 <p><span typeof="mw:Nowiki">
2363 </pre> inside nowiki
2365 <nowiki></pre></nowiki>
2371 # Parsoid doesn't strip empty tags, like Tidy does.
2373 Empty pre; pre inside other HTML tags (T56946)
2398 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2400 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2404 HTML pre followed by indent-pre
2414 # Note that tidy removes the empty <p> tags from the start and end.
2415 # Parsoid does not, by design.
2419 <p><pre>foo</pre></p>
2425 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2429 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2437 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2447 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2459 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2480 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2484 {{echo| foo}}{{echo| bar}}
2489 {{echo|<!--cmt--> foo}}
2491 <!--cmt-->{{echo| foo}}
2493 {{echo|{{echo| }}bar}}
2511 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2547 ## Hmm, should Parsoid rt this?
2549 Pres with newline attributes
2551 parsoid=wt2html,html2html
2556 <pre class="one two">hi</pre>
2559 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2563 Things that look like <pre> tags aren't treated as such
2565 Barack Obama <President> of the United States
2566 <President></President>
2568 <p>Barack Obama <President> of the United States
2569 <President></President>
2574 Handle broken pre-like tags (T66025)
2578 {{echo|<pre <pre>x</pre>}}
2580 <table><pre </table>
2583 <table><pre </table>
2591 <pre about="#mwt1" typeof="mw:Transclusion mw:Extension/pre" 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>
2600 Parsoid: handle pre with space after attribute
2604 <pre style="width:50%;" >{{echo|foo}}</pre>
2606 <pre style="width:50%;">{{echo|foo}}</pre>
2609 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2612 # TODO / maybe: fix wt2wt for this
2614 Parsoid: Don't paragraph-wrap fosterable content
2640 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2668 #--------------------------------------------------------------------
2669 # Transclusion parameter whitespace stripping tests
2670 # Behavior is different for positional and named parameters
2671 #--------------------------------------------------------------------
2673 Templates: Strip leading and trailing whitespace from named-param values
2677 {{echo|1= {{echo|b}} }}
2690 <ul><li> d</li></ul>
2695 Templates: Don't strip whitespace from positional-param values
2699 {{echo|{{echo|b}} }}
2731 <ul><li> f</li></ul>
2739 Templates: Handle empty comment-and-ws-only lines correctly
2742 <!--should be ignored-->
2743 <!--should be ignored as well-->
2750 <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>
2754 Templates: Handle comments in the target
2757 <!-- should be ignored -->
2761 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2764 {{echo<!-- should be ignored -->
2767 {{echo<!-- should be ignored -->|foo}}
2769 {{<!-- should be ignored -->echo|foo}}
2778 <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>
2780 <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>
2782 <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>
2784 <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>
2786 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2790 Templates: Handle comments in parameter names (T69657)
2793 <!-- should be ignored -->
2797 <!-- should be ignored -->
2800 {{echo|1<!-- should be ignored -->=foo}}
2802 {{echo|<!-- should be ignored -->1=foo}}
2810 <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>
2812 <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>
2814 <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>
2816 <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>
2820 Templates: Other wikitext in parameter names (T69657)
2827 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2830 #--------------------------------------------------------------------
2831 # Transclusion parameter escaping tests
2832 #--------------------------------------------------------------------
2834 Templates: Parsoid parameter escaping test 1
2836 {{echo|[foo]|{{echo|[bar]}}}}
2840 <p about="#mwt1" typeof="mw:Transclusion"
2841 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2845 Parsoid: Pipes in external links in template parameter
2847 {{echo|[{{echo|http://example.com}} link]}}
2849 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2851 <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>
2855 Parsoid: pipe in transclusion parameter
2857 {{echo|http://foo.com/a|b}}
2859 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2861 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2862 typeof="mw:Transclusion"
2863 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>
2867 Parsoid: Pipe in external link target and content in template parameter
2869 parsoid=html2wt,wt2wt
2871 {{echo|[http://foo.com/a|b a|b]}}
2873 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2875 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2876 typeof="mw:Transclusion"
2877 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2878 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2882 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2886 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2888 <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>
2892 Templates: Don't escape already nowiki-escaped text in template parameters
2894 parsoid=html2wt,wt2wt
2896 {{echo|foo<nowiki>|</nowiki>bar}}
2897 {{echo|<nowiki><div></nowiki>}}
2898 {{echo|<nowiki></nowiki>}}
2900 <p>foo|bar <div></p>
2902 <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>
2903 <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>
2904 <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>
2910 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2912 parsoid=html2wt,wt2wt
2914 {{echo|{{echo|1=bar}}}}
2918 <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>
2923 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2929 <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>
2934 Templates: Preserve blank parameter names
2940 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2944 Templates: Preserve blank parameter names in other positions
2946 {{blank_param|bar|=foo}}
2950 <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
2955 ### Parsoid-centric tests for testing RT edge cases for pre
2959 1a. Indent-Pre and Comments
2972 1b. Indent-Pre and Comments
2985 1c. Indent-Pre and Comments
2998 1d. Indent-Pre and Comments
2999 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3012 2a. Indent-Pre and tables
3033 2b. Indent-Pre and tables
3049 2c. Indent-Pre and tables (T44252)
3066 2d. Indent-Pre and tables
3083 <tbody><tr><td> b</td></tr>
3088 2e. Indent-Pre and table-line syntax
3101 2f. Indent-pre started by table-line syntax
3120 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3125 Text that should be rendered preformatted
3133 <pre>Text that should be rendered preformatted
3142 3a. Indent-Pre and block tags (single-line html)
3146 c <blockquote> foo </blockquote>
3151 c <blockquote> foo </blockquote>
3152 <pre><span> foo </span>
3155 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3156 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3157 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3158 <pre><span> foo </span>
3175 3b. Indent-Pre and block tags (multi-line html)
3180 <pre>a <span>foo</span>
3185 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3186 b <div data-parsoid='{"stx":"html"}'> foo </div>
3196 3c. Indent-Pre and block tags (pre-content on separate line)
3260 4. Indent-Pre and extension tags
3271 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3275 5. Indent-Pre and html pre
3277 <pre class="123">hi</pre>
3279 <pre class="123">hi</pre>
3282 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3286 Render paragraphs when indent-pre is suppressed in blocklevels
3303 4. Multiple spaces at start-of-line
3321 ## NOTE: the leading white-space chars on empty line are significant
3323 5a. White-space in indent-pre
3335 ## NOTE: the leading white-space chars on empty line are significant
3337 5b. White-space in indent-pre
3356 5c. White-space in indent-pre
3369 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3392 7a. Indent-pre and category links
3394 parsoid=wt2html,wt2wt
3396 [[Category:foo]] <!-- No pre-wrapping -->
3397 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3400 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3401 <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 -->
3404 ## We used to, but no longer wt2wt this test since the default serializer
3405 ## will normalize all categories to serialize on their own line.
3406 ## This wikitext usage is going to be fairly uncommon in production and
3407 ## selser will take care of preserving formatting in those scenarios.
3409 7b. Indent-pre and category links
3414 [[Category:foo]] {{echo|b}}
3416 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3417 <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>
3421 Indent-Pre: Newlines in comments shouldn't affect sol state
3435 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3439 HTML-pre: 1. embedded newlines
3474 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3476 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3479 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3484 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3492 HTML-pre: big spaces
3528 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3547 HTML-pre: 2: indented text
3560 HTML-pre: 3: other wikitext
3579 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3588 ### Definition lists
3595 <dl><dt> name </dt>
3596 <dd> Definition</dd></dl>
3601 Definition list for indentation only
3605 <dl><dd> Indented text</dd></dl>
3610 Definition list with no space
3615 <dd>Definition</dd></dl>
3620 Definition list with URL link
3622 ; http://example.com/ : definition
3624 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3625 <dd> definition</dd></dl>
3630 Definition list with bracketed URL link
3632 ;[http://www.example.com/ Example]:Something about it
3634 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3635 <dd>Something about it</dd></dl>
3640 Definition list with wikilink containing colon
3642 ; [[Help:FAQ]]: The least-read page on Wikipedia
3644 <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>
3645 <dd> The least-read page on Wikipedia</dd></dl>
3649 # At Brion's and JeLuF's insistence... :)
3651 Definition list with news link containing colon
3653 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3655 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3656 <dd> This isn't even a real newsgroup!</dd></dl>
3659 <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>
3663 Malformed definition list with colon
3665 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3667 <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>
3672 Definition lists: colon in external link text
3674 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3676 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3677 <dd> OK, I made that up</dd></dl>
3682 Definition lists: colon in HTML attribute
3684 ;<b style="display: inline">bold</b>
3686 <dl><dt><b style="display: inline">bold</b></dt></dl>
3691 Definition lists: self-closed tag
3693 ;one<br/>two : two-line fun
3695 <dl><dt>one<br />two </dt>
3696 <dd> two-line fun</dd></dl>
3701 Definition lists: ignore colons inside tags
3703 ;one <b>two : tag <i>fun:</i>:</b>: def
3705 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3711 Definition lists: excess closed tags
3713 ;one</b>two : bad tag fun
3716 <dt>onetwo </dt>
3717 <dd>bad tag fun</dd>
3722 <dd>bad tag fun</dd>
3727 T13748: Literal closing tags
3731 <dd>test test test test test</dd>
3733 <dd>test test test test test</dd>
3738 <dd>test test test test test</dd>
3740 <dd>test test test test test</dd>
3746 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3749 ; term : description
3754 <dl><dt> term </dt>
3755 <dd> description</dd></dl>
3756 <ul><li> unordered</li></ul>
3762 Definition list with empty definition and following paragraph
3774 Nested definition lists using html syntax
3787 Definition Lists: No nesting: Multiple dd's
3800 Definition Lists: Indentation: Regular
3808 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3813 Definition Lists: Indentation: Missing 1st level
3819 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3824 Definition Lists: Indentation: Multi-level indent
3828 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3833 Definition Lists: Hacky use to indent tables
3840 should be left alone
3842 <dl><dd><dl><dd><table>
3847 </td></tr></table></dd></dl></dd></dl>
3849 should be left alone
3854 Definition Lists: Hacky use to indent tables, with comments (T65979)
3862 should be left alone
3865 <dl><dd><dl><dd><table><tr>
3868 </tr></table><!-- bar --></dd></dl></dd></dl>
3870 should be left alone</p>
3874 Definition Lists: Hacky use to indent tables, with comment before table
3880 <dl><dd><dl><dd><!-- foo --><table><tr>
3882 </tr></table></dd></dl></dd></dl>
3885 # The trailing whitespace in this test is to catch a regression in
3886 # Parsoid after T54473.
3888 Definition Lists: Hacky use to indent tables (WS-insensitive)
3897 </td></tr></table></dd></dl>
3901 <tbody><tr><td>a</td></tr>
3902 </tbody></table> </dd></dl>
3905 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3906 ## as an empty dt item. It also ignores all but the last ";" when followed
3907 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3908 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3911 ## Ex: ";;t2 ::d2" is transformed into:
3923 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3924 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3935 ## All Parsoid only definition list tests have this difference.
3937 ## See also: https://phabricator.wikimedia.org/T8569
3938 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3941 Table / list interaction: indented table with lists in table contents
3956 <ul><li> b</li></ul>
3960 <ul><li> d</li></ul>
3961 </td></tr></table></dd></dl>
3966 Table / list interaction: lists nested in tables nested in indented lists
3989 </td></tr></table></dd></dl>
3996 Definition Lists: Nesting: Multi-level (Parsoid only)
4026 Definition Lists: Nesting: Test 2 (Parsoid only)
4053 Definition Lists: Nesting: Test 3 (Parsoid only)
4096 Definition Lists: Nesting: Test 4
4101 <dl><dd><dl><dd><dl><dt>t3</dt>
4102 <dd>d3</dd></dl></dd></dl></dd></dl>
4107 ## The Parsoid team believes the following three test exposes a
4108 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4109 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4110 ## It also exposes a "misfeature" in tidy, which doesn't like
4111 ## <dl> tags with a single <dt> child; it converts the <dt> into
4112 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4114 Definition Lists: Mixed Lists: Test 1
4120 <dl><dd><dl><dt><ul><li> foo</li>
4121 <li> bar</li></ul></dt></dl>
4122 <dl><dt> baz</dt></dl></dd></dl>
4157 Definition Lists: Mixed Lists: Test 2
4162 <ul><li><dl><dd> d1</dd>
4163 <dd> d2</dd></dl></li></ul>
4169 Definition Lists: Mixed Lists: Test 3
4174 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4175 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4181 Definition Lists: Mixed Lists: Test 4
4186 <ul><li><dl><dt>d1 </dt>
4189 <dd>d4</dd></dl></li></ul>
4195 Definition Lists: Mixed Lists: Test 5
4201 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4207 Definition Lists: Mixed Lists: Test 6
4212 <ol><li><ul><li><dl><dd>d1
4213 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4219 Definition Lists: Mixed Lists: Test 7
4224 <dl><dd><ul><li> d1</li>
4225 <li> d2</li></ul></dd></dl>
4231 Definition Lists: Mixed Lists: Test 8
4236 <dl><dd><ul><li> d1</li></ul>
4237 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4243 Definition Lists: Mixed Lists: Test 9
4247 <ul><li><dl><dt>foo </dt>
4248 <dd>bar</dd></dl></li></ul>
4254 Definition Lists: Mixed Lists: Test 10
4258 <ul><li><ol><li><dl><dt>foo </dt>
4259 <dd>bar</dd></dl></li></ol></li></ul>
4263 # The Parsoid team disagrees with the PHP parser's seemingly-random
4264 # rules regarding dd/dt on the next two tests. Parsoid is more
4265 # consistent, and recognizes the shared nesting and keeps the
4266 # still-open tags around until the nesting is complete.
4267 # (And tidy again converts <dt> to <dd> before 'bar'.)
4270 Definition Lists: Mixed Lists: Test 11
4275 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4276 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4277 <dl><dt>boo </dt>
4278 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4333 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4334 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4338 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4339 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4348 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4350 # * The test is wrong, there are two colons where there should be :;
4351 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4353 Definition Lists: Weird Ones: Test 1
4355 *#;*::;; foo : bar (who uses this?)
4357 <ul><li><ol><li><dl><dt> foo </dt>
4358 <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>
4377 <dt>bar (who uses this?)</dt>
4409 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4410 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4422 Definition Lists: colons occurring in tags
4440 <dt><span>a:b</span></dt>
4467 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4469 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4470 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4471 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4472 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4474 <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>
4475 <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>
4476 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4480 Definition Lists: colons and tables 1
4492 </td></tr></table></dd></dl>
4496 </td></tr></table></dd></dl>
4500 # Parsoid's output (as documented below) differs from php's in this case.
4501 # This is probably a bug. If we fixup parsoid to match php's output, the
4502 # above test should pass and the below test case can be removed. It is
4503 # unclear which output is more desirable.
4506 Definition Lists: colons and tables 2
4518 </td></tr></table></dd>
4522 </td></tr></table></dd></dl>
4526 Definition Lists: template interaction
4528 ::{{definition_list}}
4531 ::{{definition_list}}
4536 <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">
4537 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4539 <dl><dd data-parsoid='{}'>one
4540 <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">
4541 </span><dd about="#mwt2">two
4543 <dd>three</dd></dl></dd>
4544 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4552 External links: non-bracketed
4554 Non-bracketed: http://example.com
4556 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4560 # parsoid doesn't explicitly mark autonumbered links, see T55505
4562 External links: numbered
4564 Numbered: [http://example.com]
4565 Numbered: [http://example.net]
4566 Numbered: [http://example.com]
4568 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4569 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4570 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4573 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4574 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4575 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4579 External links: specified text
4581 Specified text: [http://example.com link]
4583 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4588 External links: trail
4590 Linktrails should not work for external links: [http://example.com link]s
4592 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4597 External links: dollar sign in URL
4599 http://example.com/1$2345
4601 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4605 # parsoid doesn't explicitly mark autonumbered links, see T55505
4607 External links: dollar sign in URL (autonumber)
4609 [http://example.com/1$2345]
4611 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4614 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4618 External links: open square bracket forbidden in URL (T6377)
4620 parsoid=wt2html,wt2wt,html2html
4622 http://example.com/1[2345
4624 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4627 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4631 External links: open square bracket forbidden in URL (named) (T6377)
4633 parsoid=wt2html,html2html
4635 [http://example.com/1[2345]
4637 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4640 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4643 # parsoid adds a space before the link name
4645 External links: open square bracket forbidden in URL (named) (T6377)
4648 [http://example.com/1 [2345]
4650 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4655 External links: nowiki in URL link text (T8230)
4657 [http://example.com/ <nowiki>''example site''</nowiki>]
4659 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4664 External links: newline forbidden in text (T8230 regression check)
4666 [http://example.com/ first
4669 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4675 External links: Pipe char between url and text
4677 [http://example.com | link]
4679 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4684 External links: protocol-relative URL in brackets
4686 [//example.com/ Test]
4688 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4692 # parsoid doesn't explicitly mark autonumbered links, see T55505
4694 External links: protocol-relative URL in brackets without text
4698 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4701 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4705 External links: protocol-relative URL in free text is left alone
4709 <p>//example.com/Foo
4714 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4716 foo//example.com/Foo
4718 <p>foo//example.com/Foo
4723 External links: with no contents
4725 [http://en.wikipedia.org/wiki/Foo]
4727 [[wikipedia:Foo|Bar]]
4729 [[wikipedia:Foo|<span>Bar</span>]]
4731 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4732 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4733 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4736 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4737 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4738 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4742 External links: Free with trailing punctuation
4752 http://example.com/url_with_(brackets)
4753 (http://example.com/url_without_brackets)
4754 http://example.com/url_with_entity&
4755 http://example.com/url_with_entity&
4756 http://example.com/url_with_entity&
4757 http://example.com/url_with_entity
4758 http://example.com/url_with_entity 
4759 http://example.com/url_with_entity 
4760 http://example.com/url_with_entity<
4761 http://example.com/url_with_entity<
4762 http://example.com/url_with_entity<
4764 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4765 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4766 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4767 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4768 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4769 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4770 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4771 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4772 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4773 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4774 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4775 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4776 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4777 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4778 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4779 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4780 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4781 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4782 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4785 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4786 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4787 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4788 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4789 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4790 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4791 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4792 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4793 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4794 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4795 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4796 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4797 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4798 <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>
4799 <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>
4800 <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>
4801 <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>
4802 <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>
4803 <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>
4807 External links: tricky Parsoid html2html case
4809 parsoid=wt2html,wt2wt,html2html
4811 http://example.com/url_with_entity&amp;
4813 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4816 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4820 External links: Free with trailing quotes (T113666)
4822 '''News:''' Stuff here
4826 <p><b>News:</b> Stuff here
4827 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4830 <p><b>News:</b> Stuff here</p>
4831 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4835 External links: with entity
4837 [http:// www.librarieswithoutborders.org Libraries without borders]
4839 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4842 <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>
4846 External links: Lone protocols are never linked (T105697)
4865 External links: No preceding word characters allowed (T67278)
4867 NOPEhttp://example.com
4868 N0http://example.com
4869 ok:http://example.com
4870 ok-http://example.com
4872 <p>NOPEhttp://example.com
4873 N0http://example.com
4874 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4875 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4880 External links: nofollow domain exception
4882 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4884 <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>.
4891 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4893 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4898 External image from https
4900 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4902 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4907 External image (when not allowed)
4909 wgAllowExternalImages=0
4911 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4913 <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>
4918 Link to non-http image, no img tag
4920 Link to non-http image, no img tag: ftp://example.com/test.jpg
4922 <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>
4927 External links: terminating separator
4929 Terminating separator: http://example.com/thing,
4931 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4936 External links: intervening separator
4938 Intervening separator: http://example.com/1,2,3
4940 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4945 External links: old bug with URL in query
4947 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4949 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4954 External links: old URL-in-URL bug, mixed protocols
4956 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4958 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4962 # Since Parsoid is starting to emit canonical wikitext for links,
4963 # [http://example.com http://example.com] will not RT back to that
4966 External links: URL in text
4970 URL in text: [http://example.com http://example.com]
4972 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4975 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4979 External links: Clickable images
4981 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4983 <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>
4986 <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>
4990 External links: raw ampersand
4992 Old & use: http://x&y
4994 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4999 External links: encoded ampersand
5001 Old & use: http://x&y
5003 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5006 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
5010 External links: encoded equals (T8102)
5012 http://example.com/?foo=bar
5014 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5017 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5021 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5022 ## does it number them. As discussed in T55505, we can identify
5023 ## autonumbered links via CSS.
5027 External links: [raw ampersand]
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>
5037 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5038 # mode will return the [raw ampersand] wikitext
5040 External links: [encoded ampersand]
5042 parsoid=wt2html,wt2wt,html2html
5044 Old & use: [http://x&y]
5046 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5049 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5053 External links: [raw equals]
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 # note that parsoid html is identical to [raw equals] case; so html2wt
5064 # mode will return the [raw equals] wikitext
5066 External links: [encoded equals] (T8102)
5068 parsoid=wt2html,wt2wt,html2html
5070 [http://example.com/?foo=bar]
5072 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5075 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5078 # xxx parsoid strips the IDN character, so the round-trip tests will
5079 # obviously fail and are disabled. --cscott
5081 External links: [IDN ignored character reference in hostname; strip it right off]
5083 parsoid=wt2html,wt2wt,html2html
5085 [http://e‌xample.com/]
5087 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5090 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5093 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5094 # Where an external link could easily circumvent the sanitization of the text of
5095 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5096 # test demands a higher standard. That's a bit strange.
5100 # http://example.com -> [http://example.com|http://example.com]
5101 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5103 # The first example is sanitized, but the second is not. Any security benefits
5104 # from this production are trivial to circumvent. Either remove this test and
5105 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5106 # the test accordingly.
5110 # xxx parsoid strips the IDN character, so the round-trip tests will
5111 # obviously fail and are disabled. --cscott
5113 External links: IDN ignored character reference in hostname; strip it right off
5115 parsoid=wt2html,html2html
5117 http://e‌xample.com/
5119 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5122 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5126 External links: www.jpeg.org (T2554)
5130 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5134 # parsoid doesn't explicitly mark autonumbered links, see T55505
5136 External links: URL within URL (T2002)
5138 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5140 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5143 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5147 T2361: URL inside bracketed URL
5149 [http://www.example.com/foo http://www.example.com/bar]
5151 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5156 T2361: URL within URL, not bracketed
5158 http://www.example.com/foo?=http://www.example.com/bar
5160 <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>
5165 T2289: ">"-token in URL-tail
5167 http://www.example.com/<hello>
5169 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5174 T2289: literal ">"-token in URL-tail
5176 http://www.example.com/<b>html</b>
5178 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5181 <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>
5185 T2289: ">"-token in bracketed URL
5187 [http://www.example.com/<hello> stuff]
5189 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5194 T2289: literal ">"-token in bracketed URL
5196 [http://www.example.com/<b>html</b> stuff]
5198 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5203 T2289: literal double quote at end of URL
5205 http://www.example.com/"hello"
5207 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5212 T2289: literal double quote in bracketed URL
5214 [http://www.example.com/"hello" stuff]
5216 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5221 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5223 [http://www.example.com test]
5225 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5230 External links: link text with spaces
5232 [http://www.example.com a b c]
5233 [http://www.example.com ''a'' ''b'']
5235 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5236 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5241 External links: wiki links within external link (T5695)
5243 parsoid=wt2html,html2html
5245 [http://example.com [[wikilink]] embedded in ext link]
5247 <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>
5250 <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>
5254 T2787: Links with one slash after the url protocol are invalid
5258 [http:/example.com title]
5260 <p>http:/example.com
5261 </p><p>[http:/example.com title]
5266 Bracketed external links with template-generated invalid target
5268 [{{echo|http:/example.com}} title]
5270 <p>[http:/example.com title]
5275 T4702: Mismatched <i>, <b> and <a> tags are invalid
5277 ''[http://example.com text'']
5278 [http://example.com '''text]'''
5279 ''Something [http://example.com in italic'']
5280 ''Something [http://example.com mixed''''', even bold]'''
5281 '''''Now [http://example.com both''''']
5283 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5284 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5285 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5286 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5287 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5295 http://www.example.com/?title=AT%26T
5297 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5300 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5303 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5304 # % is actually legal in HTML5. Any change in output would need testing though.
5306 T6781, T7267: %25 in URL
5308 http://www.example.com/?title=100%25_Bran
5310 <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>
5313 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5317 T6781, T7267: %28, %29 in URL
5319 http://www.example.com/?title=Ben-Hur_%281959_film%29
5321 <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>
5324 <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>
5329 T6781: %26 in autonumber URL
5331 [http://www.example.com/?title=AT%26T]
5333 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5336 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5340 T6781, T7267: %26 in autonumber URL
5342 [http://www.example.com/?title=100%25_Bran]
5344 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5347 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5351 T6781, T7267: %28, %29 in autonumber URL
5353 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5355 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5358 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5363 T6781: %26 in bracketed URL
5365 [http://www.example.com/?title=AT%26T link]
5367 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5370 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5374 T6781, T7267: %25 in bracketed URL
5376 [http://www.example.com/?title=100%25_Bran link]
5378 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5383 T6781, T7267: %28, %29 in bracketed URL
5385 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5387 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5390 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5394 External link containing a period in the anchor. (T65947)
5396 [//foo.org/bar#baz. bang]
5398 [//foo.org/bar. bang]
5400 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5401 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5404 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5405 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5409 External link containing a single quote. (T65947)
5413 [//foo.org/bar'baz bang]
5415 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5416 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5419 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5420 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5424 External link containing double-single-quotes in text '' (T6598 sanity check)
5426 Some [http://example.com/ pretty ''italics'' and stuff]!
5428 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5433 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5435 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5437 <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>
5442 External link containing double-single-quotes with no space separating the url from text in italics
5444 [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]].]
5446 <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>
5449 <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>
5451 <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>
5455 External link with comments in link text
5457 [http://www.google.com Google <!-- comment -->]
5459 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5462 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5466 External link to bare IPv4 address
5468 [http://192.168.0.1 Link]
5470 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5473 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5477 URL-encoding in URL functions (single parameter)
5479 {{localurl:Some page|amp=&}}
5481 <p>/index.php?title=Some_page&amp=&
5486 URL-encoding in URL functions (multiple parameters)
5488 {{localurl:Some page|q=?&=&}}
5490 <p>/index.php?title=Some_page&q=?&amp=&
5497 http://example.com/index.php?foozoid%5B%5D=bar
5499 http://example.com/index.php?foozoid[]=bar
5501 <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>
5502 </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>
5505 <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>
5507 <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>
5511 IPv6 urls, autolink format (T23261)
5513 http://[2404:130:0:1000::187:2]/index.php
5515 Examples from RFC 2373, section 2.2:
5516 * http://[1080::8:800:200C:417A]/unicast
5517 * http://[FF01::101]/multicast
5518 * http://[::1]/loopback
5519 * http://[::]/unspecified
5520 * http://[::13.1.68.3]/ipv4compat
5521 * http://[::FFFF:129.144.52.38]/ipv4compat
5523 Examples from RFC 2732, section 2:
5524 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5525 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5526 * http://[3ffe:2a00:100:7031::1]
5527 * http://[1080::8:800:200C:417A]/foo
5528 * http://[::192.9.5.5]/ipng
5529 * http://[::FFFF:129.144.52.38]:80/index.html
5530 * http://[2010:836B:4179::836B:4179]
5533 <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>
5534 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5536 <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>
5537 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5538 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5539 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5540 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5541 <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>
5542 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5544 <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>
5545 <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>
5546 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5547 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5548 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5549 <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>
5550 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5553 <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>
5555 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5556 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5557 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5558 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5559 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5560 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5561 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5563 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5564 <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>
5565 <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>
5566 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5567 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5568 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5569 <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>
5570 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5574 IPv6 urls, bracketed format (T23261)
5576 [http://[2404:130:0:1000::187:2]/index.php test]
5578 Examples from RFC 2373, section 2.2:
5579 * [http://[1080::8:800:200C:417A] unicast]
5580 * [http://[FF01::101] multicast]
5581 * [http://[::1]/ loopback]
5582 * [http://[::] unspecified]
5583 * [http://[::13.1.68.3] ipv4compat]
5584 * [http://[::FFFF:129.144.52.38] ipv4compat]
5586 Examples from RFC 2732, section 2:
5587 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5588 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5589 * [http://[3ffe:2a00:100:7031::1] 3]
5590 * [http://[1080::8:800:200C:417A]/foo 4]
5591 * [http://[::192.9.5.5]/ipng 5]
5592 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5593 * [http://[2010:836B:4179::836B:4179] 7]
5596 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5597 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5599 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5600 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5601 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5602 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5603 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5604 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5605 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5607 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5608 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5609 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5610 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5611 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5612 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5613 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5616 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5618 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5619 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5620 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5621 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5622 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5623 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5624 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5626 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5627 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5628 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5629 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5630 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5631 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5632 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5633 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5637 Non-extlinks in brackets
5646 [{{echo|foo}} ''bar'']
5647 [{{echo|foo}}l's] errand
5648 [{{echo|foo}}l's errand]
5650 [url=http://example.com]
5651 [http:// bare protocols don't count]
5664 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5665 [http:// bare protocols don't count]
5673 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5674 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5675 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5676 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5677 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5678 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5679 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5680 [http:// bare protocols don't count]</p>
5684 Percent encoding in external links
5686 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5688 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5691 <p><a rel="mw:ExtLink"
5692 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5696 Use url link syntax for links where the content is equal the link target
5700 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5703 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5707 Parenthesis in external links, especially URL links
5711 http://example.com/test)
5713 http://example.com/(test)
5715 http://example.com/((test)
5717 (http://example.com/(test))
5719 (http://example.com/(test)))))
5721 http://example.com/a)b
5723 [http://example.com) foo]
5725 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5726 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5727 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5728 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5729 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5730 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5731 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5732 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5735 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5736 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5737 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5738 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5739 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5740 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5741 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5742 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5746 Parenthesis in external links, w/ transclusion or comment
5748 (http://example.com/{{echo|hi}})
5750 (http://example.com<!-- hi -->)
5752 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5753 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5756 <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>
5758 <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>
5762 Serialize <a> tags with invalid link targets as plain text
5764 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5766 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5767 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5768 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5769 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5772 <nowiki>*</nowiki>text
5773 <nowiki>[[foo]]</nowiki>
5774 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5778 mw:ExtLink -vs- mw:WikiLink (T94723)
5782 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5783 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5784 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5785 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5787 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5788 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5793 [[wikipedia:Foo|Bar]]
5794 [[wikipedia:Foo|Bar]]
5796 [[wikipedia:European_Robin|European Robin]]
5797 [[wikipedia:European_Robin|European Robin]]
5801 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5805 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5807 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5818 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5820 Normal text. '''''Bold italic text.''''' Normal text.
5822 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5823 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5828 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5829 # parser strips. The wikitext contains just the first half of the bold
5832 Unclosed and unmatched quotes
5834 '''''Bold italic text '''with bold deactivated''' in between.'''''
5836 '''''Bold italic text ''with italic deactivated'' in between.'''''
5840 ..spanning two paragraphs (should not work).'''
5842 '''Bold tag left open
5844 ''Italic tag left open
5848 <!-- Unmatching number of opening, closing tags: -->
5849 '''This year''''s election ''should'' beat '''last year''''s.
5851 ''Tom'''s car is bigger than ''Susan'''s.
5853 Plain ''italic'''s plain
5855 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5856 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5857 </p><p><b>Bold text..</b>
5858 </p><p>..spanning two paragraphs (should not work).
5859 </p><p><b>Bold tag left open</b>
5860 </p><p><i>Italic tag left open</i>
5862 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5863 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5864 </p><p>Plain <i>italic'</i>s plain
5867 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5868 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5869 </p><p><b>Bold text..</b>
5870 </p><p>..spanning two paragraphs (should not work).<b></b>
5871 </p><p><b>Bold tag left open</b>
5872 </p><p><i>Italic tag left open</i>
5875 <!-- Unmatching number of opening, closing tags: -->
5876 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5877 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5878 </p><p>Plain <i>italic'</i>s plain
5885 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5888 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5889 # is the bare minimum required by the spec, see:
5890 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5891 # Parsoid team replies: empty table tags are legal in HTML5
5893 A table with no data.
5906 A table with stray table end tags on start tag line (wt2html)
5910 {|style="color: red;"|}
5912 {|style="color: red;" |}
5916 {|style="color: red;"|} id="foo"
5920 {|style="color: red;" |} id="foo"
5924 <table style="color: red;"></table>
5926 <table style="color: red;">
5932 <table style="color: red;" id="foo">
5938 <table style="color: red;" id="foo">
5947 A table with no data (take 2)
5955 # A table with nothing but a caption is invalid XHTML, we might want to render
5956 # this as <p>caption</p>
5957 # Parsoid team replies: table with only a caption is legal in HTML5
5959 A table with nothing but a caption
5967 </caption><tr><td></td></tr></table>
5970 <table><caption> caption</caption></table>
5974 A table with caption with default-spaced attributes and a table row
5977 |+ style="color: red;" | caption1
5983 <caption style="color: red;"> caption1
5992 A table with captions with non-default spaced attributes and a table row
5995 |+style="color: red;"|caption2
5996 |+ style="color: red;"| caption3
6002 <caption style="color: red;">caption2
6004 <caption style="color: red;"> caption3
6013 Table td-cell syntax variations
6017 | foo bar foo || baz
6018 | style='color:red;' | baz
6019 | style='color:red;' || baz
6026 <td> foo bar foo </td>
6029 <td style="color:red;"> baz
6031 <td> style='color:red;' </td>
6059 Simple table but with multiple dashes for row wikitext
6078 Multiplication table
6080 {| border="1" cellpadding="2"
6081 |+Multiplication table
6083 ! × !! 1 !! 2 !! 3
6101 <table border="1" cellpadding="2">
6102 <caption>Multiplication table
6149 Accept "||" in table headings
6164 Accept "!!" in table data
6178 <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>
6183 Accept "||" in indented table headings
6193 </th></tr></table></dd></dl>
6198 Accept "!!" in templates
6212 <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>
6216 Accept "!!" in table headings after newline
6233 <p>b!!c</p></th></tr>
6238 Accept "!!" in table data of mixed wikitext / html syntax
6242 <tr><td>b!!c</td></tr>
6255 <tbody><tr><th>a</th></tr>
6256 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6261 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6278 Accept "| !" at start of line in tables (ignore !-attribute)
6282 | !style="color:red" | bar
6294 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 +/-
6298 |style='color:red;'|+1
6299 |style='color:blue;'|-1
6311 <td style="color:red;">+1
6313 <td style="color:blue;">-1
6337 |rowspan=2| Cell 2, row 1 (and 2)
6348 <td rowspan="2"> Cell 2, row 1 (and 2)
6366 {| bgcolor=#ABCDEF border=2
6371 |the original table again
6379 <table bgcolor="#ABCDEF" border="2">
6387 <td>the original table again
6393 Invalid attributes in table cell (T3830)
6407 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6411 | title="foo<nowiki>|</nowiki>" |bar
6412 | title="foo<nowiki>|</nowiki>" bar
6419 <td title="foo|">bar
6421 <td> title="foo|" bar
6426 <tbody><tr><td title="foo">bar</td>
6427 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6428 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6432 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6433 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6434 # *2wt modes will fail.
6436 Table security: embedded pipes
6438 parsoid=wt2html,html2html
6441 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6445 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6446 <td>]" onmouseover="alert(document.cookie)">test
6454 <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>
6458 Element attributes with double ! should not be broken up by <th>
6461 ! hi <div class="!!">ha</div> ho
6466 <th> hi <div class="!!">ha</div> ho
6471 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6476 ! and || in element attributes should not be parsed as <th>/<td>
6479 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6484 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6489 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6493 # FIXME: The output seems broken. Filed as T110268.
6495 ! and || in td attributes should not be parsed as <th>/<td>
6500 | style="color: red !important;" data-contrived="put this here ||" | foo
6505 <td> style="color: red !important;" data-contrived="put this here </td>
6511 <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>
6516 Break on | in element attribute in template
6518 parsoid=wt2html,html2html
6520 {{echo|1=<div class="hi|ho">ha</div>}}
6522 <p>ho">ha</div>
6525 <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>
6529 Break on | in element attribute name in template
6531 {{echo|<div cla|ss="hiho">ha</div>}}
6533 <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>
6537 Don't break on | in extension attribute in template
6539 {{echo|<ref name="hi|ho">ha</ref>}}
6543 <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>
6545 <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>
6548 ## We don't support roundtripping of these attributes in Parsoid.
6549 ## Selective serialization takes care of preventing dirty diffs.
6550 ## But, on edits, we dirty-diff the invalid attribute text.
6552 Invalid text in table attributes should be discarded
6556 {| <span>boo</span> style='border:1px solid black'
6557 | <span>boo</span> style='color:blue' | 1
6558 |<span>boo</span> style='color:blue'| 2
6561 <table style="border:1px solid black">
6563 <td style="color:blue"> 1
6565 <td style="color:blue"> 2
6569 <table style="border:1px solid black">
6571 <td style="color:blue"> 1</td>
6572 <td style="color:blue"> 2</td>
6578 Invalid text in table attributes should be preserved by selective serializer
6581 "modes": ["selser"],
6583 ["td:first-child", "text", "abc"],
6584 ["td + td", "text", "xyz"]
6588 {| <span>boo</span> style='border:1px solid black'
6589 | <span>boo</span> style='color:blue' | 1
6590 |<span>boo</span> style='color:blue'| 2
6593 {| <span>boo</span> style='border:1px solid black'
6594 | <span>boo</span> style='color:blue' |abc
6595 |<span>boo</span> style='color:blue'|xyz
6600 1. Template-generated table cell attributes and cell content
6605 || {{table_attribs_5}}
6606 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6607 |align=center {{table_attribs}}
6608 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6613 <td style="color:red;">Foo
6615 <td style="color:red;">Foo
6617 <td> style="color:red;"</td>
6620 <td style="color:red;">Foo
6622 <td align="center" style="color:red;">Foo
6624 <td align="center" style="color:red;">Foo
6630 2. Template-generated table cell attributes and cell content
6633 |{{table_attribs_2}}
6638 <td style="color:red;">Foo
6646 <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>
6647 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6652 3. Template-generated table cell attributes and cell content
6655 !align=center {{table_header_cells}}
6657 |align=center {{table_cells}}
6662 <th align="center" style="color:red;">Foo</th>
6663 <th style="color:red;"><i>Bar</i></th>
6664 <th style="color:brown;"><i>Foo</i> and Baz
6667 <td align="center" style="color:red;">Foo</td>
6668 <td style="color:red;"><i>Bar</i></td>
6669 <td style="color:brown;"><i>Foo</i> and Baz
6674 <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>
6675 <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>
6680 4. Template-generated table cell attributes and cell content inside a templated table
6683 !align=center {{table_header_cells}}
6685 |align=center {{table_cells}}
6690 <th align="center" style="color:red;">Foo</th>
6691 <th style="color:red;"><i>Bar</i></th>
6692 <th style="color:brown;"><i>Foo</i> and Baz
6695 <td align="center" style="color:red;">Foo</td>
6696 <td style="color:red;"><i>Bar</i></td>
6697 <td style="color:brown;"><i>Foo</i> and Baz
6701 <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}}]}'>
6702 <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>
6704 <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>
6708 ## Edge case fix to prevent future regressions
6710 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6713 |{{table_attribs_7}}
6718 <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>
6720 <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>
6724 Table with row followed by newlines and table heading
6726 parsoid=wt2html,html2html
6744 Table with empty line following the start tag
6746 parsoid=wt2html,html2html
6764 Table attributes with empty value
6766 parsoid=wt2html,html2html
6779 <tbody><tr><td style=""> hello</td></tr>
6784 Wikitext table with a lot of comments
6807 Wikitext table comments represented in parsoid dom
6809 {|<!--c1--><!--c2-->
6820 <table><!--c1--><!--c2-->
6821 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6822 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6827 Wikitext table with double-line table cell
6844 Table cell with a single comment
6861 Table-cell after a comment-only-empty-line
6878 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6880 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6886 Build table with {{!}}
6888 {{{!}} class="wikitable"
6891 {{!}}- style="color:red;"
6892 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6895 <table class="wikitable">
6901 <tr style="color:red;">
6903 <td style="color:red;"> second data
6909 Build table with pipe as data
6911 {| class="wikitable"
6914 |- style="color:red;"
6915 | data || style="color:red;" | second data
6917 | style="color:red;" | data with | || style="color:red;" | second data with |
6919 || data with | ||| second data with |
6922 <table class="wikitable">
6928 <tr style="color:red;">
6930 <td style="color:red;"> second data
6933 <td style="color:red;"> data with | </td>
6934 <td style="color:red;"> second data with |
6937 <td> data with | </td>
6938 <td> second data with |
6944 Build table with wikilink
6946 {| class="wikitable"
6947 ! header || second header
6948 |- style="color:red;"
6949 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6951 | data || second data [[Main Page|link|text with pipe]]
6954 <table class="wikitable">
6959 <tr style="color:red;">
6960 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6961 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6965 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6970 # The expected HTML structure in this test is debatable. The PHP parser does
6971 # not parse this kind of table at all. The main focus for Parsoid is on
6972 # round-tripping, so this output is ok for now. TODO: revisit!
6974 Wikitext table with html-syntax row
6984 <td>foo</td></tr></tbody></table>
6988 Implicit <td> after a |-
6990 parsoid=wt2html,html2html
7005 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7006 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7008 </tr></tbody></table>
7012 Lists should be recognized in an implicit <td> context
7014 parsoid=wt2html,html2html
7031 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7032 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7034 </tr></tbody></table>
7038 Table cells not properly parsed in an implicit-td context
7042 {{table_attribs_4}} || a || b
7047 <td style="background-color:#DC241f;" width="10px"></td>
7054 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7055 <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}}," || a || b"]}'> </td><td about="#mwt1"> a </td><td about="#mwt1"> b</td></tr>
7059 Parsoid: Round-trip tables directly followed by content (T53219)
7061 parsoid=wt2html,wt2wt
7086 Parsoid: Default to a newline after tables in new content (T53219)
7091 <tr><td>foo</td></tr></tbody></table> bar
7093 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7098 <nowiki> </nowiki>bar
7106 Parsoid: newline inducing block nodes don't suppress <nowiki>
7118 Parsoid: Row-syntax table headings followed by comment & table cells
7120 parsoid=wt2html,wt2wt
7124 <!-- foo --> || baz || quux
7138 <tbody><tr><th> foo </th><th> bar
7139 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7144 Parsoid: Recover better from broken table attributes
7164 <p>foo</p></td></tr>
7169 Tables: Digest broken attributes on table and tr tag
7185 # T137406: Whitespace in the HTML
7187 1. Generate correct wikitext for tables with thead/tbody/tfoot
7192 <caption>Test</caption>
7233 <caption>Test</caption>
7253 # T137406: No whitespace in the HTML
7255 2. Generate correct wikitext for tables with thead/tbody/tfoot
7259 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7269 Testing serialization after deletion in references
7278 hi <ref><div id="x">ho</div></ref>
7288 Testing serialization after deletion of table cells
7291 "modes": ["wt2wt", "selser"],
7299 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7309 Testing selser after addition of new row before first row (T125419)
7312 "modes": ["wt2wt", "selser"],
7314 [ "tr", "before", "<tr><td>X</td></tr>" ]
7330 Serialize new table rows in a HTML table using HTML tags
7333 "modes": ["wt2wt", "selser"],
7335 [ "tr", "before", "<tr><td>X</td></tr>" ]
7339 <table><tr><td>a</td></tr></table>
7341 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7345 Serialize new table cells in a HTML row using HTML tags
7348 "modes": ["wt2wt", "selser"],
7350 [ "td", "before", "<td>X</td>" ]
7354 <table><tr><td>a</td></tr></table>
7356 <table><tr><td>X</td><td>a</td></tr></table>
7360 Wikitext tables can be nested inside HTML tables
7364 <table data-parsoid='{"stx":"html"}'>
7367 <tr><td>foo</td></tr>
7382 Serialize wikitext list items as HTML list items when embedded in a HTML list
7386 <ul data-parsoid='{"stx": "html"}'>
7387 <li data-parsoid='{}'>a</li>
7397 # SSS FIXME: Is this actually a good thing given the
7398 # odd nested list output that is generated by MW?
7399 # <ul><li>foo<ul>..</ul></li></ul> instead of
7400 # <ul><li>foo</li><ul>..</ul></ul>
7402 Wikitext lists can be nested inside HTML lists
7406 <ul data-parsoid='{"stx": "html"}'>
7407 <li data-parsoid='{"stx": "html"}'>a
7412 <ul data-parsoid='{"stx": "html"}'>
7435 Plain link, capitalized
7439 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7444 Plain link, uncapitalized
7448 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7455 [[Main Page|The Main Page]]
7457 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7462 Piped link with comment in link text
7464 [[Main Page|The Main<!--front--> Page]]
7466 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7471 Piped link with multiple pipe characters in link text
7473 [[Main Page||The|Main|Page|]]
7475 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7478 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7482 Piped link with no link text
7484 [[Thomas Bek (bishop of St David's)|]]
7486 <p>[[Thomas Bek (bishop of St David's)|]]
7489 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7493 Piped link with empty link text
7495 [[Main Page|<nowiki/>]] - empty nowiki
7496 [[Main Page| ]] - empty space
7497 [[Main Page| ]] - empty non breaking space
7499 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7500 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7501 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7504 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7505 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7506 <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>
7514 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7519 Broken link with fragment
7521 [[Zigzagzogzagzig#zug]]
7523 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7528 Special page link with fragment
7530 [[Special:Version#anchor]]
7532 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7537 Nonexistent special page link with fragment
7539 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7541 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7548 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7550 <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>
7557 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7559 <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>!!!
7570 T45661: Piped links with identical prefixes
7572 [[prefixed article|prefixed articles with spaces]]
7574 [[prefixed article|prefixed articlesaoeu]]
7576 [[Main Page|Main Page test]]
7578 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7579 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7580 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7586 Link with HTML entity in suffix / tail
7588 [[Main Page]]", [[Main Page]]a
7590 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7593 <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>
7597 Link with 3 brackets
7608 Link with 4 brackets
7612 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7617 Piped link with 3 brackets
7619 [[[main page|the main page]]]
7621 <p>[[[main page|the main page]]]
7626 Piped link with extlink-like text
7629 [[Main Page|This is a [bar]]]
7631 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7632 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7635 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7636 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7640 Link with multiple pipes
7642 [[Main Page|The|Main|Page]]
7644 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7649 Anchor containing a #. (T65430)
7651 [[Main Page#And#Link]]
7653 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7656 <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>
7662 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7664 <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>
7669 Link with space in namespace
7671 [[User talk:Foo bar]]
7673 <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>
7678 MemoryAlpha:AlphaTest
7680 This is an article in the MemoryAlpha namespace
7681 (which shadows the memoryalpha interwiki link).
7685 Namespace takes precedence over interwiki link (T53680)
7687 [[MemoryAlpha:AlphaTest]]
7689 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7693 # The previous test doesn't work correctly in html2*, due to not recognizing the
7694 # link as an internal one. This one checks for the correct behavior.
7696 Link to namespace preferred over interwiki with correct rel attribute
7698 parsoid=html2wt,html2html
7700 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7702 [[MemoryAlpha:AlphaTest]]
7706 Piped link to namespace
7708 [[Meta:Disclaimers|The disclaimers]]
7710 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7717 [[Usually caused by a typo (oops}]]
7719 <p>[[Usually caused by a typo (oops}]]
7726 Just a test of an article title containing a percent.
7730 Link containing % (not as a hex sequence)
7733 [[7% Solution|7%25 Solution]]
7735 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7736 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7739 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7740 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7743 # note that the parsoid HTML is identical to the previous test output,
7744 # so the previous test ensures that the html2wt mode will generate the
7745 # "not as a hex sequence" wikitext.
7747 Link containing % as a single hex sequence interpreted to char
7749 parsoid=wt2wt,wt2html,html2html
7752 [[7%25 Solution|7%25 Solution]]
7754 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7755 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7758 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7759 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7763 Link containing % as a double hex sequence interpreted to hex sequence
7767 <p>[[7%2525 Solution]]
7771 ## Example for such a section: == < ==
7773 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7775 [[%23%3c]][[%23%3e]]
7777 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7780 <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>
7784 Link containing "<#" and ">#" as a hex sequences
7786 [[%3c%23]][[%3e%23]]
7788 <p>[[%3c%23]][[%3e%23]]
7793 Link containing an equals sign
7795 [[Special:BookSources/isbn=4-00-026157-6]]
7797 <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>
7800 <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>
7806 Just a test of an article title containing a tilde.
7809 # note that links containing signatures, like [[Foo~~~~]], are
7810 # massaged by the pre-save transform (PST) and so the tildes are never
7811 # seen by the parser.
7813 Link containing a tilde
7817 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7820 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7824 Link containing double-single-quotes '' (T6598)
7826 [[Lista d''e paise d''o munno]]
7828 <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>
7831 <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>
7835 Link containing double quotes and spaces
7839 <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>
7842 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7846 File containing double quotes and spaces
7848 [[File:Cool "Gator".png]]
7850 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></span></p>
7854 Redirect containing double quotes and spaces
7856 #REDIRECT [[Cool "Gator"]]
7858 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7862 Link containing double-single-quotes '' in text (T6598 sanity check)
7864 Some [[Link|pretty ''italics'' and stuff]]!
7866 <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>!
7869 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7873 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7875 ''Some [[Link|pretty ''italics'' and stuff]]!''
7877 <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>
7882 Link with double quotes in title part (literal) and alternate part (interpreted)
7884 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7888 [[''Pentecoste''|Pentecoste]]
7890 [[''Pentecoste''|''Pentecoste'']]
7892 <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>
7893 </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>
7894 </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>
7895 </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>
7898 <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>
7899 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7900 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7901 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7905 Broken image links with HTML captions (T41700)
7907 [[File:Nonexistent|<script></script>]]
7908 [[File:Nonexistent|100x100px|<script></script>]]
7909 [[File:Nonexistent|<]]
7910 [[File:Nonexistent|a<i>b</i>c]]
7912 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7913 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7914 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7915 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7918 <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>
7919 <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>
7920 <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>
7921 <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>
7927 [[http://www.example.com]]
7929 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7932 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7936 Plain link to URL with link text
7938 [[http://www.example.com Link text]]
7940 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7945 Plain link to protocol-relative URL
7947 [[//www.example.com]]
7949 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7952 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7956 Plain link to protocol-relative URL with link text
7958 [[//www.example.com Link text]]
7960 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7965 Plain link to page with question mark in title
7971 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7972 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7977 # I'm fairly sure the expected result here is wrong.
7978 # We want these to be URL links, not pseudo-pages with URLs for titles....
7979 # However the current output is also pretty screwy.
7982 # I'm changing it to match the current output--it arguably makes more
7983 # sense in the light of the test above. Old expected result was:
7984 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7986 # But I think this test is bordering on "garbage in, garbage out" anyway.
7991 Piped link to URL: [[http://www.example.com|an example URL]]
7993 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7996 <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>
8000 T2002: [[page|http://url/]] should link to page, not http://url/
8002 [[Main Page|http://url/]]
8004 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8007 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8010 # Parsoid does not mark self-links, by design.
8012 T2337: Escaped self-links should be bold
8016 [[Bug462]] [[Bug462]]
8018 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
8021 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
8023 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8027 Self-link to section should not be bold
8031 [[Main Page#section]]
8033 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8044 Self-link to numeric title
8050 <p><strong class="selflink">0</strong>
8055 Link to numeric-equivalent title
8061 <p><a href="/wiki/00" title="00">00</a>
8066 <nowiki> inside a link
8068 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8070 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8075 Non-breaking spaces in title
8077 [[ Main Page ]]
8079 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8084 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8090 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8095 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8101 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8106 Internal link with en linktrail: no apostrophes (T29473)
8112 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8117 Internal link with ca linktrail with apostrophes (T29473)
8123 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8128 Internal link with kaa linktrail with apostrophes (T29473)
8134 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8139 Link with multiple ":" in a subpage-supporting namespace (T65636)
8141 [[User:Foo/Test/63636:Bar|Test]]
8143 <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>
8146 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8149 ## Mainly a sanity check for Parsoid
8151 Handle title parsing for subpages
8171 Link to a subpage from a namespace other than main
8178 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8181 <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>
8185 Ensure that transclusion titles are not url-decoded
8187 subpage title=[[Test]]
8190 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8192 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8195 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8199 Purely hash wikilink
8201 title=[[User:Test/123]]
8206 <p><a href="#a">b</a>
8209 <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>
8213 1. Interaction of linktrail and template encapsulation
8217 <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>
8221 2. Interaction of linktrail and template encapsulation
8225 {{echo|Some [[Fool]]}}s
8227 <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>
8231 3. Interaction of linktrail and template encapsulation
8235 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8237 <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>
8247 Internal link with is link prefix
8251 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8253 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8264 Internal link with is link trail and link prefix
8268 [[mótmælendatrú|xxx]]ar
8270 mótmælenda[[söfnuður]]
8271 mótmælenda[[söfnuður|söfnuðir]]
8272 mótmælenda[[söfnuður|söfnuðir]]xxx
8274 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8275 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8276 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8277 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8278 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8283 Parsoid link trail escaping
8285 parsoid=html2wt,html2html
8287 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8293 Parsoid link prefix escaping
8296 parsoid=html2wt,html2html
8298 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8300 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8304 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8312 [http://wp.org ''foo'']
8314 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8315 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8316 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8317 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8322 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8324 [[Foo|{{echo|a}} b {{echo|c}}]]
8326 <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>
8330 Link with angle bracket after anchor
8334 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8337 <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>
8341 ### Interwiki links (see maintenance/interwiki.sql)
8345 Inline interwiki link
8347 parsoid=wt2html,wt2wt,html2html
8349 [[MeatBall:SoftSecurity]]
8351 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8354 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8358 Inline interwiki link with empty title (T4372)
8360 parsoid=wt2html,wt2wt,html2html
8364 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8367 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8371 Interwiki link encoding conversion (T3636)
8373 *[[Wikipedia:ro:Olteniţa]]
8374 *[[Wikipedia:ro:Olteniţa]]
8376 <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>
8377 <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>
8381 <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>
8382 <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>
8387 Interwiki link with fragment (T4130)
8389 [[MeatBall:SoftSecurity#foo]]
8391 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8396 Link scenarios with escaped fragments
8399 [[Foo#Is this great?]]
8400 [[meatball:Foo#Is this great?]]
8402 <p><a href="#Is_this_great.3F">#Is this great?</a>
8403 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8404 <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>
8407 <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>
8408 <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>
8409 <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>
8412 # Ideally the wikipedia: prefix here should be proto-relative too
8413 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8414 # define the 'en' prefix, and originally the test used 'wikipedia',
8415 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8418 Different interwiki prefixes mapping to the same URL
8426 [[:wikipedia:Foo|Foo]]
8428 [[wikipedia:en:Foo]]
8430 [[:wikipedia:en:Foo]]
8434 <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>
8436 <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>
8438 <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>
8440 <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>
8442 <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>
8444 <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>
8446 <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>
8450 Interwiki links that cannot be represented in wiki syntax
8453 [[meatball:ok#foo|ok with fragment]]
8454 [[meatball:ok_as_well?|ok ending with ? mark]]
8455 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8456 [http://de.wikipedia.org/wiki/#foo is just fragment]
8459 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8460 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8461 <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>
8462 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8463 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8466 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8467 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8468 <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>
8469 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8470 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8474 Interwiki links: trail
8476 [[wikipedia:Foo|Ba]]r
8478 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8481 <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>
8485 Local interwiki link
8487 parsoid=wt2html,wt2wt,html2html
8489 [[local:Template:Foo]]
8491 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8494 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8497 # Parsoid does not mark self-links, by design.
8499 Local interwiki link: self-link to current page
8502 parsoid=wt2html,wt2wt,html2html
8506 <p><strong class="selflink">local:Main Page</strong>
8509 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8513 Local interwiki link: prefix only (T66167)
8515 parsoid=wt2html,wt2wt,html2html
8519 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8522 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8526 Local interwiki link: with additional interwiki prefix (T63357)
8528 parsoid=wt2html,wt2wt,html2html
8530 [[local:meatball:Hello]]
8532 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8535 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8539 Multiple local interwiki link prefixes
8541 [[local:local:local:local:mi:local:Foo]]
8543 parsoid=wt2html,wt2wt,html2html
8545 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8548 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8552 ### Interlanguage links
8553 ### Language links (so that searching for '### language' matches..)
8565 <p>Blah blah blah</p>
8566 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8569 ## parsoid html2wt will lose the space variations
8571 Interlanguage link with spacing
8573 parsoid=wt2html,wt2wt,html2html
8581 <p>Blah blah blah</p>
8582 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8586 Double interlanguage link
8595 <p>Blah blah blah</p>
8596 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8597 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8600 ## parsoid html2wt will lose the space variations
8602 Interlanguage link variations
8604 parsoid=wt2html,wt2wt,html2html
8614 <p>Blah blah blah</p>
8615 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8616 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8617 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8621 Escaping of interlanguage links (T129218, T156308)
8625 [[ : zh : Chinese ]]
8628 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8629 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8633 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8634 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8637 ## parsoid html2wt will normalize the space to _
8639 Space and question mark encoding in interlanguage links (T95473)
8641 parsoid=wt2html,wt2wt,html2html
8649 <p>Blah blah blah</p>
8650 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8654 Interlanguage link, with prefix links
8664 <p>Blah blah blah</p>
8665 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8669 Double interlanguage link, with prefix links (T10897)
8680 <p>Blah blah blah</p>
8681 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8682 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8686 "Extra" interlanguage links (T34189 / gerrit 111390)
8694 <p>Blah blah blah</p>
8695 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8698 ## PHP parser tests script needs an update
8699 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8701 Language links render as inline links if $wgInterwikiMagic=false
8703 wgInterwikiMagic=false
8704 parsoid=wt2html,wt2wt,html2html
8709 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8712 ## PHP parser tests script needs an update
8713 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8715 Language links render as inline links in the Talk namespace
8718 parsoid=wt2html,wt2wt,html2html
8723 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8727 Parsoid-specific test: Wikilinks with should RT properly
8733 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8738 Parsoid T55221: Wikilinks should be properly entity-escaped
8740 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8742 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8743 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8745 He&nbsp;llo [[Foo|He&nbsp;llo]]
8747 He&nbsp;llo He&nbsp;llo
8749 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8750 </p><p>He&nbsp;llo He&nbsp;llo
8754 # html2wt will fail because of title normalization without data-parsoid
8756 Parsoid: handle constructor well
8758 parsoid=wt2html,wt2wt
8764 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8765 </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>
8768 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8770 <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>
8779 # Note that `ko` isn't a known interlanguage prefix
8781 Parsoid: recognize interlanguage links without a target page
8791 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8793 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8796 # Note that `ko` isn't a known interwiki prefix
8798 Parsoid: recognize interwiki links without a target page
8800 parsoid=wt2html,wt2wt,html2html
8806 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8807 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8810 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8811 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8815 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
8819 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8822 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8826 Interlanguage link with preceding local interwiki link (T70085)
8828 parsoid=wt2html,wt2wt,html2html
8831 [[local:es:Spanish]]
8834 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8838 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8842 Looks like an interlanguage link, but is actually a local interwiki
8844 parsoid=wt2html,wt2wt,html2html
8850 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8854 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8858 ### Redirects, Parsoid-only
8862 1. Simple redirect to page
8864 #REDIRECT [[Main Page]]
8866 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8870 2. Other redirect variants
8872 #REDIRECT [[Main_Page]]
8874 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8877 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8878 # This tests the Parsoid bail-out code.
8880 3. Other redirect variants
8882 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8884 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8888 4. Redirect to a templated destination
8890 #REDIRECT [[{{echo|Foo}}bar]]
8892 <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"}]]}'/>
8898 parsoid=wt2html,wt2wt
8903 <li>REDIRECT [[]]</li></ol>
8907 Optional colon in #REDIRECT
8909 # the colon is archaic syntax. we support it for wt2html, but we
8910 # don't care that it roundtrips back to the modern syntax.
8911 parsoid=wt2html,html2html
8913 #REDIRECT:[[Main Page]]
8915 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8919 Whitespace in #REDIRECT with optional colon
8921 # the colon and gratuitous whitespace is archaic syntax. we support
8922 # it for wt2html, but we don't care that it roundtrips back to the
8923 # modern syntax (without extra whitespace)
8924 parsoid=wt2html,html2html
8931 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8935 Piped link in #REDIRECT
8937 # content after piped link is ignored. we support this syntax,
8938 # but don't care that the piped link is lost when we roundtrip this.
8941 #REDIRECT [[Main Page|bar]]
8943 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8947 Redirect to category (T104502)
8949 parsoid=wt2html,wt2wt
8951 #REDIRECT [[Category:Foo]]
8953 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8957 Redirect to category with URL encoding (T104502)
8961 #REDIRECT [[Category%3AFoo]]
8963 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8967 Redirect to category page
8969 #REDIRECT [[:Category:Foo]]
8971 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8975 Redirect to image page (1)
8977 #REDIRECT [[File:Wiki.png]]
8979 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8983 Redirect to image page (2)
8985 #REDIRECT [[Image:Wiki.png]]
8987 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8990 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8991 # Next test confirms this.
8993 Redirect to language (1) (T104918)
8995 parsoid=wt2html,wt2wt,html2html
8997 #REDIRECT [[en:File:Wiki.png]]
8999 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9003 Redirect to language (2) (T104918)
9005 #REDIRECT [[:en:File:Wiki.png]]
9007 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9011 Redirect to interwiki (T104918)
9013 #REDIRECT [[meatball:File:Wiki.png]]
9015 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9019 Non-English #REDIRECT
9023 #TILVÍSUN [[Main Page]]
9025 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9029 Redirect syntax under text isn't considered a redirect
9032 #redirect [[Main Page]]
9035 <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>
9038 # FIXME: Should hoist the redirect to the top of the page and ensure there
9045 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9065 Broken br tag sanitization
9073 # TODO: Fix html2html mode (T53055)!
9075 Parsoid: Broken br tag recognition
9088 Incorrecly removing closing slashes from correctly formed XHTML
9090 <br style="clear:both;" />
9092 <p><br style="clear:both;" />
9097 Failing to transform badly formed HTML into correct XHTML
9099 <br style="clear: left;">
9100 <br style="clear: right;">
9101 <br style="clear: both;">
9103 <p><br style="clear: left;" />
9104 <br style="clear: right;" />
9105 <br style="clear: both;" />
9109 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9110 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9112 Handling html with a div self-closing tag
9121 <p><div title />
9125 <p><div title=bar />
9126 <div title=bar/>
9128 <div title="bar/"></div>
9132 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9133 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9134 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9135 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9136 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9137 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9141 Handling html with a br self-closing tag
9168 Horizontal ruler (should it add that extra space?)
9183 Horizontal ruler -- 4+ dashes render hr
9192 Horizontal ruler -- eats additional dashes on the same line
9201 Horizontal ruler -- does not collapse dashes on consecutive lines
9212 Horizontal ruler -- <4 dashes render as plain text
9221 Horizontal ruler -- Supports content following dashes on same line
9233 ### Block-level elements
9242 <ul><li>Common list</li>
9244 <li>item 3</li></ul>
9255 <ol><li>Numbered list</li>
9257 <li> item 3</li></ol>
9271 ***#Number on level 4
9273 **#Number on level 3
9274 **#Number on level 3
9278 #** Level 3, but ordered
9281 <ol><li> with numbers</li></ol>
9282 <ul><li> and bullets</li></ul>
9283 <ol><li> and numbers</li></ol></li>
9285 <ul><li>bullet level 2
9286 <ul><li>bullet level 3
9287 <ol><li>Number on level 4</li></ol></li></ul></li>
9289 <ol><li>Number on level 3</li>
9290 <li>Number on level 3</li></ol></li></ul>
9291 <ol><li>number level 2</li></ol></li>
9293 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9294 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9299 1. Nested mixed wikitext and html list
9302 * <ul><li>ho</li></ul>
9307 <li> <ul><li>ho</li></ul></li>
9309 <ul><li> ho</li></ul></li></ul>
9313 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9315 <ul><li> ho</li></ul></li></ul>
9319 2. Nested mixed wikitext and html list (incompatible)
9322 : {{echo|<li>ho</li>}}
9325 <dd> <li>ho</li></dd></dl>
9329 <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>
9339 <ul><li>bar</li></ul></li></ul>
9349 <ul><li><ul><li>foo</li></ul></li>
9355 Nested lists 3 (first element empty)
9361 <ul><li>bar</li></ul></li></ul>
9366 Nested lists 4 (first element empty)
9371 <ul><li><ul><li></li></ul></li>
9377 Nested lists 5 (both elements empty)
9382 <ul><li><ul><li></li></ul></li>
9388 Nested lists 6 (both elements empty)
9394 <ul><li></li></ul></li></ul>
9399 Nested lists 7 (skip initial nesting levels)
9403 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9408 Nested lists 8 (multiple nesting transitions)
9416 <ul><li><ul><li> bar</li></ul></li>
9417 <li> baz</li></ul></li>
9423 Nested lists 9 (extension interaction)
9429 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9433 1. Lists with start-of-line-transparent tokens before bullets: Comments
9446 2. Lists with start-of-line-transparent tokens before bullets: Template close
9451 <ul><li>foo bar</li>
9457 List items are not parsed correctly following a <pre> block (T2785)
9463 <ul><li> <pre>foo</pre></li>
9464 <li> <pre>bar</pre></li>
9468 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9469 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9474 List items from template
9485 * notSOL{{inner list}}
9488 <ul><li> item 1</li>
9489 <li> item 2</li></ul>
9490 <ul><li> item 0</li>
9492 <li> item 2</li></ul>
9493 <ul><li> item 0</li>
9496 <li> item 2</li></ul>
9501 List interrupted by empty line or heading
9509 <ul><li> foo</li></ul>
9510 <ul><li><ul><li> bar</li></ul></li></ul>
9511 <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>
9512 <ul><li> Another list item</li></ul>
9517 Multiple list tags generated by templates
9538 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9541 <!--This line will NOT split the list-->
9543 <!--This line will NOT split the list either-->
9545 <!--foo--> <!----> <!--This line NOT split the list either-->
9556 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9559 <!--This line will NOT split the list-->
9561 <!--This line will NOT split the list either-->
9563 <!--foo--> <!----> <!--This line NOT split the list
9576 (The PHP parser relies on Tidy for the hack)
9578 parsoid=wt2html,wt2wt
9582 * {{echo|<li>templated li-hack}}
9583 * <!--foo--> <li> unsupported li-hack with preceding comments
9586 <li><li>not a li-hack
9593 <li>templated li-hack</li>
9594 <li>unsupported li-hack with preceding comments</li>
9597 <li>not a li-hack</li>
9602 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9629 Parsoid: Test of whitespace serialization with Templated bullets
9636 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9640 # ------------------------------------------------------------------------
9641 # The next set of tests are about Parsoid's ability to handle badly nested
9642 # tags (parse, minimize scope of fixup, and roundtrip back)
9643 # ------------------------------------------------------------------------
9646 Unbalanced closing block tags break a list
9647 (php parser relies on Tidy to fix up)
9665 # Parsoid fails this test, but it might be tricky to support properly.
9668 Unbalanced closing non-block tags don't break a list
9669 (php parser relies on Tidy to fix up)
9676 <li><span>a</span></li>
9677 <li><span>b</span></li>
9691 Unclosed formatting tags that straddle lists are closed and reopened
9692 (php parser relies on Tidy to fix up)
9694 parsoid=wt2html,wt2wt,html2html
9704 <ol><li> <s> a</s></li>
9705 <li><s> b </s></li></ol>
9710 1. List embedded in a formatting tag
9717 <li><small>foo</small></li>
9727 ## Ugly Parsoid output here
9728 ## Not sure what the right output is.
9730 2. List embedded in a formatting tag
9737 <li><small>a</small></li>
9738 <li><small>b</small></li>
9745 <li><small>b</small></li>
9749 # Ugly Parsoid and PHP parser output here
9750 # Not sure if we want to make this a test!
9753 ## 3. Unclosed formatting tags in list elements
9759 ## <li><small>a</small></li>
9760 ## <li><small><small>b</small></small></li>
9764 ## <li><small>a</small></li>
9766 ## <li><small>b</small></li>
9770 # This is a bug in the PHP parser + tidy combination.
9771 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9772 # and then fostered out of the table by tidy.)
9773 # We believe the Parsoid output to be correct.
9775 Table with missing opening <tr> tag
9777 parsoid=wt2html,wt2wt
9795 # Note that the current date is hard-coded as
9796 # 1970-01-01T00:02:03Z (a Thursday)
9797 # when running parser tests. The timezone is also fixed to GMT, so
9798 # local date will be identical to current date.
9801 Magic Word: {{CURRENTDAY}}
9810 Magic Word: {{CURRENTDAY2}}
9819 Magic Word: {{CURRENTDAYNAME}}
9828 Magic Word: {{CURRENTDOW}}
9837 Magic Word: {{CURRENTMONTH}}
9846 Magic Word: {{CURRENTMONTH1}}
9855 Magic Word: {{CURRENTMONTHABBREV}}
9857 {{CURRENTMONTHABBREV}}
9864 Magic Word: {{CURRENTMONTHNAME}}
9866 {{CURRENTMONTHNAME}}
9873 Magic Word: {{CURRENTMONTHNAMEGEN}}
9875 {{CURRENTMONTHNAMEGEN}}
9882 Magic Word: {{CURRENTTIME}}
9891 Magic Word: {{CURRENTHOUR}}
9900 Magic Word: {{CURRENTWEEK}} (T6594)
9909 Magic Word: {{CURRENTYEAR}}
9918 Magic Word: {{CURRENTTIMESTAMP}}
9920 {{CURRENTTIMESTAMP}}
9927 Magic Words LOCAL (UTC)
9931 * {{LOCALMONTHNAME}}
9932 * {{LOCALMONTHNAMEGEN}}
9933 * {{LOCALMONTHABBREV}}
9942 * {{LOCALTIMESTAMP}}
9957 <li> 19700101000203</li></ul>
9962 Magic Word: {{FULLPAGENAME}}
9964 title=[[User:Ævar Arnfjörð Bjarmason]]
9968 <p>User:Ævar Arnfjörð Bjarmason
9973 Magic Word: {{FULLPAGENAMEE}}
9975 title=[[User:Ævar Arnfjörð Bjarmason]]
9979 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9984 Magic Word: {{TALKSPACE}}
9986 title=[[User:Ævar Arnfjörð Bjarmason]]
9995 Magic Word: {{TALKSPACE}}, same namespace
9997 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10006 Magic Word: {{TALKSPACE}}, main namespace
10008 title=[[Parser Test]]
10017 Magic Word: {{TALKSPACEE}}
10019 title=[[User:Ævar Arnfjörð Bjarmason]]
10028 Magic Word: {{SUBJECTSPACE}}
10030 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10039 Magic Word: {{SUBJECTSPACE}}, same namespace
10041 title=[[User:Ævar Arnfjörð Bjarmason]]
10050 Magic Word: {{SUBJECTSPACE}}, main namespace
10052 title=[[Parser Test]]
10060 Magic Word: {{SUBJECTSPACEE}}
10062 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10071 Magic Word: {{NAMESPACE}}
10073 title=[[User:Ævar Arnfjörð Bjarmason]]
10082 Magic Word: {{NAMESPACEE}}
10084 title=[[User:Ævar Arnfjörð Bjarmason]]
10093 Magic Word: {{NAMESPACENUMBER}}
10095 title=[[User:Ævar Arnfjörð Bjarmason]]
10097 {{NAMESPACENUMBER}}
10104 Magic Word: {{SUBPAGENAME}}
10106 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10115 Magic Word: {{SUBPAGENAMEE}}
10117 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10126 Magic Word: {{ROOTPAGENAME}}
10128 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10132 <p>Ævar Arnfjörð Bjarmason
10137 Magic Word: {{ROOTPAGENAMEE}}
10139 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10143 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10148 Magic Word: {{BASEPAGENAME}}
10150 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10154 <p>Ævar Arnfjörð Bjarmason
10159 Magic Word: {{BASEPAGENAMEE}}
10161 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10165 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10170 Magic Word: {{TALKPAGENAME}}
10172 title=[[User:Ævar Arnfjörð Bjarmason]]
10176 <p>User talk:Ævar Arnfjörð Bjarmason
10181 Magic Word: {{TALKPAGENAMEE}}
10183 title=[[User:Ævar Arnfjörð Bjarmason]]
10187 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10192 Magic Word: {{SUBJECTPAGENAME}}
10194 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10196 {{SUBJECTPAGENAME}}
10198 <p>User:Ævar Arnfjörð Bjarmason
10203 Magic Word: {{SUBJECTPAGENAMEE}}
10205 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10207 {{SUBJECTPAGENAMEE}}
10209 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10214 Magic Word: {{NUMBEROFFILES}}
10223 Magic Word: {{PAGENAME}}
10225 title=[[User:Ævar Arnfjörð Bjarmason]]
10229 <p>Ævar Arnfjörð Bjarmason
10234 Magic Word: {{PAGENAME}} with metacharacters
10236 title=[['foo & bar = baz']]
10240 <p><i>'foo & bar = baz'</i>
10243 <p><i>'foo & bar = baz'</i></p>
10247 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10249 title=[[*RFC 1234 http://example.com/]]
10253 <p>*RFC 1234 http://example.com/
10256 <p>*RFC 1234 http://example.com/</p>
10260 Magic Word: {{PAGENAMEE}}
10262 title=[[User:Ævar Arnfjörð Bjarmason]]
10266 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10271 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10273 title=[[*RFC 1234 http://example.com/]]
10277 <p>*RFC_1234_http://example.com/
10280 <p>*RFC_1234_http://example.com/</p>
10284 Magic Word: {{REVISIONID}}
10293 Magic Word: {{SCRIPTPATH}}
10301 Magic Word: {{STYLEPATH}}
10310 Magic Word: {{SERVER}}
10314 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10319 Magic Word: {{SERVERNAME}}
10328 Magic Word: {{SITENAME}}
10337 Magic Word: {{PAGELANGUAGE}}
10348 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10357 Case-sensitive magic words, when cased differently, should just be template transclusions
10364 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10365 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10366 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10367 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10372 Case-insensitive magic words should still work with weird casing.
10382 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10386 # From plwiki:PLOS_ONE
10388 Parsoid: Page property magic word with magic word contents
10390 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10392 <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>"}]]}'/>
10396 Parsoid: Template-generated DISPLAYTITLE
10398 {{{{echo|DISPLAYTITLE}}:Foo}}
10400 <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}}]}'/>
10404 Namespace 1 {{ns:1}}
10413 Namespace 1 {{ns:01}}
10422 Namespace 0 {{ns:0}} (T6783)
10430 Namespace 0 {{ns:00}} (T6783)
10438 Namespace -1 {{ns:-1}}
10447 Namespace User {{ns:User}}
10456 Namespace User talk {{ns:User_talk}}
10465 Namespace User talk {{ns:uSeR tAlK}}
10474 Namespace File {{ns:File}}
10483 Namespace File {{ns:Image}}
10492 Namespace (lang=de) Benutzer {{ns:User}}
10503 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10509 <p>Benutzer Diskussion
10516 {{urlencode:hi world?!}}
10517 {{urlencode:hi world?!|WIKI}}
10518 {{urlencode:hi world?!|PATH}}
10519 {{urlencode:hi world?!|QUERY}}
10529 Magic Word: prioritize type info over data-parsoid
10533 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10539 Magic Word: serialize on separate line (parsoid)
10541 parsoid=wt2wt,html2wt
10547 foo<meta property="mw:PageProp/notoc"/>bar
10551 Magic Word: rt non-english wikis
10558 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10562 __proto__ is treated as normal wikitext (T105997)
10574 Magic links: internal link to RFC (T2479)
10578 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10581 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10585 Magic links: RFC (T2479)
10589 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10592 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10596 Magic links: RFC (T67278)
10598 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10600 <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.
10603 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10607 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10609 RFC      822
10613 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10618 <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>
10624 Magic links: ISBN (T3937)
10628 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10631 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10635 Magic links: ISBN (T67278)
10637 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10639 <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.
10642 <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>
10646 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10648 ISBN      978 0 316 09811 3
10654 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10661 <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>
10669 Magic links: PMID incorrectly converts space to underscore
10673 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10676 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10680 Magic links: PMID (T67278)
10682 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10684 <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.
10687 <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>
10691 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10693 PMID      1234
10697 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10702 <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>
10707 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10708 # since these are ExtLinkText, not MagicLinkText
10710 Magic links: use appropriate serialization for "almost" magic links.
10712 X[[Special:BookSources/0978739256|foo]]
10714 X[//tools.ietf.org/html/rfc1234 foo]
10716 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10717 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10720 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10721 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10725 Magic links: All disabled (T47942)
10727 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10733 <p>ISBN 0-306-40615-2
10744 Nonexistent template
10746 {{thistemplatedoesnotexist}}
10748 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10753 Template with invalid target containing tags
10755 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10757 <p>{{a<b>b</b>|foo|a=b|a = b}}
10762 Template with invalid target containing unclosed tag
10764 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10766 <p>{{a<b>|foo|a=b|a = b}}</b>
10771 Template with invalid target containing wikilink
10775 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10778 <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>
10782 Template with just whitespace in it, T70421
10786 <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>
10792 This is a test template
10800 <p>This is a test template
10805 Template with explicit namespace
10809 <p>This is a test template
10817 This is a test template with parameter {{{param}}}
10823 {{paramtest|param=foo}}
10825 <p>This is a test template with parameter foo
10830 Template:paramtestnum
10832 [[{{{1}}}|{{{2}}}]]
10836 Template unnamed parameter
10838 {{paramtestnum|Main Page|the main page}}
10840 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10845 Template:templatesimple
10851 Template:templateredirect
10853 #redirect [[Template:templatesimple]]
10857 Template:templateasargtestnum
10863 Template:templateasargtest
10865 {{template{{{templ}}}}}
10869 Template:templateasargtest2
10875 Template with template name as unnamed argument
10877 {{templateasargtestnum|templatesimple}}
10884 Template with template name as argument
10886 {{templateasargtest|templ=simple}}
10893 Template with template name as argument (2)
10895 {{templateasargtest2|templ=templatesimple}}
10902 Template:templateasargtestdefault
10904 {{{{{templ|templatesimple}}}}}
10914 Template with default value
10916 {{templateasargtestdefault}}
10923 Template with default value (value set)
10925 {{templateasargtestdefault|templ=templa}}
10934 {{templateredirect}}
10939 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10943 Template with argument in separate line
10945 {{ templateasargtest |
10953 Template with complex template as argument
10956 param ={{ templateasargtest |
10957 templ = simple }}}}
10959 <p>This is a test template with parameter (test)
10964 Template with thumb image (with link in description)
10966 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10968 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>
10971 <p>This is a test template with parameter</p>
10972 <div class="thumb tright">
10973 <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>
10974 <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>
10978 <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>
10982 Template:complextemplate
10984 {{{1}}} {{paramtest|
10985 param ={{{param}}}}}
10989 Template with complex arguments
10992 param ={{ templateasargtest |
10993 templ = simple }}|[[Template:complextemplate|link]]}}
10995 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11000 T2553: link with two variables in a piped link
11003 |[[{{{1}}}|{{{2}}}]]
11008 <td>[[{{{1}}}|{{{2}}}]]
11013 <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>
11019 Abort table cell attribute parsing on wikilink
11022 | testing [[one|two]] | three || four
11023 | testing one two | three || four
11024 | testing="[[one|two]]" | three || four
11029 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11035 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11041 <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>
11042 <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>
11043 <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>
11048 Don't abort table cell attribute parsing if wikilink is found in template arg
11051 | Test {{#tag:ref|One two "[[three]]" four}}
11055 <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>
11060 Magic variable as template parameter
11062 {{paramtest|param={{SITENAME}}}}
11064 <p>This is a test template with parameter MediaWiki
11071 [[{{{param}}}|link]]
11075 Template parameter as link source
11077 {{linktest|param=Main Page}}
11079 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11084 Template:paramtest2
11086 including another template, {{paramtest|param={{{arg}}}}}
11090 Template passing argument to another template
11092 {{paramtest2|arg='hmm'}}
11094 <p>including another template, This is a test template with parameter 'hmm'
11105 Template as link source
11109 [[{{linktest2}}|Main Page]]
11111 [[{{linktest2}}]]Page
11113 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11114 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11115 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11133 Template infinite loop
11137 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11142 Template from main namespace
11161 T2529: Template with table, not included at beginning of line
11180 T2523: Template shouldn't eat newline (or add an extra one before table)
11200 T2041: Template parameters shown as broken links
11209 Template with targets containing wikilinks
11213 {{[[{{echo|foo}}]]}}
11215 {{{{echo|[[foo}}]]}}
11217 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11218 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11230 Templates: Double quotes as template target
11237 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11241 ## This test is about making sure Parsoid's data-mw is well formed in the
11242 ## face of multiple templates with intersecting and overlapping ranges. The
11243 ## wikitext itself is wretched.
11245 Templates with intersecting and overlapping ranges
11270 <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":""}]]}'>
11272 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11274 <tbody><tr><td>hi</td></tr>
11279 Template:MSGNW test
11281 ''None'' of '''this''' should be
11283 but rather passed unmodified
11291 # hmm, fix this or just deprecate msgnw and document its behavior?
11295 {{msgnw:MSGNW test}}
11297 <p>''None'' of '''this''' should be
11299  but rather passed unmodified
11300 {{test}}
11304 <!-- comment -->
11311 {{int:youhavenewmessages|lots of money|not!}}
11313 <p>You have lots of money (not!).
11318 int keyword - non-existing message
11329 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11333 <includeonly> and <noinclude> being included
11344 <onlyinclude>Foo</onlyinclude>bar
11348 <onlyinclude> being included
11360 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11364 <onlyinclude> and <includeonly> being included
11373 <includeonly> and <noinclude> on a page
11375 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11382 Un-closed <noinclude>
11389 <onlyinclude> on a page
11391 <onlyinclude>Foo</onlyinclude>bar
11398 Un-closed <onlyinclude>
11405 Self-closed noinclude, includeonly, onlyinclude tags
11416 Unbalanced includeonly and noinclude tags
11420 |b</noinclude></noinclude>
11421 |c</noinclude></includeonly>
11422 |d</includeonly></includeonly>
11431 <td>c</includeonly>
11433 <td>d</includeonly></includeonly>
11439 Template:Includeonly section
11442 ==Includeonly section==
11448 T8563: Edit link generation for section shown by <includeonly>
11450 {{includeonly section}}
11452 <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>
11453 <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>
11457 # Uses same input as the contents of [[Template:Includeonly section]]
11459 T8563: Section extraction for section shown by <includeonly>
11464 ==Includeonly section==
11472 T8563: Edit link generation for section suppressed by <includeonly>
11475 ==Includeonly section==
11479 <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>
11484 T8563: Section extraction for section suppressed by <includeonly>
11489 ==Includeonly section==
11497 Un-closed <includeonly>
11502 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11505 ## We used to, but no longer wt2wt this test since the default serializer
11506 ## will normalize the include directives to serialize on their own line.
11507 ## Selser will take care of preserving formatting in scenarios where they
11508 ## intermingled with other wikitext.
11510 Includes and comments at SOL
11512 parsoid=wt2html,html2html
11514 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11518 </noinclude>* stuff
11521 <includeonly>can have stuff</includeonly>=== here ===
11524 <h2><span class="mw-headline" id="hu">hu</span></h2>
11527 <ul><li> stuff</li>
11528 <li> here</li></ul>
11529 <h3><span class="mw-headline" id="here">here</span></h3>
11532 <!-- 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>
11534 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11536 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11537 <li> here</li></ul>
11539 <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>
11543 # TODO: test with DOM fragment reuse!
11545 Parsoid: DOM fragment reuse
11547 parsoid=wt2wt,wt2html
11549 a{{echo|b<table></table>c}}d
11561 <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>
11563 <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">
11564 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11565 </span><p about="#mwt2">cd</p>
11567 <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">
11569 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11571 </span><p about="#mwt3">b</p>
11575 Parsoid: Merge double tds (T52603)
11580 |{{echo|{{!}} foo}}
11584 <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>
11589 Parsoid: Merge double tds in nested transclusion content (T52603)
11595 |{{echo|{{!}} foo}}
11599 <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}}]}'>
11601 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11607 ### <includeonly> and <noinclude> in attributes
11610 0. includeonly around the entire attribute
11612 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11614 <p><span id="v2">bar</span>
11619 1. includeonly in html attr key
11621 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11623 <p><span id="foo">bar</span>
11628 2. includeonly in html attr value
11630 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11631 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11633 <p><span id="v1">bar</span>
11634 <span id="v1">bar</span>
11639 3. includeonly in part of an attr value
11641 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11643 <p><span style="color:red;">bar</span>
11648 4. includeonly in table attributes
11672 ### Token Stream Patcher tests
11674 ### These tests won't always pass wt2wt and other modes because
11675 ### on serialization, the table will be output on a new line.
11676 ### For now, we are blacklisting them, and using this to test selser.
11680 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11682 parsoid=wt2html,wt2wt
11684 {{echo|}}{| width = '100%'
11688 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11689 <tbody><tr><td>foo</td></tr>
11693 ## We used to, but no longer wt2wt this test since the default serializer
11694 ## will normalize the include directives to serialize on their own line.
11695 ## Selser will take care of preserving formatting in scenarios where they
11696 ## intermingled with other wikitext.
11698 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11702 <includeonly>a</includeonly>{| {{{b}}}
11706 <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":""}]]}'>
11707 <tbody><tr><td>c</td></tr>
11712 Table wikitext syntax outside wiki-tables
11716 ! not a table heading
11719 | class="foo bar" | baz
11727 ! not a table heading
11730 | class="foo bar" | baz
11739 ### Testing parsing of templates where a template arg
11740 ### has the same name as the template itself.
11746 {{{quote|{{{1}}}}}}
11750 Templates: Template Name/Arg clash: 1. Use of positional param
11759 Templates: Template Name/Arg clash: 2. Use of named param
11761 {{quote|quote=foo}}
11768 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11777 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11781 Templates: 1. Simple use
11790 Templates: 2. Inside a block tag
11792 <div>{{echo|Foo}}</div>
11793 <blockquote>{{echo|Foo}}</blockquote>
11796 <blockquote>Foo</blockquote>
11806 Templates: P-wrapping: 1a. Templates on consecutive lines
11817 Templates: P-wrapping: 1b. Templates on consecutive lines
11831 Templates: P-wrapping: 1c. Templates on consecutive lines
11834 {{echo|bar}} <div>baz</div>
11847 Templates: P-wrapping: 1d. Template preceded by comment-only line
11856 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11860 Templates: Inline Text: 1. Multiple template uses
11862 {{echo|Foo}}bar{{echo|baz}}
11869 Templates: Inline Text: 2. Back-to-back template uses
11871 {{echo|Foo}}{{echo|bar}}
11878 Templates: Block Tags: 1. Multiple template uses
11880 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11882 <div>Foo</div><div>bar</div><div>baz</div>
11887 Templates: Block Tags: 2. Back-to-back template uses
11889 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11891 <div>Foo</div><div>bar</div>
11895 # This is an edge case relating to paragraph wrapping.
11897 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11902 <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
11907 Templates: Links: 1. Simple example
11909 {{echo|[[Foo|bar]]}}
11911 <p><a href="/wiki/Foo" title="Foo">bar</a>
11916 Templates: Links: 2. Generation of link href
11918 [[{{echo|Foo}}|bar]]
11920 <p><a href="/wiki/Foo" title="Foo">bar</a>
11925 Templates: Links: 3. Generation of part of a link href
11927 [[Fo{{echo|o}}|bar]]
11929 [[Foo{{echo|bar}}]]
11931 [[Foo{{echo|bar}}baz]]
11933 [[Foo{{echo|bar}}|bar]]
11935 [[:Foo{{echo|bar}}]]
11937 [[:Foo{{echo|bar}}|bar]]
11939 <p><a href="/wiki/Foo" title="Foo">bar</a>
11940 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11941 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11942 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11943 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11944 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11949 Templates: Links: 4. Multiple templates generating link href
11951 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11953 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11958 Templates: Links: 5. Generation of link text
11960 [[Foo|{{echo|bar}}]]
11962 <p><a href="/wiki/Foo" title="Foo">bar</a>
11967 Templates: Links: 5. Nested templates (only outermost template should be marked)
11969 {{echo|[[{{echo|Foo}}|bar]]}}
11971 <p><a href="/wiki/Foo" title="Foo">bar</a>
11976 Templates: HTML Tag: 1. Generation of HTML attr. key
11978 <div {{echo|style}}="color:red;">foo</div>
11980 <div style="color:red;">foo</div>
11985 Templates: HTML Tag: 2. Generation of HTML attr. value
11987 <div style={{echo|'color:red;'}}>foo</div>
11989 <div style="color:red;">foo</div>
11994 Templates: HTML Tag: 3. Generation of HTML attr key and value
11996 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11998 <div style="color:red;">foo</div>
12003 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12005 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12007 <div title="This is a long title with just one piece templated">foo</div>
12012 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12014 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12016 <div title="This is a long title with just one piece templated">foo</div>
12021 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12023 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12025 <div title="This is a long title with just one piece templated">foo</div>
12029 # SSS FIXME: While it is great we added support for all this,
12030 # do we want to make this part of the spec? Maybe we want to
12031 # deprecate this kind of usage in the future?
12033 Templates: HTML Tag: 7. Generation of partial attribute key string
12035 <div st{{echo|yle}}="color:red;">foo</div>
12037 <div style="color:red;">foo</div>
12042 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12044 <div {{echo|1=id="v1"}}>bar</div>
12046 <div id="v1">bar</div>
12051 Templates: HTML Tag: 9. Multiple template-generated attributes
12053 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12055 <div id="v1" title="foo">bar</div>
12060 Templates: Support for templates generating attributes and content
12062 {| {{mixed_attr_content_template}}
12067 <table style="color:red;" title="T48811">
12077 <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|}"]}'>
12086 1. Entities and nowikis inside templated attributes should be handled correctly
12088 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12090 <div style="background:#f9f9f9;">foo</div>
12093 <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>
12097 2. Entities and nowikis inside templated attributes should be handled correctly
12100 |{{table_attribs_3}}
12105 <td style="background:#f9f9f9;">Foo
12110 <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>
12115 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12118 |{{table_attribs_3}}
12123 <td style="background:#f9f9f9;">Foo
12127 <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}}]}'>
12128 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12134 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12137 | {{table_attribs_6}} hi
12142 <td style="background: red;"> hi
12147 <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>
12152 Templates: HTML Tables: 1. Generating start of a HTML table
12154 {{echo|<table><tr><td>foo</td>}}</tr></table>
12156 <table><tr><td>foo</td></tr></table>
12161 Templates: HTML Tables: 2a. Generating middle of a HTML table
12163 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12165 <table><tr><td>foo</td></tr></table>
12170 Templates: HTML Tables: 2b. Generating middle of a HTML table
12172 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12174 <table><tr><td>foo</td></tr></table>
12179 Templates: HTML Tables: 3. Generating end of a HTML table
12181 <table><tr>{{echo|<td>foo</td></tr></table>}}
12183 <table><tr><td>foo</td></tr></table>
12188 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12190 {{echo|<table>}}<tr><td>foo</td></tr></table>
12192 <table><tr><td>foo</td></tr></table>
12197 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12199 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12201 <table><tr><td>foo</td></tr></table>
12206 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12208 <table><tr>{{echo|<td>}}foo</td></tr></table>
12210 <table><tr><td>foo</td></tr></table>
12215 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12217 <table><tr><td>foo{{echo|</td>}}</tr></table>
12219 <table><tr><td>foo</td></tr></table>
12224 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12226 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12228 <table><tr><td>foo</td></tr></table>
12233 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12235 <table><tr><td>foo</td></tr>{{echo|</table>}}
12237 <table><tr><td>foo</td></tr></table>
12242 Templates: HTML Tables: 5. Proper fostering of categories from inside
12244 parsoid=wt2html,wt2wt
12246 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12247 <!--Two categories (T52330)-->
12248 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12250 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12251 <!--Two categories (T52330)-->
12252 <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>
12256 Templates: Wiki Tables: 1a. Fostering of entire template content
12264 <tr><td></td></tr></table>
12276 Templates: Wiki Tables: 1b. Fostering of entire template content
12289 <tr><td></td></tr></table>
12303 Templates: Wiki Tables: 2. Fostering of partial template content
12313 <tr><td></td></tr></table>
12326 Templates: Wiki Tables: 3. td-content via multiple templates
12329 {{echo|{{pipe}}a}}{{echo|b}}
12340 Templates: Wiki Tables: 4. Templated tags, no content
12346 <tr><td></td></tr></table>
12351 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12365 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12378 ## This test case is very specific to Parsoid's internals
12379 ## and is hence only tested for Parsoid's code. Parsoid uses
12380 ## a <meta> marker tag for <ref> tags and they are expanded
12381 ## much later. We are verifying that this <meta> tag usage
12382 ## doesn't prevent foster parenting.
12384 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12386 {{PartialTable}}<ref>foo</ref>
12391 <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">
12395 <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>
12399 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12409 <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{{!}}}"]}'>
12410 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12414 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12419 Templates: Lists: Multi-line list-items via templates
12421 *{{echo|a {{nonexistent|
12423 *{{echo|b {{nonexistent|
12426 <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>
12427 <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>
12432 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12434 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12436 <p><i>ab</i>c<i>d</i>e
12441 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12442 (PHP parser generates misnested html)
12444 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12446 <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>
12450 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12451 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12453 parsoid=wt2html,wt2wt
12455 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12457 <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>
12458 <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>
12459 <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>
12463 Templates: Ugly nesting: 4. Divs opened/closed across templates
12465 a<div>b{{echo|c</div>d}}e
12476 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12482 |{{echo|foo</table>}}
12486 <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|}"]}'>
12490 <td>foo</td></tr></tbody></table><span about="#mwt1">
12491 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12496 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12506 <td>1. {{echo|foo </table>}}</td>
12508 <td>2. {{echo|baz </table>}}</td>
12521 <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>"]}'>
12526 <td>1. foo </td></tr></tbody></table></td>
12528 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12529 </span><span about="#mwt2">
12530 </span><span about="#mwt2">
12531 </span><span about="#mwt2">abc</span><span about="#mwt2">
12532 </span><span about="#mwt2">
12533 </span><span about="#mwt2">
12534 </span><span about="#mwt2">
12535 </span><span about="#mwt2">
12536 </span><span about="#mwt2">
12537 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12538 </span><span about="#mwt2">
12543 Templates: Ugly templates: 3. newline-only template parameter
12552 # This looks like a bug: a single newline triggers p/br for some reason.
12554 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12563 # T66017 -- ugly wikitext with fostered content generates two template ranges that
12564 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12566 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12572 <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
12573 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12577 # T66017 -- ugly wikitext with fostered content generates two template ranges
12578 # that are "identical" and generate nesting cycles in the algorithm
12580 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12582 {{echo|<table><tr><td><table>}}
12586 <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"}'>
12587 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12588 </table></td></tr></tbody></table>
12592 Templates: Parameters substituted at the top-level
12594 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12598 <p><i>who</i> me? <b>never!</b>
12602 <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>
12604 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
12608 Parser Functions: 1. Simple example
12617 Parser Functions: 2. Nested use (only outermost should be marked up)
12626 ### Pre-save transform tests
12629 pre-save transform: subst:
12635 This is a test template
12639 pre-save transform: normal template
12649 pre-save transform: nonexistent template
12653 {{thistemplatedoesnotexist}}
12655 {{thistemplatedoesnotexist}}
12659 pre-save transform: subst magic variables
12668 # This is T2089, which I fixed. -- wtm
12670 pre-save transform: subst: templates with parameters
12674 {{subst:paramtest|param="something else"}}
12676 This is a test template with parameter "something else"
12680 Template:nowikitest
12682 <nowiki>'''not wiki'''</nowiki>
12686 pre-save transform: nowiki in subst (T3188)
12690 {{subst:nowikitest}}
12692 <nowiki>'''not wiki'''</nowiki>
12696 Template:commenttest
12698 This template has <!-- a comment --> in it.
12702 pre-save transform: comment in subst (T3936)
12706 {{subst:commenttest}}
12708 This template has <!-- a comment --> in it.
12712 pre-save transform: unclosed tag
12716 <nowiki>'''not wiki'''
12718 <nowiki>'''not wiki'''
12722 pre-save transform: mixed tag case
12726 <NOwiki>'''not wiki'''</noWIKI>
12728 <NOwiki>'''not wiki'''</noWIKI>
12732 pre-save transform: unclosed comment in <nowiki>
12736 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12738 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12741 # Leading @ in this template definition works around a limitation
12742 # in parsoid's parserTests which otherwise strips the <span> from the
12743 # result (confusing it for a template wrapper)
12747 @<span onmouseover="alert('crap')">Oh no</span>
12751 (confirming safety of fix for subst T3936)
12753 {{Template:dangerous}}
12755 <p>@<span>Oh no</span>
12760 pre-save transform: comment containing gallery (T7024)
12764 <!-- <gallery>data</gallery> -->
12766 <!-- <gallery>data</gallery> -->
12770 pre-save transform: comment containing extension
12774 <!-- <tag>data</tag> -->
12776 <!-- <tag>data</tag> -->
12780 pre-save transform: comment containing nowiki
12784 <!-- <nowiki>data</nowiki> -->
12786 <!-- <nowiki>data</nowiki> -->
12790 pre-save transform: <noinclude> in subst (T5298)
12800 pre-save transform: <onlyinclude> in subst (T5298)
12804 {{subst:Includes2}}
12812 {{<includeonly>subst:</includeonly>Includes}}
12816 Template:SafeSubstTest
12818 {{<includeonly>safesubst:</includeonly>Includes}}
12822 T24297: safesubst: works during PST
12826 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12832 T24297: safesubst: works during normal parse
12841 subst: does not work during normal parse
12845 <p>{{subst:Includes}}
12850 pre-save transform: context links ("pipe trick")
12854 [[Article (context)|]]
12857 [[Bar:Article (context)|]]
12858 [[:Bar:Article (context)|]]
12860 [[|Article (context)]]
12864 [[Article (context)|Article]]
12865 [[Bar:Article|Article]]
12866 [[:Bar:Article|Article]]
12867 [[Bar:Article (context)|Article]]
12868 [[:Bar:Article (context)|Article]]
12870 [[Article (context)]]
12871 [[Bar:X (Y) Z|X (Y) Z]]
12872 [[:Bar:X (Y) Z|X (Y) Z]]
12876 pre-save transform: context links ("pipe trick") with interwiki prefix
12880 [[interwiki:Article|]]
12881 [[:interwiki:Article|]]
12882 [[interwiki:Bar:Article|]]
12883 [[:interwiki:Bar:Article|]]
12885 [[interwiki:Article|Article]]
12886 [[:interwiki:Article|Article]]
12887 [[interwiki:Bar:Article|Bar:Article]]
12888 [[:interwiki:Bar:Article|Bar:Article]]
12892 pre-save transform: context links ("pipe trick") with parens in title
12894 pst title=[[Somearticle (context)]]
12898 [[Article (context)|Article]]
12902 pre-save transform: context links ("pipe trick") with comma in title
12904 pst title=[[Someplace, Somewhere]]
12907 [[Otherplace, Elsewhere|]]
12908 [[Otherplace, Elsewhere, Anywhere|]]
12910 [[Otherplace, Somewhere|Otherplace]]
12911 [[Otherplace, Elsewhere|Otherplace]]
12912 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12916 pre-save transform: context links ("pipe trick") with parens and comma
12918 pst title=[[Someplace (IGNORED), Somewhere]]
12921 [[Otherplace (place), Elsewhere|]]
12923 [[Otherplace, Somewhere|Otherplace]]
12924 [[Otherplace (place), Elsewhere|Otherplace]]
12928 pre-save transform: context links ("pipe trick") with comma and parens
12930 pst title=[[Who, me? (context)]]
12933 [[Me, Myself, and I (1937 song)|]]
12935 [[Yes, you. (context)|Yes, you.]]
12936 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12940 pre-save transform: context links ("pipe trick") with namespace
12942 pst title=[[Ns:Somearticle]]
12946 [[Ns:Article|Article]]
12950 pre-save transform: context links ("pipe trick") with namespace and parens
12952 pst title=[[Ns:Somearticle (context)]]
12956 [[Ns:Article (context)|Article]]
12960 pre-save transform: context links ("pipe trick") with namespace and comma
12962 pst title=[[Ns:Somearticle, Context, Whatever]]
12966 [[Ns:Article, Context, Whatever|Article]]
12970 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12972 pst title=[[Ns:Somearticle, Context (context)]]
12976 [[Ns:Article (context)|Article]]
12980 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12982 pst title=[[Ns:Somearticle (IGNORED), Context]]
12986 [[Ns:Article, Context|Article]]
12990 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
12994 [[Article(context)|]]
12995 [[Bar:Article(context)|]]
12996 [[:Bar:Article(context)|]]
12997 [[|Article(context)]]
13001 [[Article(context)|Article]]
13002 [[Bar:Article(context)|Article]]
13003 [[:Bar:Article(context)|Article]]
13004 [[Article(context)]]
13005 [[Bar:X(Y)Z|X(Y)Z]]
13006 [[:Bar:X(Y)Z|X(Y)Z]]
13010 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13014 [[Article (context)|]]
13015 [[Bar:Article (context)|]]
13016 [[:Bar:Article (context)|]]
13017 [[|Article (context)]]
13021 [[Article (context)|Article]]
13022 [[Bar:Article (context)|Article]]
13023 [[:Bar:Article (context)|Article]]
13024 [[Article (context)]]
13025 [[Bar:X (Y) Z|X (Y) Z]]
13026 [[:Bar:X (Y) Z|X (Y) Z]]
13030 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13034 [[Article(context)|]]
13035 [[Bar:Article(context)|]]
13036 [[:Bar:Article(context)|]]
13037 [[|Article(context)]]
13041 [[Article(context)|Article]]
13042 [[Bar:Article(context)|Article]]
13043 [[:Bar:Article(context)|Article]]
13044 [[Article(context)]]
13045 [[Bar:X(Y)Z|X(Y)Z]]
13046 [[:Bar:X(Y)Z|X(Y)Z]]
13050 pre-save transform: context links ("pipe trick") with commas (T23660)
13054 [[Article (context), context|]]
13055 [[Article (context),context|]]
13056 [[Bar:Article (context), context|]]
13057 [[Bar:Article (context),context|]]
13058 [[:Bar:Article (context), context|]]
13059 [[:Bar:Article (context),context|]]
13061 [[Article (context), context|Article]]
13062 [[Article (context),context|Article]]
13063 [[Bar:Article (context), context|Article]]
13064 [[Bar:Article (context),context|Article]]
13065 [[:Bar:Article (context), context|Article]]
13066 [[:Bar:Article (context),context|Article]]
13070 pre-save transform: trim trailing empty lines
13074 Empty lines are trimmed
13080 Empty lines are trimmed
13084 pre-save transform: Signature expansion
13089 * <noinclude>~~~</noinclude>
13090 * <includeonly>~~~</includeonly>
13091 * <onlyinclude>~~~</onlyinclude>
13093 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13094 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13095 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13096 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13101 pre-save transform: Signature expansion in nowiki tags (T2093)
13107 <nowiki>~~~~</nowiki>
13109 <includeonly><nowiki>~~~~</nowiki></includeonly>
13111 <noinclude><nowiki>~~~~</nowiki></noinclude>
13113 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13115 {{subst:Foo}} shall be converted to FOO
13117 As well as inside noinclude/onlyinclude
13118 <noinclude>{{subst:Foo}}</noinclude>
13119 <onlyinclude>{{subst:Foo}}</onlyinclude>
13121 But not inside includeonly
13122 <includeonly>{{subst:Foo}}</includeonly>
13126 <nowiki>~~~~</nowiki>
13128 <includeonly><nowiki>~~~~</nowiki></includeonly>
13130 <noinclude><nowiki>~~~~</nowiki></noinclude>
13132 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13134 FOO shall be converted to FOO
13136 As well as inside noinclude/onlyinclude
13137 <noinclude>FOO</noinclude>
13138 <onlyinclude>FOO</onlyinclude>
13140 But not inside includeonly
13141 <includeonly>{{subst:Foo}}</includeonly>
13145 Parsoid: Recognize nowiki with trailing space in tags
13149 <nowiki ><div>[[foo]]</nowiki >
13157 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13164 Parsoid: Recognize nowiki with odd capitalization
13168 <noWikI ><div>[[foo]]</Nowiki >
13170 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13175 Parsoid: Escape nowiki with trailing space in tags
13179 <p><nowiki > foo </nowiki ></p>
13180 <p>a<nowiki />b</p>
13181 <p>c<nowiki/ >d</p>
13183 <nowiki > foo </nowiki >
13191 Parsoid: Escape weird noWikI capitalizations
13195 <p><noWikI > foo </NoWikI ></p>
13197 <noWikI > foo </NoWikI >
13201 ### Message transform tests
13204 message transform: magic variables
13214 message transform: should not transform wiki markup
13224 message transform: <noinclude> in transcluded template (T6926)
13234 message transform: <onlyinclude> in transcluded template (T6926)
13244 {{#special:}} page name, known
13248 {{#special:Recentchanges}}
13250 Special:RecentChanges
13254 {{#special:}} page name with subpage, known
13258 {{#special:Recentchanges/param}}
13260 Special:RecentChanges/param
13264 {{#special:}} page name, unknown
13268 {{#special:foobar nonexistent}}
13270 Special:Foobar nonexistent
13274 {{#speciale:}} page name, known
13278 {{#speciale:Recentchanges}}
13280 Special:RecentChanges
13284 {{#speciale:}} page name with subpage, known
13288 {{#speciale:Recentchanges/param}}
13290 Special:RecentChanges/param
13294 {{#speciale:}} page name, unknown
13298 {{#speciale:foobar nonexistent}}
13300 Special:Foobar_nonexistent
13306 ### For Parsoid-specific tests, see
13307 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13312 parsoid=wt2html,wt2wt,html2html
13314 [[Image:foobar.jpg]]
13316 <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>
13319 <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>
13323 Simple image (using File: namespace, now canonical)
13325 [[File:Foobar.jpg]]
13327 <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>
13330 <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>
13334 Right-aligned image
13336 [[File:Foobar.jpg|right]]
13338 <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>
13341 <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>
13347 [[File:Foobar.jpg|right|Caption text]]
13349 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13352 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13356 Image with caption, T55312 #1
13358 [[File:Foobar.jpg|right|Caption page stuff]]
13360 <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>
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><figcaption>Caption page stuff</figcaption></figure>
13367 Image with caption, T55312 #2
13369 [[File:Foobar.jpg|right|Caption page=]]
13371 <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>
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 page=</figcaption></figure>
13378 Image with caption, T55312 #3
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 Allow empty links in image captions (T62753)
13393 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13398 <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>
13401 <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>
13403 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13404 </figcaption></figure>
13408 Titles in unlinked images (T23454)
13410 [[File:Foobar.jpg|link=|stuff]]
13412 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13417 Link with empty target
13426 Image with link trail
13428 Linktrails should not work for images: [[File:Foobar.jpg]]s
13430 <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
13433 <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>
13437 Image with empty attribute
13439 parsoid=wt2html,wt2wt,html2html
13441 [[File:Foobar.jpg|right||Caption text]]
13443 <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>
13446 <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>
13450 1. Block image with individual attributes from templates
13452 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13454 <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>
13457 <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>
13461 2. Block Image with individual attributes from templates
13463 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13465 <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>
13468 <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>
13472 3. Inline image with individual attributes from templates
13474 [[File:Foobar.jpg|{{echo|50px}}]]
13476 <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>
13479 <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>
13482 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13483 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13485 Image with multiple attributes from the same template
13487 [[File:Foobar.jpg|{{image_attribs}}]]
13489 <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>
13492 <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>
13496 Image with link tails
13500 123[[File:Foobar.jpg]]456
13501 123[[File:Foobar.jpg|right]]456
13502 123[[File:Foobar.jpg|thumb]]456
13504 <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
13506 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
13507 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
13510 <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>
13512 <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>
13514 <div class="thumb tright">
13515 <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>
13516 <div class="thumbcaption">
13517 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13523 <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>
13524 <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>
13525 <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>
13529 Image with multiple captions -- only last one is accepted
13531 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13533 <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>
13536 <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>
13540 Image with multiple widths -- use last
13542 [[File:Foobar.jpg|200px|300px|caption]]
13544 <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>
13547 <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>
13551 Image with multiple alignments -- use first (T50664)
13555 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13557 [[File:Foobar.jpg|middle|text-top|caption]]
13559 <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>
13560 <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>
13563 <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>
13564 <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>
13568 Image with width attribute at different positions
13570 [[File:Foobar.jpg|200px|right|Caption]]
13571 [[File:Foobar.jpg|right|200px|Caption]]
13572 [[File:Foobar.jpg|right|Caption|200px]]
13574 <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>
13575 <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>
13576 <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>
13579 <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>
13580 <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>
13581 <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>
13584 # a sad bit of backward-compatibility
13586 Image with size specified with pxpx (T15500, T53628)
13588 parsoid=wt2html,wt2wt,html2html
13590 [[File:Foobar.jpg|20pxpx]]
13591 [[File:Foobar.jpg|200x20pxpx]]
13593 <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>
13594 <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>
13597 <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>
13601 Image with link parameter, wiki target
13603 [[File:Foobar.jpg|link=Main Page]]
13605 <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>
13608 <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>
13611 # parsoid T51293 (part 1)
13613 Image with link parameter, URL target
13615 [[File:Foobar.jpg|link=http://example.com/]]
13617 <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>
13620 <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>
13623 # parsoid T51293 (part 2)
13625 Image with link parameter, protocol-less URL target
13627 [[File:Foobar.jpg|link=//example.com/]]
13629 <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>
13632 <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>
13636 Escaping non-block captions (T107435)
13639 "modes": ["wt2wt"],
13641 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13645 [[Image:Foobar.jpg|caption]]
13647 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13650 # wgExternalLinkTarget not supported by Parsoid
13652 Image with link parameter, wgExternalLinkTarget
13654 [[Image:foobar.jpg|link=http://example.com/]]
13656 wgExternalLinkTarget='foobar'
13658 <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>
13663 Image with link parameter, wgNoFollowLinks set to false
13665 [[Image:foobar.jpg|link=http://example.com/]]
13667 wgNoFollowLinks=false
13669 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13674 Image with link parameter, wgNoFollowDomainExceptions
13676 [[Image:foobar.jpg|link=http://example.com/]]
13678 wgNoFollowDomainExceptions='example.com'
13680 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13684 # wgExternalLinkTarget not supported by Parsoid
13686 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13688 [[Image:foobar.jpg|link=http://example.com/|Title]]
13690 wgExternalLinkTarget='foobar'
13692 <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>
13697 Image with empty link parameter
13699 [[File:Foobar.jpg|link=]]
13701 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13704 <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>
13708 Image with link parameter (wiki target) and unnamed parameter
13710 [[File:Foobar.jpg|link=Main_Page|Title]]
13712 <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>
13715 <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>
13719 Image with link parameter (URL target) and unnamed parameter
13721 [[File:Foobar.jpg|link=http://example.com/|Title]]
13723 <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>
13726 <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>
13730 Thumbnail image with link parameter
13733 parsoid=wt2html,wt2wt,html2html
13735 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13737 <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>
13740 <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>
13744 Manually-specified thumbnail image
13748 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13750 <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>
13753 <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>
13757 Manually-specified thumbnail image with explicit link to wiki page
13760 parsoid=wt2html,wt2wt,html2html
13762 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13764 <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>
13767 <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>
13771 Manually-specified thumbnail image with explicit link to url
13774 parsoid=wt2html,wt2wt,html2html
13776 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13778 <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>
13781 <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>
13785 Manually-specified thumbnail image with explicit no link
13788 parsoid=wt2html,wt2wt,html2html
13790 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13792 <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>
13795 <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>
13799 Manually-specified thumbnail image with explicit link and alt text
13802 parsoid=wt2html,wt2wt,html2html
13804 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13806 <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>
13809 <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>
13813 Image with frame and link
13815 parsoid=wt2html,wt2wt,html2html
13817 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13819 <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>
13822 <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>
13826 Image with frame and link and explicit alt
13828 parsoid=wt2html,wt2wt,html2html
13830 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13832 <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>
13835 <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>
13839 Image with wiki markup in implicit alt
13841 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13843 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13845 <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>
13846 </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>
13849 <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>
13851 <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>
13855 Alt image option should handle most kinds of wikitext without barfing
13857 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13859 <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>
13862 <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>
13865 ###################
13866 # Conflicting image format options.
13867 # First option specified should 'win'.
13868 # All three cases in each test should be identical.
13871 Image with 'frameless' first.
13873 parsoid=wt2html,wt2wt,html2html
13875 [[File:Foobar.jpg|frameless|caption]]
13877 [[File:Foobar.jpg|frameless|frame|caption]]
13879 [[File:Foobar.jpg|frameless|thumb|caption]]
13881 <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>
13882 </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>
13883 </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>
13886 <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>
13887 <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>
13888 <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>
13892 Image with 'frame' first.
13894 parsoid=wt2html,wt2wt,html2html
13896 [[File:Foobar.jpg|frame|caption]]
13897 [[File:Foobar.jpg|frame|frameless|caption]]
13898 [[File:Foobar.jpg|frame|thumb|caption]]
13900 <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>
13901 <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>
13902 <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>
13905 <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>
13906 <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>
13907 <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>
13911 Image with 'thumb' first.
13913 parsoid=wt2html,wt2wt,html2html
13915 [[File:Foobar.jpg|thumb|caption]]
13916 [[File:Foobar.jpg|thumb|frameless|caption]]
13917 [[File:Foobar.jpg|thumb|frame|caption]]
13919 <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>
13920 <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>
13921 <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>
13924 <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>
13925 <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>
13926 <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>
13929 ###################
13931 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13932 # and https://phabricator.wikimedia.org/T64258
13933 # Foobar has actual size of 1941x220
13934 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13935 # a scalable format.
13936 # 2. Framed images always ignore size options; always render at default size.
13937 # 3. "Unspecified format" and border are the only types which can be
13941 Image: "unspecified format" and border enlarge
13943 parsoid=wt2html,wt2wt,html2html
13945 [[File:Foobar.jpg|2000px]]
13947 [[File:Foobar.jpg|border|2000px]]
13949 <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>
13950 </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>
13953 <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>
13954 <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>
13958 Image: "unspecified format" and border reduce
13960 parsoid=wt2html,wt2wt,html2html
13962 [[File:Foobar.jpg|1000px]]
13964 [[File:Foobar.jpg|border|1000px]]
13966 <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>
13967 </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>
13970 <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>
13971 <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>
13975 Image: thumbs reduce
13977 parsoid=wt2html,wt2wt,html2html
13979 [[File:Foobar.jpg|thumb|50px]]
13981 <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>
13984 <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>
13988 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13990 parsoid=wt2html,wt2wt,html2html
13992 [[File:Foobar.jpg|thumb|2000px]]
13994 [[File:Foobar.svg|thumb|2000px]]
13996 <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>
13997 <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>
14000 <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>
14001 <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>
14005 Image: frameless can reduce in size
14007 parsoid=wt2html,wt2wt,html2html
14009 [[File:Foobar.jpg|frameless|50px]]
14011 <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>
14014 <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>
14018 Image: bitmap frameless can't be enlarged past original size, but vector can
14020 parsoid=wt2html,wt2wt,html2html
14022 [[File:Foobar.jpg|frameless|2000px]]
14024 [[File:Foobar.svg|frameless|2000px]]
14026 <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>
14027 </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>
14030 <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>
14031 <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>
14035 Image: framed images are always unscaled.
14037 parsoid=wt2html,wt2wt,html2html
14039 [[File:Foobar.jpg|frame]]
14041 [[File:Foobar.jpg|frame|50px]]
14043 [[File:Foobar.jpg|frame|50x50px]]
14045 [[File:Foobar.jpg|frame|2000px]]
14047 <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>
14048 <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>
14049 <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>
14050 <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>
14053 <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>
14054 <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>
14055 <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>
14056 <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>
14059 ###################
14062 Link to image page- image page normally doesn't exists, hence edit link
14063 Add test with existing image page
14064 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14068 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14073 T20784 Link to non-existent image page with caption should use caption as link text
14075 [[:Image:test|caption]]
14077 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14082 Frameless image caption with a free URL
14084 [[File:Foobar.jpg|http://example.com]]
14086 <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>
14089 <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>
14093 Thumbnail image caption with a free URL
14097 [[File:Foobar.jpg|thumb|http://example.com]]
14099 <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>
14102 <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>
14106 Thumbnail image caption with a free URL and explicit alt
14109 parsoid=wt2html,wt2wt,html2html
14111 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14113 <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>
14116 <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>
14120 SVG thumbnails with no language set
14123 [[File:Foobar.svg|thumb|caption]]
14125 <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>
14128 <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>
14132 SVG thumbnails with language de
14134 parsoid=wt2html,wt2wt,html2html
14136 [[File:Foobar.svg|thumb|caption|lang=de]]
14138 <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>
14141 <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>
14145 SVG thumbnails with invalid language code
14147 parsoid=wt2html,wt2wt,html2html
14149 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14151 <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>
14154 <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>
14158 T3887: A ISBN with a thumbnail
14160 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14162 <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>
14165 <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>
14169 T3887: A RFC with a thumbnail
14171 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14173 <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>
14176 <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>
14180 T3887: A mailto link with a thumbnail
14182 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
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>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</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>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
14190 # Pending resolution to T2368
14192 T2648: Frameless image caption with a link
14194 [[File:Foobar.jpg|text with a [[link]] in it]]
14196 <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>
14199 <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>
14203 T2648: Frameless image caption with a link (suffix)
14205 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14207 <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>
14210 <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>
14214 T2648: Frameless image caption with an interwiki link
14216 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14218 <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>
14221 <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>
14225 T2648: Frameless image caption with a piped interwiki link
14227 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14229 <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>
14232 <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>
14236 T107474: Frameless image caption with <nowiki>
14238 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14240 <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>
14244 Escape HTML special chars in image alt text
14246 [[File:Foobar.jpg|& < > "]]
14248 <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>
14251 <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>
14255 Escape HTML special chars in image alt text with LanguageConverter
14259 [[File:Foobar.jpg|& < > "]]
14261 <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>
14264 <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>
14268 Entities in file name and attributes
14270 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14272 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14275 <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>
14279 T2499: Alt text should have Ӓ, not &1234;
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":"&#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>
14290 Broken image caption with link
14292 parsoid=wt2html,wt2wt,html2html
14294 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14296 <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.
14299 <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>
14303 Image caption containing another image
14305 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14307 <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>
14310 <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>
14314 Image: caption containing a newline
14316 [[File:Foobar.jpg|This
14319 <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>
14322 <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>
14326 Image: caption containing leading space
14327 (The leading space should not trigger nowiki escaping in wt2wt mode)
14329 [[File:Foobar.jpg|thumb| bar]]
14331 <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>
14334 <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>
14338 Image: caption containing a table
14340 parsoid=wt2html,wt2wt,html2html
14342 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14348 and some more text.]]
14350 <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>
14353 <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
14356 <tr><th>Foo </th><th>Bar</th></tr>
14359 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14363 T5090: External links other than http: in image captions
14365 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14367 <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>
14370 <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>
14376 parsoid=wt2html,wt2wt,html2html
14378 [[Image:foobar.jpg|a|class=b]]
14380 <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>
14383 <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>
14387 Localized image handling (1).
14389 parsoid=wt2html,wt2wt,html2html
14392 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14394 <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>
14397 <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>
14401 Localized image handling (2).
14404 parsoid=wt2html,wt2wt,html2html
14407 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14409 <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>
14412 <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>
14416 Localized image handling (3).
14421 <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>
14423 [[File:Foobar.jpg|بندانگشتی]]
14427 "border", "frameless" and "class" attributes on an image.
14430 parsoid=wt2html,wt2wt,html2html
14432 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14434 <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>
14437 <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>
14440 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14442 Invalid image attributes (T64500)
14445 parsoid=wt2html,wt2wt,html2html
14447 [[File:Foobar.jpg|thumb|float|left|caption]]
14449 [[File:Foobar.jpg|thumb|righ|caption]]
14451 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14453 <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>
14454 <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>
14455 <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>
14458 <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>
14459 <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>
14460 <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>
14466 #REDIRECT [[File:Barfoo.jpg]]
14469 # FIXME: Parsoid should run this test -- but we'd need to teach the
14470 # mockAPI about the redirected Barfoo.jpg image.
14474 [[Image:Barfoo.jpg]]
14476 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14481 Missing image with uploads disabled
14485 [[File:Foobaz.jpg]]
14487 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14490 <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>
14493 # Parsoid-specific testing for images
14494 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14495 # Currently imperfect due to a flaw in the Parsoid testrunner
14497 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14501 Parsoid-specific image handling - simple image with size and middle alignment
14503 [[File:Foobar.jpg|middle|50px]]
14505 <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>
14509 Parsoid-specific image handling - simple image with size, middle alignment,
14510 non-standard namespace alias
14512 parsoid=wt2wt,wt2html,html2html
14514 [[Image:Foobar.jpg|middle|50px]]
14516 <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>
14520 Parsoid-specific image handling - simple image with size and middle alignment
14523 [[File:Foobar.jpg|50px|middle]]
14525 <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>
14529 Parsoid-specific image handling - simple image with size and middle alignment
14530 and non-standard namespace name
14532 parsoid=wt2html,wt2wt,html2html
14534 [[Image:Foobar.jpg|50px|middle]]
14536 <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>
14540 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14542 [[File:Foobar.jpg|500x10px|baseline|caption]]
14544 <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>
14548 Parsoid-specific image handling - simple image with border and size spec
14550 [[File:Foobar.jpg|50px|border|caption]]
14552 <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>
14556 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14558 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14560 <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>
14564 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14567 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14569 <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>
14573 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14575 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14577 <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>
14581 Parsoid-specific image handling - thumbnail with specific size, halign,
14582 valign, and caption (existing content)
14584 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14586 <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>
14590 Parsoid-specific image handling - framed image with specific size and caption
14593 parsoid=wt2html,wt2wt,html2html
14595 [[File:Foobar.jpg|frame|500x50px|caption]]
14597 <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>
14601 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14604 parsoid=wt2html,wt2wt,html2html
14606 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14608 <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>
14612 Parsoid-specific image handling - frameless image with specific size, border, and caption
14614 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14616 <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>
14620 Parsoid-specific image handling - simple image with a formatted caption
14622 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14624 <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>
14628 Parsoid-specific image handling - caption with a template in it
14630 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14632 <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>
14636 Parsoid-specific image handling - caption with unbalanced tags in it
14638 parsoid=wt2html,wt2wt,html2html
14641 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14645 <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>
14650 Parsoid-specific image handling - empty caption (1)
14652 parsoid=wt2html,wt2wt
14654 [[File:Foobar.jpg|thumb|]]
14656 <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>
14659 # empty captions don't get serialized unless we're in the "round trip" case
14661 Parsoid-specific image handling - empty caption (2)
14665 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14666 <a href="./File:Foobar.jpg">
14667 <img resource="./File:Foobar.jpg"
14668 src="//example.com/images/3/3a/Foobar.jpg"
14669 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14670 height="25" width="220"/>
14672 <figcaption></figcaption>
14675 [[File:Foobar.jpg|thumb]]
14679 Parsoid-specific image handling - whitespace caption
14681 [[File:Foobar.jpg|thumb| ]]
14683 <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>
14687 Parsoid-specific image handling - lang option
14690 [[File:Foobar.svg|lang=de|caption]]
14694 <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>
14698 ## Edge case bugs in Parsoid from T93580
14700 T93580: 1. Templated <ref> inside block images
14702 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14706 <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>
14708 <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>
14712 T93580: 2. <ref> inside inline images
14714 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14718 <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>
14720 <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>
14724 T93580: 3. Templated <ref> inside inline images
14726 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14730 <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>
14732 <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>
14739 Subpage test/subpage
14747 subpage title=[[Subpage test]]
14751 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14756 Subpage noslash link
14758 subpage title=[[Subpage test]]
14762 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14767 Subpage test/1/2/subpage
14773 Relative subpage noslash link
14775 parsoid=wt2wt,wt2html,html2html
14776 subpage title=[[Subpage test/1/2/3/4]]
14782 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14783 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14786 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14787 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14791 Parsoid: dot-slash prefixed wikilinks
14801 </p><p>[[././baz/]]
14806 </p><p>[[././baz/]]
14811 Render invalid page names as plain text (T53090)
14824 [[{{echo|./../foo}}|bar]]
14825 [[{{echo|foo/.}}|bar]]
14826 [[{{echo|foo/..}}|bar]]
14827 [[{{echo|foo~~~~bar}}]]
14828 [[{{echo|foo>bar}}]]
14829 [[{{echo|foo././bar}}]]
14830 [[{{echo|foo{bar}}]]
14831 [[{{echo|foo}bar}}]]
14832 [[{{echo|foo[bar}}]]
14833 [[{{echo|foo]bar}}]]
14834 [[{{echo|foo<bar}}]]
14836 <p>[[./../foo|bar]]
14846 </p><p>[[./../foo|bar]]
14859 <p>[[./../foo|bar]]
14870 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14871 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14872 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14873 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14874 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14875 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14876 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14877 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14878 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14879 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14880 [[<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>
14888 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14893 T2561: {{/Subpage}}
14895 subpage title=[[Page]]
14899 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14907 Category:MediaWiki User's Guide
14915 [[:Category:MediaWiki User's Guide]]
14917 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14926 [[Category:MediaWiki User's Guide]]
14928 cat=MediaWiki_User's_Guide sort=
14930 <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"}}'/>
14934 PAGESINCATEGORY invalid title fatal (r33546 fix)
14936 {{PAGESINCATEGORY:<bogus>}}
14943 Category with different sort key
14947 [[Category:MediaWiki User's Guide|Foo]]
14949 cat=MediaWiki_User's_Guide sort=Foo
14951 <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"}}'/>
14955 Category with identical sort key
14959 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14961 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14963 <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"}}'/>
14967 Category with empty sort key
14972 [[Category:MediaWiki User's Guide|]]
14974 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14978 Category with empty sort key and parentheses
14983 [[Category:Foo (bar)|]]
14985 [[Category:Foo (bar)|Foo]]
14989 Category with link tail
14994 123[[Category:Foo]]456
14996 123[[Category:Foo]]456
15000 Category with template
15005 [[Category:{{echo|Foo}}]]
15007 [[Category:{{echo|Foo}}]]
15011 Category with template in sort key
15016 [[Category:Foo|{{echo|Bar}}]]
15018 [[Category:Foo|{{echo|Bar}}]]
15022 Category with template in sort key and title
15027 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15029 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15032 ## We used to, but no longer wt2wt this test since the default serializer
15033 ## will normalize all categories to serialize on their own line.
15034 ## This wikitext usage is going to be fairly uncommon in production and
15035 ## selser will take care of preserving formatting in those scenarios.
15037 Category / paragraph interactions
15041 Foo [[Category:Baz]] Bar
15043 Foo [[Category:Baz]]
15051 [[Category:Baz]] Bar
15064 {{echo|[[Category:Baz]]}}
15077 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15078 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15079 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15080 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15081 <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>
15082 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15085 ## We used to, but no longer wt2wt this test since the default serializer
15086 ## will normalize all categories to serialize on their own line.
15087 ## This wikitext usage is going to be fairly uncommon in production and
15088 ## selser will take care of preserving formatting in those scenarios.
15090 ## The whitespace on the empty line is part of the test. Please do not delete
15092 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15098 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15100 {{echo|[[Category:Foo]] and so should this!}}
15102 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15107 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15109 <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>
15112 ## Parsoid will not try to wt2wt this while preserving newlines because
15113 ## it suppresses excess newlines within list items -- and we don't want to
15114 ## introduce a special case just for categories, which is, in reality somewhat
15115 ## odd behavior -- categories are unlikely to be used in list items like this
15116 ## in top-level pages and are only likely to show up in template-generated
15117 ## list items where this RT-ing is a non-issue.
15119 ## The whitespace on the empty line is part of the test. Please do not delete
15121 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15127 [[Category:Foo]] and this should be part of the same list item
15130 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15132 <ul><li>This and this should be part of the same list item</li>
15133 <li>So should this and this should be part of the same list item</li></ul>
15136 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15137 <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>
15141 ## Newlines and categories that follow the last item of a list
15142 ## are treated differently because this (list followed by categories)
15143 ## is an extremely common pattern on wikis.
15145 3. Categories and newlines: newline suppression for last list item should RT properly
15158 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15160 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15161 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15165 4. Categories and newlines: newline suppression for last list item should RT properly
15173 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15175 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15178 ## only wt2html for this to make sure the algo only applies to the rightmost path
15180 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15193 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15195 <ul><li> d</li></ul></li></ul>
15196 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15199 ## We used to, but no longer wt2wt this test since the default serializer
15200 ## will normalize all categories to serialize on their own line.
15201 ## This wikitext usage is going to be fairly uncommon in production and
15202 ## selser will take care of preserving formatting in those scenarios.
15204 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15208 * a [[Category:Foo]]
15210 <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>
15213 # This test also demonstrates because of newline+category tunneling
15214 # through the list hander, template wrapping doesn't expand to the
15215 # containing list when the list item swallows the category.
15217 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15222 <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
15223 </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>
15227 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15231 {{echo|[[Category:Foo]]
15235 <ul><li> a</li></ul>
15237 <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">
15238 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15239 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15243 Category links with multiple namespaces
15245 [[Category:Project:Foo]]
15247 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15251 Parsoid: Serialize link to category page with colon escape
15257 [[:Category:Foo|Bar]]
15260 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15261 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15265 # We used to, but no longer wt2wt this test since the default serializer
15266 # will normalize all categories to serialize on their own line.
15267 # This wikitext usage is going to be fairly uncommon in production and
15268 # selser will take care of preventing whitespace insertion if this
15269 # occurs in an article.
15271 # html2html disabled for the same reason (whitespace insertion between
15274 # html2wt disabled because it localizes the "Category" namespace.
15276 Link prefix/suffixes aren't applied to category links
15286 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15290 Parsoid: Serialize link to file page with colon escape
15296 [[:File:Foo.png|Bar]]
15299 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15300 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15305 Parsoid: Serialize a genuine category link without colon escape
15310 [[Category:Foo|Bar]]
15312 <link rel="mw:PageProp/Category" href="./Category:Foo">
15313 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15317 Normalize hrefs properly before testing for invalid link targets (T72894)
15321 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15323 [[Category:Toxine bactérienne]]
15327 Parsoid: Defaultsort
15329 {{DEFAULTSORT:Foo}}
15331 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15335 Parsoid: Defaultsort (template-generated)
15337 {{{{echo|DEFAULTSORT}}:Foo}}
15339 <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}}]}'/>
15343 ### Inter-language links
15346 Interlanguage links
15354 es:Alimento fr:Nourriture zh:食品
15356 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15357 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15358 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15362 Duplicate interlanguage links (T26502)
15373 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15374 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15375 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15376 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15383 Basic section headings
15390 ===Smaller headline===
15393 <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>
15396 <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>
15399 <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>
15405 Section headings with TOC
15408 === Subheadline 1 ===
15409 ===== Skipping a level =====
15410 ====== Skipping a level ======
15414 ===Another headline===
15416 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15418 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15420 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15422 <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>
15424 <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>
15431 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15433 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15439 <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>
15440 <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>
15441 <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>
15442 <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>
15443 <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>
15446 <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>
15451 TOC anchors don't collide
15459 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15461 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15462 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15463 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15464 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15468 <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>
15469 <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>
15470 <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>
15471 <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>
15475 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15477 Handling of sections up to level 6 and beyond
15480 == Level 2 Heading==
15481 === Level 3 Heading===
15482 ==== Level 4 Heading====
15483 ===== Level 5 Heading=====
15484 ====== Level 6 Heading======
15485 ======= Level 7 Heading=======
15486 ======== Level 8 Heading========
15487 ========= Level 9 Heading=========
15488 ========== Level 10 Heading==========
15490 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15492 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15494 <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>
15496 <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>
15498 <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>
15500 <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>
15502 <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>
15503 <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>
15504 <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>
15505 <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>
15506 <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>
15520 <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>
15521 <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>
15522 <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>
15523 <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>
15524 <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>
15525 <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>
15526 <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>
15527 <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>
15528 <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>
15529 <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>
15534 TOC regression (T11764)
15538 ==== title 1.1.1 ====
15543 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15545 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15547 <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>
15549 <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>
15552 <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>
15555 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15557 <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>
15563 <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>
15564 <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>
15565 <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>
15566 <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>
15567 <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>
15568 <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>
15573 TOC for heading containing <span id="..."></span> (T96153)
15576 ==<span id="old-anchor"></span>New title==
15578 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15580 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15584 <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>
15589 TOC with wgMaxTocLevel=3 (T8204)
15595 ==== title 1.1.1 ====
15600 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15602 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15604 <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>
15605 <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>
15608 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15610 <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>
15616 <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>
15617 <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>
15618 <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>
15619 <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>
15620 <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>
15621 <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>
15626 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
15632 ====Section 1.1.1====
15633 ====Section 1.1.1.1====
15636 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15638 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15640 <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>
15643 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15647 <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>
15648 <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>
15649 <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>
15650 <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>
15651 <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>
15657 Resolving duplicate section names
15662 <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>
15663 <h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15668 Resolving duplicate section names with differing case (T12721)
15673 <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>
15674 <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>
15686 Template with sections, __NOTOC__
15693 <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>
15694 <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>
15695 <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>
15696 <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>
15701 __NOEDITSECTION__ keyword
15707 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15708 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15713 Link inside a section heading
15715 ==Section with a [[Main Page|link]] in it==
15717 <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>
15722 TOC regression (T14077)
15729 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15731 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15733 <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>
15736 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15740 <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>
15741 <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>
15742 <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>
15747 T3219 URL next to image (good)
15749 http://example.com [[File:Foobar.jpg]]
15751 <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>
15754 <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>
15758 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
15761 The line above must have a trailing space!
15764 But just in case it doesn't...
15766 <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>
15767 <p>The line above must have a trailing space!
15769 <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>
15770 <p>But just in case it doesn't...
15775 Header with special characters (T27462)
15777 The tooltips shall not show entities to the user (ie. be double escaped)
15794 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15796 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15798 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15799 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15800 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15801 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15802 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15806 <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>
15809 <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>
15812 <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>
15815 <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>
15818 <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>
15824 Header with space, plus and underscore as entity
15826 Id should not contain + for spaces
15828 == Space between Text ==
15831 == Space-Entity between Text ==
15834 == Plus+between+Text ==
15837 == Plus-Entity+between+Text ==
15840 == Underscore_between_Text ==
15843 == Underscore-Entity_between_Text ==
15846 [[#Space between Text]]
15847 [[#Space-Entity between Text]]
15848 [[#Plus+between+Text]]
15849 [[#Plus-Entity+between+Text]]
15850 [[#Underscore_between_Text]]
15851 [[#Underscore-Entity_between_Text]]
15853 <p>Id should not contain + for spaces
15855 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15857 <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>
15858 <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>
15859 <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>
15860 <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>
15861 <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>
15862 <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>
15866 <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>
15869 <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>
15872 <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>
15875 <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>
15878 <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>
15881 <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>
15883 </p><p><a href="#Space_between_Text">#Space between Text</a>
15884 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15885 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15886 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15887 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15888 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15893 Headers with excess '=' characters
15894 (Are similar tests necessary beyond the 1st level?)
15898 =''italic'' heading==
15899 ==''italic'' heading=
15901 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15903 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15904 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15905 <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>
15906 <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>
15910 <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>
15911 <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>
15912 <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>
15913 <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>
15918 HTML headers vs TOC (T25393)
15919 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15931 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15933 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15935 <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>
15936 <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>
15939 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15941 <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>
15942 <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>
15948 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15949 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15950 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15951 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15952 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15953 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15958 Single-line or multiline-comments can follow headings
15960 parsoid=wt2html,wt2wt
15968 <h2><span class="mw-headline" id="foo">foo</span></h2>
15969 <h2><span class="mw-headline" id="bar">bar</span></h2>
15970 <h2><span class="mw-headline" id="baz">baz</span></h2>
15975 T3219 URL next to image (broken)
15977 http://example.com[[File:Foobar.jpg]]
15979 <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>
15982 <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>
15986 T3186 news: in the middle of text
15988 http://en.wikinews.org/wiki/Wikinews:Workplace
15990 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15996 Namespaced link must have a title
16005 Namespaced link must have a title (bad fragment version)
16007 [[Project:#fragment]]
16009 <p>[[Project:#fragment]]
16015 ### HTML tags and HTML attributes
16019 div with no attributes
16021 <div>HTML rocks</div>
16023 <div>HTML rocks</div>
16028 div with double-quoted attribute
16030 <div id="rock">HTML rocks</div>
16032 <div id="rock">HTML rocks</div>
16037 div with single-quoted attribute
16039 <div id='rock'>HTML rocks</div>
16041 <div id="rock">HTML rocks</div>
16046 div with unquoted attribute
16048 <div id=rock>HTML rocks</div>
16050 <div id="rock">HTML rocks</div>
16055 div with illegal double attributes
16057 <div id="a" id="b">HTML rocks</div>
16059 <div id="b">HTML rocks</div>
16064 div with empty attribute value, space before equals
16066 parsoid=wt2html,html2html
16068 <div class =>HTML rocks</div>
16070 <div class="">HTML rocks</div>
16073 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16077 div with multiple empty attribute values
16079 parsoid=wt2html,html2html
16081 <div id= title=>HTML rocks</div>
16083 <div id="title.3D">HTML rocks</div>
16086 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16090 table with multiple empty attribute values
16092 parsoid=wt2html,html2html
16098 <table title="id=">
16104 <table title="id=">
16105 <tbody><tr><td> hi</td></tr>
16110 div with braces in attribute value
16112 <div title="{}">Foo</div>
16114 <div title="{}">Foo</div>
16117 <div title="{}">Foo</div>
16121 div with empty attribute value, no space before equals
16123 parsoid=wt2html,html2html
16125 <div class=>HTML rocks</div>
16127 <div class="">HTML rocks</div>
16130 <div class="">HTML rocks</div>
16134 HTML multiple attributes correction
16136 <p class="error" class="awesome">Awesome!</p>
16138 <p class="awesome">Awesome!</p>
16143 Table multiple attributes correction
16146 !+ class="error" class="awesome"| status
16151 <th class="awesome"> status
16159 <DIV ID="x">HTML ROCKS</DIV>
16161 <div id="x">HTML ROCKS</div>
16166 Non-ASCII pseudo-tags are rendered as text
16175 Pseudo-tag with URL 'name' renders as url link
16177 <http://example.com/>
16179 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16184 text with amp in the middle of nowhere
16188 <p>Remember AT&T?
16193 text with character entity: eacute
16195 I always thought é was a cute letter.
16197 <p>I always thought é was a cute letter.
16200 <p>I always thought é was a cute letter.</p>
16204 text with entity-escaped character entity-like string: eacute
16206 I always thought &eacute; was a cute letter.
16208 <p>I always thought &eacute; was a cute letter.
16213 text with undefined character entity: xacute
16215 I always thought &xacute; was a cute letter.
16217 <p>I always thought &xacute; was a cute letter.
16224 <data value="5">five</data>
16225 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16226 <mark>This highlighted text</mark>
16228 <p><data value="5">five</data>
16229 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16230 <mark>This highlighted text</mark>
16235 HTML tag with leading space is parsed as text
16239 <p>< div>foo< /div>
16244 ### Nesting tests (see T43545, T52604, T53081)
16247 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
16248 # Note that html2wt is considerably more difficult if we use <b> in
16249 # the test case, instead of <small>
16251 Ensure that HTML adoption agency algorithm is properly implemented.
16253 <small>X<small>Y</small>Z</small>
16255 <p><small>X<small>Y</small>Z</small>
16259 # This was T43545 in the PHP parser.
16260 # Note that tidy doesn't handle this correctly.
16264 <kbd>X<kbd>Y</kbd>Z</kbd>
16266 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16270 # The following cases were T53081 in the PHP parser.
16271 # Note that there are some other nestable tags (b, i, etc) which are
16272 # not covered; see T53081 for discussion.
16274 # Note that tidy doesn't handle this correctly.
16278 <em>X<em>Y</em>Z</em>
16280 <p><em>X<em>Y</em>Z</em>
16284 # Note that tidy doesn't handle this correctly.
16286 Nesting of <strong>
16288 <strong>X<strong>Y</strong>Z</strong>
16290 <p><strong>X<strong>Y</strong>Z</strong>
16299 <p><q>X<q>Y</q>Z</q></p>
16302 # Note that tidy doesn't handle this correctly.
16306 <ruby>X<ruby>Y</ruby>Z</ruby>
16308 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16312 # Note that tidy doesn't handle this correctly.
16316 <bdo>X<bdo>Y</bdo>Z</bdo>
16318 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16330 [[Media:Foobar.jpg]]
16332 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16337 Media link with text
16339 [[Media:Foobar.jpg|A neat file to look at]]
16341 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16345 # FIXME: this is still bad HTML tag nesting
16346 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16348 Media link with nasty text
16350 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16352 <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>
16355 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16356 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16360 Media link to nonexistent file (T3702)
16362 [[Media:No such.jpg]]
16364 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16369 Image link to nonexistent file (T3850 - good)
16371 [[File:No_such.jpg]]
16373 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16376 <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>
16380 :Image link to nonexistent file (T3850 - bad)
16382 [[:Image:No such.jpg]]
16384 <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>
16387 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16393 Character reference normalization in link text (T3938)
16395 [[Main Page|this&that]]
16397 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16404 Test for unicode normalization
16406 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16410 (T21451) Links should refer to the normalized form.
16418 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16419 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16420 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16421 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16422 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16427 Empty attribute crash test (T4067)
16429 <font color="">foo</font>
16431 <p><font color="">foo</font>
16436 Empty attribute crash test single-quotes (T4067)
16438 <font color=''>foo</font>
16440 <p><font color="">foo</font>
16445 Attribute test: equals, then nothing
16447 parsoid=wt2html,html2html
16449 <font color=>foo</font>
16451 <p><font color="">foo</font>
16454 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16458 Attribute test: unquoted value
16460 parsoid=wt2html,html2html
16462 <font color=x>foo</font>
16464 <p><font color="x">foo</font>
16467 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16471 Attribute test: unquoted but illegal value (hash)
16473 <font color=#x>foo</font>
16475 <p><font color="#x">foo</font>
16479 # Parsoid does not serialize to empty attribute syntax,
16480 # so wt2wt and html2wt cases are skipped
16482 Attribute test: no value (T54330)
16484 parsoid=wt2html,html2html
16486 <font color>foo</font>
16488 <p><font color="">foo</font>
16491 <p><font color="">foo</font></p>
16495 T4095: link with three closing brackets
16499 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16502 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16506 T4095: link with pipe and three closing brackets
16508 [[Main Page|link]]]
16510 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16513 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16517 T4095: link with pipe and three closing brackets, version 2
16519 [[Main Page|[http://example.com/]]]
16521 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16524 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16533 Template:Dangerous attribute
16535 " onmouseover="alert(document.cookie)
16539 Template:Dangerous style attribute
16541 border-size: expression(alert(document.cookie))
16547 <div style="float: right; {{{1}}}">Magic div</div>
16551 T4304: HTML attribute safety (safe template; regression T4309)
16553 <div title="{{test}}"></div>
16555 <div title="This is a test template"></div>
16558 <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>
16561 # Parsoid has enough context to handle this case
16563 T4304: HTML attribute safety (dangerous template; 2309)
16565 <div title="{{dangerous attribute}}"></div>
16567 <div title=""></div>
16570 <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>
16574 T4304: HTML attribute safety (dangerous style template; 2309)
16576 <div style="{{dangerous style attribute}}"></div>
16578 <div style="/* insecure input */"></div>
16581 <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>
16585 T4304: HTML attribute safety (safe parameter; 2309)
16587 {{div style|width: 200px}}
16589 <div style="float: right; width: 200px">Magic div</div>
16592 <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>
16596 T4304: HTML attribute safety (unsafe parameter; 2309)
16598 {{div style|width: expression(alert(document.cookie))}}
16600 <div style="/* insecure input */">Magic div</div>
16603 <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>
16606 ## Parsoid output here differs; needs investigation.
16608 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
16610 {{div style|"><script>alert(document.cookie)</script>}}
16612 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16616 ## Parsoid output here differs; needs investigation.
16618 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16620 {{div style|" ><script>alert(document.cookie)</script>}}
16622 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16627 T4304: HTML attribute safety (link)
16629 <div title="[[Main Page]]"></div>
16631 <div title="[[Main Page]]"></div>
16636 T4304: HTML attribute safety (italics)
16638 <div title="''foobar''"></div>
16640 <div title="''foobar''"></div>
16645 T4304: HTML attribute safety (bold)
16647 <div title="'''foobar'''"></div>
16649 <div title="'''foobar'''"></div>
16654 T4304: HTML attribute safety (ISBN)
16656 <div title="ISBN 1234567890"></div>
16658 <div title="ISBN 1234567890"></div>
16663 T4304: HTML attribute safety (RFC)
16665 <div title="RFC 1234"></div>
16667 <div title="RFC 1234"></div>
16672 T4304: HTML attribute safety (PMID)
16674 <div title="PMID 1234567890"></div>
16676 <div title="PMID 1234567890"></div>
16681 T4304: HTML attribute safety (web link)
16683 <div title="http://example.com/"></div>
16685 <div title="http://example.com/"></div>
16690 T4304: HTML attribute safety (named web link)
16692 <div title="[http://example.com/ link]"></div>
16694 <div title="[http://example.com/ link]"></div>
16699 T5244: HTML attribute safety (extension; safe)
16701 <div style="<nowiki>background:blue</nowiki>"></div>
16703 <div style="background:blue"></div>
16706 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
16710 T5244: HTML attribute safety (extension; unsafe)
16712 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16714 <div style="/* insecure input */"></div>
16717 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
16720 # More MSIE fun discovered by Tom Gilder
16723 MSIE CSS safety test: spurious slash
16725 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16727 <div style="/* insecure input */">evil</div>
16730 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
16734 MSIE CSS safety test: hex code
16736 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16738 <div style="/* insecure input */">evil</div>
16741 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
16745 MSIE CSS safety test: comment in url
16747 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16749 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16752 <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>
16756 MSIE CSS safety test: comment in expression
16758 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16760 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16763 <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>
16767 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
16769 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16771 <p style="/* invalid control char */">A</p>
16774 <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>
16778 MSIE 6 CSS safety test: Fullwidth (T57332)
16780 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16781 <div style="top:EXPRESSION(alert())">B</div>
16783 <p style="/* insecure input */">A</p>
16784 <div style="/* insecure input */">B</div>
16787 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
16788 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
16792 MSIE 6 CSS safety test: IPA extensions (T57332)
16794 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16795 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16797 <div style="/* insecure input */">A</div>
16798 <p style="/* insecure input */">B</p>
16801 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
16802 <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>
16806 MSIE 6 CSS safety test: sup/sub script (T57332)
16808 <div style="background-image:url⁽javascript:alert())">A</div>
16809 <div style="background-image:url₍javascript:alert())">B</div>
16810 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16812 <div style="/* insecure input */">A</div>
16813 <div style="/* insecure input */">B</div>
16814 <p style="/* insecure input */">C</p>
16817 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
16818 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
16819 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
16825 parsoid=wt2html,html2html
16828 title="data:text/html,<img src=1 onerror=alert(1)>"
16829 style="-o-link:attr(title);-o-link-source:current">X</div>
16831 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16834 <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>
16838 MSIE 6 CSS safety test: Repetition markers (T57332)
16840 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16841 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16842 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16843 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16844 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16845 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16846 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16848 <p style="/* insecure input */">A</p>
16849 <p style="/* insecure input */">B</p>
16850 <p style="/* insecure input */">C</p>
16851 <p style="/* insecure input */">D</p>
16852 <p style="/* insecure input */">E</p>
16853 <p style="/* insecure input */">F</p>
16854 <p style="/* insecure input */">G</p>
16857 <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>
16858 <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>
16859 <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>
16860 <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>
16861 <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>
16862 <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>
16863 <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>
16867 Table attribute legitimate extension
16870 !+ style="<nowiki>color:blue</nowiki>"| status
16875 <th style="color:blue"> status
16881 Table attribute safety
16884 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16889 <th style="/* insecure input */"> status
16895 CSS line continuation 1
16897 <div style="background-image: u\ rl(test.jpg);"></div>
16899 <div style="/* insecure input */"></div>
16904 CSS line continuation 2
16906 <div style="background-image: u\ rl(test.jpg); "></div>
16908 <div style="/* invalid control char */"></div>
16919 Expansion of multi-line templates in attribute values (T8255)
16921 <div style="background: {{identity|#00FF00}}">-</div>
16923 <div style="background: #00FF00">-</div>
16928 Expansion of multi-line templates in attribute values (T8255 sanity check)
16930 <div style="background:
16933 <div style="background: #00FF00">-</div>
16936 <div style="background:
16941 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
16943 <div style="background: #00FF00">-</div>
16945 <div style="background: #00FF00">-</div>
16950 Tags which are hidden from Tidy cannot pass through the Sanitizer
16952 <mw:toc><script>alert();</script></mw:toc>
16954 <p><mw:toc><script>alert();</script></mw:toc></p>
16958 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16962 Parser hook: empty input
16973 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16976 ## Don't expect parsoid to rt this form.
16978 Parser hook: empty input using terminated empty elements
16980 parsoid=wt2html,html2html
16991 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16995 Parser hook: empty input using terminated empty elements (space before)
17006 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17010 Parser hook: basic input
17021 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17024 ## Don't expect parsoid to rt this form.
17026 Parser hook: case insensitive
17028 parsoid=wt2html,html2html
17039 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17042 ## Don't expect parsoid to rt this form.
17044 Parser hook: case insensitive, redux
17046 parsoid=wt2html,html2html
17057 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17061 Parser hook: nested tags
17063 <tag><tag></tag></tag>
17072 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17076 Parser hook: basic arguments
17078 <tag width="200" height="100" depth="50" square=""></tag>
17091 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17094 ## Don't expect parsoid to rt this form.
17096 Parser hook: basic arguments, variations
17098 parsoid=wt2html,html2html
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>
17117 Parser hook: argument containing a forward slash (T7344)
17119 <tag filename="/tmp/bla"></tag>
17124 'filename' => '/tmp/bla',
17129 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17132 ## Don't expect parsoid to rt this form.
17134 Parser hook: empty input using terminated empty elements (T4374)
17136 parsoid=wt2html,html2html
17148 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17151 ## </tag> should be output literally since there is no matching tag that begins it
17152 ## Don't expect parsoid to rt this form.
17154 Parser hook: basic arguments using terminated empty elements (T4374)
17158 <tag width=200 height = "100" depth = '50' square/>
17175 <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
17179 ## Don't expect parsoid to rt this form.
17181 Parser hook: Don't allow unclosed extension tags
17187 this is a '''test'''
17189 <p>test <tag>123
17190 </p><p>this is a <b>test</b>
17193 <p>test <tag>123</p>
17195 <p>this is a <b>test</b></p>
17199 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17203 Parser hook: static parser hook not inside a comment
17205 <statictag>hello, world</statictag>
17207 <statictag action="flush" />
17213 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17214 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17218 Parser hook: static parser hook inside a comment
17220 <!-- <statictag>hello, world</statictag> -->
17221 <statictag action="flush" />
17226 <!-- <statictag>hello, world</statictag> -->
17227 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17230 # Nested template calls; this case was broken by Parser.php rev 1.506,
17234 Template:One-parameter
17236 (My parameter is: {{{1}}})
17240 Template:Map-one-parameter
17242 {{{{{1}}}|{{{2}}}}}
17246 Nested template calls
17248 {{Map-one-parameter|One-parameter|param}}
17250 <p>(My parameter is: param)
17259 # HTML+Tidy effectively strips out the empty tags completely
17260 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17261 # which Tidy would have done for the PHP parser had there been content inside it.
17263 Sanitizer: Closing of open tags
17265 <s></s><table></table>
17267 <s></s><table></table>
17270 <p><s></s></p><table></table>
17274 Sanitizer: Closing of open but not closed tags
17283 Sanitizer: Closing of closed but not open tags
17293 Sanitizer: Closing of closed but not open table tags
17297 Table not started</td></tr></table>
17299 <p>Table not started</p>
17301 <p>Table not started</p>
17305 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17307 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17309 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17312 <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>
17315 # In HTML5, the restrictions are that id must contain at least one character,
17316 # and must not contain any space characters.
17318 Sanitizer: Validating the contents of the id attribute (T6515)
17322 <br id="" /><br id="a space" />
17327 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17329 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
17333 <br id="foo" /><br id="foo" />
17335 Something need to be done. foo-2 ?
17339 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17342 <meta itemprop="hello" content="world">
17343 <meta http-equiv="refresh" content="5">
17344 <meta itemprop="hello" http-equiv="refresh" content="5">
17345 <link itemprop="hello" href="{{SERVER}}">
17346 <link rel="stylesheet" href="{{SERVER}}">
17347 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17351 <p> <meta itemprop="hello" content="world" />
17352 <meta http-equiv="refresh" content="5">
17353 <meta itemprop="hello" content="5" />
17355 <link itemprop="hello" href="http://example.org" />
17356 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17357 <link itemprop="hello" href="http://example.org" />
17363 Language converter: output gets cut off unexpectedly (T7757)
17367 this bit is safe: }-
17369 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17371 then we get cut off here: }-
17373 all additional text is vanished
17375 <p>this bit is safe: }-
17376 </p><p>but if we add a conversion instance: xxx
17377 </p><p>then we get cut off here: }-
17378 </p><p>all additional text is vanished
17383 Self closed html pairs (T7487)
17386 <center><font id="bug" />Centered text</center>
17387 <div><font id="bug2" />In div text</div>
17389 <center><font id="bug" />Centered text</center>
17390 <div><font id="bug2" />In div text</div>
17399 Punctuation: nbsp before exclamation
17403 <p>C'est grave !
17408 Punctuation: CSS !important (T13874)
17410 <div style="width:50% !important">important</div>
17412 <div style="width:50% !important">important</div>
17417 Punctuation: CSS ! important (T13874; with space after)
17419 <div style="width:50% ! important">important</div>
17421 <div style="width:50% ! important">important</div>
17426 HTML bullet list, closed tags (T7497)
17439 <ul data-parsoid='{"stx":"html"}'>
17440 <li data-parsoid='{"stx":"html"}'>One</li>
17441 <li data-parsoid='{"stx":"html"}'>Two</li>
17447 HTML bullet list, unclosed tags (T7497)
17459 <ul data-parsoid='{"stx":"html"}'>
17460 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17461 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17467 HTML ordered list, closed tags (T7497)
17480 <ol data-parsoid='{"stx":"html"}'>
17481 <li data-parsoid='{"stx":"html"}'>One</li>
17482 <li data-parsoid='{"stx":"html"}'>Two</li>
17488 HTML ordered list, unclosed tags (T7497)
17501 <ol data-parsoid='{"stx":"html"}'>
17502 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17503 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17509 HTML nested bullet list, closed tags (T7497)
17532 <ul data-parsoid='{"stx":"html"}'>
17533 <li data-parsoid='{"stx":"html"}'>One</li>
17534 <li data-parsoid='{"stx":"html"}'>Two:
17535 <ul data-parsoid='{"stx":"html"}'>
17536 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17537 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17544 HTML nested bullet list, open tags (T7497)
17581 HTML nested ordered list, closed tags (T7497)
17606 HTML nested ordered list, open tags (T7497)
17643 HTML ordered list item with parameters oddity
17645 <ol><li id="fragment">One</li>
17648 <ol><li id="fragment">One</li>
17653 # parsoid doesn't explicitly mark autonumbered links, see T55505
17655 T7918: autonumbering
17657 [http://first/] [http://second] [ftp://ftp]
17661 [mailto:enclosed@mail.tld With target]
17663 [mailto:enclosed@mail.tld]
17665 mailto:inline@mail.tld
17667 <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>
17668 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17669 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17670 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17671 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17674 <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>
17675 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17676 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17677 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17678 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17683 # Security and HTML correctness
17684 # From Nick Jenkins' fuzz testing
17688 Fuzz testing: Parser13
17703 Fuzz testing: Parser14
17708 <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>
17709 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17711 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17717 <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>
17719 <div id="toc" class="toc">
17720 <div id="toctitle">
17724 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17731 Fuzz testing: Parser14-table
17733 parsoid=wt2html,html2html
17738 <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>
17739 <table style="__TOC__">
17744 <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>
17745 <table style="__TOC__">
17752 <table style="__TOC__"></table>
17755 # Known to produce bogus xml (extra </td>)
17757 Fuzz testing: Parser16
17784 Fuzz testing: Parser21
17787 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17792 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17802 Fuzz testing: Parser22
17804 http://===r:::https://b
17808 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17816 # Known to produce bad XML for now
17818 Fuzz testing: Parser24
17825 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17826 <br style="onmouseover='alert(document.cookie);' " />
17828 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17833 <u class="|">}}}} >
17834 <br style="onmouseover='alert(document.cookie);'" />
17836 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17844 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
17845 <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":""}]]}'>
17846 <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}'>
17850 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
17853 # Note: the current result listed for this is not what the original one was,
17854 # but the original bug was JavaScript injection, which is fixed in any case.
17855 # It's not clear that the original result listed was any more correct than the
17856 # current one. Original result:
17859 # <li class="||">
17860 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17862 Fuzz testing: Parser25 (T8055)
17868 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17870 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17873 <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"]}'>
17874 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
17878 Fuzz testing: URL adjacent extension (with space, clean)
17880 http://example.com <nowiki>junk</nowiki>
17882 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17885 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17889 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17891 http://example.com<nowiki>junk</nowiki>
17893 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17896 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17900 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17902 http://example.com<pre>junk</pre>
17904 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17907 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17912 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
17916 Fuzz testing: image with bogus manual thumbnail
17918 [[Image:foobar.jpg|thumbnail= ]]
17920 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17923 <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>
17927 Fuzz testing: encoded newline in generated HTML replacements (T8577)
17929 <pre dir=" "></pre>
17931 <pre dir=" "></pre>
17934 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
17938 Parsing optional HTML elements (T8171)
17943 <td> Some tabular data</td>
17944 <td> More tabular data ...
17945 <td> And yet som tabular data</td>
17951 <td> Some tabular data</td>
17952 <td> More tabular data ...
17953 </td><td> And yet som tabular data</td>
17960 Correct handling of <td>, <tr> (T8171)
17965 <td> Some tabular data</td>
17966 <td> More tabular data ...</td>
17967 <td> And yet som tabular data</td>
17973 <td> Some tabular data</td>
17974 <td> More tabular data ...</td>
17975 <td> And yet som tabular data</td>
17983 Parsing crashing regression (fr:JavaScript)
17987 <p></body></x>
17992 Inline wiki vs wiki block nesting
17998 <p><b>Bold paragraph</b>
17999 </p><p>New wiki paragraph
18003 # FIXME: The current php output is documented
18004 # and desired output is the parsoid target.
18006 Inline HTML vs wiki block nesting
18012 <p><b>Bold paragraph
18013 </p><p>New wiki paragraph</b>
18016 <p><b>Bold paragraph</b>
18017 </p><p>New wiki paragraph
18021 # Original result was this:
18022 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18024 # While that might be marginally more intuitive, maybe, the six-apostrophe
18025 # construct is clearly pathological and the result stated here (which is what
18026 # the parser actually does) is about as reasonable as anything.
18028 Mixing markup for italics and bold
18031 '''bold''''''bold''bolditalics'''''
18033 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18041 Article for special page transclusion test
18045 Special page transclusion
18048 {{Special:Prefixindex/Xyzzyx}}
18050 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18056 Special page transclusion twice (T7021)
18059 {{Special:Prefixindex/Xyzzyx}}
18060 {{Special:Prefixindex/Xyzzyx}}
18062 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18064 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18070 Transclusion of default MediaWiki message
18072 {{MediaWiki:Mainpage}}
18079 Transclusion of nonexistent MediaWiki message
18081 {{MediaWiki:Mainpagexxx}}
18083 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18088 Transclusion of MediaWiki message with underscore
18090 {{MediaWiki:history_short}}
18097 Transclusion of MediaWiki message with space
18099 {{MediaWiki:history short}}
18106 Invalid header with following text
18116 Section extraction test (section 0)
18136 Section extraction test (section 1)
18158 Section extraction test (section 2)
18179 Section extraction test (section 3)
18199 Section extraction test (section 4)
18223 Section extraction test (section 5)
18243 Section extraction test (section 6)
18264 Section extraction test (section 7)
18284 Section extraction test (section 8)
18304 Section extraction test (section 9)
18325 Section extraction test (section 10)
18345 Section extraction test (nonexistent section 11)
18364 Section extraction test with bogus heading (section 1)
18369 ==bogus== not a legal section
18373 ==bogus== not a legal section
18377 Section extraction test with bogus heading (section 2)
18382 ==bogus== not a legal section
18389 Section extraction test with comment after heading (section 1)
18401 Section extraction test with comment after heading (section 2)
18413 Section extraction test with bogus <nowiki> heading (section 1)
18418 ==bogus== <nowiki>not a legal section</nowiki>
18422 ==bogus== <nowiki>not a legal section</nowiki>
18426 Section extraction test with bogus <nowiki> heading (section 2)
18431 ==bogus== <nowiki>not a legal section</nowiki>
18437 # Formerly testing for T4587, now resolved by the use of unmarked sections
18438 # instead of respecting commented sections
18440 Section extraction prefixed by comment (section 1)
18451 Section extraction prefixed by comment (section 2)
18461 # Formerly testing for T4607, now resolved by the use of unmarked sections
18462 # instead of respecting HTML-style headings
18464 Section extraction, mixed wiki and html (section 1)
18480 Section extraction, mixed wiki and html (section 2)
18496 # Formerly testing for T5342
18498 Section extraction, heading surrounded by <noinclude>
18502 <noinclude>==unmarked==</noinclude>
18508 # Test behavior of T21910
18510 Sectiion with all-equals
18515 The line above must have a trailing space
18518 But just in case it doesn't...
18522 But just in case it doesn't...
18526 Section replacement test (section 0)
18557 Section replacement test (section 1)
18586 Section replacement test (section 2)
18616 Section replacement test (section 3)
18647 Section replacement test (section 4)
18674 Section replacement test (section 5)
18705 Section replacement test (section 6)
18735 Section replacement test (section 7)
18766 Section replacement test (section 8)
18797 Section replacement test (section 9)
18826 Section replacement test (section 10)
18856 Section replacement test with initial whitespace (T15728)
18860 Preformatted initial line
18864 Preformatted initial line
18871 Section extraction, heading followed by pre with 20 spaces (T8398)
18883 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
18896 Section extraction, <pre> around bogus header (T12309)
18913 Section replacement, <pre> around bogus header (T12309)
18934 Handling of 
 in URLs
18938 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18941 <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>
18945 Handling of %0A in URLs
18949 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18952 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18955 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18957 5 quotes, code coverage +1 line
18964 <p><b><i></i></b></p>
18967 # same html as previous, but wikitext adjusted to match parsoid html2wt
18968 # note that wt2html and html2html will put the <i> before the <b>
18970 5 quotes, code coverage +1 line w/ nowiki (1)
18972 parsoid=wt2wt,html2wt
18974 '''''<nowiki/>'''''
18979 <p><b><i></i></b></p>
18982 # same as previous, just swapping the <i> and <b>
18984 5 quotes, code coverage +1 line w/ nowiki (2)
18986 '''''<nowiki/>'''''
18991 <p><i><b></b></i></p>
18995 Special:Search page linking.
18999 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19004 {{!}} is a magic word
19006 {{!}} is a magic word there and {{!}} is still a magic word here
19007 | is not a magic word here but {{!}} is still a magic word here
19009 <p>| is a magic word there and | is still a magic word here
19010 | is not a magic word here but | is still a magic word here
19013 <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
19014 | 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>
19021 title=[[Parser test]]
19026 * {{FULLPAGENAMEE}}
19028 * {{BASEPAGENAMEE}}
19032 * {{ROOTPAGENAMEE}}
19034 * {{TALKPAGENAMEE}}
19035 * {{SUBJECTPAGENAME}}
19036 * {{SUBJECTPAGENAMEE}}
19039 * {{NAMESPACENUMBER}}
19043 * {{SUBJECTSPACEE}}
19044 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19046 <ul><li> Parser test</li>
19047 <li> Parser_test</li>
19048 <li> Parser test</li>
19049 <li> Parser_test</li>
19050 <li> Parser test</li>
19051 <li> Parser_test</li>
19052 <li> Parser test</li>
19053 <li> Parser_test</li>
19054 <li> Parser test</li>
19055 <li> Parser_test</li>
19056 <li> Talk:Parser test</li>
19057 <li> Talk:Parser_test</li>
19058 <li> Parser test</li>
19059 <li> Parser_test</li>
19067 <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>
19070 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19072 ## Parsoid thinks the "centre" here is a property, not a caption.
19077 "modes": ["wt2html"],
19078 "nativeGallery": true
19086 image4 |300px| centre
19087 image5.svg| http://///////
19092 <ul class="gallery mw-gallery-traditional">
19093 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19094 <div class="thumb" style="height: 150px;">Image1.png</div>
19095 <div class="gallerytext">
19098 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19099 <div class="thumb" style="height: 150px;">Image2.gif</div>
19100 <div class="gallerytext">
19103 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19104 <div class="thumb" style="height: 150px;">Image3</div>
19105 <div class="gallerytext">
19108 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19109 <div class="thumb" style="height: 150px;">Image4</div>
19110 <div class="gallerytext">
19115 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19116 <div class="thumb" style="height: 150px;">Image5.svg</div>
19117 <div class="gallerytext">
19118 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19122 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19123 <div class="thumb" style="height: 150px;">* image6</div>
19124 <div class="gallerytext">
19130 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19131 <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>
19132 <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>
19133 <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>
19134 <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>
19135 <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>
19136 <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>
19141 Gallery (with options, html)
19144 "modes": ["wt2html", "html2html"],
19145 "nativeGallery": true
19148 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19149 File:Nonexistent.jpg|caption
19150 File:Nonexistent.jpg
19151 image:foobar.jpg|some '''caption''' [[Main Page]]
19153 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19156 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19157 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19158 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19159 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19160 <div class="gallerytext">
19165 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19166 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19167 <div class="gallerytext">
19170 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19171 <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>
19172 <div class="gallerytext">
19173 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19177 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19178 <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>
19179 <div class="gallerytext">
19182 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19183 <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>
19184 <div class="gallerytext">
19192 <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":{}}'>
19193 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19194 <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>
19195 <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>
19196 <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>
19197 <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>
19198 <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>
19203 Gallery (with options, extsrc)
19206 "nativeGallery": false
19209 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19210 File:Nonexistent.jpg|caption
19211 File:Nonexistent.jpg
19212 image:foobar.jpg|some '''caption''' [[Main Page]]
19214 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19217 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19218 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19219 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19220 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19221 <div class="gallerytext">
19226 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19227 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19228 <div class="gallerytext">
19231 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19232 <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>
19233 <div class="gallerytext">
19234 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19238 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19239 <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>
19240 <div class="gallerytext">
19243 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19244 <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>
19245 <div class="gallerytext">
19253 <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"}}'>
19254 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19255 <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>
19256 <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>
19257 <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>
19258 <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>
19259 <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>
19264 Gallery with link that has fragment
19267 "modes": ["wt2html", "html2html"],
19268 "nativeGallery": true
19272 image:foobar.jpg|link=Main_Page
19273 image:foobar.jpg|link=Main_Page#section
19274 image:foobar.jpg|link=Main Page#section|caption
19277 <ul class="gallery mw-gallery-traditional">
19278 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19279 <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>
19280 <div class="gallerytext">
19283 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19284 <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>
19285 <div class="gallerytext">
19288 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19289 <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>
19290 <div class="gallerytext">
19298 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19299 <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>
19300 <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>
19301 <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>
19305 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19307 Gallery with template inside caption
19310 "nativeGallery": true
19313 <gallery caption="{{echo|hi}}">
19314 File:Foobar.jpg|{{echo|ho}}
19317 <ul class="gallery mw-gallery-traditional">
19318 <li class='gallerycaption'>{{echo|hi}}</li>
19319 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19320 <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>
19321 <div class="gallerytext">
19329 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19330 <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>
19331 <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>
19336 Gallery with wikitext inside caption
19339 "nativeGallery": true
19343 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19344 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19347 <ul class="gallery mw-gallery-traditional">
19348 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19349 <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>
19350 <div class="gallerytext">
19351 <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>
19355 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19356 <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>
19357 <div class="gallerytext">
19358 <p>This is a test template
19365 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19366 <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>
19367 <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>
19372 Gallery (with showfilename option)
19375 "nativeGallery": true
19378 <gallery showfilename="">
19379 File:Nonexistent.jpg|caption
19380 File:Nonexistent.jpg
19381 File:Foobar.jpg|some '''caption''' [[Main Page]]
19385 <ul class="gallery mw-gallery-traditional">
19386 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19387 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19388 <div class="gallerytext">
19389 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19394 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19395 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19396 <div class="gallerytext">
19397 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19401 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19402 <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>
19403 <div class="gallerytext">
19404 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19405 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19409 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19410 <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>
19411 <div class="gallerytext">
19412 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19419 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19420 <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>
19421 <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>
19422 <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>
19423 <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>
19427 ## Should Parsoid be preserving these variations?
19429 Gallery (with namespace-less filenames)
19432 "modes": ["wt2html", "html2html"],
19433 "nativeGallery": true
19437 File:Nonexistent.jpg
19443 <ul class="gallery mw-gallery-traditional">
19444 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19445 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19446 <div class="gallerytext">
19449 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19450 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19451 <div class="gallerytext">
19454 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19455 <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>
19456 <div class="gallerytext">
19459 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19460 <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>
19461 <div class="gallerytext">
19467 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19468 <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>
19469 <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>
19470 <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>
19471 <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>
19476 Gallery override link with WikiLink (T36852)
19479 "nativeGallery": true
19483 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19486 <ul class="gallery mw-gallery-traditional">
19487 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19488 <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>
19489 <div class="gallerytext">
19495 <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":{}}'>
19496 <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>
19501 Gallery override link with absolute external link (T36852)
19504 "nativeGallery": true
19508 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19511 <ul class="gallery mw-gallery-traditional">
19512 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19513 <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>
19514 <div class="gallerytext">
19520 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19521 <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>
19526 Gallery override link with absolute external link with LanguageConverter
19531 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19534 <ul class="gallery mw-gallery-traditional">
19535 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19536 <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>
19537 <div class="gallerytext">
19547 Gallery override link with malicious javascript (T36852)
19550 "modes": ["wt2html", "html2html"],
19551 "nativeGallery": true
19555 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19558 <ul class="gallery mw-gallery-traditional">
19559 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19560 <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>
19561 <div class="gallerytext">
19567 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19568 <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>
19573 Gallery with invalid title as link (T45964)
19576 "modes": ["wt2html", "html2html"],
19577 "nativeGallery": true
19581 File:Foobar.jpg|link=<
19584 <ul class="gallery mw-gallery-traditional">
19585 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19586 <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>
19587 <div class="gallerytext">
19593 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19594 <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>
19599 Serialize gallery without attrs in data-mw
19602 "modes": ["html2wt"],
19603 "nativeGallery": true
19606 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
19607 <li class="gallerycaption">123</li>
19608 <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>
19611 <gallery caption="123">
19617 HTML Hex character encoding (spells the word "JavaScript")
19619 parsoid=wt2html,wt2wt,html2html
19621 JavaScript
19623 <p>JavaScript
19628 <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>
19632 HTML Hex character encoding bogus encoding (T28437 regression check)
19636 <p>&#xsee;&#XSEE;
19639 <p>&#xsee;&#XSEE;</p>
19643 HTML Hex character encoding mixed case
19645 parsoid=wt2html,wt2wt,html2html
19654 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19657 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19658 # Note that U+000C (form feed) is not a valid XML character, so
19659 # it is banned even though allowed in HTML5.
19661 Illegal character references (T106578)
19666 ; Control (low): 
19667 ; Control (high):  Ÿ
19668 ; Surrogate: ��
19669 ; This is an okay astral character: 💩
19678 <dt>Control (low)</dt>
19680 <dt>Control (high)</dt>
19681 <dd>&#x7F; &#x9F;</dd>
19683 <dd>&#xD83D;&#xDCA9;</dd>
19684 <dt>This is an okay astral character</dt>
19690 __FORCETOC__ override
19702 ISBN 978-0-1234-56 789
19704 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19707 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19709 <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>
19713 ISBN followed by 5 spaces
19724 ISBN ISBN 1234567890
19726 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19729 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19732 # Uppercase X and lowercase x as well
19743 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19744 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19745 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19746 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19747 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19748 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19751 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19752 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19753 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19754 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19755 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19756 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19760 ISBN with empty prefix (parsoid test)
19764 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19767 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19771 T24905: <abbr> followed by ISBN followed by </a>
19773 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19775 <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>
19778 <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>
19786 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19791 Double RFC with a wiki link
19795 <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>
19804 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19807 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19811 Centre-aligned image
19813 [[Image:foobar.jpg|centre]]
19815 <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>
19822 [[Image:foobar.jpg|none]]
19824 <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>
19829 Width + Height sized image (using px) (height is ignored)
19831 [[Image:foobar.jpg|640x480px]]
19833 <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>
19838 Width-sized image (using px, no following whitespace)
19840 [[Image:foobar.jpg|640px]]
19842 <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>
19847 Width-sized image (using px, with following whitespace - test regression from r39467)
19849 [[Image:foobar.jpg|640px ]]
19851 <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>
19856 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19858 [[Image:foobar.jpg| 640px]]
19860 <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>
19865 Image with page parameter
19869 [[File:LoremIpsum.djvu|page=2]]
19871 <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>
19874 <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>
19878 Another italics / bold test
19886 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19892 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19895 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19899 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19901 Images with the "|" character in the comment
19903 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19905 <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>
19908 <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>
19912 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19914 <html><script>alert(1);</script></html>
19916 <p><html><script>alert(1);</script></html>
19921 HTML with raw HTML ($wgRawHtml==true)
19925 <html><script>alert(1);</script></html>
19927 <p><script>alert(1);</script>
19932 Parents of subpages, one level up
19934 subpage title=[[Subpage test/L1/L2/L3]]
19938 <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>
19944 Parents of subpages, one level up, not named
19946 subpage title=[[Subpage test/L1/L2/L3]]
19950 <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>
19957 Parents of subpages, two levels up
19959 subpage title=[[Subpage test/L1/L2/L3]]
19965 <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
19966 </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>
19971 Parents of subpages, two levels up, without trailing slash or name.
19973 subpage title=[[Subpage test/L1/L2/L3]]
19982 Parents of subpages, two levels up, with lots of extra trailing slashes.
19984 subpage title=[[Subpage test/L1/L2/L3]]
19988 <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>
19993 Subpage test/L1/L2/L3Sibling
19999 Transclusion of a sibling page (one level up)
20001 subpage title=[[Subpage test/L1/L2/L3]]
20010 Transclusion of a child page
20012 subpage title=[[Subpage test/L1/L2]]
20020 # This is wt2html only in Parsoid because we add <nowiki>
20021 # because of {{..}} and we don't expect to fix that to
20022 # eliminate the nowikis selective for {{..}} markup.
20024 Non-transclusion because of too many up levels
20026 subpage title=[[Subpage test/L1/L2/L3]]
20029 {{../../../../More than parent}}
20031 <p>{{../../../../More than parent}}
20034 <p>{{../../../../More than parent}}</p>
20038 Definition list code coverage
20044 <dl><dt> title  </dt>
20046 <dt> title </dt>
20052 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20053 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20054 <dt>title</dt><dd> def</dd></dl>
20058 Don't fall for the self-closing div
20060 <div>hello world</div/>
20062 <div>hello world</div>
20071 <p>[[:Template:Msg]]
20080 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20084 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20086 Always escape literal '>' in output, not just after '<'
20100 <p>This is a test template
20101 This is a test template
20113 Inclusion of !userCanEdit() content
20117 <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>
20123 Out-of-order TOC heading levels
20132 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20134 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20136 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20137 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20140 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20142 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20143 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20149 <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>
20150 <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>
20151 <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>
20152 <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>
20153 <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>
20154 <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>
20160 ISBN with a dummy number
20170 ISBN with space-delimited number
20174 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20180 ISBN with multiple spaces, no number
20199 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20200 </p><p>ISBN 12345678901
20206 ISBN with trailing year (T9110)
20208 ISBN 1-234-56789-0 - 2006
20210 ISBN 1 234 56789 0 - 2006
20212 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20213 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20221 {{anchorencode:foo bar©#%n}}
20223 <p>foo_bar.C2.A9.23.25n
20228 anchorencode trims spaces
20230 {{anchorencode: __pretty__please__}}
20237 anchorencode deals with links
20239 {{anchorencode: [[hello|world]] [[hi]]}}
20246 anchorencode deals with templates
20248 {{anchorencode: {{Foo}} }}
20255 anchorencode encodes like the TOC generator: (T20431)
20257 === _ +:.3A%3A&&]] ===
20258 {{anchorencode: _ +:.3A%3A&&]] }}
20261 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20262 <p>.2B:.3A.253A.26.26.5D.5D
20267 T8200: blockquotes and paragraph formatting
20288 T10293: Use of center tag ruins paragraph formatting
20309 Parsing of overlapping (improperly nested) inline html tags
20311 <span><s>x</span></s>
20313 <p><span><s>x</span></s></span>
20316 <p><span><s>x</s></span>
20321 ### Language variants related tests
20324 Self-link in language variants
20326 title=[[Dunav]] language=sr
20328 Both [[Dunav]] and [[Дунав]] are names for this river.
20330 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
20341 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20343 title=[[Duna]] language=sr
20345 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20347 <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.
20352 Link to a section of a variant of this title shouldn't be parsed as self-link
20354 title=[[Duna]] language=sr
20356 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20358 <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.
20363 Link to pages in language variants
20367 Main Page can be written as [[Маин Паге]]
20369 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20375 Multiple links to pages in language variants
20379 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20381 <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>.
20387 Simple template in language variants
20393 <p>This is a test template
20399 Template with explicit namespace in language variants
20405 <p>This is a test template
20411 Basic test for template parameter in language variants
20415 {{парамтест|param=foo}}
20417 <p>This is a test template with parameter foo
20422 Simple category in language variants
20426 [[Category:МедиаWики Усер'с Гуиде]]
20428 cat=МедиаWики_Усер'с_Гуиде sort=
20430 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20445 ## We used to, but no longer wt2wt this test since the default serializer
20446 ## will normalize all categories to serialize on their own line.
20447 ## This wikitext usage is going to be fairly uncommon in production and
20448 ## selser will take care of preserving formatting in those scenarios.
20450 Don't convert blue categorylinks to another variant (T35210)
20456 [[A]][[Category:分类]]
20460 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
20461 <link rel="mw:PageProp/Category" href="./Category:分类"/>
20465 Stripping -{}- tags (language variants)
20469 Latin proverb: -{Ne nuntium necare}-
20471 <p>Latin proverb: Ne nuntium necare
20477 Prevent conversion with -{}- tags (language variants)
20479 language=sr variant=sr-ec
20481 Latinski: -{Ne nuntium necare}-
20483 <p>Латински: Ne nuntium necare
20489 Prevent conversion of text with -{}- tags (language variants)
20491 language=sr variant=sr-ec
20493 Latinski: -{Ne nuntium necare}-
20495 <p>Латински: Ne nuntium necare
20501 Prevent conversion of links with -{}- tags (language variants)
20503 language=sr variant=sr-ec
20507 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20513 -{}- tags within headlines (within html for parserConvert())
20515 language=sr variant=sr-ec
20519 <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>
20525 Explicit definition of language variant alternatives
20527 language=zh variant=zh-tw
20529 -{zh:China;zh-tw:Taiwan}-, not China
20531 <p>Taiwan, not China
20537 Conversion around HTML tags
20539 language=sr variant=sr-ec
20541 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20542 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20545 <span title="ЛаCтин">ски</span>
20551 Explicit session-wise language variant mapping (A flag and - flag)
20553 language=zh variant=zh-tw
20555 Taiwan is not China.
20556 But -{A|zh:China;zh-tw:Taiwan}- is China,
20557 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20558 and -{China}- is China.
20560 <p>Taiwan is not China.
20561 But Taiwan is Taiwan,
20562 (This should be stripped!)
20563 and China is China.
20568 Explicit session-wise language variant mapping (H flag for hide)
20570 language=zh variant=zh-tw
20572 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20575 <p>(This should be stripped!)
20581 Adding explicit conversion rule for title (T flag)
20583 language=zh variant=zh-tw showtitle
20585 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20588 <p>Should be stripped!
20593 Testing that changing the language variant here in the tests actually works
20595 language=zh variant=zh showtitle
20597 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20600 <p>Should be stripped!
20605 Recursive conversion of alt and title attrs shouldn't clear converter state
20607 language=zh variant=zh-cn showtitle
20609 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20610 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20614 Should be stripped<span title="Exclamation">!</span>
20619 T26072: more test on conversion rule for title
20621 language=zh variant=zh-tw showtitle
20623 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20624 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20627 <p>This should be stripped!
20628 This won't take interferes with the title rule.
20633 Partly disable title conversion if variant == main language code
20635 language=zh variant=zh title=[[ZH]] showtitle
20637 -{T|zh-cn:CN;zh-tw:TW}-
20645 Partly disable title conversion if variant == main language code, more
20647 language=zh variant=zh title=[[ZH]] showtitle
20657 Raw output of variant escape tags (R flag)
20659 language=zh variant=zh-tw
20661 Raw: -{R|zh:China;zh-tw:Taiwan}-
20663 <p>Raw: zh:China;zh-tw:Taiwan
20668 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20670 language=zh variant=zh-cn
20672 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20679 Conversion rules from [numeric-only string] to [something else] (T48634)
20681 language=zh variant=zh-cn
20683 -{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
20690 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20692 language=zh variant=zh-cn
20694 -{H|zh-cn:foo;zh-tw:;}-foobar
20701 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20703 language=zh variant=zh-cn
20705 -{H|=>zh-cn:foo;}-foobar
20712 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20714 language=zh variant=zh-cn
20723 Nested using of manual convert syntax
20725 language=zh variant=zh-hk
20727 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20729 <p>Nested: Hello Hong Kong!
20734 HTML markups with conversion syntax in attribs, nested in other conversion blocks
20736 language=zh variant=zh-cn
20738 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
20740 <p><span title="X">A</span>
20745 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
20747 language=zh variant=zh-cn disabled
20749 -{<span title="-{X}-">A</span>}-
20751 <p><span title="X">A</span>
20755 # Since Parsoid is starting to emit canonical wikitext for links,
20756 # [http://example.com http://example.com] will not RT back to that
20759 Proper conversion of text in external links
20761 language=sr variant=sr-ec
20764 http://www.google.com
20765 gopher://www.google.com
20766 [http://www.google.com http://www.google.com]
20767 [gopher://www.google.com gopher://www.google.com]
20768 [https://www.google.com irc://www.google.com]
20769 [ftp://www.google.com www.google.com/ftp://dir]
20770 [//www.google.com www.google.com]
20772 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20773 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20774 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20775 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20776 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20777 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20778 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20781 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20782 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20783 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20784 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20785 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20786 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20787 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20791 Do not convert roman numbers to language variants
20793 language=sr variant=sr-ec
20797 <p>Фридрих IV је цар.
20802 Unclosed language converter markup "-{"
20813 Don't convert raw rule "-{R|=>}-" to "=>"
20824 Don't break link parsing if language converter markup is in the caption.
20826 language=sr variant=sr-ec
20828 [[Main Page|-{R|main page}-]]
20830 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20834 # FIXME: This test is currently broken in the PHP parser T153761
20836 T146304: Don't break template parsing if language converter markup is in the parameter.
20838 language=sr variant=sr-ec
20848 T146305: Don't break image parsing if language converter markup is in the caption.
20852 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
20854 <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>
20857 <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>
20861 T146305: Don't break image parsing if nested language converter markup is in the caption.
20863 language=zh variant=zh-cn
20865 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
20867 <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>
20870 <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>
20874 Don't break gallery if language converter markup is inside.
20879 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
20880 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
20883 <ul class="gallery mw-gallery-traditional">
20884 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20885 <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>
20886 <div class="gallerytext">
20887 <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>
20891 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20892 <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>
20893 <div class="gallerytext">
20894 <p>This is a test template
20903 T153135: Don't break list handling if language converter markup is in the item.
20905 language=zh variant=zh-cn
20907 ;-{zh-cn:AAA;zh-tw:BBB}-
20911 <dt>foo:bar</dt></dl>
20915 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}],"show":true}'></span></dt>
20916 <dt><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"foo:bar"}'></span></dt>
20920 // Note that parsoid does not protect colons unless language converter
20921 // markup is properly nested, because it is a backtracking parser.
20923 T153135: Unclosed markup in definition list (code coverage)
20925 language=zh variant=zh-cn
20930 <dl><dt><b>foo:bar</dt>
20931 <dt>-{zh-cn:AAA</b></dt></dl>
20935 <dt><b>foo:bar</b></dt>
20943 T153135: Nested language converter markup in definition list (code coverage)
20945 language=zh variant=zh-cn
20947 ;-{zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
20949 <dl><dt>AAA foo:bar bat:baz</dt>
20954 <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>
20960 T153140: Don't break table handling if language converter markup is in the cell.
20962 language=sr variant=sr-ec
20985 T2529: Uncovered bullet
20994 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20995 # Templates in Wikipedia rely on this behavior, as tidy has always been
20996 # enabled there. These tests are normally run *without* tidy, so specify the
20997 # full output here.
20998 # To test realistic parsing behavior, apply a tidy-like transformation to both
20999 # the expected output and your parser's output.
21001 T2529: Uncovered bullet leaving empty list, normally removed by tidy
21003 ******* Foo {{bullet}}
21005 <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>
21011 T2529: Uncovered table already at line-start
21034 T2529: Uncovered bullet in parser function result
21036 * Foo {{lc:{{bullet}} }}
21044 T7678: Double-parsed template argument
21046 {{lc:{{{1}}}|hello}}
21053 T7678: Double-parsed template invocation
21055 {{lc:{{paramtest {{!}} param = hello }} }}
21057 <p>{{paramtest | param = hello }}
21062 Case insensitivity of parser functions for non-ASCII characters (T10143)
21065 title=[[Main Page]]
21067 {{PRVNÍVELKÉ:ěščř}}
21068 {{prvnívelké:ěščř}}
21088 Morwen/13: Unclosed link followed by heading
21095 <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>
21100 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21107 <h1><span class="mw-headline" id="heading">heading</span></h1>
21112 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21119 <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>
21134 Paragraphs inside divs (no extra line breaks)
21146 Paragraphs inside divs (extra line break on open)
21161 Paragraphs inside divs (extra line break on close)
21176 Paragraphs inside divs (extra line break on open and close)
21193 Nesting tags, paragraphs on lines which begin with <div>
21195 <div></div><strong>A
21198 <p><strong>A</strong></p>
21199 <p><strong>B</strong></p>
21207 # T8200: <blockquote> should behave like <div> with respect to line breaks
21209 T8200: paragraphs inside blockquotes (no extra line breaks)
21211 <blockquote>Line one
21213 Line two</blockquote>
21215 <blockquote>Line one
21216 Line two</blockquote>
21220 <p>Line one Line two</p>
21225 T8200: paragraphs inside blockquotes (extra line break on open)
21230 Line two</blockquote>
21235 Line two</blockquote>
21240 Line two</blockquote>
21244 T8200: paragraphs inside blockquotes (extra line break on close)
21246 <blockquote>Line one
21251 <blockquote>Line one
21264 T8200: paragraphs inside blockquotes (extra line break on open and close)
21286 Paragraphs inside blockquotes/divs (no extra line breaks)
21288 <blockquote><div>Line one
21290 Line two</div></blockquote>
21292 <blockquote><div>Line one
21293 Line two</div></blockquote>
21298 Paragraphs inside blockquotes/divs (extra line break on open)
21303 Line two</div></blockquote>
21308 Line two</div></blockquote>
21313 Paragraphs inside blockquotes/divs (extra line break on close)
21315 <blockquote><div>Line one
21318 </div></blockquote>
21320 <blockquote><div>Line one
21323 </div></blockquote>
21328 Paragraphs inside blockquotes/divs (extra line break on open and close)
21334 </div></blockquote>
21340 </div></blockquote>
21345 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21347 wgLinkHolderBatchSize=0
21353 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21354 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21355 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21360 Free external link invading image caption
21362 [[Image:Foobar.jpg|thumb|http://x|hello]]
21364 <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>
21369 T17196: localised external link numbers
21373 [http://en.wikipedia.org/]
21375 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21378 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21382 Multibyte character in padleft
21384 {{padleft:-Hello|7|Æ}}
21391 Multibyte character in padright
21393 {{padright:Hello-|7|Æ}}
21400 formatdate parser function
21402 {{#formatdate:2009-03-24}}
21404 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21409 formatdate parser function, with default format
21411 {{#formatdate:2009-03-24|mdy}}
21413 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21418 Spacing of numbers in formatted dates
21420 {{#formatdate:January 15}}
21422 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21427 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
21429 language=nl title=[[MediaWiki:Common.css]]
21431 {{#formatdate:2009-03-24|dmy}}
21433 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21446 Edit comment with link
21450 I like the [[Main Page]] a lot
21452 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21456 Edit comment with link and link text
21460 I like the [[Main Page|best pages]] a lot
21462 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21466 Edit comment with link and link text with suffix
21470 I like the [[Main Page|best page]]s a lot
21472 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21476 Edit comment with section link (non-local, eg in history list)
21478 comment title=[[Main Page]]
21480 /* External links */ removed bogus entries
21482 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21486 Edit comment with section link and text before it (non-local, eg in history list)
21488 comment title=[[Main Page]]
21490 pre-comment text /* External links */ removed bogus entries
21492 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>
21496 Edit comment with section link (local, eg in diff view)
21498 comment local title=[[Main Page]]
21500 /* External links */ removed bogus entries
21502 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21506 Edit comment with subpage link (T16080)
21510 title=[[Subpage test]]
21512 Poked at a [[/subpage]] here...
21514 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21518 Edit comment with subpage link and link text (T16080)
21522 title=[[Subpage test]]
21524 Poked at a [[/subpage|neat little page]] here...
21526 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21530 Edit comment with bogus subpage link in non-subpage NS (T16080)
21533 title=[[Subpage test]]
21535 Poked at a [[/subpage]] here...
21537 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21541 Edit comment with bare anchor link (local, as on diff)
21545 title=[[Main Page]]
21549 <a href="#section">#section</a>
21553 Edit comment with bare anchor link (non-local, as on history)
21556 title=[[Main Page]]
21560 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21564 Anchor starting with underscore
21570 <p><a href="#_ref">One</a>
21573 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21577 Id starting with underscore
21579 <div id="_ref"></div>
21581 <div id="_ref"></div>
21586 Edit comment with link with more than one pipe (T99346)
21590 [[Main Page|Many|pipes]]
21592 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21596 Complex edit comment with link with more than one pipe (T99346)
21600 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21602 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..."
21606 Space normalisation on autocomment (T24784)
21609 title=[[Main Page]]
21611 /* __hello__world__ */
21613 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21617 percent-encoding and + signs in comments (T28410)
21621 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21623 <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>
21626 # Parsoid doesn't support this yet: see T75581
21627 # but it *should* omit the 'src' attribute if the image is bad.
21628 # PHP side of tests was disabled in
21629 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21630 # because of issues in the PHP parserTests infrastructure
21631 # (but the output below is indeed what the PHP side emits)
21633 Bad images - basic functionality
21636 !! DISABLED/html/php
21638 <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>
21642 Bad images - T18039: text after bad image disappears
21647 !! DISABLED/html/php
21653 <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>
21658 Verify that displaytitle works (T24501) no displaytitle
21662 wgAllowDisplayTitle=true
21663 wgRestrictDisplayTitle=false
21665 this is not the the title
21668 <p>this is not the the title
21673 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
21678 wgAllowDisplayTitle=true
21679 wgRestrictDisplayTitle=false
21681 this is not the the title
21682 {{DISPLAYTITLE:whatever}}
21685 <p>this is not the the title
21690 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
21695 wgAllowDisplayTitle=true
21696 wgRestrictDisplayTitle=true
21698 this is not the the title
21699 {{DISPLAYTITLE:whatever}}
21702 <p>this is not the the title
21707 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
21712 wgAllowDisplayTitle=true
21713 wgRestrictDisplayTitle=true
21715 this is not the the title
21716 {{DISPLAYTITLE:screen}}
21719 <p>this is not the the title
21724 Verify that displaytitle works (T24501) AllowDisplayTitle=false
21729 wgAllowDisplayTitle=false
21731 this is not the the title
21732 {{DISPLAYTITLE:screen}}
21735 <p>this is not the the title
21736 <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>
21741 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
21746 wgAllowDisplayTitle=false
21748 this is not the the title
21751 <p>this is not the the title
21756 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
21761 wgAllowDisplayTitle=true
21762 wgRestrictDisplayTitle=true
21764 this is not the the title
21765 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21767 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21768 <p>this is not the the title
21773 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
21778 wgAllowDisplayTitle=true
21779 wgRestrictDisplayTitle=true
21781 this is not the the title
21782 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21784 <span style="color: red;">s</span>creen
21785 <p>this is not the the title
21790 Page status indicators: Empty name is invalid
21794 <indicator name=" "></indicator>
21795 <indicator></indicator>
21797 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21798 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21803 Page status indicators: Weird syntaxes that are okay
21807 <indicator name="empty" />
21808 <indicator name="name"></indicator>
21817 Page status indicators: Torture test
21821 <indicator name="01">hello world</indicator>
21822 <indicator name="02">[[Main Page]]</indicator>
21823 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21824 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21825 <indicator name="05">* foo
21827 <indicator name="06"><nowiki>foo</nowiki></indicator>
21828 <indicator name="07"> Preformatted</indicator>
21829 <indicator name="08"><div>Broken tag</indicator>
21830 <indicator name="09">{| class=wikitable
21833 <indicator name="10">Two
21835 paragraphs</indicator>
21838 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21839 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" />
21840 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>
21841 05=<ul><li> foo</li>
21845 07=<pre>Preformatted
21847 08=<div>Broken tag</div>
21849 09=<table class="wikitable">
21866 preload: check <noinclude> and <includeonly>
21870 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21876 preload: check <onlyinclude>
21880 Goodbye <onlyinclude>Hello world</onlyinclude>
21886 preload: can pass tags through if we want to
21890 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21892 <includeonly>Hello world</includeonly>
21896 preload: check that it doesn't try to do tricks
21900 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21902 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21906 Play a bit with r67090 and T5158
21908 <div style="width:50% !important"> </div>
21909 <div style="width:50% !important"> </div>
21910 <div style="width:50% !important"> </div>
21911 <div style="border : solid;"> </div>
21913 <div style="width:50% !important"> </div>
21914 <div style="width:50% !important"> </div>
21915 <div style="width:50% !important"> </div>
21916 <div style="border : solid;"> </div>
21919 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21920 <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>
21921 <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>
21922 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21927 HTML5 data attributes
21929 <span data-foo="bar">Baz</span>
21930 <p data-abc-def_hij="">Quuz</p>
21932 <p><span data-foo="bar">Baz</span>
21934 <p data-abc-def_hij="">Quuz</p>
21937 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21938 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21942 Strip reserved data attributes
21944 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21946 <div data-ok="fred">d</div>
21949 <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>
21953 percent-encoding and + signs in internal links (T28410)
21955 [[User:+%]] [[Page+title%]]
21956 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21957 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21958 [[%33%45]] [[%33%45+]]
21960 <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>
21961 <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>
21962 <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>
21963 <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>
21966 <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>
21967 <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>
21968 <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>
21969 <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>
21973 Special characters in embedded file links (T29679)
21975 [[File:Contains & ampersand.jpg]]
21976 [[File:Does not exist.jpg|Title with & ampersand]]
21978 <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>
21979 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21982 <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>
21983 <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>
21987 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21989 Text's been normalized?
21991 <p>Text's been normalized?
21996 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21998 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
22000 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
22005 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
22007 [http://www.example.org/ ideograms]
22009 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
22014 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
22016 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
22018 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
22042 T33098 Template which includes system messages which includes the template
22046 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22047 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22052 T33490 Turkish: ucfirst 'blah'
22063 T33490 Turkish: ucfirst 'ix'
22074 T33490 Turkish: lcfirst 'BLAH'
22085 T33490 Turkish: ucfırst (with a dotless i)
22091 <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>
22096 T33490 ucfırst (with a dotless i) with English language
22102 <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>
22107 T28375: TOC with italics
22109 title=[[Main Page]]
22112 == ''Lost'' episodes ==
22114 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22116 <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>
22120 <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>
22125 T28375: TOC with bold
22127 title=[[Main Page]]
22130 == '''should be bold''' then normal text ==
22132 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22134 <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>
22138 <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>
22143 T35845: Headings become cursive in TOC when they contain an image
22145 title=[[Main Page]]
22148 == Image [[Image:foobar.jpg]] ==
22150 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22152 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22156 <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>
22161 T35845 (2): Headings become bold in TOC when they contain a blockquote
22163 title=[[Main Page]]
22166 == <blockquote>Quote</blockquote> ==
22168 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22170 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22174 <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>
22178 <div id="toc" class="toc">
22179 <div id="toctitle">
22183 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22187 <h2><span class="mw-headline" id="Quote"></span></h2>
22189 <p><span class="mw-headline" id="Quote">Quote</span></p>
22191 <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>
22195 Unclosed tags in TOC
22197 title=[[Main Page]]
22201 <small>Hanc marginis exiguitas non caperet.</small>
22204 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22206 <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>
22210 <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>
22211 <p><small>Hanc marginis exiguitas non caperet.</small>
22217 Multiple tags in TOC
22220 == <i>Foo</i> <b>Bar</b> ==
22222 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22224 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22226 <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>
22227 <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>
22231 <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>
22232 <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>
22236 <div id="toc" class="toc">
22237 <div id="toctitle">
22241 <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>
22242 <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>
22246 <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>
22247 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22249 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22251 <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>
22254 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22255 # html5 tag parsing.
22257 Tags with parameters in TOC
22262 == <sup class="in-h2">Hello</sup> ==
22264 == <sup class="a > b">Evilbye</sup> ==
22266 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22268 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22269 <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>
22273 <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>
22274 <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>
22277 <meta property="mw:PageProp/toc" />
22278 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22280 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22284 span tags with directionality in TOC
22287 == <span dir="ltr">C++</span> ==
22289 == <span dir="rtl">זבנג!</span> ==
22291 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22293 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22295 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22297 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22299 <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>
22300 <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>
22301 <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>
22302 <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>
22303 <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>
22307 <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>
22308 <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>
22309 <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>
22310 <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>
22311 <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>
22316 T74884: bdi element in ToC
22319 == <bdi>test</bdi> ==
22321 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22323 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22327 <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>
22332 T35715: s/strike element in ToC
22335 == <s>test</s> test <strike>test</strike> ==
22337 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22339 <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>
22343 <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>
22347 # Note that the html output does not have the <p></p>, but the
22348 # html+tidy output *does*. This is because the empty <p></p> is
22349 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22351 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22356 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22358 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22362 <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>
22366 <div id="toc" class="toc">
22367 <div id="toctitle">
22371 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22375 <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>
22381 == {{int:headline_sample}} ==
22385 T34057: Title needed when expanding <h> nodes.
22387 title=[[Main Page]]
22391 <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>
22396 Strip marker in urlencode
22398 {{urlencode:x<nowiki/>y}}
22399 {{urlencode:x<nowiki/>y|wiki}}
22400 {{urlencode:x<nowiki/>y|path}}
22401 {{urlencode:x<pre id="one">two</pre>y}}
22429 Strip marker in formatNum
22431 {{formatnum:1<nowiki/>2}}
22432 {{formatnum:1<nowiki/>2|R}}
22440 Check noCommafy in formatNum
22444 {{formatnum:123456.78}}
22445 {{formatnum:123456.78|NOSEP}}
22453 Wrong option for formatNum (T58199)
22455 {{formatnum:1,234.56|Random}}
22456 {{formatnum:1,234.56|EVERYTHING}}
22457 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22466 Strip marker in grammar
22470 {{grammar:elative|foo<nowiki/>bar}}
22477 Strip marker in padleft
22479 {{padleft:|2|x<nowiki/>y}}
22486 Strip marker in padright
22488 {{padright:|2|x<nowiki/>y}}
22495 Strip marker in anchorencode
22497 {{anchorencode:x<nowiki/>y}}
22504 nowiki inside link inside heading (T20295)
22506 ==[[foo|x<nowiki>y</nowiki>z]]==
22508 <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>
22513 new support for bdi element (T33817)
22515 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22517 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22522 Ignore pipe between table row attributes
22526 |- id=foo | style='color: red'
22534 <tr id="foo" style="color: red">
22541 Language parser function
22550 Padleft and padright as substr
22552 {{padleft:|3|abcde}}
22553 {{padright:|3|abcde}}
22561 Special parser function
22563 {{#special:RandomPage}}
22564 {{#special:BaDtItLe}}
22565 {{#special:Foobar}}
22574 T36939 - Case insensitive link parsing ([HttP://])
22576 [HttP://MediaWiki.Org/]
22578 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22581 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22585 T36939 - Case insensitive link parsing ([HttP:// title])
22587 [HttP://MediaWiki.Org/ MediaWiki]
22589 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22594 T36939 - Case insensitive link parsing (HttP://)
22596 HttP://MediaWiki.Org/
22598 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22601 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22619 <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>
22620 <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>
22621 <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>
22622 <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>
22623 <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>
22629 ### Parsoid-specific tests
22630 ### Parsoid-PHP parser incompatibilities
22633 1. SOL-sensitive wikitext tokens as template-args
22635 parsoid=wt2html,wt2wt
22641 <span about="#mwt1" typeof="mw:Transclusion">
22642 </span><ul about="#mwt1"><li>a</li>
22644 <span about="#mwt2" typeof="mw:Transclusion">
22645 </span><ol about="#mwt2"><li>a</li>
22647 <span about="#mwt3" typeof="mw:Transclusion">
22648 </span><dl about="#mwt3"><dd>a</dd>
22652 #### -----------------------------------------------------------------
22653 #### Parsoid-specific functionality tests
22654 #### -----------------------------------------------------------------
22656 # T65642/T68749: Formatting elt fixup around images is cleaned up.
22657 # We know wt2wt will fail, but we expect selser to pass.
22658 # Due to the nature of our testing, wt2wt and selser tests will enter the
22659 # blacklist and we'll catch selser regressions based on changes to the
22660 # blacklist entries for selser tests.
22662 1. Bad treebuilder fixup of formatting elt is cleaned up
22664 parsoid=wt2html,wt2wt
22669 [[Image:Foobar.jpg|right|Test]]
22676 <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>
22683 2. Bad treebuilder fixup of formatting elt is cleaned up
22685 parsoid=wt2html,wt2wt
22687 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22689 <small>[[Image:Foobar.jpg|right|300px]]</small>
22693 <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>
22695 <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>
22699 3. Bad treebuilder fixup of formatting elt is cleaned up
22701 parsoid=wt2html,wt2wt
22703 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22705 <p><small><b>foo</b></small></p>
22706 <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>
22707 <p><small><b>bar</b></small></p>
22711 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22713 parsoid=wt2html,wt2wt
22715 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22717 <p><b><small></small></b></p>
22718 <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>
22722 #### ----------------------------------------------------------------
22723 #### Parsoid-only testing of Parsoid's impl of LST
22724 #### Not implemented yet, see
22725 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22726 #### ----------------------------------------------------------------
22728 ## We still need to support serializing the older format while content is stored.
22730 LST Sections: Backwards compatibility
22733 "suppressErrors": true,
22734 "modes": ["html2wt"]
22737 <section begin="2011-05-16" />
22738 <section end="2014-04-10 (MW 1.23wmf22)" />
22740 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22741 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22744 ## The unconventional output is the result of `usePHPPreProcessor` being
22745 ## disabled in parserTests.js. This test is mainly just to show <section> is
22746 ## recognized as an extension tag w/o a native handler.
22748 LST Sections: Newfangled approach
22750 parsoid={ "suppressErrors": true }
22752 <section begin="2011-05-16" />
22753 <section end="2014-04-10 (MW 1.23wmf22)" />
22755 <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>
22756 <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>
22759 #--------- Test stripping of empty nodes in template content ----------
22761 Empty LI and TR nodes should be stripped from template content
22766 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22770 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22783 Empty LI and TR nodes should not be stripped from top-level content
22810 Empty TR nodes should not be stripped if they have any attributes set
22812 {{EmptyTRWithHTMLAttrTest}}
22814 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22815 <tr align="center"></tr>
22816 <tr><td>foo</td></tr>
22817 <tr align="center"></tr>
22818 <tr><td>bar</td></tr>
22822 #### ----------------------------------------------------------------
22823 #### The following section of tests are primarily to test
22824 #### wikitext escaping capabilities of Parsoid. Given that
22825 #### escaping can be done any number of ways, the wikitext (input)
22826 #### is always adjusted to reflect how Parsoid adds nowiki
22829 #### We are marking several tests as parsoid-only since the
22830 #### HTML in the result section is different from what the
22831 #### PHP parser generates for it.
22832 #### ----------------------------------------------------------------
22835 #### --------------- Headings ---------------
22837 #### 1. Nested inside html <h1>=foo=</h1>
22838 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22839 #### 3. Nested inside html with wikitext split by html tags
22840 #### 4. No escape needed
22841 #### 5. Empty headings <h1></h1>
22842 #### 6. Heading chars in SOL context
22843 #### ----------------------------------------
22845 Headings: 0. Unnested
22855 <p>=foo<i>a</i>=</p>
22857 <nowiki>=foo=</nowiki>
22859 <nowiki> </nowiki>=foo=
22861 <nowiki>=foo=</nowiki>
22863 =foo''a''<nowiki>=</nowiki>
22866 # New headings and existing headings are handled differently
22868 Headings: 1. Nested inside html
22876 <h1 data-parsoid=''>=foo=</h1>
22877 <h2 data-parsoid=''>=foo=</h2>
22878 <h3 data-parsoid=''>=foo=</h3>
22879 <h4 data-parsoid=''>=foo=</h4>
22880 <h5 data-parsoid=''>=foo=</h5>
22881 <h6 data-parsoid=''>=foo=</h6>
22889 =<nowiki>=foo=</nowiki>=
22890 ==<nowiki>=foo=</nowiki>==
22891 ===<nowiki>=foo=</nowiki>===
22892 ====<nowiki>=foo=</nowiki>====
22893 =====<nowiki>=foo=</nowiki>=====
22894 ======<nowiki>=foo=</nowiki>======
22899 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22908 <nowiki>*</nowiki>bar
22914 <nowiki>=bar=</nowiki>
22918 Headings: 3. Nested inside html with wikitext split by html tags
22922 <h1>=<b>bold</b>foo=</h1>
22924 = ='''bold'''foo= =
22928 Headings: 4a. No escaping needed (testing just h1 and h2)
22939 <h1><i>=</i>foo=</h1>
22959 Headings: 4b. No escaping needed (inside p-tags)
22974 Headings: 5. Empty headings
22978 <h1 data-parsoid='{}'></h1>
22980 <h2 data-parsoid='{}'></h2>
22982 <h3 data-parsoid='{}'></h3>
22984 <h4 data-parsoid='{}'></h4>
22986 <h5 data-parsoid='{}'></h5>
22988 <h6 data-parsoid='{}'></h6>
22998 =====<nowiki/>=====
23000 ======<nowiki/>======
23004 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23014 <nowiki>=a=</nowiki>
23016 <nowiki>=a=</nowiki>
23018 <nowiki>=a=</nowiki>
23022 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23035 <nowiki>=a=</nowiki>
23038 <nowiki>=a=</nowiki>
23041 <nowiki>=a=</nowiki>
23046 Headings: 6c. Heading chars in SOL context (leading newline break)
23054 <nowiki>=b=</nowiki>
23058 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23062 <!--c0--><p>=a=</p>
23064 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23066 <!--c0--><nowiki>=a=</nowiki>
23068 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23072 Headings: 6d. Heading chars in SOL context (No escaping needed)
23082 Headings: 7. Insert a newline between new content and headings
23088 <h2 data-parsoid='{}'>A</h2>
23089 <p data-parsoid='{}'>a</p>
23099 #### --------------- Lists ---------------
23100 #### 0. Outside nests (*foo, etc.)
23101 #### 1. Nested inside html <ul><li>*foo</li></ul>
23102 #### 2. Inside definition lists
23103 #### 3. Only bullets at start should be escaped
23104 #### 4. No escapes needed
23105 #### 5. No unnecessary escapes
23106 #### 6. Escape bullets in SOL position
23107 #### 7. Escape bullets in a multi-line context
23108 #### ----------------------------------------
23111 Lists: 0. Outside nests
23121 <nowiki>*</nowiki>foo
23123 <nowiki>#</nowiki>foo
23125 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23128 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23129 ## to test wikitext escaping, and insignificant whitespace diffs
23130 ## cause PHP parser tests to barf
23132 Lists: 1. Nested inside html (No unnecessary escapes)
23141 <li data-parsoid='{}'>*foo</li>
23142 <li data-parsoid='{}'>#foo</li>
23143 <li data-parsoid='{}'>:foo</li>
23144 <li data-parsoid='{}'>;foo</li>
23152 <li data-parsoid='{}'>*foo</li>
23153 <li data-parsoid='{}'>#foo</li>
23154 <li data-parsoid='{}'>:foo</li>
23155 <li data-parsoid='{}'>;foo</li>
23162 *<nowiki>*foo</nowiki>
23163 *<nowiki>#foo</nowiki>
23164 *<nowiki>:foo</nowiki>
23165 *<nowiki>;foo</nowiki>
23171 #<nowiki>*foo</nowiki>
23172 #<nowiki>#foo</nowiki>
23173 #<nowiki>:foo</nowiki>
23174 #<nowiki>;foo</nowiki>
23178 Lists: 2. Inside definition lists
23182 <dl><dt>;foo</dt></dl>
23183 <dl><dt>:foo</dt></dl>
23186 <dl><dd>:foo</dd></dl>
23190 ; <nowiki>:foo</nowiki>
23192 ; <nowiki>:foo</nowiki>
23199 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23205 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23209 *<nowiki>*foo</nowiki>''it''*bar
23213 Lists: 4. No escapes needed
23226 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23230 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23244 Lists: 5. No unnecessary escapes
23248 <ul><li> bar <span>[[foo]]</span></li></ul>
23249 <ul><li> =bar <span>[[foo]]</span></li></ul>
23250 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23251 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23252 <ul><li> =bar <span>foo]]</span>=</li></ul>
23253 <ul><li> <s></s>: a</li></ul>
23254 <ul><li> <i>* foo</i></li></ul>
23257 * bar <span><nowiki>[[foo]]</nowiki></span>
23259 * =bar <span><nowiki>[[foo]]</nowiki></span>
23261 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23263 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23265 * =bar <span>foo]]</span>=
23273 Lists: 6. Escape bullets in SOL position
23277 <p><!--cmt-->*foo</p>
23279 <!--cmt--><nowiki>*</nowiki>foo
23283 Lists: 7. Escape bullets in a multi-line context
23292 <nowiki>*</nowiki>b
23296 Lists: 8. Escape colons only if not present in tags
23300 <dl><dt>a:b<i>c:d</i></dt></dl>
23302 ; <nowiki>a:b</nowiki>''c:d''
23305 #### --------------- HRs ---------------
23306 #### 1. Single line
23307 #### -----------------------------------
23310 HRs: 1. Single line
23318 ----<nowiki>----</nowiki>
23323 #### --------------- Tables ---------------
23324 #### 1a. Simple example
23325 #### 1b. No escaping needed (!foo)
23326 #### 1c. No escaping needed (|foo)
23327 #### 1d. No escaping needed (|}foo)
23329 #### 2a. Nested in td (<td>foo|bar</td>)
23330 #### 2b. Nested in td (<td>foo||bar</td>)
23331 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23333 #### 3a. Nested in th (<th>foo!bar</th>)
23334 #### 3b. Nested in th (<th>foo!!bar</th>)
23335 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23339 #### 4c. No escaping needed
23340 #### --------------------------------------
23343 Tables: 1a. Simple example
23351 <nowiki>{|</nowiki>
23356 Tables: 1b. No escaping needed
23367 Tables: 1c. No escaping needed
23378 Tables: 1d. No escaping needed
23389 Tables: 2a. Nested in td
23394 <td>foo|bar</td></tr>
23395 <tr><td>x<div>a|b</div></td>
23399 |<nowiki>foo|bar</nowiki>
23401 |x<div><nowiki>a|b</nowiki></div>
23417 Tables: 2b. Nested in td
23423 <td>a<i>b||c</i></td>
23424 <td>a<i><div>b||c</div></i></td>
23425 </tr></tbody></table>
23428 |<nowiki>foo||bar</nowiki>
23429 |a''<nowiki>b||c</nowiki>''
23430 |a''<div><nowiki>b||c</nowiki></div>''
23439 <td>a<i><div>b||c</div></i>
23445 Tables: 2c. Nested in td -- no escaping needed
23461 Tables: 3a. Nested in th
23477 Tables: 3b. Nested in th
23482 <tr><th>foo!!bar</th>
23483 <th><i>foo|bar</i></th>
23484 <th><i>foo!!bar</i></th>
23485 <th><i><span>foo!!bar</span></i></th>
23486 </tr></tbody></table>
23489 !<nowiki>foo!!bar</nowiki>
23490 !''<nowiki>foo|bar</nowiki>''
23491 !''<nowiki>foo!!bar</nowiki>''
23492 !''<span><nowiki>foo!!bar</nowiki></span>''
23501 <th><i>foo!!bar</i>
23503 <th><i><span>foo!!bar</span></i>
23509 Tables: 3c. Nested in th
23514 <tr><th>foo||bar</th>
23515 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23516 </tr></tbody></table>
23519 !<nowiki>foo||bar</nowiki>
23520 !<nowiki>foo||bar</nowiki>
23533 Tables: 4a. Escape -
23549 |<nowiki>-bar</nowiki>
23554 Tables: 4b. Escape +
23570 |<nowiki>+bar</nowiki>
23575 Tables: 4c. No escaping needed
23580 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23581 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23587 <div>a|b</div></td>
23632 Tables: 4d. No escaping needed
23637 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23638 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23639 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23650 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23660 T97430: Don't emit empty nowiki pairs around marker meta tags
23664 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23665 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23667 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23668 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23672 Unclosed xmlish element in table line shouldn't eat end delimiters
23677 <tbody><tr><td> <foo</td>
23678 <td> bar></td></tr>
23695 #### --------------- Links ----------------
23696 #### 1. Quote marks in link text
23697 #### 2. Wikilinks: Escapes needed
23698 #### 3. Wikilinks: No escapes needed
23699 #### 4. Extlinks: Escapes needed
23700 #### 5. Extlinks: No escapes needed
23701 #### --------------------------------------
23703 Links 1. WikiLinks: No escapes needed
23707 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23708 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23709 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23713 [[Foo|x [Foobar] x]]
23715 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23716 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23717 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23722 Links 2. WikiLinks: Escapes needed
23726 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23727 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23728 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23729 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23730 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23731 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23732 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23733 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23734 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23735 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23737 [[Foo|<nowiki>Foobar]</nowiki>]]
23738 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23739 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23740 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23741 [[Foo|<nowiki>|Bar</nowiki>]]
23742 [[Foo|<nowiki>]]bar</nowiki>]]
23743 [[Foo|<nowiki>[[bar</nowiki>]]
23744 [[Foo|<nowiki>x [[ y</nowiki>]]
23745 [[Foo|<nowiki>x ]] y</nowiki>]]
23746 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23748 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23749 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23750 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23751 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23752 <a href="/wiki/Foo" title="Foo">|Bar</a>
23753 <a href="/wiki/Foo" title="Foo">]]bar</a>
23754 <a href="/wiki/Foo" title="Foo">[[bar</a>
23755 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23756 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23757 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23762 Links 3. WikiLinks: No escapes needed
23766 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23767 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23772 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23773 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23778 Links 4. ExtLinks: Escapes needed
23782 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23783 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23784 <p>[http://google.com]</p>
23785 <p>[http://google.com google]</p>
23786 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23787 <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>
23789 [http://google.com <nowiki>[google]</nowiki>]
23790 [http://google.com <nowiki>google]</nowiki>]
23792 <nowiki>[http://google.com]</nowiki>
23794 <nowiki>[http://google.com google]</nowiki>
23796 [http://google.com<nowiki>]</nowiki>
23798 [{{echo|http://google.com}}<nowiki>]</nowiki>
23800 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23801 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23802 </p><p>[http://google.com]
23803 </p><p>[http://google.com google]
23804 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23805 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23810 Links 5. ExtLinks: No escapes needed
23814 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23815 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23817 [http://google.com [google]
23819 [[http://google.com]]
23821 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23822 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23827 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
23831 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23832 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23833 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23834 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23835 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23836 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23837 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23838 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23839 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23840 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23841 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23842 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23843 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23846 x<nowiki/>http://example.com<nowiki/>y
23847 http://example.com<nowiki/>?x
23848 http://example.com<nowiki/>&x
23849 http://example.com<nowiki/>'x
23850 http://example.com<nowiki/>,x
23851 http://example.com<nowiki/>.x
23852 http://example.com<nowiki/>;x
23853 http://example.com<nowiki/>:x
23854 http://example.com<nowiki/>;x
23855 http://example.com<nowiki/>!x
23856 http://example.com<nowiki/>=x
23857 http://example.com<nowiki/>(x)
23858 http://example.com(x<nowiki/>)
23862 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
23867 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23869 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23870 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23871 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23872 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23873 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23879 "http://example.com"
23880 (http://example.com)
23881 (http://example.com) foo
23882 http://example.com,
23883 http://example.com, foo
23886 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23888 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23889 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23890 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23891 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23892 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23897 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
23901 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23902 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23904 http://example.com.,;:!?\
23905 -http://example.com:
23907 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23908 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23913 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
23917 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23918 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23919 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23923 X<nowiki/>RFC 123<nowiki/>y
23927 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
23931 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23932 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23933 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23940 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23941 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23942 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23947 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
23951 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23952 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23953 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23957 X<nowiki/>PMID 123<nowiki/>y
23961 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
23965 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23966 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23967 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23974 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23975 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23976 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23981 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
23985 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23986 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23987 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23990 ISBN 1234567890<nowiki/>1
23991 ISBN 1234567890<nowiki/>x
23992 a<nowiki/>ISBN 1234567890<nowiki/>b
23996 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
24000 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24004 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24009 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24013 <p>this is not a link: http://example.com
24016 this is not a link: <nowiki>http://example.com</nowiki>
24020 Links 15. Link trails can't become link prefixes.
24025 <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>
24027 [[Söfnuður]]-[[00]]
24029 <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>
24033 #### --------------- Quotes ---------------
24034 #### 1. Quotes inside <b> and <i>
24035 #### 2. Link fragments separated by <i> and <b> tags
24036 #### 3. Link fragments inside <i> and <b>
24037 #### 4. No escaping needed
24038 #### --------------------------------------
24040 1a. Quotes inside <b> and <i>
24051 <b>foo'<i>bar'</i>baz</b>
24060 <i>fools'<span> errand</span></i>
24061 <i><span>fool</span>'s errand</i>
24062 '<i>foo</i> bar '<i>baz</i>
24063 a|!*#-:;+-~[]{}b'<i>x</i>
24067 ''<nowiki>''foo''</nowiki>''
24068 ''<nowiki>'''foo'''</nowiki>''
24070 '''<nowiki/>'foo''''
24071 '''<nowiki>''foo''</nowiki>'''
24072 '''<nowiki>'''foo'''</nowiki>'''
24073 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24074 '''foo'''<nowiki/>'s
24080 '''foo'''<nowiki/>'
24081 ''''foo'''<nowiki/>'
24082 ''fools'<span> errand</span>''
24083 ''<span>fool</span>'s errand''
24084 '<nowiki/>''foo'' bar '''baz''
24085 a|!*#-:;+-~[]{}b'''x''
24089 1b. Quotes inside <b> and <i> with other tags on same line
24093 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24094 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24095 <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>
24096 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24097 '<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>
24098 '<i>foo</i> <div title="name">test</div>
24099 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24100 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24101 <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>
24104 '''a'' foo ''[[bar]]''
24105 ''a''' foo ''[[bar]]''
24106 ''a''' foo '''{{echo|[[bar]]}}'''
24107 [[foo]] x'''[[bar]]''
24108 '''foo'' <ref>test</ref>
24109 '''foo'' <div title="name">test</div>
24110 '''foo'' and <br> bar
24115 2. Link fragments separated by <i> and <b> tags
24119 <p>[[<i>foo</i>hello]]</p>
24120 <p>[[<b>foo</b>hello]]</p>
24122 [[''foo''<nowiki>hello]]</nowiki>
24124 [['''foo'''<nowiki>hello]]</nowiki>
24127 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24128 # this is one of the shortcomings of this format
24130 3. Link fragments inside <i> and <b>
24134 <p><i>[[foo</i>]]</p>
24135 <p><b>[[foo</b>]]</p>
24137 ''[[foo''<nowiki>]]</nowiki>
24139 '''[[foo'''<nowiki>]]</nowiki>
24143 4. No escaping needed
24147 <p>'<span><i>bar</i></span>'
24148 '<span><b>bar</b></span>'
24152 '<span>''bar''</span>'
24153 '<span>'''bar'''</span>'
24157 #### ----------- Paragraphs ---------------
24158 #### 1. No unnecessary escapes
24159 #### --------------------------------------
24162 1. No unnecessary escapes
24166 <p>bar <span>[[foo]]</span>
24167 </p><p>=bar <span>[[foo]]</span>
24168 </p><p>[[bar <span>[[foo]]</span>
24169 </p><p>]]bar <span>[[foo]]</span>
24170 </p><p>=bar <span>foo]]</span>=
24173 bar <span><nowiki>[[foo]]</nowiki></span>
24175 =bar <span><nowiki>[[foo]]</nowiki></span>
24177 [[bar <span><nowiki>[[foo]]</nowiki></span>
24179 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24181 =bar <span>foo]]</span><nowiki>=</nowiki>
24184 #### ----------------------- PRE --------------------------
24185 #### 1. Leading whitespace in SOL context should be escaped
24186 #### ------------------------------------------------------
24188 1. Leading whitespace in SOL context should be escaped
24211 <nowiki> </nowiki>a
24213 <nowiki> </nowiki> a
24217 <nowiki> </nowiki> a
24219 <nowiki> </nowiki>a
24222 <nowiki> </nowiki>b
24245 2. Leading whitespace in non-indent-pre contexts should not be escaped
24249 <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>
24250 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24251 <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>
24261 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24280 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24284 <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>
24286 [[File:Foobar.jpg|thumb|caption]]
24290 5. Nowiki escaping should account for indent-pres
24300 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24313 #### --------------- Behavior Switches --------------------
24316 1. Valid behavior switches should be escaped
24323 <nowiki>__TOC__</nowiki>
24324 ''<nowiki>__TOC__</nowiki>''
24328 2. Invalid behavior switches should not be escaped
24339 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24341 Behavior switches should be SOL-transparent
24345 <meta property="mw:PageProp/toc" />
24347 <!-- this one's bogus -->
24350 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24352 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24356 <!-- this one's bogus -->
24365 #### --------------- HTML tags ---------------
24368 #### 3. multi-line html tag
24369 #### 4. extension tags
24370 #### -----------------------------------------
24376 <a href="http://google.com">google</a>
24378 <a href="http://google.com">google</a>
24386 <ul><li> <div>foo</div></li>
24387 <li> <div style="color:red">foo</div></li>
24388 <li> <td></li></ul>
24391 * <nowiki><div>foo</div></nowiki>
24392 * <nowiki><div style="color:red">foo</div></nowiki>
24393 * <nowiki><td></nowiki>
24397 3. multi-line html tag
24416 <p><ref>foo</ref>
24417 </p><p><ref>bar
24418 </p><p>baz</ref>
24421 <nowiki><ref>foo</ref></nowiki>
24423 <nowiki><ref>bar</nowiki>
24425 baz<nowiki></ref></nowiki>
24428 #### --------------- Others ---------------
24434 <p><nowiki>foo</nowiki>
24437 <nowiki>foo</nowiki>
24440 ## The quote-char in the input is necessary for triggering the bug
24442 (T54035) Nowiki-escaping should not get tripped by " :" in text
24451 #----------- End of wikitext escaping tests --------------
24455 Tag-like HTML structures are passed through as text
24477 </p><p>1<d e>f
24482 HTML tag with necessary entities in attributes
24484 <span title="&amp;">foo</span>
24486 <p><span title="&amp;">foo</span>
24491 HTML tag with 'unnecessary' entity encoding in attributes
24493 <span title="&">foo</span>
24495 <p><span title="&">foo</span>
24500 HTML tag with broken attribute value quoting
24502 parsoid=wt2html,html2html
24504 <span title="Hello world>Foo</span>
24506 <p><span title="Hello world">Foo</span>
24509 <p><span title="Hello world">Foo</span></p>
24513 Self-closed tag with broken attribute value quoting
24515 parsoid=wt2html,html2html
24517 <div title="Hello world />Foo
24519 <div title="Hello world"></div>
24522 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24526 Table with broken attribute value quoting
24528 parsoid=wt2html,html2html
24531 | title="Hello world|Foo
24536 <td title="Hello world">Foo
24542 <td title="Hello world">Foo
24548 Table with broken attribute value quoting on consecutive lines
24550 parsoid=wt2html,html2html
24553 | title="Hello world|Foo
24554 | style="color:red|Bar
24559 <td title="Hello world">Foo
24561 <td style="color:red">Bar
24567 <td title="Hello world">Foo
24568 </td><td style="color: red">Bar
24569 </td></tr></tbody></table>
24574 Accept empty td cell attribute
24577 | align="center" | foo || |
24582 <td align="center"> foo </td>
24589 Non-empty attributes in th-cells
24592 ! Foo !! style="color: red" | Bar
24598 <th style="color: red"> Bar
24604 Accept empty attributes in th-cells
24619 Empty table rows go away
24640 ### Parsoid-centric tests for testing RTing of inter-element separators
24641 ### Edge cases not tested by existing parser tests and specific to
24642 ### Parsoid-specific serialization strategies.
24646 RT-ed inter-element separators should be valid separators
24658 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24662 # Parsoid-only since PHP parser relies on Tidy for correct output
24664 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24678 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24679 <p>bar</p></small></td></tr>
24683 <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>
24687 # Note that the "style" attribute is really a template parameter here.
24688 # The = would have to be {{=}} if you wanted the literal.
24690 Empty TD followed by TD with tpl-generated attribute
24695 |{{echo|style='color:red'}}|foo
24709 Indented table with an empty td
24727 ## We have some newline diffs RT-ing this edge case
24728 ## and it is not important enough -- we seem to be emitting
24729 ## at most 2 newlines after a </tr> and this is unrelated to
24730 ## the issue from T85627 that this is testing.
24732 Indented table with blank lines in between (T85627)
24751 Indented block & table
24765 <div data-parsoid='{"stx":"html"}'>foo</div>
24767 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24772 Indent and comment before table row
24787 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24788 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24792 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24794 Empty TR followed by a template-generated TR
24800 {{echo|<tr><td>foo</td></tr>}}
24806 <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}}]}'>
24811 ## PHP and parsoid output differ for this, and since this is primarily
24812 ## for testing Parsoid's serializer, marking this Parsoid only
24814 Empty TR followed by mixed-ws-comment line should RT correctly
24830 <!--c--> </tr><!--d-->
24836 Multi-line image caption generated by templates with/without trailing newlines
24838 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24839 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24841 <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>
24842 <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>
24846 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24850 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24852 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24854 <includeonly>foo</includeonly>
24862 ## PHP emits broken html for this, and since this is primarily
24863 ## a Parsoid serializer test, marking this Parsoid only
24865 Improperly nested inline or quotes tags with whitespace in between
24867 <span> <s>x</span> </s>
24870 <p><span> <s>x</s></span><s> </s>
24871 <b> <i>x</i></b><i> </i>
24876 Encapsulate protected attributes from wt
24878 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24880 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
24884 <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>
24886 <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">
24887 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
24891 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24892 ## Having nested or stray pre tags results in the attempt to add duplicates,
24893 ## causing an assertion fail. This test tries to prevent that situation.
24895 Ensure ParagraphWrapper can deal with stray closing pre tags
24905 1. Ensure fostered text content is wrapped in element nodes
24909 <table>hi</table><table>ho</table>
24918 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24920 parsoid=wt2html,wt2wt
24929 <tbody><tr><td> a</td></tr>
24934 Encapsulation properly handles null DSR information from foster box
24936 parsoid=wt2html,wt2wt
24938 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24940 <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>
24944 1. Encapsulate foster-parented transclusion content
24946 parsoid=wt2wt,wt2html
24948 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24950 <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>
24960 2. Encapsulate foster-parented transclusion content
24962 parsoid=wt2wt,wt2html
24964 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24966 <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>
24977 3. Encapsulate foster-parented transclusion content
24979 parsoid=wt2wt,wt2html
24981 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24983 <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>"]}">
24996 4. Encapsulate foster-parented transclusion content
24998 parsoid=wt2wt,wt2html
25000 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25002 <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>"]}">
25015 5. Encapsulate foster-parented transclusion content
25017 parsoid=wt2wt,wt2html
25019 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25021 <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>
25036 6. Encapsulate foster-parented transclusion content
25038 parsoid=wt2wt,wt2html
25040 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25042 <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>
25058 7. Encapsulate foster-parented transclusion content
25060 parsoid=wt2wt,wt2html
25062 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25064 <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>
25074 # Note that the wt is broken on purpose: the = should be {{=}} if you
25075 # don't want it to be a template parameter key.
25077 8. Encapsulate foster-parented transclusion content
25079 parsoid=wt2wt,wt2html
25082 }}{|{{echo|style='color:red'}}
25087 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25089 <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>
25100 9. Encapsulate foster-parented transclusion content
25102 parsoid=wt2wt,wt2html
25104 <table>{{echo|hi</table>hello}}
25106 <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>
25110 Table in fosterable position
25121 <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">
25123 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25129 # Parsoid only for T66747
25131 Properly encapsulate empty-content transclusions in fosterable positions
25139 <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"}]]}'>
25145 Always encapsulate foster box when template range is expanded to table
25158 T115289: Unclosed table
25160 {{echo|<table>}}<!--c-->[[Category:Two]]
25162 <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>
25166 T115289: Don't migrate newlines out of tables with fostered content
25168 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25170 <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>
25174 T73074: More fostering fun
25176 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25178 <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>
25182 Support <object> element with .data attribute
25186 <object data="test.swf"></object>
25188 <object data="test.swf"></object>
25192 Don't block XML namespace declaration
25194 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25196 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25199 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25202 # -----------------------------------------------------------------
25203 # The following section of tests are primarily to spec requirements
25204 # around Parsoid's serialization (old, new, edited content)
25206 # All these tests are marked Parsoid html2wt and html2html only
25207 # ----------------------------------------------------------------
25210 Ignore rel attribute in a-tags during serialization to url-links
25214 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25215 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25216 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25218 http://en.wikipedia.org/wiki/Foobar
25219 http://en.wikipedia.org/wiki/Foobar
25220 http://en.wikipedia.org/wiki/Foobar
25223 # 'mi' is a localinterwiki prefix as well as a language
25225 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
25229 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25236 New wikilinks should be serialized properly
25240 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25241 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25242 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25243 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25244 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25248 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25249 http://en.wikipedia.org/wiki/Foo
25250 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25254 New wiki links (href variations)
25258 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25259 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25260 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25261 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25266 [[Toxine bactérienne]]
25270 New wiki links (content string variations)
25274 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25275 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25276 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25280 [[Foo_bar|./Foo_bar]]
25284 New category links (href variations)
25288 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25289 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25290 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25292 [[Category:Toxine bactérienne]]
25293 [[Category:Toxine bactérienne]]
25294 [[Category:Toxine bactérienne]]
25298 New sol transparent links don't need indent-pre nowiki protection
25303 <link rel="mw:PageProp/redirect" href="./Main_Page">
25304 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25305 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25307 #WEITERLEITUNG [[Main Page]]
25308 <!-- this is good --> [[Category:Good]]
25309 <!-- this is great --> [[Kategorie:Great]]
25313 New interlanguage links (href variations)
25317 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25318 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25319 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25321 [[es:Toxine bactérienne]]
25322 [[es:Toxine_bactérienne]]
25323 [[es:Toxine_bactérienne]]
25327 Image: Modifying size of an image (1)
25330 "modes": ["wt2wt"],
25332 ["img[height]", "attr", "height", "22"],
25333 ["img[width]", "attr", "width", "200"]
25337 [[Image:Foobar.jpg|230x230px]]
25339 [[Image:Foobar.jpg|200x200px]]
25343 Image: Modifying size of an image (2)
25346 "modes": ["wt2wt"],
25348 ["img[height]", "attr", "height", "100"],
25349 ["img[width]", "attr", "width", "500"]
25353 [[Image:Foobar.jpg|230x230px]]
25355 [[Image:Foobar.jpg|500x500px]]
25358 # Change in size is ignored so long as class='mw-default-size'
25360 Image: Modifying size of an image (3)
25363 "modes": ["wt2wt"],
25365 ["figure[class]", "removeClass", "mw-default-size"],
25366 ["figure img", "attr", "height", "19"],
25367 ["figure img", "attr", "width", "170"]
25371 [[Image:Foobar.jpg|thumb]]
25373 [[Image:Foobar.jpg|thumb|170x170px]]
25377 Image: Modifying alignment of an image (T50665)
25380 "modes": ["wt2wt"],
25382 ["figure[class]", "removeClass", "mw-halign-right"],
25383 ["figure[class]", "addClass", "mw-halign-left"]
25387 [[Image:Foobar.jpg|thumb|caption|right]]
25389 [[Image:Foobar.jpg|thumb|caption|left]]
25393 Image: Modifying mw-default-size of an frameless image (T64805)
25396 "modes": ["wt2wt"],
25398 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25402 [[Image:Foobar.jpg|frameless|right]]
25404 [[Image:Foobar.jpg|frameless|right|220x220px]]
25408 Image: Modifying valign of an image (T51221)
25411 "modes": ["wt2wt"],
25413 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25414 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25418 [[File:Foobar.jpg|20px|middle]]
25420 [[File:Foobar.jpg|20px|text-top]]
25424 Image: Modifying alt attribute of an image (T58400)
25427 "modes": ["wt2wt"],
25429 ["img[alt]", "attr", "alt", "some alternate edited text"]
25433 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25435 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25439 Image: Modifying caption of an image
25442 "modes": ["wt2wt"],
25444 ["figcaption", "text", "new caption"]
25448 [[Image:Foobar.jpg|thumb|original caption]]
25450 [[Image:Foobar.jpg|thumb|new caption]]
25454 Image: empty alt attribute (T50924)
25458 [[File:Foobar.jpg|thumb|alt=|bar]]
25460 <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>
25464 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
25470 <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>
25472 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25476 Image: Block level image should have \n before and after
25479 [[File:Foobar.jpg|right|thumb|150x150px]]
25483 <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>
25488 Image: New block level image should have \n before and after (existing content)
25491 [[File:Foobar.jpg|right|thumb|150x150px]]
25495 <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>
25500 Image: upright option (parsoid)
25502 [[File:Foobar.jpg|thumb|upright|caption]]
25503 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25504 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25506 <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>
25507 <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>
25508 <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>
25512 Image: upright option is ignored on inline and frame images (parsoid)
25514 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25516 <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>
25520 Image: from basic HTML (1)
25524 <span typeof="mw:Image">
25525 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25528 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25532 Image: from basic HTML (2)
25536 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25538 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25542 Image: from basic HTML (3)
25546 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25548 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25552 Image: from basic HTML (4)
25556 <img src="./File:Foobar.jpg">
25558 [[File:Foobar.jpg|link=]]
25562 Image: Invalid title as link
25564 [[File:Foobar.jpg|link=<]]
25566 <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>
25569 <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>
25573 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25578 <li><p>foo</p></li>
25585 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25589 <ul> <li>foo</li></ul>
25595 Don't strip leading whitespace when handling indent-pre suppressing tags
25600 <tr><td> indented row</td></tr>
25603 <b>This is very bold of you!</b>
25606 indented cell (no pre-wrapping!)
25616 '''This is very bold of you!'''
25620 indented cell (no pre-wrapping!)
25628 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25650 <nowiki> </nowiki></span>bar2
25653 <nowiki> </nowiki><span>bar</span>
25656 <nowiki> </nowiki><span>foo</span>
25661 Lists: Dont insert newlines in a serialized list item.
25665 <ul><li>a<br>b</li><li>c</li></ul>
25672 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25675 "modes": ["html2wt"],
25676 "scrubWikitext": false
25679 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25680 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25682 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25683 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25685 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25687 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25689 == hello there [[Category:A1]] ==
25691 == [[Category:A2]] hi pal ==
25693 == <!--foo--> [[Category:A3]] how goes it ==
25695 == it goes well [[Category:A4]] <!--bar--> ==
25697 ==howdy [[Category:A5]]==
25703 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25706 "modes": ["html2wt"],
25707 "scrubWikitext": true
25710 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25711 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25713 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25714 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25716 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25724 <!--foo--> [[Category:A3]]
25729 [[Category:A4]] <!--bar-->
25737 Headings: Don't hoist metas that come from templates
25740 "modes": ["html2wt"],
25741 "scrubWikitext": true
25744 <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>
25746 == {{echo|foo [[Category:Foo]]}} ==
25750 Headings: Category in ref isn't hoisted
25753 "modes": ["html2wt"],
25754 "scrubWikitext": true
25757 <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>
25759 <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>
25762 [[Category:Baz]] </ref> ==
25768 Parsoid: Serialize positional parameters with = in them as named parameter
25772 <p about="#mwt1" typeof="mw:Transclusion"
25773 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25775 <p about="#mwt1" typeof="mw:Transclusion"
25776 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25778 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25779 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25780 <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>
25784 {{echo|1=f=oo|2=bar}}
25786 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25787 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25788 {{echo|<nowiki>f=oo</nowiki>|bar}}
25792 Parsoid: Serialize positional parameters with = in extlink as named parameter
25796 <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>
25798 {{echo|1=http://stuff?is=ok}}
25802 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25806 <div>a<p>b</p></div>
25827 Substrings resembling wikitext in hrefs should not get nowiki escapes
25831 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25837 Enforce single-line context in the serializer
25844 <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">
25845 </span><span about="#mwt1">you</span> </h2>
25847 <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>
25849 <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
25850 there</span></li></ol>
25862 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25869 </tbody></table></dd></dl>
25873 == hi {{bogus|there
25884 * foo '''bar''' baz
25896 Serialize new placeholder space without spans
25900 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25902 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25904 <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>
25910 <ref>foo : bar</ref>ok
25914 #-----------------------
25915 # Tag minimization tests
25916 #-----------------------
25919 1. I/B quote minimization: wikitext-only tags should be combined
25923 <p><i>A</i><i>B</i></p>
25924 <p><b>A</b><b>B</b></p>
25925 <p><i>A</i><b><i>B</i></b></p>
25926 <p><b>A</b><i><b>B</b></i></p>
25927 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25928 <p><i><b>A</b></i><i><b>B</b></i></p>
25929 <p><i><b>A</b></i><b><i>B</i></b></p>
25930 <p><b><i>A</i></b><i><b>B</b></i></p>
25950 2. I/B quote minimization: wikitext and html tags should not be combined
25954 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25955 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25959 ''A''<nowiki/>'''<i>B</i>'''
25963 3. I/B quote minimization: templated content stops minimization
25967 <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>
25968 <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>
25970 ''A''{{echo|''B''}}
25972 ''A''{{echo|'''''B'''''}}
25976 4. I/B quote minimization: new content should be mimimized with adjacent old content
25980 <p><i>A</i><i>B</i></p>
25981 <p><b>A</b><b>B</b></p>
25982 <p><i>A</i><b><i>B</i></b></p>
25992 5a. Merge adjacent quote nodes if they've been edited
25995 "modes": ["wt2wt", "selser"],
25997 ["p", "contents", "remove", ":contains('b')"]
26007 5b. Merge adjacent quote nodes if they've been edited
26010 "modes": ["wt2wt", "selser"],
26016 ''a''<span id="x">b</span>''c''
26022 1. Merge adjacent link nodes as long as at least one element is new
26025 "modes": ["html2wt"],
26026 "scrubWikitext": true
26029 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26030 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26031 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26035 [[Football|Foot]][[Football|ball]]
26039 2. Merge adjacent link nodes and enable additional normalizations
26042 "modes": ["html2wt"],
26043 "scrubWikitext": true
26046 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26048 [[Football|''Football'']]
26052 3. Don't merge adjacent link nodes if scrubWikitext is false
26055 "modes": ["html2wt"],
26056 "scrubWikitext": false
26059 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26061 [[Football|Foot]][[Football|ball]]
26064 #------------------------------
26065 # End of tag minimization tests
26066 #------------------------------
26069 T56262: New entities
26073 <span typeof="mw:Entity"> </span>
26078 ## Note that there is no wikitext output for 'unknownproperty' ##
26079 ## Unknown magic words are silently dropped ##
26086 <meta property='mw:PageProp/toc' />
26087 <meta property='mw:PageProp/notoc' />
26088 <meta property='mw:PageProp/forcetoc' />
26089 <meta property='mw:PageProp/index' />
26090 <meta property='mw:PageProp/noindex' />
26091 <meta property='mw:PageProp/nogallery' />
26092 <meta property='mw:PageProp/noeditsection' />
26093 <meta property='mw:PageProp/notitleconvert' />
26094 <meta property='mw:PageProp/nocontentconvert' />
26095 <meta property='mw:PageProp/unknownproperty' />
26105 __NOCONTENTCONVERT__
26109 Consecutive <pre>s should not get merged
26111 parsoid=html2wt,html2html
26113 <pre>a</pre><pre>b</pre>
26141 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26145 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26147 [[Special:BookSources/1234567890|ISBN 1234567895]]
26151 Edited RFC links not serializable as RFC links should serialize as extlinks
26155 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26157 [//tools.ietf.org/html/rfc123 New RFC]
26161 Edited PMID links not serializable as PMID links should serialize as extlinks
26165 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26167 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26171 WTS of autolinks with trailing/surrounding context
26175 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26176 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26177 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26178 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26179 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26180 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26182 http://cscott.net'''foo'''
26184 http://cscott.net<b>foo</b>
26186 '''http://cscott.net'''
26188 '''http://cscott.net '''
26190 '''http://cscott.net<nowiki/>x'''
26192 http://cscott.net<nowiki/>x
26196 WTS of autolinks with nowikis (round-trip)
26198 x<nowiki/>http://cscott.net<nowiki/>x
26200 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26203 # this is the "easy" test because it leaves in place all the
26204 # data-parsoid information indicating this is an autolink
26206 WTS of autolinks with escapes (editing)
26209 "modes": ["wt2wt"],
26211 [ "span", "remove" ]
26215 x<nowiki/>http://cscott.net<nowiki/>x
26217 x<nowiki/>http://cscott.net<nowiki/>x
26221 WTS of edited autolink-like text (T103364)
26224 "modes": ["wt2wt"],
26226 [ "span[typeof]", "removeAttr", "typeof" ]
26230 Not a link: <nowiki>http://example.com</nowiki>.
26232 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26236 WTS of newly-authored autolink-like text (T103364)
26240 <p>http://example.com is not a link.</p>
26242 <nowiki>http://example.com</nowiki> is not a link.
26246 WTS of autolink-like text after an autolink (T108563)
26250 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26252 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26256 Magic links inside links (not autolinked)
26258 [[Foo|http://example.com]]
26261 [[Foo|ISBN 123456789x]]
26263 [http://foo.com http://example.com]
26264 [http://foo.com RFC 1234]
26265 [http://foo.com PMID 1234]
26266 [http://foo.com ISBN 123456789x]
26268 <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>
26269 <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>
26271 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26272 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26273 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26274 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26276 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26277 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26278 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26279 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26283 Magic links inside image captions (autolinked)
26285 [[File:Foobar.jpg|thumb|http://example.com]]
26286 [[File:Foobar.jpg|thumb|RFC 1234]]
26287 [[File:Foobar.jpg|thumb|PMID 1234]]
26288 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26290 <div class="thumb tright">
26291 <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>
26292 <div class="thumbcaption">
26293 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26294 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26297 <div class="thumb tright">
26298 <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>
26299 <div class="thumbcaption">
26300 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26301 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26304 <div class="thumb tright">
26305 <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>
26306 <div class="thumbcaption">
26307 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26308 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26311 <div class="thumb tright">
26312 <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>
26313 <div class="thumbcaption">
26314 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26315 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26319 <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>
26320 <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>
26321 <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>
26322 <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>
26326 WTS of magic word text (T109371)
26331 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26332 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26334 <nowiki>RFC 1234</nowiki>
26336 [http://foo.com RFC 1234]
26342 Edited Redirect link should emit a non-piped wikitext link
26346 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26352 T75121: Infer extension name from typeOf if data-mw is not present
26354 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26356 <div typeOf="mw:Extension/foo"></div>
26361 # Note that the <p> wrapping isn't present in PHP parser output
26362 # The important thing for this test is that P-wrapping doesn't
26363 # interfere with the <nowiki> protection for leading - in <td>
26364 # (which isn't necessary for <th>).
26366 T88318: p-wrapped dash in table.
26368 parsoid=html2wt,wt2wt
26371 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26372 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26373 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26380 |<nowiki>-</nowiki>
26381 |<nowiki>- </nowiki>
26400 <td><small>-</small></td>
26412 T149209: WTS: Handle newlines in table cells properly
26420 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26422 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26428 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26430 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26452 T149209: Selser: Handle newlines in table cells properly
26455 "modes": ["selser"],
26457 [ "#h1", "html", "a\nb\n" ],
26458 [ "#h2", "html", "a\nb\n" ],
26459 [ "#c1", "html", "a\nb\n" ],
26460 [ "#c2", "html", "<p>a</p>" ],
26461 [ "#c3", "html", "<p>a</p>" ],
26462 [ "#c4", "html", "edit-me<p>a</p>" ]
26467 ! id="h1" |edit-me!!1
26469 ! id="h2" |edit-me||2
26471 | id="c1" |edit-me||3
26473 | id="c2" |edit-me||4
26475 | id="c3" |edit-me||p||q||r
26477 | id="c4" |edit-me||p||q||r
26506 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26511 <td id='mwAc'>foo</td>
26512 <td id='serialize-this'>bar</td>
26517 | id="serialize-this" |bar
26522 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26526 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26528 <div id="hello">ok</div>
26535 "modes": ["wt2wt"],
26537 [ "#xyz", "before", "<b>before</b> stuff " ],
26538 [ "#xyz", "after", " stuff <i>after</i>" ],
26539 [ "#xyz", "html", "x <b>y</b> z" ]
26543 <span id="xyz">hello</span>
26545 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26549 Never serialize a-tag as html, regardless of what data-parsoid has to say
26551 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26553 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26558 ## SSS FIXME: This is broken output nevertheless.
26559 ## What might be a reasonable non-broken output for this?
26560 ## This is an edge case unlikely to be seen in production
26561 ## that I am not wasting more time on this right now.
26563 Never serialize a-tag as html, no matter what attributes it has
26565 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26567 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26569 [http://boo.org http://boohoo.org]
26572 # Misnested is an indication that selser can reuse the source but these have
26573 # shown to sneak through on occasion. See T101768.
26574 # The original wikitext here is: [http://test.com [[one]] two three]
26576 Strip span tags added to mark misnested links
26580 <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>
26582 [http://test.com][[one]] two three
26586 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26590 <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|}"]}'>
26602 ## This test verifies the presence and computation of this attribute indirectly
26603 ## by making an edit and ensuring that the serialization is correct (which it would be
26604 ## only if firstWikitextNode is properly set).
26606 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26609 "modes": ["wt2wt"],
26611 [ "div#x", "remove" ],
26612 [ "div", "before", "<div>new</div>" ]
26616 <div id="x">foo</div>
26618 {{echo|<div>boo</div>
26626 {{echo|<div>boo</div>
26632 # --------------------------------------------
26633 # Tests spec'ing wikitext serialization norms |
26634 # --------------------------------------------
26637 1. Categories should always be serialized on their own line
26641 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26649 2. Categories that are part of templates should not introduce a line break
26651 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26653 <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>
26656 # Careful while editing these next 2 tests. There are \u200f characters
26657 # before and after the <link> tags in the HTML and following some
26658 # of the categories in wikitext
26659 # Do not remove these characters in edits.
26661 # As part of the serialization, these bidi characters will get stripped.
26663 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26666 "modes": ["html2wt"],
26667 "scrubWikitext": true
26670 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26671 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26674 [[קטגוריה: שיטות משפט]]
26678 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26681 "modes": ["html2wt"],
26682 "scrubWikitext": true
26685 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26692 Lists: Add space after bullets
26699 <li><span> baz</span></li>
26704 * <span> baz</span>
26708 1. Headings: Add space before/after == (T53744)
26715 <h2><span> baz</span></h2>
26723 == <span> baz</span> ==
26727 2. Headings: Add space before/after == even after hoisted content
26730 "modes": ["html2wt"],
26731 "scrubWikitext": true
26734 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26742 1. Headings: suppress newly created empty headings
26745 "modes": ["html2wt"],
26746 "scrubWikitext": true
26754 2. Headings: don't suppress empty headings if scrubWikitext is false
26764 3. Headings: suppress empty headings on edits
26767 "modes": ["selser"],
26768 "scrubWikitext": true,
26774 ==<span id="x">foo</span>==
26779 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26782 "modes": ["html2wt"],
26783 "scrubWikitext": true
26786 <h2>foo<br/>bar</h2>
26787 <h2>foo <span><br/>bar</span> baz</h2>
26791 == foo <span> bar</span> baz ==
26795 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26798 "modes": ["html2wt"],
26799 "scrubWikitext": false
26802 <h2>foo<br/>bar</h2>
26808 1. WT Quote Tags: suppress newly created empty style tags
26811 "modes": ["html2wt"],
26812 "scrubWikitext": true
26820 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26826 ''<nowiki/>'''''<nowiki/>'''
26830 3. WT Quote Tags: suppress empty style tags on edits
26833 "modes": ["selser"],
26834 "scrubWikitext": true,
26840 '''<span id="x">foo</span>'''
26845 1. Anchors: suppress newly created empty anchors
26848 "modes": ["html2wt"],
26849 "scrubWikitext": true
26852 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26857 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26860 "modes": ["html2wt"],
26861 "scrubWikitext": false
26864 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26870 3. Anchors: suppress empty anchors on edits
26873 "modes": ["selser"],
26874 "scrubWikitext": true,
26880 [[Test|<span id="x">foo</span>]]
26885 3a. Anchors: do not suppress numbered extlinks
26888 "modes": ["wt2wt"],
26889 "scrubWikitext": true
26894 <a rel="mw:ExtLink" href="http://foo.com"></a>
26898 3b. Anchors: do not suppress numbered extlinks
26901 "modes": ["wt2wt"],
26902 "scrubWikitext": true,
26908 [http://foo.com <span id="x">foo</span>]
26914 Normalizations should be restricted to edited content
26917 "modes": ["selser"],
26918 "scrubWikitext": true,
26920 [ "h1", "before", "<i></i>"]
26934 1. Multiple normalizations (html2wt)
26937 "modes": ["html2wt"],
26938 "scrubWikitext": true
26942 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26943 </a><b><i></i></b>x</p>
26952 2. Multiple normalizations (selser)
26955 "modes": ["selser"],
26956 "scrubWikitext": true,
26958 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26962 <span id="x">foo</span>
26964 <span id="x">foo</span>
26970 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26973 "modes": ["html2wt"],
26974 "scrubWikitext": true
26986 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26993 <nowiki> </nowiki>hi
26995 <nowiki> </nowiki> hello
26999 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27002 "modes": ["html2wt"],
27003 "scrubWikitext": true
27012 baz bang</td></tr></table>
27018 bar<span>boo</span></p>
27034 bar<span>boo</span>
27038 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27041 "modes": ["selser"],
27042 "scrubWikitext": true,
27044 [ "p", "html", " a\n b" ]
27055 1. New links that end in spaces
27058 "modes": ["html2wt"],
27059 "scrubWikitext": false
27062 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27063 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27064 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27066 [[Berlin ]]<nowiki/>is the capital of Germany.
27070 [[Boston ]] is a city.
27074 2. New links that end in spaces
27077 "modes": ["html2wt"],
27078 "scrubWikitext": true
27081 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27082 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27083 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27085 [[Berlin]] is the capital of Germany.
27089 [[Boston]] is a city.
27093 1. Table cells with escapable prefixes
27096 "modes": ["html2wt"],
27097 "scrubWikitext": false
27101 <tr><td>a</td></tr>
27102 <tr><td>-</td></tr>
27103 <tr><td>+</td></tr>
27109 |<nowiki>-</nowiki>
27111 |<nowiki>+</nowiki>
27116 2. Table cells with escapable prefixes
27119 "modes": ["html2wt"],
27120 "scrubWikitext": true
27124 <tr><td>a</td></tr>
27125 <tr><td>-</td></tr>
27126 <tr><td>+</td></tr>
27139 3a. Table cells with escapable prefixes after edits
27142 "modes": ["selser"],
27143 "scrubWikitext": true,
27145 [ "table tbody tr:first-child td:first-child", "remove"]
27159 3b. Table cells with escapable prefixes after edits
27162 "modes": ["selser"],
27163 "scrubWikitext": true,
27165 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27172 |<span id="x">foo</span>+
27181 # FIXME: This test will fail because
27182 # normalization doesn't realize that the id attribute
27183 # will eliminate the escapable scenario
27185 4a. Table cells without escapable prefixes after edits
27188 "modes": ["selser"],
27189 "scrubWikitext": true,
27191 [ "#x", "html", "-" ]
27204 ## This tests normalizer's ability to discriminate between
27205 ## cells having identical content.
27207 4b. Table cells without escapable prefixes after edits
27210 "modes": ["selser"],
27211 "scrubWikitext": true,
27213 [ "td", "html", "-" ]
27226 ## This tests normalizer's ability to not be tripped by
27227 ## comments (and whitespace)
27229 4c. Table cells without escapable prefixes after edits
27232 "modes": ["selser"],
27233 "scrubWikitext": true,
27235 [ "table tbody tr td:first-child", "remove" ]
27250 ## This tests normalizer's ability to handle HTML cells
27252 4d. Table cells without escapable prefixes after edits
27255 "modes": ["selser"],
27256 "scrubWikitext": true,
27258 [ "td", "html", "-" ]
27263 <tr><td>a</td></tr>
27267 <tr><td>-</td></tr>
27271 ## T111151 Remove font elements without attributes
27273 5a. font tags without attributes should be dropped in scrubWikitext mode
27276 "modes": ["html2wt"],
27277 "scrubWikitext": true
27281 <font><font>bar</font></font>
27282 <font class="x">boo</font>
27286 <font class="x">boo</font>
27290 5b. font tags should not be dropped without scrubWikitext being enabled
27293 "modes": ["html2wt"],
27294 "scrubWikitext": false
27303 Escape nowiki DOM elements
27307 <nowiki><i>foo</i></nowiki>
27309 <nowiki>''foo''</nowiki>
27312 # This is meant to be an interim fix while we go about figuring out
27313 # how to not introduce these trailing <nowiki/>s in the first place.
27315 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27319 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27321 <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>
27322 <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>
27335 # ---------------------------------------------------
27336 # End of tests spec'ing wikitext serialization norms |
27337 # ---------------------------------------------------
27341 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27349 <td><b>c</b><p>d</p></td>
27367 # -----------------------------------------------------------------
27368 # End of section for Parsoid-only html2wt tests for serialization
27370 # -----------------------------------------------------------------
27372 # -----------------------------------------------------------------
27373 # The following section of tests are primarily to spec behavior of
27374 # the selective serializer. All these tests have manual selser
27375 # changes. The automated selser changes for all tests handle the
27376 # wide variation of changes, but these tests here capture specs
27377 # deterministically.
27378 # ----------------------------------------------------------------
27382 Selser: New comments should not be lost
27385 "modes": ["selser"],
27387 [ "#a", "after", "<!--c1-->" ],
27388 [ "#b", "before", "<!--c2-->" ]
27392 <span id="a">a</span>
27394 <span id="b">b</span>
27396 <span id="a">a</span><!--c1-->
27398 <!--c2--><span id="b">b</span>
27403 Selser: Check for validity of DSR before using it
27406 "modes": ["selser"],
27408 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27412 <span id="a">a</span>
27414 {{DISPLAYTITLE:foo}}
27415 <span id="a">a</span>
27419 1. DOMDiff: Changes to <ref> content should be looked up using id
27422 "modes": ["selser"],
27424 ["#X", "after", "bar"],
27425 ["#Y", "after", "baz"]
27429 X <ref><span id="X">foo</span></ref>
27432 <ref name="a"><span id="Y">foo</span></ref>
27435 X <ref><span id="X">foo</span>bar</ref>
27438 <ref name="a"><span id="Y">foo</span>baz</ref>
27443 2. DOMDiff: Changes to <ref> content should be looked up using id
27446 "modes": ["selser"],
27448 ["#Z", "after", "bar"]
27452 A <ref>foo bar for a</ref>
27453 B <ref group="X" name="b" />
27457 <references group="X">
27458 <ref name="b"><span id="Z">foo</span></ref>
27461 A <ref>foo bar for a</ref>
27462 B <ref group="X" name="b" />
27466 <references group="X">
27467 <ref name="b"><span id="Z">foo</span>bar</ref>
27472 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27475 "modes": ["selser"],
27477 [ "div:first-child", "text", "bar" ]
27481 <div style="{{1x|color:red;}}%">foo</div>
27483 <div style="{{1x|color:red;}}%">bar</div>
27496 <li class="mw-empty-elt"></li>
27497 <li class="mw-empty-elt"></li>
27505 [[File:Thumb.png|thumb]]
27507 <div class="thumb tright">
27508 <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>
27509 <div class="thumbcaption">
27510 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27517 unclosed internal link XSS (T137264)
27519 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27521 <p>[[#<script>alert(1)</script>|
27524 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>