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><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8021 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></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><a class="mw-selflink selflink">0</a>
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><a class="mw-selflink selflink">local:Main Page</a>
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]]
9965 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
9969 <p>User:Ævar Arnfjörð Bjarmason
9974 Magic Word: {{FULLPAGENAMEE}}
9976 title=[[User:Ævar Arnfjörð Bjarmason]]
9977 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
9981 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9986 Magic Word: {{TALKSPACE}}
9988 title=[[User:Ævar Arnfjörð Bjarmason]]
9989 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
9998 Magic Word: {{TALKSPACE}}, same namespace
10000 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10001 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10010 Magic Word: {{TALKSPACE}}, main namespace
10012 title=[[Parser Test]]
10013 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10022 Magic Word: {{TALKSPACEE}}
10024 title=[[User:Ævar Arnfjörð Bjarmason]]
10025 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10034 Magic Word: {{SUBJECTSPACE}}
10036 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10037 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10046 Magic Word: {{SUBJECTSPACE}}, same namespace
10048 title=[[User:Ævar Arnfjörð Bjarmason]]
10049 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10058 Magic Word: {{SUBJECTSPACE}}, main namespace
10060 title=[[Parser Test]]
10061 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10069 Magic Word: {{SUBJECTSPACEE}}
10071 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10072 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10081 Magic Word: {{NAMESPACE}}
10083 title=[[User:Ævar Arnfjörð Bjarmason]]
10084 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10093 Magic Word: {{NAMESPACEE}}
10095 title=[[User:Ævar Arnfjörð Bjarmason]]
10096 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10105 Magic Word: {{NAMESPACENUMBER}}
10107 title=[[User:Ævar Arnfjörð Bjarmason]]
10108 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10110 {{NAMESPACENUMBER}}
10117 Magic Word: {{SUBPAGENAME}}
10119 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10120 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10129 Magic Word: {{SUBPAGENAMEE}}
10131 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10132 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10141 Magic Word: {{ROOTPAGENAME}}
10143 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10144 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10148 <p>Ævar Arnfjörð Bjarmason
10153 Magic Word: {{ROOTPAGENAMEE}}
10155 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10156 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10160 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10165 Magic Word: {{BASEPAGENAME}}
10167 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10168 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10172 <p>Ævar Arnfjörð Bjarmason
10177 Magic Word: {{BASEPAGENAMEE}}
10179 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10180 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10184 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10189 Magic Word: {{TALKPAGENAME}}
10191 title=[[User:Ævar Arnfjörð Bjarmason]]
10192 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10196 <p>User talk:Ævar Arnfjörð Bjarmason
10201 Magic Word: {{TALKPAGENAMEE}}
10203 title=[[User:Ævar Arnfjörð Bjarmason]]
10204 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10208 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10213 Magic Word: {{SUBJECTPAGENAME}}
10215 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10216 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10218 {{SUBJECTPAGENAME}}
10220 <p>User:Ævar Arnfjörð Bjarmason
10225 Magic Word: {{SUBJECTPAGENAMEE}}
10227 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10228 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10230 {{SUBJECTPAGENAMEE}}
10232 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10237 Magic Word: {{NUMBEROFFILES}}
10239 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10248 Magic Word: {{PAGENAME}}
10250 title=[[User:Ævar Arnfjörð Bjarmason]]
10251 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10255 <p>Ævar Arnfjörð Bjarmason
10260 Magic Word: {{PAGENAME}} with metacharacters
10262 title=[['foo & bar = baz']]
10263 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10267 <p><i>'foo & bar = baz'</i>
10270 <p><i>'foo & bar = baz'</i></p>
10274 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10276 title=[[*RFC 1234 http://example.com/]]
10277 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10281 <p>*RFC 1234 http://example.com/
10284 <p>*RFC 1234 http://example.com/</p>
10288 Magic Word: {{PAGENAMEE}}
10290 title=[[User:Ævar Arnfjörð Bjarmason]]
10291 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10295 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10300 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10302 title=[[*RFC 1234 http://example.com/]]
10303 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10307 <p>*RFC_1234_http://example.com/
10310 <p>*RFC_1234_http://example.com/</p>
10314 Magic Word: {{REVISIONID}}
10316 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10325 Magic Word: {{SCRIPTPATH}}
10327 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10335 Magic Word: {{STYLEPATH}}
10337 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10346 Magic Word: {{SERVER}}
10348 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10352 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10357 Magic Word: {{SERVERNAME}}
10359 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10368 Magic Word: {{SITENAME}}
10370 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10379 Magic Word: {{PAGELANGUAGE}}
10382 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10391 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10393 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10402 Case-sensitive magic words, when cased differently, should just be template transclusions
10409 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10410 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10411 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10412 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10417 Case-insensitive magic words should still work with weird casing.
10427 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10431 # From plwiki:PLOS_ONE
10433 Parsoid: Page property magic word with magic word contents
10435 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10437 <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>"}]]}'/>
10441 Parsoid: Template-generated DISPLAYTITLE
10443 {{{{echo|DISPLAYTITLE}}:Foo}}
10445 <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}}]}'/>
10449 Namespace 1 {{ns:1}}
10458 Namespace 1 {{ns:01}}
10467 Namespace 0 {{ns:0}} (T6783)
10475 Namespace 0 {{ns:00}} (T6783)
10483 Namespace -1 {{ns:-1}}
10492 Namespace User {{ns:User}}
10501 Namespace User talk {{ns:User_talk}}
10510 Namespace User talk {{ns:uSeR tAlK}}
10519 Namespace File {{ns:File}}
10528 Namespace File {{ns:Image}}
10537 Namespace (lang=de) Benutzer {{ns:User}}
10548 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10554 <p>Benutzer Diskussion
10561 {{urlencode:hi world?!}}
10562 {{urlencode:hi world?!|WIKI}}
10563 {{urlencode:hi world?!|PATH}}
10564 {{urlencode:hi world?!|QUERY}}
10574 Magic Word: prioritize type info over data-parsoid
10578 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10584 Magic Word: serialize on separate line (parsoid)
10586 parsoid=wt2wt,html2wt
10592 foo<meta property="mw:PageProp/notoc"/>bar
10596 Magic Word: rt non-english wikis
10603 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10607 __proto__ is treated as normal wikitext (T105997)
10619 Magic links: internal link to RFC (T2479)
10623 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10626 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10630 Magic links: RFC (T2479)
10634 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10637 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10641 Magic links: RFC (T67278)
10643 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10645 <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.
10648 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10652 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10654 RFC      822
10658 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10663 <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>
10669 Magic links: ISBN (T3937)
10673 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10676 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10680 Magic links: ISBN (T67278)
10682 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10684 <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.
10687 <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>
10691 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10693 ISBN      978 0 316 09811 3
10699 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10706 <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>
10714 Magic links: PMID incorrectly converts space to underscore
10718 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10721 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10725 Magic links: PMID (T67278)
10727 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10729 <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.
10732 <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>
10736 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10738 PMID      1234
10742 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10747 <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>
10752 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10753 # since these are ExtLinkText, not MagicLinkText
10755 Magic links: use appropriate serialization for "almost" magic links.
10757 X[[Special:BookSources/0978739256|foo]]
10759 X[//tools.ietf.org/html/rfc1234 foo]
10761 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10762 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10765 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10766 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10770 Magic links: All disabled (T47942)
10772 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10778 <p>ISBN 0-306-40615-2
10789 Nonexistent template
10791 {{thistemplatedoesnotexist}}
10793 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10798 Template with invalid target containing tags
10800 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10802 <p>{{a<b>b</b>|foo|a=b|a = b}}
10807 Template with invalid target containing unclosed tag
10809 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10811 <p>{{a<b>|foo|a=b|a = b}}</b>
10816 Template with invalid target containing wikilink
10820 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10823 <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>
10827 Template with just whitespace in it, T70421
10831 <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>
10837 This is a test template
10845 <p>This is a test template
10850 Template with explicit namespace
10854 <p>This is a test template
10862 This is a test template with parameter {{{param}}}
10868 {{paramtest|param=foo}}
10870 <p>This is a test template with parameter foo
10875 Template:paramtestnum
10877 [[{{{1}}}|{{{2}}}]]
10881 Template unnamed parameter
10883 {{paramtestnum|Main Page|the main page}}
10885 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10890 Template:templatesimple
10896 Template:templateredirect
10898 #redirect [[Template:templatesimple]]
10902 Template:templateasargtestnum
10908 Template:templateasargtest
10910 {{template{{{templ}}}}}
10914 Template:templateasargtest2
10920 Template with template name as unnamed argument
10922 {{templateasargtestnum|templatesimple}}
10929 Template with template name as argument
10931 {{templateasargtest|templ=simple}}
10938 Template with template name as argument (2)
10940 {{templateasargtest2|templ=templatesimple}}
10947 Template:templateasargtestdefault
10949 {{{{{templ|templatesimple}}}}}
10959 Template with default value
10961 {{templateasargtestdefault}}
10968 Template with default value (value set)
10970 {{templateasargtestdefault|templ=templa}}
10979 {{templateredirect}}
10984 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10988 Template with argument in separate line
10990 {{ templateasargtest |
10998 Template with complex template as argument
11001 param ={{ templateasargtest |
11002 templ = simple }}}}
11004 <p>This is a test template with parameter (test)
11009 Template with thumb image (with link in description)
11011 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11013 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>
11016 <p>This is a test template with parameter</p>
11017 <div class="thumb tright">
11018 <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>
11019 <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>
11023 <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>
11027 Template:complextemplate
11029 {{{1}}} {{paramtest|
11030 param ={{{param}}}}}
11034 Template with complex arguments
11037 param ={{ templateasargtest |
11038 templ = simple }}|[[Template:complextemplate|link]]}}
11040 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11045 T2553: link with two variables in a piped link
11048 |[[{{{1}}}|{{{2}}}]]
11053 <td>[[{{{1}}}|{{{2}}}]]
11058 <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>
11064 Abort table cell attribute parsing on wikilink
11067 | testing [[one|two]] | three || four
11068 | testing one two | three || four
11069 | testing="[[one|two]]" | three || four
11074 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11080 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11086 <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>
11087 <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>
11088 <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>
11093 Don't abort table cell attribute parsing if wikilink is found in template arg
11096 | Test {{#tag:ref|One two "[[three]]" four}}
11100 <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>
11105 Magic variable as template parameter
11107 {{paramtest|param={{SITENAME}}}}
11109 <p>This is a test template with parameter MediaWiki
11116 [[{{{param}}}|link]]
11120 Template parameter as link source
11122 {{linktest|param=Main Page}}
11124 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11129 Template:paramtest2
11131 including another template, {{paramtest|param={{{arg}}}}}
11135 Template passing argument to another template
11137 {{paramtest2|arg='hmm'}}
11139 <p>including another template, This is a test template with parameter 'hmm'
11150 Template as link source
11154 [[{{linktest2}}|Main Page]]
11156 [[{{linktest2}}]]Page
11158 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11159 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11160 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11178 Template infinite loop
11182 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11187 Template from main namespace
11206 T2529: Template with table, not included at beginning of line
11225 T2523: Template shouldn't eat newline (or add an extra one before table)
11245 T2041: Template parameters shown as broken links
11254 Template with targets containing wikilinks
11258 {{[[{{echo|foo}}]]}}
11260 {{{{echo|[[foo}}]]}}
11262 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11263 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11275 Templates: Double quotes as template target
11282 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11286 ## This test is about making sure Parsoid's data-mw is well formed in the
11287 ## face of multiple templates with intersecting and overlapping ranges. The
11288 ## wikitext itself is wretched.
11290 Templates with intersecting and overlapping ranges
11315 <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":""}]]}'>
11317 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11319 <tbody><tr><td>hi</td></tr>
11324 Template:MSGNW test
11326 ''None'' of '''this''' should be
11328 but rather passed unmodified
11336 # hmm, fix this or just deprecate msgnw and document its behavior?
11340 {{msgnw:MSGNW test}}
11342 <p>''None'' of '''this''' should be
11344  but rather passed unmodified
11345 {{test}}
11349 <!-- comment -->
11356 {{int:youhavenewmessages|lots of money|not!}}
11358 <p>You have lots of money (not!).
11363 int keyword - non-existing message
11374 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11378 <includeonly> and <noinclude> being included
11389 <onlyinclude>Foo</onlyinclude>bar
11393 <onlyinclude> being included
11405 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11409 <onlyinclude> and <includeonly> being included
11418 <includeonly> and <noinclude> on a page
11420 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11427 Un-closed <noinclude>
11434 <onlyinclude> on a page
11436 <onlyinclude>Foo</onlyinclude>bar
11443 Un-closed <onlyinclude>
11450 Self-closed noinclude, includeonly, onlyinclude tags
11461 Unbalanced includeonly and noinclude tags
11465 |b</noinclude></noinclude>
11466 |c</noinclude></includeonly>
11467 |d</includeonly></includeonly>
11476 <td>c</includeonly>
11478 <td>d</includeonly></includeonly>
11484 Template:Includeonly section
11487 ==Includeonly section==
11493 T8563: Edit link generation for section shown by <includeonly>
11495 {{includeonly section}}
11497 <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>
11498 <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>
11502 # Uses same input as the contents of [[Template:Includeonly section]]
11504 T8563: Section extraction for section shown by <includeonly>
11509 ==Includeonly section==
11517 T8563: Edit link generation for section suppressed by <includeonly>
11520 ==Includeonly section==
11524 <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>
11529 T8563: Section extraction for section suppressed by <includeonly>
11534 ==Includeonly section==
11542 Un-closed <includeonly>
11547 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11550 ## We used to, but no longer wt2wt this test since the default serializer
11551 ## will normalize the include directives to serialize on their own line.
11552 ## Selser will take care of preserving formatting in scenarios where they
11553 ## intermingled with other wikitext.
11555 Includes and comments at SOL
11557 parsoid=wt2html,html2html
11559 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11563 </noinclude>* stuff
11566 <includeonly>can have stuff</includeonly>=== here ===
11569 <h2><span class="mw-headline" id="hu">hu</span></h2>
11572 <ul><li> stuff</li>
11573 <li> here</li></ul>
11574 <h3><span class="mw-headline" id="here">here</span></h3>
11577 <!-- 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>
11579 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11581 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11582 <li> here</li></ul>
11584 <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>
11588 # TODO: test with DOM fragment reuse!
11590 Parsoid: DOM fragment reuse
11592 parsoid=wt2wt,wt2html
11594 a{{echo|b<table></table>c}}d
11606 <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>
11608 <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">
11609 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11610 </span><p about="#mwt2">cd</p>
11612 <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">
11614 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11616 </span><p about="#mwt3">b</p>
11620 Parsoid: Merge double tds (T52603)
11625 |{{echo|{{!}} foo}}
11629 <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>
11634 Parsoid: Merge double tds in nested transclusion content (T52603)
11640 |{{echo|{{!}} foo}}
11644 <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}}]}'>
11646 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11652 ### <includeonly> and <noinclude> in attributes
11655 0. includeonly around the entire attribute
11657 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11659 <p><span id="v2">bar</span>
11664 1. includeonly in html attr key
11666 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11668 <p><span id="foo">bar</span>
11673 2. includeonly in html attr value
11675 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11676 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11678 <p><span id="v1">bar</span>
11679 <span id="v1">bar</span>
11684 3. includeonly in part of an attr value
11686 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11688 <p><span style="color:red;">bar</span>
11693 4. includeonly in table attributes
11717 ### Token Stream Patcher tests
11719 ### These tests won't always pass wt2wt and other modes because
11720 ### on serialization, the table will be output on a new line.
11721 ### For now, we are blacklisting them, and using this to test selser.
11725 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11727 parsoid=wt2html,wt2wt
11729 {{echo|}}{| width = '100%'
11733 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11734 <tbody><tr><td>foo</td></tr>
11738 ## We used to, but no longer wt2wt this test since the default serializer
11739 ## will normalize the include directives to serialize on their own line.
11740 ## Selser will take care of preserving formatting in scenarios where they
11741 ## intermingled with other wikitext.
11743 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11747 <includeonly>a</includeonly>{| {{{b}}}
11751 <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":""}]]}'>
11752 <tbody><tr><td>c</td></tr>
11757 Table wikitext syntax outside wiki-tables
11761 ! not a table heading
11764 | class="foo bar" | baz
11772 ! not a table heading
11775 | class="foo bar" | baz
11784 ### Testing parsing of templates where a template arg
11785 ### has the same name as the template itself.
11791 {{{quote|{{{1}}}}}}
11795 Templates: Template Name/Arg clash: 1. Use of positional param
11804 Templates: Template Name/Arg clash: 2. Use of named param
11806 {{quote|quote=foo}}
11813 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11822 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11826 Templates: 1. Simple use
11835 Templates: 2. Inside a block tag
11837 <div>{{echo|Foo}}</div>
11838 <blockquote>{{echo|Foo}}</blockquote>
11841 <blockquote>Foo</blockquote>
11851 Templates: P-wrapping: 1a. Templates on consecutive lines
11862 Templates: P-wrapping: 1b. Templates on consecutive lines
11876 Templates: P-wrapping: 1c. Templates on consecutive lines
11879 {{echo|bar}} <div>baz</div>
11892 Templates: P-wrapping: 1d. Template preceded by comment-only line
11901 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11905 Templates: Inline Text: 1. Multiple template uses
11907 {{echo|Foo}}bar{{echo|baz}}
11914 Templates: Inline Text: 2. Back-to-back template uses
11916 {{echo|Foo}}{{echo|bar}}
11923 Templates: Block Tags: 1. Multiple template uses
11925 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11927 <div>Foo</div><div>bar</div><div>baz</div>
11932 Templates: Block Tags: 2. Back-to-back template uses
11934 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11936 <div>Foo</div><div>bar</div>
11940 # This is an edge case relating to paragraph wrapping.
11942 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11947 <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
11952 Templates: Links: 1. Simple example
11954 {{echo|[[Foo|bar]]}}
11956 <p><a href="/wiki/Foo" title="Foo">bar</a>
11961 Templates: Links: 2. Generation of link href
11963 [[{{echo|Foo}}|bar]]
11965 <p><a href="/wiki/Foo" title="Foo">bar</a>
11970 Templates: Links: 3. Generation of part of a link href
11972 [[Fo{{echo|o}}|bar]]
11974 [[Foo{{echo|bar}}]]
11976 [[Foo{{echo|bar}}baz]]
11978 [[Foo{{echo|bar}}|bar]]
11980 [[:Foo{{echo|bar}}]]
11982 [[:Foo{{echo|bar}}|bar]]
11984 <p><a href="/wiki/Foo" title="Foo">bar</a>
11985 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11986 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11987 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11988 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11989 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11994 Templates: Links: 4. Multiple templates generating link href
11996 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11998 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12003 Templates: Links: 5. Generation of link text
12005 [[Foo|{{echo|bar}}]]
12007 <p><a href="/wiki/Foo" title="Foo">bar</a>
12012 Templates: Links: 5. Nested templates (only outermost template should be marked)
12014 {{echo|[[{{echo|Foo}}|bar]]}}
12016 <p><a href="/wiki/Foo" title="Foo">bar</a>
12021 Templates: HTML Tag: 1. Generation of HTML attr. key
12023 <div {{echo|style}}="color:red;">foo</div>
12025 <div style="color:red;">foo</div>
12030 Templates: HTML Tag: 2. Generation of HTML attr. value
12032 <div style={{echo|'color:red;'}}>foo</div>
12034 <div style="color:red;">foo</div>
12039 Templates: HTML Tag: 3. Generation of HTML attr key and value
12041 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12043 <div style="color:red;">foo</div>
12048 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12050 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12052 <div title="This is a long title with just one piece templated">foo</div>
12057 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12059 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12061 <div title="This is a long title with just one piece templated">foo</div>
12066 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12068 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12070 <div title="This is a long title with just one piece templated">foo</div>
12074 # SSS FIXME: While it is great we added support for all this,
12075 # do we want to make this part of the spec? Maybe we want to
12076 # deprecate this kind of usage in the future?
12078 Templates: HTML Tag: 7. Generation of partial attribute key string
12080 <div st{{echo|yle}}="color:red;">foo</div>
12082 <div style="color:red;">foo</div>
12087 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12089 <div {{echo|1=id="v1"}}>bar</div>
12091 <div id="v1">bar</div>
12096 Templates: HTML Tag: 9. Multiple template-generated attributes
12098 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12100 <div id="v1" title="foo">bar</div>
12105 Templates: Support for templates generating attributes and content
12107 {| {{mixed_attr_content_template}}
12112 <table style="color:red;" title="T48811">
12122 <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|}"]}'>
12131 1. Entities and nowikis inside templated attributes should be handled correctly
12133 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12135 <div style="background:#f9f9f9;">foo</div>
12138 <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>
12142 2. Entities and nowikis inside templated attributes should be handled correctly
12145 |{{table_attribs_3}}
12150 <td style="background:#f9f9f9;">Foo
12155 <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>
12160 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12163 |{{table_attribs_3}}
12168 <td style="background:#f9f9f9;">Foo
12172 <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}}]}'>
12173 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12179 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12182 | {{table_attribs_6}} hi
12187 <td style="background: red;"> hi
12192 <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>
12197 Templates: HTML Tables: 1. Generating start of a HTML table
12199 {{echo|<table><tr><td>foo</td>}}</tr></table>
12201 <table><tr><td>foo</td></tr></table>
12206 Templates: HTML Tables: 2a. Generating middle 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: 2b. Generating middle of a HTML table
12217 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12219 <table><tr><td>foo</td></tr></table>
12224 Templates: HTML Tables: 3. Generating end of a HTML table
12226 <table><tr>{{echo|<td>foo</td></tr></table>}}
12228 <table><tr><td>foo</td></tr></table>
12233 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12235 {{echo|<table>}}<tr><td>foo</td></tr></table>
12237 <table><tr><td>foo</td></tr></table>
12242 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12244 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12246 <table><tr><td>foo</td></tr></table>
12251 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12253 <table><tr>{{echo|<td>}}foo</td></tr></table>
12255 <table><tr><td>foo</td></tr></table>
12260 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12262 <table><tr><td>foo{{echo|</td>}}</tr></table>
12264 <table><tr><td>foo</td></tr></table>
12269 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12271 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12273 <table><tr><td>foo</td></tr></table>
12278 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12280 <table><tr><td>foo</td></tr>{{echo|</table>}}
12282 <table><tr><td>foo</td></tr></table>
12287 Templates: HTML Tables: 5. Proper fostering of categories from inside
12289 parsoid=wt2html,wt2wt
12291 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12292 <!--Two categories (T52330)-->
12293 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12295 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12296 <!--Two categories (T52330)-->
12297 <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>
12301 Templates: Wiki Tables: 1a. Fostering of entire template content
12309 <tr><td></td></tr></table>
12321 Templates: Wiki Tables: 1b. Fostering of entire template content
12334 <tr><td></td></tr></table>
12348 Templates: Wiki Tables: 2. Fostering of partial template content
12358 <tr><td></td></tr></table>
12371 Templates: Wiki Tables: 3. td-content via multiple templates
12374 {{echo|{{pipe}}a}}{{echo|b}}
12385 Templates: Wiki Tables: 4. Templated tags, no content
12391 <tr><td></td></tr></table>
12396 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12410 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12423 ## This test case is very specific to Parsoid's internals
12424 ## and is hence only tested for Parsoid's code. Parsoid uses
12425 ## a <meta> marker tag for <ref> tags and they are expanded
12426 ## much later. We are verifying that this <meta> tag usage
12427 ## doesn't prevent foster parenting.
12429 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12431 {{PartialTable}}<ref>foo</ref>
12436 <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">
12440 <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>
12444 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12454 <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{{!}}}"]}'>
12455 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12459 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12464 Templates: Lists: Multi-line list-items via templates
12466 *{{echo|a {{nonexistent|
12468 *{{echo|b {{nonexistent|
12471 <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>
12472 <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>
12477 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12479 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12481 <p><i>ab</i>c<i>d</i>e
12486 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12487 (PHP parser generates misnested html)
12489 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12491 <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>
12495 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12496 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12498 parsoid=wt2html,wt2wt
12500 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12502 <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>
12503 <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>
12504 <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>
12508 Templates: Ugly nesting: 4. Divs opened/closed across templates
12510 a<div>b{{echo|c</div>d}}e
12521 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12527 |{{echo|foo</table>}}
12531 <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|}"]}'>
12535 <td>foo</td></tr></tbody></table><span about="#mwt1">
12536 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12541 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12551 <td>1. {{echo|foo </table>}}</td>
12553 <td>2. {{echo|baz </table>}}</td>
12566 <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>"]}'>
12571 <td>1. foo </td></tr></tbody></table></td>
12573 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12574 </span><span about="#mwt2">
12575 </span><span about="#mwt2">
12576 </span><span about="#mwt2">abc</span><span about="#mwt2">
12577 </span><span about="#mwt2">
12578 </span><span about="#mwt2">
12579 </span><span about="#mwt2">
12580 </span><span about="#mwt2">
12581 </span><span about="#mwt2">
12582 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12583 </span><span about="#mwt2">
12588 Templates: Ugly templates: 3. newline-only template parameter
12597 # This looks like a bug: a single newline triggers p/br for some reason.
12599 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12608 # T66017 -- ugly wikitext with fostered content generates two template ranges that
12609 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12611 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12617 <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
12618 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12622 # T66017 -- ugly wikitext with fostered content generates two template ranges
12623 # that are "identical" and generate nesting cycles in the algorithm
12625 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12627 {{echo|<table><tr><td><table>}}
12631 <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"}'>
12632 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12633 </table></td></tr></tbody></table>
12637 Templates: Parameters substituted at the top-level
12639 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12643 <p><i>who</i> me? <b>never!</b>
12647 <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>
12649 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
12653 Parser Functions: 1. Simple example
12662 Parser Functions: 2. Nested use (only outermost should be marked up)
12671 ### Pre-save transform tests
12674 pre-save transform: subst:
12680 This is a test template
12684 pre-save transform: normal template
12694 pre-save transform: nonexistent template
12698 {{thistemplatedoesnotexist}}
12700 {{thistemplatedoesnotexist}}
12704 pre-save transform: subst magic variables
12713 # This is T2089, which I fixed. -- wtm
12715 pre-save transform: subst: templates with parameters
12719 {{subst:paramtest|param="something else"}}
12721 This is a test template with parameter "something else"
12725 Template:nowikitest
12727 <nowiki>'''not wiki'''</nowiki>
12731 pre-save transform: nowiki in subst (T3188)
12735 {{subst:nowikitest}}
12737 <nowiki>'''not wiki'''</nowiki>
12741 Template:commenttest
12743 This template has <!-- a comment --> in it.
12747 pre-save transform: comment in subst (T3936)
12751 {{subst:commenttest}}
12753 This template has <!-- a comment --> in it.
12757 pre-save transform: unclosed tag
12761 <nowiki>'''not wiki'''
12763 <nowiki>'''not wiki'''
12767 pre-save transform: mixed tag case
12771 <NOwiki>'''not wiki'''</noWIKI>
12773 <NOwiki>'''not wiki'''</noWIKI>
12777 pre-save transform: unclosed comment in <nowiki>
12781 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12783 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12786 # Leading @ in this template definition works around a limitation
12787 # in parsoid's parserTests which otherwise strips the <span> from the
12788 # result (confusing it for a template wrapper)
12792 @<span onmouseover="alert('crap')">Oh no</span>
12796 (confirming safety of fix for subst T3936)
12798 {{Template:dangerous}}
12800 <p>@<span>Oh no</span>
12805 pre-save transform: comment containing gallery (T7024)
12809 <!-- <gallery>data</gallery> -->
12811 <!-- <gallery>data</gallery> -->
12815 pre-save transform: comment containing extension
12819 <!-- <tag>data</tag> -->
12821 <!-- <tag>data</tag> -->
12825 pre-save transform: comment containing nowiki
12829 <!-- <nowiki>data</nowiki> -->
12831 <!-- <nowiki>data</nowiki> -->
12835 pre-save transform: <noinclude> in subst (T5298)
12845 pre-save transform: <onlyinclude> in subst (T5298)
12849 {{subst:Includes2}}
12857 {{<includeonly>subst:</includeonly>Includes}}
12861 Template:SafeSubstTest
12863 {{<includeonly>safesubst:</includeonly>Includes}}
12867 T24297: safesubst: works during PST
12871 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12877 T24297: safesubst: works during normal parse
12886 subst: does not work during normal parse
12890 <p>{{subst:Includes}}
12895 pre-save transform: context links ("pipe trick")
12899 [[Article (context)|]]
12902 [[Bar:Article (context)|]]
12903 [[:Bar:Article (context)|]]
12905 [[|Article (context)]]
12909 [[Article (context)|Article]]
12910 [[Bar:Article|Article]]
12911 [[:Bar:Article|Article]]
12912 [[Bar:Article (context)|Article]]
12913 [[:Bar:Article (context)|Article]]
12915 [[Article (context)]]
12916 [[Bar:X (Y) Z|X (Y) Z]]
12917 [[:Bar:X (Y) Z|X (Y) Z]]
12921 pre-save transform: context links ("pipe trick") with interwiki prefix
12925 [[interwiki:Article|]]
12926 [[:interwiki:Article|]]
12927 [[interwiki:Bar:Article|]]
12928 [[:interwiki:Bar:Article|]]
12930 [[interwiki:Article|Article]]
12931 [[:interwiki:Article|Article]]
12932 [[interwiki:Bar:Article|Bar:Article]]
12933 [[:interwiki:Bar:Article|Bar:Article]]
12937 pre-save transform: context links ("pipe trick") with parens in title
12939 pst title=[[Somearticle (context)]]
12943 [[Article (context)|Article]]
12947 pre-save transform: context links ("pipe trick") with comma in title
12949 pst title=[[Someplace, Somewhere]]
12952 [[Otherplace, Elsewhere|]]
12953 [[Otherplace, Elsewhere, Anywhere|]]
12955 [[Otherplace, Somewhere|Otherplace]]
12956 [[Otherplace, Elsewhere|Otherplace]]
12957 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12961 pre-save transform: context links ("pipe trick") with parens and comma
12963 pst title=[[Someplace (IGNORED), Somewhere]]
12966 [[Otherplace (place), Elsewhere|]]
12968 [[Otherplace, Somewhere|Otherplace]]
12969 [[Otherplace (place), Elsewhere|Otherplace]]
12973 pre-save transform: context links ("pipe trick") with comma and parens
12975 pst title=[[Who, me? (context)]]
12978 [[Me, Myself, and I (1937 song)|]]
12980 [[Yes, you. (context)|Yes, you.]]
12981 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12985 pre-save transform: context links ("pipe trick") with namespace
12987 pst title=[[Ns:Somearticle]]
12991 [[Ns:Article|Article]]
12995 pre-save transform: context links ("pipe trick") with namespace and parens
12997 pst title=[[Ns:Somearticle (context)]]
13001 [[Ns:Article (context)|Article]]
13005 pre-save transform: context links ("pipe trick") with namespace and comma
13007 pst title=[[Ns:Somearticle, Context, Whatever]]
13011 [[Ns:Article, Context, Whatever|Article]]
13015 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13017 pst title=[[Ns:Somearticle, Context (context)]]
13021 [[Ns:Article (context)|Article]]
13025 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13027 pst title=[[Ns:Somearticle (IGNORED), Context]]
13031 [[Ns:Article, Context|Article]]
13035 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13039 [[Article(context)|]]
13040 [[Bar:Article(context)|]]
13041 [[:Bar:Article(context)|]]
13042 [[|Article(context)]]
13046 [[Article(context)|Article]]
13047 [[Bar:Article(context)|Article]]
13048 [[:Bar:Article(context)|Article]]
13049 [[Article(context)]]
13050 [[Bar:X(Y)Z|X(Y)Z]]
13051 [[:Bar:X(Y)Z|X(Y)Z]]
13055 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13059 [[Article (context)|]]
13060 [[Bar:Article (context)|]]
13061 [[:Bar:Article (context)|]]
13062 [[|Article (context)]]
13066 [[Article (context)|Article]]
13067 [[Bar:Article (context)|Article]]
13068 [[:Bar:Article (context)|Article]]
13069 [[Article (context)]]
13070 [[Bar:X (Y) Z|X (Y) Z]]
13071 [[:Bar:X (Y) Z|X (Y) Z]]
13075 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13079 [[Article(context)|]]
13080 [[Bar:Article(context)|]]
13081 [[:Bar:Article(context)|]]
13082 [[|Article(context)]]
13086 [[Article(context)|Article]]
13087 [[Bar:Article(context)|Article]]
13088 [[:Bar:Article(context)|Article]]
13089 [[Article(context)]]
13090 [[Bar:X(Y)Z|X(Y)Z]]
13091 [[:Bar:X(Y)Z|X(Y)Z]]
13095 pre-save transform: context links ("pipe trick") with commas (T23660)
13099 [[Article (context), context|]]
13100 [[Article (context),context|]]
13101 [[Bar:Article (context), context|]]
13102 [[Bar:Article (context),context|]]
13103 [[:Bar:Article (context), context|]]
13104 [[:Bar:Article (context),context|]]
13106 [[Article (context), context|Article]]
13107 [[Article (context),context|Article]]
13108 [[Bar:Article (context), context|Article]]
13109 [[Bar:Article (context),context|Article]]
13110 [[:Bar:Article (context), context|Article]]
13111 [[:Bar:Article (context),context|Article]]
13115 pre-save transform: trim trailing empty lines
13119 Empty lines are trimmed
13125 Empty lines are trimmed
13129 pre-save transform: Signature expansion
13134 * <noinclude>~~~</noinclude>
13135 * <includeonly>~~~</includeonly>
13136 * <onlyinclude>~~~</onlyinclude>
13138 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13139 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13140 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13141 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13146 pre-save transform: Signature expansion in nowiki tags (T2093)
13152 <nowiki>~~~~</nowiki>
13154 <includeonly><nowiki>~~~~</nowiki></includeonly>
13156 <noinclude><nowiki>~~~~</nowiki></noinclude>
13158 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13160 {{subst:Foo}} shall be converted to FOO
13162 As well as inside noinclude/onlyinclude
13163 <noinclude>{{subst:Foo}}</noinclude>
13164 <onlyinclude>{{subst:Foo}}</onlyinclude>
13166 But not inside includeonly
13167 <includeonly>{{subst:Foo}}</includeonly>
13171 <nowiki>~~~~</nowiki>
13173 <includeonly><nowiki>~~~~</nowiki></includeonly>
13175 <noinclude><nowiki>~~~~</nowiki></noinclude>
13177 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13179 FOO shall be converted to FOO
13181 As well as inside noinclude/onlyinclude
13182 <noinclude>FOO</noinclude>
13183 <onlyinclude>FOO</onlyinclude>
13185 But not inside includeonly
13186 <includeonly>{{subst:Foo}}</includeonly>
13190 Parsoid: Recognize nowiki with trailing space in tags
13194 <nowiki ><div>[[foo]]</nowiki >
13202 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13209 Parsoid: Recognize nowiki with odd capitalization
13213 <noWikI ><div>[[foo]]</Nowiki >
13215 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13220 Parsoid: Escape nowiki with trailing space in tags
13224 <p><nowiki > foo </nowiki ></p>
13225 <p>a<nowiki />b</p>
13226 <p>c<nowiki/ >d</p>
13228 <nowiki > foo </nowiki >
13236 Parsoid: Escape weird noWikI capitalizations
13240 <p><noWikI > foo </NoWikI ></p>
13242 <noWikI > foo </NoWikI >
13246 ### Message transform tests
13249 message transform: magic variables
13259 message transform: should not transform wiki markup
13269 message transform: <noinclude> in transcluded template (T6926)
13279 message transform: <onlyinclude> in transcluded template (T6926)
13289 {{#special:}} page name, known
13293 {{#special:Recentchanges}}
13295 Special:RecentChanges
13299 {{#special:}} page name with subpage, known
13303 {{#special:Recentchanges/param}}
13305 Special:RecentChanges/param
13309 {{#special:}} page name, unknown
13313 {{#special:foobar nonexistent}}
13315 Special:Foobar nonexistent
13319 {{#speciale:}} page name, known
13323 {{#speciale:Recentchanges}}
13325 Special:RecentChanges
13329 {{#speciale:}} page name with subpage, known
13333 {{#speciale:Recentchanges/param}}
13335 Special:RecentChanges/param
13339 {{#speciale:}} page name, unknown
13343 {{#speciale:foobar nonexistent}}
13345 Special:Foobar_nonexistent
13351 ### For Parsoid-specific tests, see
13352 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13357 parsoid=wt2html,wt2wt,html2html
13359 [[Image:foobar.jpg]]
13361 <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>
13364 <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>
13368 Simple image (using File: namespace, now canonical)
13370 [[File:Foobar.jpg]]
13372 <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>
13375 <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>
13379 Right-aligned image
13381 [[File:Foobar.jpg|right]]
13383 <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>
13386 <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>
13392 [[File:Foobar.jpg|right|Caption text]]
13394 <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>
13397 <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>
13401 Image with caption, T55312 #1
13403 [[File:Foobar.jpg|right|Caption page stuff]]
13405 <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>
13408 <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>
13412 Image with caption, T55312 #2
13414 [[File:Foobar.jpg|right|Caption page=]]
13416 <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>
13419 <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>
13423 Image with caption, T55312 #3
13425 [[File:Foobar.jpg|right|Caption page=stuff]]
13427 <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>
13430 <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>
13434 Allow empty links in image captions (T62753)
13438 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13443 <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>
13446 <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>
13448 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13449 </figcaption></figure>
13453 Titles in unlinked images (T23454)
13455 [[File:Foobar.jpg|link=|stuff]]
13457 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13462 Link with empty target
13471 Image with link trail
13473 Linktrails should not work for images: [[File:Foobar.jpg]]s
13475 <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
13478 <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>
13482 Image with empty attribute
13484 parsoid=wt2html,wt2wt,html2html
13486 [[File:Foobar.jpg|right||Caption text]]
13488 <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>
13491 <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>
13495 1. Block image with individual attributes from templates
13497 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13499 <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>
13502 <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>
13506 2. Block Image with individual attributes from templates
13508 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13510 <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>
13513 <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>
13517 3. Inline image with individual attributes from templates
13519 [[File:Foobar.jpg|{{echo|50px}}]]
13521 <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>
13524 <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>
13527 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13528 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13530 Image with multiple attributes from the same template
13532 [[File:Foobar.jpg|{{image_attribs}}]]
13534 <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>
13537 <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>
13541 Image with link tails
13545 123[[File:Foobar.jpg]]456
13546 123[[File:Foobar.jpg|right]]456
13547 123[[File:Foobar.jpg|thumb]]456
13549 <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
13551 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
13552 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
13555 <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>
13557 <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>
13559 <div class="thumb tright">
13560 <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>
13561 <div class="thumbcaption">
13562 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13568 <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>
13569 <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>
13570 <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>
13574 Image with multiple captions -- only last one is accepted
13576 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13578 <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>
13581 <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>
13585 Image with multiple widths -- use last
13587 [[File:Foobar.jpg|200px|300px|caption]]
13589 <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>
13592 <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>
13596 Image with multiple alignments -- use first (T50664)
13600 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13602 [[File:Foobar.jpg|middle|text-top|caption]]
13604 <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>
13605 <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>
13608 <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>
13609 <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>
13613 Image with width attribute at different positions
13615 [[File:Foobar.jpg|200px|right|Caption]]
13616 [[File:Foobar.jpg|right|200px|Caption]]
13617 [[File:Foobar.jpg|right|Caption|200px]]
13619 <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>
13620 <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>
13621 <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>
13624 <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>
13625 <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>
13626 <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>
13629 # a sad bit of backward-compatibility
13631 Image with size specified with pxpx (T15500, T53628)
13633 parsoid=wt2html,wt2wt,html2html
13635 [[File:Foobar.jpg|20pxpx]]
13636 [[File:Foobar.jpg|200x20pxpx]]
13638 <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>
13639 <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>
13642 <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>
13646 Image with link parameter, wiki target
13648 [[File:Foobar.jpg|link=Main Page]]
13650 <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>
13653 <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>
13656 # parsoid T51293 (part 1)
13658 Image with link parameter, URL target
13660 [[File:Foobar.jpg|link=http://example.com/]]
13662 <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>
13665 <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>
13668 # parsoid T51293 (part 2)
13670 Image with link parameter, protocol-less URL target
13672 [[File:Foobar.jpg|link=//example.com/]]
13674 <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>
13677 <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>
13681 Escaping non-block captions (T107435)
13684 "modes": ["wt2wt"],
13686 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13690 [[Image:Foobar.jpg|caption]]
13692 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13695 # wgExternalLinkTarget not supported by Parsoid
13697 Image with link parameter, wgExternalLinkTarget
13699 [[Image:foobar.jpg|link=http://example.com/]]
13701 wgExternalLinkTarget='foobar'
13703 <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>
13708 Image with link parameter, wgNoFollowLinks set to false
13710 [[Image:foobar.jpg|link=http://example.com/]]
13712 wgNoFollowLinks=false
13714 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13719 Image with link parameter, wgNoFollowDomainExceptions
13721 [[Image:foobar.jpg|link=http://example.com/]]
13723 wgNoFollowDomainExceptions='example.com'
13725 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13729 # wgExternalLinkTarget not supported by Parsoid
13731 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13733 [[Image:foobar.jpg|link=http://example.com/|Title]]
13735 wgExternalLinkTarget='foobar'
13737 <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>
13742 Image with empty link parameter
13744 [[File:Foobar.jpg|link=]]
13746 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13749 <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>
13753 Image with link parameter (wiki target) and unnamed parameter
13755 [[File:Foobar.jpg|link=Main_Page|Title]]
13757 <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>
13760 <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>
13764 Image with link parameter (URL target) and unnamed parameter
13766 [[File:Foobar.jpg|link=http://example.com/|Title]]
13768 <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>
13771 <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>
13775 Thumbnail image with link parameter
13778 parsoid=wt2html,wt2wt,html2html
13780 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13782 <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>
13785 <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>
13789 Manually-specified thumbnail image
13793 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
13795 <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>
13798 <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>
13802 Manually-specified thumbnail image with explicit link to wiki page
13805 parsoid=wt2html,wt2wt,html2html
13807 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13809 <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>
13812 <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>
13816 Manually-specified thumbnail image with explicit link to url
13819 parsoid=wt2html,wt2wt,html2html
13821 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13823 <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>
13826 <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>
13830 Manually-specified thumbnail image with explicit no link
13833 parsoid=wt2html,wt2wt,html2html
13835 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13837 <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>
13840 <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>
13844 Manually-specified thumbnail image with explicit link and alt text
13847 parsoid=wt2html,wt2wt,html2html
13849 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13851 <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>
13854 <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>
13858 Image with frame and link
13860 parsoid=wt2html,wt2wt,html2html
13862 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13864 <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>
13867 <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>
13871 Image with frame and link and explicit alt
13873 parsoid=wt2html,wt2wt,html2html
13875 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13877 <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>
13880 <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>
13884 Image with wiki markup in implicit alt
13886 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13888 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13890 <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>
13891 </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>
13894 <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>
13896 <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>
13900 Alt image option should handle most kinds of wikitext without barfing
13902 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13904 <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>
13907 <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>
13910 ###################
13911 # Conflicting image format options.
13912 # First option specified should 'win'.
13913 # All three cases in each test should be identical.
13916 Image with 'frameless' first.
13918 parsoid=wt2html,wt2wt,html2html
13920 [[File:Foobar.jpg|frameless|caption]]
13922 [[File:Foobar.jpg|frameless|frame|caption]]
13924 [[File:Foobar.jpg|frameless|thumb|caption]]
13926 <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>
13927 </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>
13928 </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>
13931 <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>
13932 <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>
13933 <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>
13937 Image with 'frame' first.
13939 parsoid=wt2html,wt2wt,html2html
13941 [[File:Foobar.jpg|frame|caption]]
13942 [[File:Foobar.jpg|frame|frameless|caption]]
13943 [[File:Foobar.jpg|frame|thumb|caption]]
13945 <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>
13946 <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>
13947 <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>
13950 <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>
13951 <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>
13952 <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>
13956 Image with 'thumb' first.
13958 parsoid=wt2html,wt2wt,html2html
13960 [[File:Foobar.jpg|thumb|caption]]
13961 [[File:Foobar.jpg|thumb|frameless|caption]]
13962 [[File:Foobar.jpg|thumb|frame|caption]]
13964 <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>
13965 <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>
13966 <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>
13969 <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>
13970 <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>
13971 <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>
13974 ###################
13976 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13977 # and https://phabricator.wikimedia.org/T64258
13978 # Foobar has actual size of 1941x220
13979 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13980 # a scalable format.
13981 # 2. Framed images always ignore size options; always render at default size.
13982 # 3. "Unspecified format" and border are the only types which can be
13986 Image: "unspecified format" and border enlarge
13988 parsoid=wt2html,wt2wt,html2html
13990 [[File:Foobar.jpg|2000px]]
13992 [[File:Foobar.jpg|border|2000px]]
13994 <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>
13995 </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>
13998 <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>
13999 <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>
14003 Image: "unspecified format" and border reduce
14005 parsoid=wt2html,wt2wt,html2html
14007 [[File:Foobar.jpg|1000px]]
14009 [[File:Foobar.jpg|border|1000px]]
14011 <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>
14012 </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>
14015 <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>
14016 <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>
14020 Image: thumbs reduce
14022 parsoid=wt2html,wt2wt,html2html
14024 [[File:Foobar.jpg|thumb|50px]]
14026 <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>
14029 <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>
14033 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14035 parsoid=wt2html,wt2wt,html2html
14037 [[File:Foobar.jpg|thumb|2000px]]
14039 [[File:Foobar.svg|thumb|2000px]]
14041 <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>
14042 <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>
14045 <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>
14046 <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>
14050 Image: frameless can reduce in size
14052 parsoid=wt2html,wt2wt,html2html
14054 [[File:Foobar.jpg|frameless|50px]]
14056 <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>
14059 <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>
14063 Image: bitmap frameless can't be enlarged past original size, but vector can
14065 parsoid=wt2html,wt2wt,html2html
14067 [[File:Foobar.jpg|frameless|2000px]]
14069 [[File:Foobar.svg|frameless|2000px]]
14071 <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>
14072 </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>
14075 <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>
14076 <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>
14080 Image: framed images are always unscaled.
14082 parsoid=wt2html,wt2wt,html2html
14084 [[File:Foobar.jpg|frame]]
14086 [[File:Foobar.jpg|frame|50px]]
14088 [[File:Foobar.jpg|frame|50x50px]]
14090 [[File:Foobar.jpg|frame|2000px]]
14092 <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>
14093 <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>
14094 <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>
14095 <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>
14098 <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>
14099 <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>
14100 <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>
14101 <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>
14104 ###################
14107 Link to image page- image page normally doesn't exists, hence edit link
14108 Add test with existing image page
14109 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14113 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14118 T20784 Link to non-existent image page with caption should use caption as link text
14120 [[:Image:test|caption]]
14122 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14127 Frameless image caption with a free URL
14129 [[File:Foobar.jpg|http://example.com]]
14131 <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>
14134 <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>
14138 Thumbnail image caption with a free URL
14142 [[File:Foobar.jpg|thumb|http://example.com]]
14144 <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>
14147 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
14151 Thumbnail image caption with a free URL and explicit alt
14154 parsoid=wt2html,wt2wt,html2html
14156 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14158 <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>
14161 <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>
14165 SVG thumbnails with no language set
14168 [[File:Foobar.svg|thumb|caption]]
14170 <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>
14173 <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>
14177 SVG thumbnails with language de
14179 parsoid=wt2html,wt2wt,html2html
14181 [[File:Foobar.svg|thumb|caption|lang=de]]
14183 <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>
14186 <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>
14190 SVG thumbnails with invalid language code
14192 parsoid=wt2html,wt2wt,html2html
14194 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14196 <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>
14199 <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>
14203 T3887: A ISBN with a thumbnail
14205 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14207 <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>
14210 <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>
14214 T3887: A RFC with a thumbnail
14216 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14218 <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>
14221 <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>
14225 T3887: A mailto link with a thumbnail
14227 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14229 <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>
14232 <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>
14235 # Pending resolution to T2368
14237 T2648: Frameless image caption with a link
14239 [[File:Foobar.jpg|text with a [[link]] in it]]
14241 <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>
14244 <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>
14248 T2648: Frameless image caption with a link (suffix)
14250 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14252 <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>
14255 <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>
14259 T2648: Frameless image caption with an interwiki link
14261 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14263 <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>
14266 <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>
14270 T2648: Frameless image caption with a piped interwiki link
14272 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14274 <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>
14277 <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>
14281 T107474: Frameless image caption with <nowiki>
14283 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14285 <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>
14289 Escape HTML special chars in image alt text
14291 [[File:Foobar.jpg|& < > "]]
14293 <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>
14296 <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>
14300 Escape HTML special chars in image alt text with LanguageConverter
14304 [[File:Foobar.jpg|& < > "]]
14306 <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>
14309 <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>
14313 Entities in file name and attributes
14315 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14317 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14320 <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>
14324 T2499: Alt text should have Ӓ, not &1234;
14326 [[File:Foobar.jpg|♀]]
14328 <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>
14331 <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>
14335 Broken image caption with link
14337 parsoid=wt2html,wt2wt,html2html
14339 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14341 <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.
14344 <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>
14348 Image caption containing another image
14350 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14352 <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>
14355 <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>
14359 Image: caption containing a newline
14361 [[File:Foobar.jpg|This
14364 <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>
14367 <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>
14371 Image: caption containing leading space
14372 (The leading space should not trigger nowiki escaping in wt2wt mode)
14374 [[File:Foobar.jpg|thumb| bar]]
14376 <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>
14379 <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>
14383 Image: caption containing a table
14385 parsoid=wt2html,wt2wt,html2html
14387 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14393 and some more text.]]
14395 <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>
14398 <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
14401 <tr><th>Foo </th><th>Bar</th></tr>
14404 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14408 T5090: External links other than http: in image captions
14410 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14412 <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>
14415 <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>
14421 parsoid=wt2html,wt2wt,html2html
14423 [[Image:foobar.jpg|a|class=b]]
14425 <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>
14428 <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>
14432 Localized image handling (1).
14434 parsoid=wt2html,wt2wt,html2html
14437 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14439 <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>
14442 <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>
14446 Localized image handling (2).
14449 parsoid=wt2html,wt2wt,html2html
14452 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14454 <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>
14457 <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>
14461 Localized image handling (3).
14466 <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>
14468 [[File:Foobar.jpg|بندانگشتی]]
14472 "border", "frameless" and "class" attributes on an image.
14475 parsoid=wt2html,wt2wt,html2html
14477 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14479 <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>
14482 <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>
14485 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14487 Invalid image attributes (T64500)
14490 parsoid=wt2html,wt2wt,html2html
14492 [[File:Foobar.jpg|thumb|float|left|caption]]
14494 [[File:Foobar.jpg|thumb|righ|caption]]
14496 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14498 <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>
14499 <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>
14500 <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>
14503 <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>
14504 <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>
14505 <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>
14511 #REDIRECT [[File:Barfoo.jpg]]
14514 # FIXME: Parsoid should run this test -- but we'd need to teach the
14515 # mockAPI about the redirected Barfoo.jpg image.
14519 [[Image:Barfoo.jpg]]
14521 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14526 Missing image with uploads disabled
14530 [[File:Foobaz.jpg]]
14532 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14535 <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>
14538 # Parsoid-specific testing for images
14539 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14540 # Currently imperfect due to a flaw in the Parsoid testrunner
14542 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14546 Parsoid-specific image handling - simple image with size and middle alignment
14548 [[File:Foobar.jpg|middle|50px]]
14550 <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>
14554 Parsoid-specific image handling - simple image with size, middle alignment,
14555 non-standard namespace alias
14557 parsoid=wt2wt,wt2html,html2html
14559 [[Image:Foobar.jpg|middle|50px]]
14561 <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>
14565 Parsoid-specific image handling - simple image with size and middle alignment
14568 [[File:Foobar.jpg|50px|middle]]
14570 <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>
14574 Parsoid-specific image handling - simple image with size and middle alignment
14575 and non-standard namespace name
14577 parsoid=wt2html,wt2wt,html2html
14579 [[Image:Foobar.jpg|50px|middle]]
14581 <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>
14585 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14587 [[File:Foobar.jpg|500x10px|baseline|caption]]
14589 <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>
14593 Parsoid-specific image handling - simple image with border and size spec
14595 [[File:Foobar.jpg|50px|border|caption]]
14597 <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>
14601 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14603 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14605 <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>
14609 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14612 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14614 <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>
14618 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14620 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14622 <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>
14626 Parsoid-specific image handling - thumbnail with specific size, halign,
14627 valign, and caption (existing content)
14629 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14631 <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>
14635 Parsoid-specific image handling - framed image with specific size and caption
14638 parsoid=wt2html,wt2wt,html2html
14640 [[File:Foobar.jpg|frame|500x50px|caption]]
14642 <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>
14646 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14649 parsoid=wt2html,wt2wt,html2html
14651 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14653 <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>
14657 Parsoid-specific image handling - frameless image with specific size, border, and caption
14659 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14661 <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>
14665 Parsoid-specific image handling - simple image with a formatted caption
14667 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14669 <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>
14673 Parsoid-specific image handling - caption with a template in it
14675 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14677 <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>
14681 Parsoid-specific image handling - caption with unbalanced tags in it
14683 parsoid=wt2html,wt2wt,html2html
14686 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14690 <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>
14695 Parsoid-specific image handling - empty caption (1)
14697 parsoid=wt2html,wt2wt
14699 [[File:Foobar.jpg|thumb|]]
14701 <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>
14704 # empty captions don't get serialized unless we're in the "round trip" case
14706 Parsoid-specific image handling - empty caption (2)
14710 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14711 <a href="./File:Foobar.jpg">
14712 <img resource="./File:Foobar.jpg"
14713 src="//example.com/images/3/3a/Foobar.jpg"
14714 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14715 height="25" width="220"/>
14717 <figcaption></figcaption>
14720 [[File:Foobar.jpg|thumb]]
14724 Parsoid-specific image handling - whitespace caption
14726 [[File:Foobar.jpg|thumb| ]]
14728 <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>
14732 Parsoid-specific image handling - lang option
14735 [[File:Foobar.svg|lang=de|caption]]
14739 <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>
14743 ## Edge case bugs in Parsoid from T93580
14745 T93580: 1. Templated <ref> inside block images
14747 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14751 <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>
14753 <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>
14757 T93580: 2. <ref> inside inline images
14759 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14763 <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>
14765 <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>
14769 T93580: 3. Templated <ref> inside inline images
14771 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14775 <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>
14777 <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>
14784 Subpage test/subpage
14792 subpage title=[[Subpage test]]
14796 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14801 Subpage noslash link
14803 subpage title=[[Subpage test]]
14807 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14812 Subpage test/1/2/subpage
14818 Relative subpage noslash link
14820 parsoid=wt2wt,wt2html,html2html
14821 subpage title=[[Subpage test/1/2/3/4]]
14827 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14828 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14831 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14832 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14836 Parsoid: dot-slash prefixed wikilinks
14846 </p><p>[[././baz/]]
14851 </p><p>[[././baz/]]
14856 Render invalid page names as plain text (T53090)
14869 [[{{echo|./../foo}}|bar]]
14870 [[{{echo|foo/.}}|bar]]
14871 [[{{echo|foo/..}}|bar]]
14872 [[{{echo|foo~~~~bar}}]]
14873 [[{{echo|foo>bar}}]]
14874 [[{{echo|foo././bar}}]]
14875 [[{{echo|foo{bar}}]]
14876 [[{{echo|foo}bar}}]]
14877 [[{{echo|foo[bar}}]]
14878 [[{{echo|foo]bar}}]]
14879 [[{{echo|foo<bar}}]]
14881 <p>[[./../foo|bar]]
14891 </p><p>[[./../foo|bar]]
14904 <p>[[./../foo|bar]]
14915 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14916 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14917 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14918 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14919 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14920 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14921 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14922 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14923 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14924 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14925 [[<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>
14933 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14938 T2561: {{/Subpage}}
14940 subpage title=[[Page]]
14944 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14952 Category:MediaWiki User's Guide
14960 [[:Category:MediaWiki User's Guide]]
14962 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14971 [[Category:MediaWiki User's Guide]]
14973 cat=MediaWiki_User's_Guide sort=
14975 <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"}}'/>
14979 PAGESINCATEGORY invalid title fatal (r33546 fix)
14981 {{PAGESINCATEGORY:<bogus>}}
14988 Category with different sort key
14992 [[Category:MediaWiki User's Guide|Foo]]
14994 cat=MediaWiki_User's_Guide sort=Foo
14996 <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"}}'/>
15000 Category with identical sort key
15004 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15006 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15008 <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"}}'/>
15012 Category with empty sort key
15017 [[Category:MediaWiki User's Guide|]]
15019 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15023 Category with empty sort key and parentheses
15028 [[Category:Foo (bar)|]]
15030 [[Category:Foo (bar)|Foo]]
15034 Category with link tail
15039 123[[Category:Foo]]456
15041 123[[Category:Foo]]456
15045 Category with template
15050 [[Category:{{echo|Foo}}]]
15052 [[Category:{{echo|Foo}}]]
15056 Category with template in sort key
15061 [[Category:Foo|{{echo|Bar}}]]
15063 [[Category:Foo|{{echo|Bar}}]]
15067 Category with template in sort key and title
15072 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15074 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15077 ## We used to, but no longer wt2wt this test since the default serializer
15078 ## will normalize all categories to serialize on their own line.
15079 ## This wikitext usage is going to be fairly uncommon in production and
15080 ## selser will take care of preserving formatting in those scenarios.
15082 Category / paragraph interactions
15086 Foo [[Category:Baz]] Bar
15088 Foo [[Category:Baz]]
15096 [[Category:Baz]] Bar
15109 {{echo|[[Category:Baz]]}}
15122 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15123 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15124 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15125 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15126 <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>
15127 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15130 ## We used to, but no longer wt2wt this test since the default serializer
15131 ## will normalize all categories to serialize on their own line.
15132 ## This wikitext usage is going to be fairly uncommon in production and
15133 ## selser will take care of preserving formatting in those scenarios.
15135 ## The whitespace on the empty line is part of the test. Please do not delete
15137 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15143 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15145 {{echo|[[Category:Foo]] and so should this!}}
15147 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15152 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15154 <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>
15157 ## Parsoid will not try to wt2wt this while preserving newlines because
15158 ## it suppresses excess newlines within list items -- and we don't want to
15159 ## introduce a special case just for categories, which is, in reality somewhat
15160 ## odd behavior -- categories are unlikely to be used in list items like this
15161 ## in top-level pages and are only likely to show up in template-generated
15162 ## list items where this RT-ing is a non-issue.
15164 ## The whitespace on the empty line is part of the test. Please do not delete
15166 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15172 [[Category:Foo]] and this should be part of the same list item
15175 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15177 <ul><li>This and this should be part of the same list item</li>
15178 <li>So should this and this should be part of the same list item</li></ul>
15181 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15182 <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>
15186 ## Newlines and categories that follow the last item of a list
15187 ## are treated differently because this (list followed by categories)
15188 ## is an extremely common pattern on wikis.
15190 3. Categories and newlines: newline suppression for last list item should RT properly
15203 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15205 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15206 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15210 4. Categories and newlines: newline suppression for last list item should RT properly
15218 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15220 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15223 ## only wt2html for this to make sure the algo only applies to the rightmost path
15225 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15238 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15240 <ul><li> d</li></ul></li></ul>
15241 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15244 ## We used to, but no longer wt2wt this test since the default serializer
15245 ## will normalize all categories to serialize on their own line.
15246 ## This wikitext usage is going to be fairly uncommon in production and
15247 ## selser will take care of preserving formatting in those scenarios.
15249 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15253 * a [[Category:Foo]]
15255 <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>
15258 # This test also demonstrates because of newline+category tunneling
15259 # through the list hander, template wrapping doesn't expand to the
15260 # containing list when the list item swallows the category.
15262 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15267 <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
15268 </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>
15272 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15276 {{echo|[[Category:Foo]]
15280 <ul><li> a</li></ul>
15282 <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">
15283 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15284 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15288 Category links with multiple namespaces
15290 [[Category:Project:Foo]]
15292 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15296 Parsoid: Serialize link to category page with colon escape
15302 [[:Category:Foo|Bar]]
15305 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15306 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15310 # We used to, but no longer wt2wt this test since the default serializer
15311 # will normalize all categories to serialize on their own line.
15312 # This wikitext usage is going to be fairly uncommon in production and
15313 # selser will take care of preventing whitespace insertion if this
15314 # occurs in an article.
15316 # html2html disabled for the same reason (whitespace insertion between
15319 # html2wt disabled because it localizes the "Category" namespace.
15321 Link prefix/suffixes aren't applied to category links
15331 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15335 Parsoid: Serialize link to file page with colon escape
15341 [[:File:Foo.png|Bar]]
15344 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15345 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15350 Parsoid: Serialize a genuine category link without colon escape
15355 [[Category:Foo|Bar]]
15357 <link rel="mw:PageProp/Category" href="./Category:Foo">
15358 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15362 Normalize hrefs properly before testing for invalid link targets (T72894)
15366 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15368 [[Category:Toxine bactérienne]]
15372 Parsoid: Defaultsort
15374 {{DEFAULTSORT:Foo}}
15376 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15380 Parsoid: Defaultsort (template-generated)
15382 {{{{echo|DEFAULTSORT}}:Foo}}
15384 <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}}]}'/>
15388 ### Inter-language links
15391 Interlanguage links
15399 es:Alimento fr:Nourriture zh:食品
15401 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15402 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15403 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15407 Duplicate interlanguage links (T26502)
15418 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15419 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15420 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15421 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15428 Basic section headings
15435 ===Smaller headline===
15438 <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>
15441 <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>
15444 <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>
15450 Section headings with TOC
15453 === Subheadline 1 ===
15454 ===== Skipping a level =====
15455 ====== Skipping a level ======
15459 ===Another headline===
15461 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15463 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15465 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15467 <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>
15469 <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>
15476 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15478 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15484 <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>
15485 <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>
15486 <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>
15487 <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>
15488 <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>
15491 <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>
15496 TOC anchors don't collide
15504 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15506 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15507 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15508 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15509 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15513 <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>
15514 <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>
15515 <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>
15516 <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>
15520 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15522 Handling of sections up to level 6 and beyond
15525 == Level 2 Heading==
15526 === Level 3 Heading===
15527 ==== Level 4 Heading====
15528 ===== Level 5 Heading=====
15529 ====== Level 6 Heading======
15530 ======= Level 7 Heading=======
15531 ======== Level 8 Heading========
15532 ========= Level 9 Heading=========
15533 ========== Level 10 Heading==========
15535 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15537 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15539 <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>
15541 <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>
15543 <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>
15545 <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>
15547 <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>
15548 <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>
15549 <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>
15550 <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>
15551 <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>
15565 <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>
15566 <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>
15567 <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>
15568 <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>
15569 <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>
15570 <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>
15571 <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>
15572 <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>
15573 <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>
15574 <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>
15579 TOC regression (T11764)
15583 ==== title 1.1.1 ====
15588 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15590 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15592 <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>
15594 <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>
15597 <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>
15600 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15602 <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>
15608 <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>
15609 <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>
15610 <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>
15611 <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>
15612 <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>
15613 <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>
15618 TOC for heading containing <span id="..."></span> (T96153)
15621 ==<span id="old-anchor"></span>New title==
15623 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15625 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15629 <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>
15634 TOC with wgMaxTocLevel=3 (T8204)
15640 ==== title 1.1.1 ====
15645 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15647 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15649 <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>
15650 <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>
15653 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15655 <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>
15661 <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>
15662 <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>
15663 <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>
15664 <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>
15665 <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>
15666 <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>
15671 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
15677 ====Section 1.1.1====
15678 ====Section 1.1.1.1====
15681 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15683 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15685 <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>
15688 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15692 <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>
15693 <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>
15694 <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>
15695 <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>
15696 <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>
15702 Resolving duplicate section names
15707 <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>
15708 <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>
15713 Resolving duplicate section names with differing case (T12721)
15718 <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>
15719 <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>
15731 Template with sections, __NOTOC__
15738 <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>
15739 <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>
15740 <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>
15741 <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>
15746 __NOEDITSECTION__ keyword
15752 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15753 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15758 Link inside a section heading
15760 ==Section with a [[Main Page|link]] in it==
15762 <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>
15767 TOC regression (T14077)
15774 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15776 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15778 <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>
15781 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15785 <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>
15786 <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>
15787 <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>
15792 T3219 URL next to image (good)
15794 http://example.com [[File:Foobar.jpg]]
15796 <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>
15799 <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>
15803 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
15806 The line above must have a trailing space!
15809 But just in case it doesn't...
15811 <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>
15812 <p>The line above must have a trailing space!
15814 <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>
15815 <p>But just in case it doesn't...
15820 Header with special characters (T27462)
15822 The tooltips shall not show entities to the user (ie. be double escaped)
15839 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15841 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15843 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15844 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15845 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15846 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15847 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15851 <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>
15854 <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>
15857 <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>
15860 <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>
15863 <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>
15869 Header with space, plus and underscore as entity
15871 Id should not contain + for spaces
15873 == Space between Text ==
15876 == Space-Entity between Text ==
15879 == Plus+between+Text ==
15882 == Plus-Entity+between+Text ==
15885 == Underscore_between_Text ==
15888 == Underscore-Entity_between_Text ==
15891 [[#Space between Text]]
15892 [[#Space-Entity between Text]]
15893 [[#Plus+between+Text]]
15894 [[#Plus-Entity+between+Text]]
15895 [[#Underscore_between_Text]]
15896 [[#Underscore-Entity_between_Text]]
15898 <p>Id should not contain + for spaces
15900 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15902 <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>
15903 <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>
15904 <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>
15905 <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>
15906 <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>
15907 <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>
15911 <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>
15914 <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>
15917 <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>
15920 <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>
15923 <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>
15926 <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>
15928 </p><p><a href="#Space_between_Text">#Space between Text</a>
15929 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15930 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15931 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15932 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15933 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15938 Headers with excess '=' characters
15939 (Are similar tests necessary beyond the 1st level?)
15943 =''italic'' heading==
15944 ==''italic'' heading=
15946 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15948 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15949 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15950 <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>
15951 <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>
15955 <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>
15956 <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>
15957 <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>
15958 <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>
15963 HTML headers vs TOC (T25393)
15964 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15976 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15978 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15980 <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>
15981 <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>
15984 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15986 <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>
15987 <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>
15993 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15994 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15995 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15996 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15997 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15998 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16003 Single-line or multiline-comments can follow headings
16005 parsoid=wt2html,wt2wt
16013 <h2><span class="mw-headline" id="foo">foo</span></h2>
16014 <h2><span class="mw-headline" id="bar">bar</span></h2>
16015 <h2><span class="mw-headline" id="baz">baz</span></h2>
16020 T3219 URL next to image (broken)
16022 http://example.com[[File:Foobar.jpg]]
16024 <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>
16027 <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>
16031 T3186 news: in the middle of text
16033 http://en.wikinews.org/wiki/Wikinews:Workplace
16035 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16041 Namespaced link must have a title
16050 Namespaced link must have a title (bad fragment version)
16052 [[Project:#fragment]]
16054 <p>[[Project:#fragment]]
16060 ### HTML tags and HTML attributes
16064 div with no attributes
16066 <div>HTML rocks</div>
16068 <div>HTML rocks</div>
16073 div with double-quoted attribute
16075 <div id="rock">HTML rocks</div>
16077 <div id="rock">HTML rocks</div>
16082 div with single-quoted attribute
16084 <div id='rock'>HTML rocks</div>
16086 <div id="rock">HTML rocks</div>
16091 div with unquoted attribute
16093 <div id=rock>HTML rocks</div>
16095 <div id="rock">HTML rocks</div>
16100 div with illegal double attributes
16102 <div id="a" id="b">HTML rocks</div>
16104 <div id="b">HTML rocks</div>
16109 div with empty attribute value, space before equals
16111 parsoid=wt2html,html2html
16113 <div class =>HTML rocks</div>
16115 <div class="">HTML rocks</div>
16118 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16122 div with multiple empty attribute values
16124 parsoid=wt2html,html2html
16126 <div id= title=>HTML rocks</div>
16128 <div id="title.3D">HTML rocks</div>
16131 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16135 table with multiple empty attribute values
16137 parsoid=wt2html,html2html
16143 <table title="id=">
16149 <table title="id=">
16150 <tbody><tr><td> hi</td></tr>
16155 div with braces in attribute value
16157 <div title="{}">Foo</div>
16159 <div title="{}">Foo</div>
16162 <div title="{}">Foo</div>
16166 div with empty attribute value, no space before equals
16168 parsoid=wt2html,html2html
16170 <div class=>HTML rocks</div>
16172 <div class="">HTML rocks</div>
16175 <div class="">HTML rocks</div>
16179 HTML multiple attributes correction
16181 <p class="error" class="awesome">Awesome!</p>
16183 <p class="awesome">Awesome!</p>
16188 Table multiple attributes correction
16191 !+ class="error" class="awesome"| status
16196 <th class="awesome"> status
16204 <DIV ID="x">HTML ROCKS</DIV>
16206 <div id="x">HTML ROCKS</div>
16211 Non-ASCII pseudo-tags are rendered as text
16220 Pseudo-tag with URL 'name' renders as url link
16222 <http://example.com/>
16224 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16229 text with amp in the middle of nowhere
16233 <p>Remember AT&T?
16238 text with character entity: eacute
16240 I always thought é was a cute letter.
16242 <p>I always thought é was a cute letter.
16245 <p>I always thought é was a cute letter.</p>
16249 text with entity-escaped character entity-like string: eacute
16251 I always thought &eacute; was a cute letter.
16253 <p>I always thought &eacute; was a cute letter.
16258 text with undefined character entity: xacute
16260 I always thought &xacute; was a cute letter.
16262 <p>I always thought &xacute; was a cute letter.
16269 <data value="5">five</data>
16270 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16271 <mark>This highlighted text</mark>
16273 <p><data value="5">five</data>
16274 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16275 <mark>This highlighted text</mark>
16280 HTML tag with leading space is parsed as text
16284 <p>< div>foo< /div>
16289 ### Nesting tests (see T43545, T52604, T53081)
16292 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
16293 # Note that html2wt is considerably more difficult if we use <b> in
16294 # the test case, instead of <small>
16296 Ensure that HTML adoption agency algorithm is properly implemented.
16298 <small>X<small>Y</small>Z</small>
16300 <p><small>X<small>Y</small>Z</small>
16304 # This was T43545 in the PHP parser.
16305 # Note that tidy doesn't handle this correctly.
16309 <kbd>X<kbd>Y</kbd>Z</kbd>
16311 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16315 # The following cases were T53081 in the PHP parser.
16316 # Note that there are some other nestable tags (b, i, etc) which are
16317 # not covered; see T53081 for discussion.
16319 # Note that tidy doesn't handle this correctly.
16323 <em>X<em>Y</em>Z</em>
16325 <p><em>X<em>Y</em>Z</em>
16329 # Note that tidy doesn't handle this correctly.
16331 Nesting of <strong>
16333 <strong>X<strong>Y</strong>Z</strong>
16335 <p><strong>X<strong>Y</strong>Z</strong>
16344 <p><q>X<q>Y</q>Z</q></p>
16347 # Note that tidy doesn't handle this correctly.
16351 <ruby>X<ruby>Y</ruby>Z</ruby>
16353 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16357 # Note that tidy doesn't handle this correctly.
16361 <bdo>X<bdo>Y</bdo>Z</bdo>
16363 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16375 [[Media:Foobar.jpg]]
16377 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16382 Media link with text
16384 [[Media:Foobar.jpg|A neat file to look at]]
16386 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16390 # FIXME: this is still bad HTML tag nesting
16391 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16393 Media link with nasty text
16395 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16397 <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>
16400 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16401 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16405 Media link to nonexistent file (T3702)
16407 [[Media:No such.jpg]]
16409 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16414 Image link to nonexistent file (T3850 - good)
16416 [[File:No_such.jpg]]
16418 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16421 <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>
16425 :Image link to nonexistent file (T3850 - bad)
16427 [[:Image:No such.jpg]]
16429 <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>
16432 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16438 Character reference normalization in link text (T3938)
16440 [[Main Page|this&that]]
16442 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16449 Test for unicode normalization
16451 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16455 (T21451) Links should refer to the normalized form.
16463 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16464 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16465 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16466 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16467 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16472 Empty attribute crash test (T4067)
16474 <font color="">foo</font>
16476 <p><font color="">foo</font>
16481 Empty attribute crash test single-quotes (T4067)
16483 <font color=''>foo</font>
16485 <p><font color="">foo</font>
16490 Attribute test: equals, then nothing
16492 parsoid=wt2html,html2html
16494 <font color=>foo</font>
16496 <p><font color="">foo</font>
16499 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16503 Attribute test: unquoted value
16505 parsoid=wt2html,html2html
16507 <font color=x>foo</font>
16509 <p><font color="x">foo</font>
16512 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16516 Attribute test: unquoted but illegal value (hash)
16518 <font color=#x>foo</font>
16520 <p><font color="#x">foo</font>
16524 # Parsoid does not serialize to empty attribute syntax,
16525 # so wt2wt and html2wt cases are skipped
16527 Attribute test: no value (T54330)
16529 parsoid=wt2html,html2html
16531 <font color>foo</font>
16533 <p><font color="">foo</font>
16536 <p><font color="">foo</font></p>
16540 T4095: link with three closing brackets
16544 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16547 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16551 T4095: link with pipe and three closing brackets
16553 [[Main Page|link]]]
16555 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16558 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16562 T4095: link with pipe and three closing brackets, version 2
16564 [[Main Page|[http://example.com/]]]
16566 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16569 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16578 Template:Dangerous attribute
16580 " onmouseover="alert(document.cookie)
16584 Template:Dangerous style attribute
16586 border-size: expression(alert(document.cookie))
16592 <div style="float: right; {{{1}}}">Magic div</div>
16596 T4304: HTML attribute safety (safe template; regression T4309)
16598 <div title="{{test}}"></div>
16600 <div title="This is a test template"></div>
16603 <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>
16606 # Parsoid has enough context to handle this case
16608 T4304: HTML attribute safety (dangerous template; 2309)
16610 <div title="{{dangerous attribute}}"></div>
16612 <div title=""></div>
16615 <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>
16619 T4304: HTML attribute safety (dangerous style template; 2309)
16621 <div style="{{dangerous style attribute}}"></div>
16623 <div style="/* insecure input */"></div>
16626 <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>
16630 T4304: HTML attribute safety (safe parameter; 2309)
16632 {{div style|width: 200px}}
16634 <div style="float: right; width: 200px">Magic div</div>
16637 <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>
16641 T4304: HTML attribute safety (unsafe parameter; 2309)
16643 {{div style|width: expression(alert(document.cookie))}}
16645 <div style="/* insecure input */">Magic div</div>
16648 <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>
16651 ## Parsoid output here differs; needs investigation.
16653 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
16655 {{div style|"><script>alert(document.cookie)</script>}}
16657 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16661 ## Parsoid output here differs; needs investigation.
16663 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16665 {{div style|" ><script>alert(document.cookie)</script>}}
16667 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16672 T4304: HTML attribute safety (link)
16674 <div title="[[Main Page]]"></div>
16676 <div title="[[Main Page]]"></div>
16681 T4304: HTML attribute safety (italics)
16683 <div title="''foobar''"></div>
16685 <div title="''foobar''"></div>
16690 T4304: HTML attribute safety (bold)
16692 <div title="'''foobar'''"></div>
16694 <div title="'''foobar'''"></div>
16699 T4304: HTML attribute safety (ISBN)
16701 <div title="ISBN 1234567890"></div>
16703 <div title="ISBN 1234567890"></div>
16708 T4304: HTML attribute safety (RFC)
16710 <div title="RFC 1234"></div>
16712 <div title="RFC 1234"></div>
16717 T4304: HTML attribute safety (PMID)
16719 <div title="PMID 1234567890"></div>
16721 <div title="PMID 1234567890"></div>
16726 T4304: HTML attribute safety (web link)
16728 <div title="http://example.com/"></div>
16730 <div title="http://example.com/"></div>
16735 T4304: HTML attribute safety (named web link)
16737 <div title="[http://example.com/ link]"></div>
16739 <div title="[http://example.com/ link]"></div>
16744 T5244: HTML attribute safety (extension; safe)
16746 <div style="<nowiki>background:blue</nowiki>"></div>
16748 <div style="background:blue"></div>
16751 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
16755 T5244: HTML attribute safety (extension; unsafe)
16757 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16759 <div style="/* insecure input */"></div>
16762 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
16765 # More MSIE fun discovered by Tom Gilder
16768 MSIE CSS safety test: spurious slash
16770 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16772 <div style="/* insecure input */">evil</div>
16775 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
16779 MSIE CSS safety test: hex code
16781 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16783 <div style="/* insecure input */">evil</div>
16786 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
16790 MSIE CSS safety test: comment in url
16792 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16794 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16797 <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>
16801 MSIE CSS safety test: comment in expression
16803 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16805 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16808 <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>
16812 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
16814 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16816 <p style="/* invalid control char */">A</p>
16819 <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>
16823 MSIE 6 CSS safety test: Fullwidth (T57332)
16825 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16826 <div style="top:EXPRESSION(alert())">B</div>
16828 <p style="/* insecure input */">A</p>
16829 <div style="/* insecure input */">B</div>
16832 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
16833 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
16837 MSIE 6 CSS safety test: IPA extensions (T57332)
16839 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16840 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16842 <div style="/* insecure input */">A</div>
16843 <p style="/* insecure input */">B</p>
16846 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
16847 <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>
16851 MSIE 6 CSS safety test: sup/sub script (T57332)
16853 <div style="background-image:url⁽javascript:alert())">A</div>
16854 <div style="background-image:url₍javascript:alert())">B</div>
16855 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16857 <div style="/* insecure input */">A</div>
16858 <div style="/* insecure input */">B</div>
16859 <p style="/* insecure input */">C</p>
16862 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
16863 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
16864 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
16870 parsoid=wt2html,html2html
16873 title="data:text/html,<img src=1 onerror=alert(1)>"
16874 style="-o-link:attr(title);-o-link-source:current">X</div>
16876 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16879 <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>
16883 MSIE 6 CSS safety test: Repetition markers (T57332)
16885 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16886 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16887 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16888 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16889 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16890 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16891 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16893 <p style="/* insecure input */">A</p>
16894 <p style="/* insecure input */">B</p>
16895 <p style="/* insecure input */">C</p>
16896 <p style="/* insecure input */">D</p>
16897 <p style="/* insecure input */">E</p>
16898 <p style="/* insecure input */">F</p>
16899 <p style="/* insecure input */">G</p>
16902 <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>
16903 <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>
16904 <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>
16905 <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>
16906 <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>
16907 <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>
16908 <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>
16912 Table attribute legitimate extension
16915 !+ style="<nowiki>color:blue</nowiki>"| status
16920 <th style="color:blue"> status
16926 Table attribute safety
16929 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16934 <th style="/* insecure input */"> status
16940 CSS line continuation 1
16942 <div style="background-image: u\ rl(test.jpg);"></div>
16944 <div style="/* insecure input */"></div>
16949 CSS line continuation 2
16951 <div style="background-image: u\ rl(test.jpg); "></div>
16953 <div style="/* invalid control char */"></div>
16964 Expansion of multi-line templates in attribute values (T8255)
16966 <div style="background: {{identity|#00FF00}}">-</div>
16968 <div style="background: #00FF00">-</div>
16973 Expansion of multi-line templates in attribute values (T8255 sanity check)
16975 <div style="background:
16978 <div style="background: #00FF00">-</div>
16981 <div style="background:
16986 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
16988 <div style="background: #00FF00">-</div>
16990 <div style="background: #00FF00">-</div>
16995 Tags which are hidden from Tidy cannot pass through the Sanitizer
16997 <mw:toc><script>alert();</script></mw:toc>
16999 <p><mw:toc><script>alert();</script></mw:toc></p>
17003 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
17007 Parser hook: empty input
17018 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17021 ## Don't expect parsoid to rt this form.
17023 Parser hook: empty input using terminated empty elements
17025 parsoid=wt2html,html2html
17036 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17040 Parser hook: empty input using terminated empty elements (space before)
17051 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17055 Parser hook: basic input
17066 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17069 ## Don't expect parsoid to rt this form.
17071 Parser hook: case insensitive
17073 parsoid=wt2html,html2html
17084 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17087 ## Don't expect parsoid to rt this form.
17089 Parser hook: case insensitive, redux
17091 parsoid=wt2html,html2html
17102 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17106 Parser hook: nested tags
17108 <tag><tag></tag></tag>
17117 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17121 Parser hook: basic arguments
17123 <tag width="200" height="100" depth="50" square=""></tag>
17136 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17139 ## Don't expect parsoid to rt this form.
17141 Parser hook: basic arguments, variations
17143 parsoid=wt2html,html2html
17145 <tag width=200 height = "100" depth = '50' square></tag>
17158 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17162 Parser hook: argument containing a forward slash (T7344)
17164 <tag filename="/tmp/bla"></tag>
17169 'filename' => '/tmp/bla',
17174 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17177 ## Don't expect parsoid to rt this form.
17179 Parser hook: empty input using terminated empty elements (T4374)
17181 parsoid=wt2html,html2html
17193 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17196 ## </tag> should be output literally since there is no matching tag that begins it
17197 ## Don't expect parsoid to rt this form.
17199 Parser hook: basic arguments using terminated empty elements (T4374)
17203 <tag width=200 height = "100" depth = '50' square/>
17220 <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
17224 ## Don't expect parsoid to rt this form.
17226 Parser hook: Don't allow unclosed extension tags
17232 this is a '''test'''
17234 <p>test <tag>123
17235 </p><p>this is a <b>test</b>
17238 <p>test <tag>123</p>
17240 <p>this is a <b>test</b></p>
17244 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17248 Parser hook: static parser hook not inside a comment
17250 <statictag>hello, world</statictag>
17252 <statictag action="flush" />
17258 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17259 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17263 Parser hook: static parser hook inside a comment
17265 <!-- <statictag>hello, world</statictag> -->
17266 <statictag action="flush" />
17271 <!-- <statictag>hello, world</statictag> -->
17272 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17275 # Nested template calls; this case was broken by Parser.php rev 1.506,
17279 Template:One-parameter
17281 (My parameter is: {{{1}}})
17285 Template:Map-one-parameter
17287 {{{{{1}}}|{{{2}}}}}
17291 Nested template calls
17293 {{Map-one-parameter|One-parameter|param}}
17295 <p>(My parameter is: param)
17304 # HTML+Tidy effectively strips out the empty tags completely
17305 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17306 # which Tidy would have done for the PHP parser had there been content inside it.
17308 Sanitizer: Closing of open tags
17310 <s></s><table></table>
17312 <s></s><table></table>
17315 <p><s></s></p><table></table>
17319 Sanitizer: Closing of open but not closed tags
17328 Sanitizer: Closing of closed but not open tags
17338 Sanitizer: Closing of closed but not open table tags
17342 Table not started</td></tr></table>
17344 <p>Table not started</p>
17346 <p>Table not started</p>
17350 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17352 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17354 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17357 <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>
17360 # In HTML5, the restrictions are that id must contain at least one character,
17361 # and must not contain any space characters.
17363 Sanitizer: Validating the contents of the id attribute (T6515)
17367 <br id="" /><br id="a space" />
17372 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17374 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
17378 <br id="foo" /><br id="foo" />
17380 Something need to be done. foo-2 ?
17384 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17387 <meta itemprop="hello" content="world">
17388 <meta http-equiv="refresh" content="5">
17389 <meta itemprop="hello" http-equiv="refresh" content="5">
17390 <link itemprop="hello" href="{{SERVER}}">
17391 <link rel="stylesheet" href="{{SERVER}}">
17392 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17396 <p> <meta itemprop="hello" content="world" />
17397 <meta http-equiv="refresh" content="5">
17398 <meta itemprop="hello" content="5" />
17400 <link itemprop="hello" href="http://example.org" />
17401 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17402 <link itemprop="hello" href="http://example.org" />
17408 Language converter: output gets cut off unexpectedly (T7757)
17412 this bit is safe: }-
17414 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17416 then we get cut off here: }-
17418 all additional text is vanished
17420 <p>this bit is safe: }-
17421 </p><p>but if we add a conversion instance: xxx
17422 </p><p>then we get cut off here: }-
17423 </p><p>all additional text is vanished
17428 Self closed html pairs (T7487)
17431 <center><font id="bug" />Centered text</center>
17432 <div><font id="bug2" />In div text</div>
17434 <center><font id="bug" />Centered text</center>
17435 <div><font id="bug2" />In div text</div>
17444 Punctuation: nbsp before exclamation
17448 <p>C'est grave !
17453 Punctuation: CSS !important (T13874)
17455 <div style="width:50% !important">important</div>
17457 <div style="width:50% !important">important</div>
17462 Punctuation: CSS ! important (T13874; with space after)
17464 <div style="width:50% ! important">important</div>
17466 <div style="width:50% ! important">important</div>
17471 HTML bullet list, closed tags (T7497)
17484 <ul data-parsoid='{"stx":"html"}'>
17485 <li data-parsoid='{"stx":"html"}'>One</li>
17486 <li data-parsoid='{"stx":"html"}'>Two</li>
17492 HTML bullet list, unclosed tags (T7497)
17504 <ul data-parsoid='{"stx":"html"}'>
17505 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17506 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17512 HTML ordered list, closed tags (T7497)
17525 <ol data-parsoid='{"stx":"html"}'>
17526 <li data-parsoid='{"stx":"html"}'>One</li>
17527 <li data-parsoid='{"stx":"html"}'>Two</li>
17533 HTML ordered list, unclosed tags (T7497)
17546 <ol data-parsoid='{"stx":"html"}'>
17547 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17548 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17554 HTML nested bullet list, closed tags (T7497)
17577 <ul data-parsoid='{"stx":"html"}'>
17578 <li data-parsoid='{"stx":"html"}'>One</li>
17579 <li data-parsoid='{"stx":"html"}'>Two:
17580 <ul data-parsoid='{"stx":"html"}'>
17581 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17582 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17589 HTML nested bullet list, open tags (T7497)
17626 HTML nested ordered list, closed tags (T7497)
17651 HTML nested ordered list, open tags (T7497)
17688 HTML ordered list item with parameters oddity
17690 <ol><li id="fragment">One</li>
17693 <ol><li id="fragment">One</li>
17698 # parsoid doesn't explicitly mark autonumbered links, see T55505
17700 T7918: autonumbering
17702 [http://first/] [http://second] [ftp://ftp]
17706 [mailto:enclosed@mail.tld With target]
17708 [mailto:enclosed@mail.tld]
17710 mailto:inline@mail.tld
17712 <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>
17713 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17714 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17715 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17716 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17719 <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>
17720 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17721 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17722 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17723 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17728 # Security and HTML correctness
17729 # From Nick Jenkins' fuzz testing
17733 Fuzz testing: Parser13
17748 Fuzz testing: Parser14
17753 <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>
17754 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17756 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17762 <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>
17764 <div id="toc" class="toc">
17765 <div id="toctitle">
17769 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17776 Fuzz testing: Parser14-table
17778 parsoid=wt2html,html2html
17783 <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>
17784 <table style="__TOC__">
17789 <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>
17790 <table style="__TOC__">
17797 <table style="__TOC__"></table>
17800 # Known to produce bogus xml (extra </td>)
17802 Fuzz testing: Parser16
17829 Fuzz testing: Parser21
17832 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17837 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17847 Fuzz testing: Parser22
17849 http://===r:::https://b
17853 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17861 # Known to produce bad XML for now
17863 Fuzz testing: Parser24
17870 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17871 <br style="onmouseover='alert(document.cookie);' " />
17873 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17878 <u class="|">}}}} >
17879 <br style="onmouseover='alert(document.cookie);'" />
17881 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17889 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
17890 <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":""}]]}'>
17891 <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}'>
17895 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
17898 # Note: the current result listed for this is not what the original one was,
17899 # but the original bug was JavaScript injection, which is fixed in any case.
17900 # It's not clear that the original result listed was any more correct than the
17901 # current one. Original result:
17904 # <li class="||">
17905 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17907 Fuzz testing: Parser25 (T8055)
17913 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17915 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17918 <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"]}'>
17919 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
17923 Fuzz testing: URL adjacent extension (with space, clean)
17925 http://example.com <nowiki>junk</nowiki>
17927 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17930 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17934 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17936 http://example.com<nowiki>junk</nowiki>
17938 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17941 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17945 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17947 http://example.com<pre>junk</pre>
17949 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17952 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17957 <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>
17961 Fuzz testing: image with bogus manual thumbnail
17963 [[Image:foobar.jpg|thumbnail= ]]
17965 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17968 <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>
17972 Fuzz testing: encoded newline in generated HTML replacements (T8577)
17974 <pre dir=" "></pre>
17976 <pre dir=" "></pre>
17979 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
17983 Parsing optional HTML elements (T8171)
17988 <td> Some tabular data</td>
17989 <td> More tabular data ...
17990 <td> And yet som tabular data</td>
17996 <td> Some tabular data</td>
17997 <td> More tabular data ...
17998 </td><td> And yet som tabular data</td>
18005 Correct handling of <td>, <tr> (T8171)
18010 <td> Some tabular data</td>
18011 <td> More tabular data ...</td>
18012 <td> And yet som tabular data</td>
18018 <td> Some tabular data</td>
18019 <td> More tabular data ...</td>
18020 <td> And yet som tabular data</td>
18028 Parsing crashing regression (fr:JavaScript)
18032 <p></body></x>
18037 Inline wiki vs wiki block nesting
18043 <p><b>Bold paragraph</b>
18044 </p><p>New wiki paragraph
18048 # FIXME: The current php output is documented
18049 # and desired output is the parsoid target.
18051 Inline HTML vs wiki block nesting
18057 <p><b>Bold paragraph
18058 </p><p>New wiki paragraph</b>
18061 <p><b>Bold paragraph</b>
18062 </p><p>New wiki paragraph
18066 # Original result was this:
18067 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18069 # While that might be marginally more intuitive, maybe, the six-apostrophe
18070 # construct is clearly pathological and the result stated here (which is what
18071 # the parser actually does) is about as reasonable as anything.
18073 Mixing markup for italics and bold
18076 '''bold''''''bold''bolditalics'''''
18078 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18086 Article for special page transclusion test
18090 Special page transclusion
18093 {{Special:Prefixindex/Xyzzyx}}
18095 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18101 Special page transclusion twice (T7021)
18104 {{Special:Prefixindex/Xyzzyx}}
18105 {{Special:Prefixindex/Xyzzyx}}
18107 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18109 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18115 Transclusion of default MediaWiki message
18117 {{MediaWiki:Mainpage}}
18124 Transclusion of nonexistent MediaWiki message
18126 {{MediaWiki:Mainpagexxx}}
18128 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18133 Transclusion of MediaWiki message with underscore
18135 {{MediaWiki:history_short}}
18142 Transclusion of MediaWiki message with space
18144 {{MediaWiki:history short}}
18151 Invalid header with following text
18161 Section extraction test (section 0)
18181 Section extraction test (section 1)
18203 Section extraction test (section 2)
18224 Section extraction test (section 3)
18244 Section extraction test (section 4)
18268 Section extraction test (section 5)
18288 Section extraction test (section 6)
18309 Section extraction test (section 7)
18329 Section extraction test (section 8)
18349 Section extraction test (section 9)
18370 Section extraction test (section 10)
18390 Section extraction test (nonexistent section 11)
18409 Section extraction test with bogus heading (section 1)
18414 ==bogus== not a legal section
18418 ==bogus== not a legal section
18422 Section extraction test with bogus heading (section 2)
18427 ==bogus== not a legal section
18434 Section extraction test with comment after heading (section 1)
18446 Section extraction test with comment after heading (section 2)
18458 Section extraction test with bogus <nowiki> heading (section 1)
18463 ==bogus== <nowiki>not a legal section</nowiki>
18467 ==bogus== <nowiki>not a legal section</nowiki>
18471 Section extraction test with bogus <nowiki> heading (section 2)
18476 ==bogus== <nowiki>not a legal section</nowiki>
18482 # Formerly testing for T4587, now resolved by the use of unmarked sections
18483 # instead of respecting commented sections
18485 Section extraction prefixed by comment (section 1)
18496 Section extraction prefixed by comment (section 2)
18506 # Formerly testing for T4607, now resolved by the use of unmarked sections
18507 # instead of respecting HTML-style headings
18509 Section extraction, mixed wiki and html (section 1)
18525 Section extraction, mixed wiki and html (section 2)
18541 # Formerly testing for T5342
18543 Section extraction, heading surrounded by <noinclude>
18547 <noinclude>==unmarked==</noinclude>
18553 # Test behavior of T21910
18555 Sectiion with all-equals
18560 The line above must have a trailing space
18563 But just in case it doesn't...
18567 But just in case it doesn't...
18571 Section replacement test (section 0)
18602 Section replacement test (section 1)
18631 Section replacement test (section 2)
18661 Section replacement test (section 3)
18692 Section replacement test (section 4)
18719 Section replacement test (section 5)
18750 Section replacement test (section 6)
18780 Section replacement test (section 7)
18811 Section replacement test (section 8)
18842 Section replacement test (section 9)
18871 Section replacement test (section 10)
18901 Section replacement test with initial whitespace (T15728)
18905 Preformatted initial line
18909 Preformatted initial line
18916 Section extraction, heading followed by pre with 20 spaces (T8398)
18928 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
18941 Section extraction, <pre> around bogus header (T12309)
18958 Section replacement, <pre> around bogus header (T12309)
18979 Handling of 
 in URLs
18983 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18986 <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>
18990 Handling of %0A in URLs
18994 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18997 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19000 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
19002 5 quotes, code coverage +1 line
19009 <p><b><i></i></b></p>
19012 # same html as previous, but wikitext adjusted to match parsoid html2wt
19013 # note that wt2html and html2html will put the <i> before the <b>
19015 5 quotes, code coverage +1 line w/ nowiki (1)
19017 parsoid=wt2wt,html2wt
19019 '''''<nowiki/>'''''
19024 <p><b><i></i></b></p>
19027 # same as previous, just swapping the <i> and <b>
19029 5 quotes, code coverage +1 line w/ nowiki (2)
19031 '''''<nowiki/>'''''
19036 <p><i><b></b></i></p>
19040 Special:Search page linking.
19044 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19049 {{!}} is a magic word
19051 {{!}} is a magic word there and {{!}} is still a magic word here
19052 | is not a magic word here but {{!}} is still a magic word here
19054 <p>| is a magic word there and | is still a magic word here
19055 | is not a magic word here but | is still a magic word here
19058 <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
19059 | 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>
19066 title=[[Parser test]]
19071 * {{FULLPAGENAMEE}}
19073 * {{BASEPAGENAMEE}}
19077 * {{ROOTPAGENAMEE}}
19079 * {{TALKPAGENAMEE}}
19080 * {{SUBJECTPAGENAME}}
19081 * {{SUBJECTPAGENAMEE}}
19084 * {{NAMESPACENUMBER}}
19088 * {{SUBJECTSPACEE}}
19089 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19091 <ul><li> Parser test</li>
19092 <li> Parser_test</li>
19093 <li> Parser test</li>
19094 <li> Parser_test</li>
19095 <li> Parser test</li>
19096 <li> Parser_test</li>
19097 <li> Parser test</li>
19098 <li> Parser_test</li>
19099 <li> Parser test</li>
19100 <li> Parser_test</li>
19101 <li> Talk:Parser test</li>
19102 <li> Talk:Parser_test</li>
19103 <li> Parser test</li>
19104 <li> Parser_test</li>
19112 <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>
19115 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19118 Gallery with valid attributes
19120 <gallery type="123" summary="345">
19121 File:File:Foobar.jpg
19124 <ul class="gallery mw-gallery-traditional" type="123">
19125 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19126 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
19127 <div class="gallerytext">
19134 ## Parsoid thinks the "centre" here is a property, not a caption.
19139 "modes": ["wt2html"],
19140 "nativeGallery": true
19148 image4 |300px| centre
19149 image5.svg| http://///////
19154 <ul class="gallery mw-gallery-traditional">
19155 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19156 <div class="thumb" style="height: 150px;">Image1.png</div>
19157 <div class="gallerytext">
19160 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19161 <div class="thumb" style="height: 150px;">Image2.gif</div>
19162 <div class="gallerytext">
19165 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19166 <div class="thumb" style="height: 150px;">Image3</div>
19167 <div class="gallerytext">
19170 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19171 <div class="thumb" style="height: 150px;">Image4</div>
19172 <div class="gallerytext">
19177 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19178 <div class="thumb" style="height: 150px;">Image5.svg</div>
19179 <div class="gallerytext">
19180 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19184 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19185 <div class="thumb" style="height: 150px;">* image6</div>
19186 <div class="gallerytext">
19192 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19193 <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>
19194 <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>
19195 <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>
19196 <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>
19197 <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>
19198 <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>
19203 Gallery (with options, html)
19206 "modes": ["wt2html", "html2html"],
19207 "nativeGallery": true
19210 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19211 File:Nonexistent.jpg|caption
19212 File:Nonexistent.jpg
19213 image:foobar.jpg|some '''caption''' [[Main Page]]
19215 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19218 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19219 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19220 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19221 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19222 <div class="gallerytext">
19227 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19228 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19229 <div class="gallerytext">
19232 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19233 <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>
19234 <div class="gallerytext">
19235 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19239 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19240 <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>
19241 <div class="gallerytext">
19244 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19245 <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>
19246 <div class="gallerytext">
19254 <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":{}}'>
19255 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></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">caption</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 style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></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">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></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 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>
19260 <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>
19265 Gallery (with options, extsrc)
19268 "nativeGallery": false
19271 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19272 File:Nonexistent.jpg|caption
19273 File:Nonexistent.jpg
19274 image:foobar.jpg|some '''caption''' [[Main Page]]
19276 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19279 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19280 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19281 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19282 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19283 <div class="gallerytext">
19288 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19289 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19290 <div class="gallerytext">
19293 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19294 <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>
19295 <div class="gallerytext">
19296 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19300 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19301 <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>
19302 <div class="gallerytext">
19305 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19306 <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>
19307 <div class="gallerytext">
19315 <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"}}'>
19316 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19317 <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>
19318 <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>
19319 <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>
19320 <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>
19321 <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>
19326 Gallery with link that has fragment
19329 "modes": ["wt2html", "html2html"],
19330 "nativeGallery": true
19334 image:foobar.jpg|link=Main_Page
19335 image:foobar.jpg|link=Main_Page#section
19336 image:foobar.jpg|link=Main Page#section|caption
19339 <ul class="gallery mw-gallery-traditional">
19340 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19341 <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>
19342 <div class="gallerytext">
19345 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19346 <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>
19347 <div class="gallerytext">
19350 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19351 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/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>
19352 <div class="gallerytext">
19360 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19361 <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>
19362 <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>
19363 <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>
19367 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19369 Gallery with template inside caption
19372 "nativeGallery": true
19375 <gallery caption="{{echo|hi}}">
19376 File:Foobar.jpg|{{echo|ho}}
19379 <ul class="gallery mw-gallery-traditional">
19380 <li class='gallerycaption'>{{echo|hi}}</li>
19381 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19382 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19383 <div class="gallerytext">
19391 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19392 <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>
19393 <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>
19398 Gallery with wikitext inside caption
19401 "nativeGallery": true
19405 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19406 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19409 <ul class="gallery mw-gallery-traditional">
19410 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19411 <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>
19412 <div class="gallerytext">
19413 <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>
19417 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19418 <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>
19419 <div class="gallerytext">
19420 <p>This is a test template
19427 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19428 <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>
19429 <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>
19434 Gallery (with showfilename option)
19437 "nativeGallery": true
19440 <gallery showfilename="">
19441 File:Nonexistent.jpg|caption
19442 File:Nonexistent.jpg
19443 File:Foobar.jpg|some '''caption''' [[Main Page]]
19447 <ul class="gallery mw-gallery-traditional">
19448 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19449 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19450 <div class="gallerytext">
19451 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19456 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19457 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19458 <div class="gallerytext">
19459 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19463 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19464 <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>
19465 <div class="gallerytext">
19466 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19467 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19471 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19472 <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>
19473 <div class="gallerytext">
19474 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19481 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19482 <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>
19483 <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>
19484 <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>
19485 <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>
19489 ## Should Parsoid be preserving these variations?
19491 Gallery (with namespace-less filenames)
19494 "modes": ["wt2html", "html2html"],
19495 "nativeGallery": true
19499 File:Nonexistent.jpg
19505 <ul class="gallery mw-gallery-traditional">
19506 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19507 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19508 <div class="gallerytext">
19511 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19512 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19513 <div class="gallerytext">
19516 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19517 <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>
19518 <div class="gallerytext">
19521 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19522 <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>
19523 <div class="gallerytext">
19529 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19530 <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>
19531 <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>
19532 <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>
19533 <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>
19538 Gallery override link with WikiLink (T36852)
19541 "nativeGallery": true
19545 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19548 <ul class="gallery mw-gallery-traditional">
19549 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19550 <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>
19551 <div class="gallerytext">
19557 <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":{}}'>
19558 <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>
19563 Gallery override link with absolute external link (T36852)
19566 "nativeGallery": true
19570 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19573 <ul class="gallery mw-gallery-traditional">
19574 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19575 <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>
19576 <div class="gallerytext">
19582 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19583 <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>
19588 Gallery override link with absolute external link with LanguageConverter
19593 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19596 <ul class="gallery mw-gallery-traditional">
19597 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19598 <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>
19599 <div class="gallerytext">
19609 Gallery override link with malicious javascript (T36852)
19612 "modes": ["wt2html", "html2html"],
19613 "nativeGallery": true
19617 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19620 <ul class="gallery mw-gallery-traditional">
19621 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19622 <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>
19623 <div class="gallerytext">
19629 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19630 <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>
19635 Gallery with invalid title as link (T45964)
19638 "modes": ["wt2html", "html2html"],
19639 "nativeGallery": true
19643 File:Foobar.jpg|link=<
19646 <ul class="gallery mw-gallery-traditional">
19647 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19648 <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>
19649 <div class="gallerytext">
19655 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19656 <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>
19661 Serialize gallery without attrs in data-mw
19664 "modes": ["html2wt"],
19665 "nativeGallery": true
19668 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
19669 <li class="gallerycaption">123</li>
19670 <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>
19673 <gallery caption="123">
19679 Gallery with class attribute
19682 "nativeGallery": true
19685 <gallery class="center">
19689 <ul class="gallery mw-gallery-traditional center">
19690 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19691 <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>
19692 <div class="gallerytext">
19698 <ul class="gallery mw-gallery-traditional center" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"class":"center"},"body":{}}'>
19699 <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>
19704 HTML Hex character encoding (spells the word "JavaScript")
19706 parsoid=wt2html,wt2wt,html2html
19708 JavaScript
19710 <p>JavaScript
19715 <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>
19719 HTML Hex character encoding bogus encoding (T28437 regression check)
19723 <p>&#xsee;&#XSEE;
19726 <p>&#xsee;&#XSEE;</p>
19730 HTML Hex character encoding mixed case
19732 parsoid=wt2html,wt2wt,html2html
19741 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19744 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19745 # Note that U+000C (form feed) is not a valid XML character, so
19746 # it is banned even though allowed in HTML5.
19748 Illegal character references (T106578)
19753 ; Control (low): 
19754 ; Control (high):  Ÿ
19755 ; Surrogate: ��
19756 ; This is an okay astral character: 💩
19765 <dt>Control (low)</dt>
19767 <dt>Control (high)</dt>
19768 <dd>&#x7F; &#x9F;</dd>
19770 <dd>&#xD83D;&#xDCA9;</dd>
19771 <dt>This is an okay astral character</dt>
19777 __FORCETOC__ override
19789 ISBN 978-0-1234-56 789
19791 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19794 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19796 <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>
19800 ISBN followed by 5 spaces
19811 ISBN ISBN 1234567890
19813 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19816 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19819 # Uppercase X and lowercase x as well
19830 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19831 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19832 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19833 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19834 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19835 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19838 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19839 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19840 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19841 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19842 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19843 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19847 ISBN with empty prefix (parsoid test)
19851 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19854 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19858 T24905: <abbr> followed by ISBN followed by </a>
19860 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19862 <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>
19865 <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>
19873 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19878 Double RFC with a wiki link
19882 <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>
19891 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19894 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19898 Centre-aligned image
19900 [[Image:foobar.jpg|centre]]
19902 <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>
19909 [[Image:foobar.jpg|none]]
19911 <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>
19916 Width + Height sized image (using px) (height is ignored)
19918 [[Image:foobar.jpg|640x480px]]
19920 <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>
19925 Width-sized image (using px, no following whitespace)
19927 [[Image:foobar.jpg|640px]]
19929 <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>
19934 Width-sized image (using px, with following whitespace - test regression from r39467)
19936 [[Image:foobar.jpg|640px ]]
19938 <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>
19943 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19945 [[Image:foobar.jpg| 640px]]
19947 <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>
19952 Image with page parameter
19956 [[File:LoremIpsum.djvu|page=2]]
19958 <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>
19961 <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>
19965 Another italics / bold test
19973 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19979 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19982 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19986 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19988 Images with the "|" character in the comment
19990 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19992 <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>
19995 <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>
19999 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
20001 <html><script>alert(1);</script></html>
20003 <p><html><script>alert(1);</script></html>
20008 HTML with raw HTML ($wgRawHtml==true)
20012 <html><script>alert(1);</script></html>
20014 <p><script>alert(1);</script>
20019 Parents of subpages, one level up
20021 subpage title=[[Subpage test/L1/L2/L3]]
20025 <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>
20031 Parents of subpages, one level up, not named
20033 subpage title=[[Subpage test/L1/L2/L3]]
20037 <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>
20044 Parents of subpages, two levels up
20046 subpage title=[[Subpage test/L1/L2/L3]]
20052 <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
20053 </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>
20058 Parents of subpages, two levels up, without trailing slash or name.
20060 subpage title=[[Subpage test/L1/L2/L3]]
20069 Parents of subpages, two levels up, with lots of extra trailing slashes.
20071 subpage title=[[Subpage test/L1/L2/L3]]
20075 <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>
20080 Subpage test/L1/L2/L3Sibling
20086 Transclusion of a sibling page (one level up)
20088 subpage title=[[Subpage test/L1/L2/L3]]
20097 Transclusion of a child page
20099 subpage title=[[Subpage test/L1/L2]]
20107 # This is wt2html only in Parsoid because we add <nowiki>
20108 # because of {{..}} and we don't expect to fix that to
20109 # eliminate the nowikis selective for {{..}} markup.
20111 Non-transclusion because of too many up levels
20113 subpage title=[[Subpage test/L1/L2/L3]]
20116 {{../../../../More than parent}}
20118 <p>{{../../../../More than parent}}
20121 <p>{{../../../../More than parent}}</p>
20125 Definition list code coverage
20131 <dl><dt> title  </dt>
20133 <dt> title </dt>
20139 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20140 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20141 <dt>title</dt><dd> def</dd></dl>
20145 Don't fall for the self-closing div
20147 <div>hello world</div/>
20149 <div>hello world</div>
20158 <p>[[:Template:Msg]]
20167 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20171 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20173 Always escape literal '>' in output, not just after '<'
20187 <p>This is a test template
20188 This is a test template
20200 Inclusion of !userCanEdit() content
20204 <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>
20210 Out-of-order TOC heading levels
20219 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20221 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20223 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20224 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20227 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20229 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20230 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20236 <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>
20237 <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>
20238 <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>
20239 <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>
20240 <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>
20241 <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>
20247 ISBN with a dummy number
20257 ISBN with space-delimited number
20261 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20267 ISBN with multiple spaces, no number
20286 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20287 </p><p>ISBN 12345678901
20293 ISBN with trailing year (T9110)
20295 ISBN 1-234-56789-0 - 2006
20297 ISBN 1 234 56789 0 - 2006
20299 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20300 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20308 {{anchorencode:foo bar©#%n}}
20310 <p>foo_bar.C2.A9.23.25n
20315 anchorencode trims spaces
20317 {{anchorencode: __pretty__please__}}
20324 anchorencode deals with links
20326 {{anchorencode: [[hello|world]] [[hi]]}}
20333 anchorencode deals with templates
20335 {{anchorencode: {{Foo}} }}
20342 anchorencode encodes like the TOC generator: (T20431)
20344 === _ +:.3A%3A&&]] ===
20345 {{anchorencode: _ +:.3A%3A&&]] }}
20348 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20349 <p>.2B:.3A.253A.26.26.5D.5D
20354 T8200: blockquotes and paragraph formatting
20375 T10293: Use of center tag ruins paragraph formatting
20396 Parsing of overlapping (improperly nested) inline html tags
20398 <span><s>x</span></s>
20400 <p><span><s>x</span></s></span>
20403 <p><span><s>x</s></span>
20408 ### Language variants related tests
20411 Self-link in language variants
20413 title=[[Dunav]] language=sr
20415 Both [[Dunav]] and [[Дунав]] are names for this river.
20417 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
20428 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20430 title=[[Duna]] language=sr
20432 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20434 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <a class="mw-selflink selflink">Duna</a> and <a class="mw-selflink selflink">Dуна</a> are still self-links.
20439 Link to a section of a variant of this title shouldn't be parsed as self-link
20441 title=[[Duna]] language=sr
20443 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20445 <p><a class="mw-selflink selflink">Dуна</a> 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.
20450 Link to pages in language variants
20454 Main Page can be written as [[Маин Паге]]
20456 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20462 Multiple links to pages in language variants
20466 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20468 <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>.
20474 Simple template in language variants
20480 <p>This is a test template
20486 Template with explicit namespace in language variants
20492 <p>This is a test template
20498 Basic test for template parameter in language variants
20502 {{парамтест|param=foo}}
20504 <p>This is a test template with parameter foo
20509 Simple category in language variants
20513 [[Category:МедиаWики Усер'с Гуиде]]
20515 cat=МедиаWики_Усер'с_Гуиде sort=
20517 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20532 ## We used to, but no longer wt2wt this test since the default serializer
20533 ## will normalize all categories to serialize on their own line.
20534 ## This wikitext usage is going to be fairly uncommon in production and
20535 ## selser will take care of preserving formatting in those scenarios.
20537 Don't convert blue categorylinks to another variant (T35210)
20543 [[A]][[Category:分类]]
20547 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
20548 <link rel="mw:PageProp/Category" href="./Category:分类"/>
20552 Stripping -{}- tags (language variants)
20556 Latin proverb: -{Ne nuntium necare}-
20558 <p>Latin proverb: Ne nuntium necare
20564 Prevent conversion with -{}- tags (language variants)
20566 language=sr variant=sr-ec
20568 Latinski: -{Ne nuntium necare}-
20570 <p>Латински: Ne nuntium necare
20576 Prevent conversion of text with -{}- tags (language variants)
20578 language=sr variant=sr-ec
20580 Latinski: -{Ne nuntium necare}-
20582 <p>Латински: Ne nuntium necare
20588 Prevent conversion of links with -{}- tags (language variants)
20590 language=sr variant=sr-ec
20594 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20600 -{}- tags within headlines (within html for parserConvert())
20602 language=sr variant=sr-ec
20606 <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>
20612 Explicit definition of language variant alternatives
20614 language=zh variant=zh-tw
20616 -{zh:China;zh-tw:Taiwan}-, not China
20618 <p>Taiwan, not China
20624 Conversion around HTML tags
20626 language=sr variant=sr-ec
20628 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20629 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20632 <span title="ЛаCтин">ски</span>
20638 Explicit session-wise language variant mapping (A flag and - flag)
20640 language=zh variant=zh-tw
20642 Taiwan is not China.
20643 But -{A|zh:China;zh-tw:Taiwan}- is China,
20644 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20645 and -{China}- is China.
20647 <p>Taiwan is not China.
20648 But Taiwan is Taiwan,
20649 (This should be stripped!)
20650 and China is China.
20655 Explicit session-wise language variant mapping (H flag for hide)
20657 language=zh variant=zh-tw
20659 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20662 <p>(This should be stripped!)
20668 Adding explicit conversion rule for title (T flag)
20670 language=zh variant=zh-tw showtitle
20672 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20675 <p>Should be stripped!
20680 Testing that changing the language variant here in the tests actually works
20682 language=zh variant=zh showtitle
20684 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20687 <p>Should be stripped!
20692 Recursive conversion of alt and title attrs shouldn't clear converter state
20694 language=zh variant=zh-cn showtitle
20696 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20697 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20701 Should be stripped<span title="Exclamation">!</span>
20706 T26072: more test on conversion rule for title
20708 language=zh variant=zh-tw showtitle
20710 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20711 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20714 <p>This should be stripped!
20715 This won't take interferes with the title rule.
20720 Partly disable title conversion if variant == main language code
20722 language=zh variant=zh title=[[ZH]] showtitle
20724 -{T|zh-cn:CN;zh-tw:TW}-
20732 Partly disable title conversion if variant == main language code, more
20734 language=zh variant=zh title=[[ZH]] showtitle
20744 Raw output of variant escape tags (R flag)
20746 language=zh variant=zh-tw
20748 Raw: -{R|zh:China;zh-tw:Taiwan}-
20750 <p>Raw: zh:China;zh-tw:Taiwan
20755 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20757 language=zh variant=zh-cn
20759 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20766 Conversion rules from [numeric-only string] to [something else] (T48634)
20768 language=zh variant=zh-cn
20770 -{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
20777 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20779 language=zh variant=zh-cn
20781 -{H|zh-cn:foo;zh-tw:;}-foobar
20788 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20790 language=zh variant=zh-cn
20792 -{H|=>zh-cn:foo;}-foobar
20799 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20801 language=zh variant=zh-cn
20810 Nested using of manual convert syntax
20812 language=zh variant=zh-hk
20814 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20816 <p>Nested: Hello Hong Kong!
20821 HTML markups with conversion syntax in attribs, nested in other conversion blocks
20823 language=zh variant=zh-cn
20825 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
20827 <p><span title="X">A</span>
20832 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
20834 language=zh variant=zh-cn disabled
20836 -{<span title="-{X}-">A</span>}-
20838 <p><span title="X">A</span>
20842 # Since Parsoid is starting to emit canonical wikitext for links,
20843 # [http://example.com http://example.com] will not RT back to that
20846 Proper conversion of text in external links
20848 language=sr variant=sr-ec
20851 http://www.google.com
20852 gopher://www.google.com
20853 [http://www.google.com http://www.google.com]
20854 [gopher://www.google.com gopher://www.google.com]
20855 [https://www.google.com irc://www.google.com]
20856 [ftp://www.google.com www.google.com/ftp://dir]
20857 [//www.google.com www.google.com]
20859 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20860 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20861 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20862 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20863 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20864 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20865 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20868 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20869 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20870 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20871 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20872 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20873 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20874 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20878 Do not convert roman numbers to language variants
20880 language=sr variant=sr-ec
20884 <p>Фридрих IV је цар.
20889 Unclosed language converter markup "-{"
20900 Don't convert raw rule "-{R|=>}-" to "=>"
20911 Don't break link parsing if language converter markup is in the caption.
20913 language=sr variant=sr-ec
20915 [[Main Page|-{R|main page}-]]
20917 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20921 # FIXME: This test is currently broken in the PHP parser T153761
20923 T146304: Don't break template parsing if language converter markup is in the parameter.
20925 language=sr variant=sr-ec
20935 T146305: Don't break image parsing if language converter markup is in the caption.
20939 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
20941 <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>
20944 <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>
20948 T146305: Don't break image parsing if nested language converter markup is in the caption.
20950 language=zh variant=zh-cn
20952 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
20954 <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>
20957 <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>
20961 Don't break gallery if language converter markup is inside.
20966 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
20967 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
20970 <ul class="gallery mw-gallery-traditional">
20971 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20972 <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>
20973 <div class="gallerytext">
20974 <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>
20978 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20979 <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>
20980 <div class="gallerytext">
20981 <p>This is a test template
20990 T153135: Don't break list handling if language converter markup is in the item.
20992 language=zh variant=zh-cn
20994 ;-{zh-cn:AAA;zh-tw:BBB}-
20998 <dt>foo:bar</dt></dl>
21002 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}],"show":true}'></span></dt>
21003 <dt><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"foo:bar"}'></span></dt>
21007 // Note that parsoid does not protect colons unless language converter
21008 // markup is properly nested, because it is a backtracking parser.
21010 T153135: Unclosed markup in definition list (code coverage)
21012 language=zh variant=zh-cn
21017 <dl><dt><b>foo:bar</dt>
21018 <dt>-{zh-cn:AAA</b></dt></dl>
21022 <dt><b>foo:bar</b></dt>
21030 T153135: Nested language converter markup in definition list (code coverage)
21032 language=zh variant=zh-cn
21034 ;-{zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
21036 <dl><dt>AAA foo:bar bat:baz</dt>
21041 <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>
21047 T153140: Don't break table handling if language converter markup is in the cell.
21049 language=sr variant=sr-ec
21072 T2529: Uncovered bullet
21081 # Plain MediaWiki does not remove empty lists, but tidy actually does.
21082 # Templates in Wikipedia rely on this behavior, as tidy has always been
21083 # enabled there. These tests are normally run *without* tidy, so specify the
21084 # full output here.
21085 # To test realistic parsing behavior, apply a tidy-like transformation to both
21086 # the expected output and your parser's output.
21088 T2529: Uncovered bullet leaving empty list, normally removed by tidy
21090 ******* Foo {{bullet}}
21092 <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>
21098 T2529: Uncovered table already at line-start
21121 T2529: Uncovered bullet in parser function result
21123 * Foo {{lc:{{bullet}} }}
21131 T7678: Double-parsed template argument
21133 {{lc:{{{1}}}|hello}}
21140 T7678: Double-parsed template invocation
21142 {{lc:{{paramtest {{!}} param = hello }} }}
21144 <p>{{paramtest | param = hello }}
21149 Case insensitivity of parser functions for non-ASCII characters (T10143)
21152 title=[[Main Page]]
21154 {{PRVNÍVELKÉ:ěščř}}
21155 {{prvnívelké:ěščř}}
21175 Morwen/13: Unclosed link followed by heading
21182 <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>
21187 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21194 <h1><span class="mw-headline" id="heading">heading</span></h1>
21199 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21206 <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>
21221 Paragraphs inside divs (no extra line breaks)
21233 Paragraphs inside divs (extra line break on open)
21248 Paragraphs inside divs (extra line break on close)
21263 Paragraphs inside divs (extra line break on open and close)
21280 Nesting tags, paragraphs on lines which begin with <div>
21282 <div></div><strong>A
21285 <p><strong>A</strong></p>
21286 <p><strong>B</strong></p>
21294 # T8200: <blockquote> should behave like <div> with respect to line breaks
21296 T8200: paragraphs inside blockquotes (no extra line breaks)
21298 <blockquote>Line one
21300 Line two</blockquote>
21302 <blockquote>Line one
21303 Line two</blockquote>
21307 <p>Line one Line two</p>
21312 T8200: paragraphs inside blockquotes (extra line break on open)
21317 Line two</blockquote>
21322 Line two</blockquote>
21327 Line two</blockquote>
21331 T8200: paragraphs inside blockquotes (extra line break on close)
21333 <blockquote>Line one
21338 <blockquote>Line one
21351 T8200: paragraphs inside blockquotes (extra line break on open and close)
21373 Paragraphs inside blockquotes/divs (no extra line breaks)
21375 <blockquote><div>Line one
21377 Line two</div></blockquote>
21379 <blockquote><div>Line one
21380 Line two</div></blockquote>
21385 Paragraphs inside blockquotes/divs (extra line break on open)
21390 Line two</div></blockquote>
21395 Line two</div></blockquote>
21400 Paragraphs inside blockquotes/divs (extra line break on close)
21402 <blockquote><div>Line one
21405 </div></blockquote>
21407 <blockquote><div>Line one
21410 </div></blockquote>
21415 Paragraphs inside blockquotes/divs (extra line break on open and close)
21421 </div></blockquote>
21427 </div></blockquote>
21432 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21434 wgLinkHolderBatchSize=0
21440 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21441 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21442 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21447 Free external link invading image caption
21449 [[Image:Foobar.jpg|thumb|http://x|hello]]
21451 <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>
21456 T17196: localised external link numbers
21460 [http://en.wikipedia.org/]
21462 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21465 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21469 Multibyte character in padleft
21471 {{padleft:-Hello|7|Æ}}
21478 Multibyte character in padright
21480 {{padright:Hello-|7|Æ}}
21487 formatdate parser function
21489 {{#formatdate:2009-03-24}}
21491 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21496 formatdate parser function, with default format
21498 {{#formatdate:2009-03-24|mdy}}
21500 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21505 Spacing of numbers in formatted dates
21507 {{#formatdate:January 15}}
21509 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21514 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
21516 language=nl title=[[MediaWiki:Common.css]]
21518 {{#formatdate:2009-03-24|dmy}}
21520 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21533 Edit comment with link
21537 I like the [[Main Page]] a lot
21539 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21543 Edit comment with link and link text
21547 I like the [[Main Page|best pages]] a lot
21549 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21553 Edit comment with link and link text with suffix
21557 I like the [[Main Page|best page]]s a lot
21559 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21563 Edit comment with section link (non-local, eg in history list)
21565 comment title=[[Main Page]]
21567 /* External links */ removed bogus entries
21569 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21573 Edit comment with section link and text before it (non-local, eg in history list)
21575 comment title=[[Main Page]]
21577 pre-comment text /* External links */ removed bogus entries
21579 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>
21583 Edit comment with section link (local, eg in diff view)
21585 comment local title=[[Main Page]]
21587 /* External links */ removed bogus entries
21589 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21593 Edit comment with subpage link (T16080)
21597 title=[[Subpage test]]
21599 Poked at a [[/subpage]] here...
21601 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21605 Edit comment with subpage link and link text (T16080)
21609 title=[[Subpage test]]
21611 Poked at a [[/subpage|neat little page]] here...
21613 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21617 Edit comment with bogus subpage link in non-subpage NS (T16080)
21620 title=[[Subpage test]]
21622 Poked at a [[/subpage]] here...
21624 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21628 Edit comment with bare anchor link (local, as on diff)
21632 title=[[Main Page]]
21636 <a href="#section">#section</a>
21640 Edit comment with bare anchor link (non-local, as on history)
21643 title=[[Main Page]]
21647 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21651 Anchor starting with underscore
21657 <p><a href="#_ref">One</a>
21660 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21664 Id starting with underscore
21666 <div id="_ref"></div>
21668 <div id="_ref"></div>
21673 Edit comment with link with more than one pipe (T99346)
21677 [[Main Page|Many|pipes]]
21679 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21683 Complex edit comment with link with more than one pipe (T99346)
21687 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21689 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..."
21693 Space normalisation on autocomment (T24784)
21696 title=[[Main Page]]
21698 /* __hello__world__ */
21700 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21704 percent-encoding and + signs in comments (T28410)
21708 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21710 <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>
21713 # Parsoid doesn't support this yet: see T75581
21714 # but it *should* omit the 'src' attribute if the image is bad.
21715 # PHP side of tests was disabled in
21716 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21717 # because of issues in the PHP parserTests infrastructure
21718 # (but the output below is indeed what the PHP side emits)
21720 Bad images - basic functionality
21723 !! DISABLED/html/php
21725 <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>
21729 Bad images - T18039: text after bad image disappears
21734 !! DISABLED/html/php
21740 <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>
21745 Verify that displaytitle works (T24501) no displaytitle
21749 wgAllowDisplayTitle=true
21750 wgRestrictDisplayTitle=false
21752 this is not the the title
21755 <p>this is not the the title
21760 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
21765 wgAllowDisplayTitle=true
21766 wgRestrictDisplayTitle=false
21768 this is not the the title
21769 {{DISPLAYTITLE:whatever}}
21772 <p>this is not the the title
21777 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
21782 wgAllowDisplayTitle=true
21783 wgRestrictDisplayTitle=true
21785 this is not the the title
21786 {{DISPLAYTITLE:whatever}}
21789 <p>this is not the the title
21794 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
21799 wgAllowDisplayTitle=true
21800 wgRestrictDisplayTitle=true
21802 this is not the the title
21803 {{DISPLAYTITLE:screen}}
21806 <p>this is not the the title
21811 Verify that displaytitle works (T24501) AllowDisplayTitle=false
21816 wgAllowDisplayTitle=false
21818 this is not the the title
21819 {{DISPLAYTITLE:screen}}
21822 <p>this is not the the title
21823 <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>
21828 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
21833 wgAllowDisplayTitle=false
21835 this is not the the title
21838 <p>this is not the the title
21843 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
21848 wgAllowDisplayTitle=true
21849 wgRestrictDisplayTitle=true
21851 this is not the the title
21852 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21854 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21855 <p>this is not the the title
21860 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
21865 wgAllowDisplayTitle=true
21866 wgRestrictDisplayTitle=true
21868 this is not the the title
21869 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21871 <span style="color: red;">s</span>creen
21872 <p>this is not the the title
21877 Page status indicators: Empty name is invalid
21881 <indicator name=" "></indicator>
21882 <indicator></indicator>
21884 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21885 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21890 Page status indicators: Weird syntaxes that are okay
21894 <indicator name="empty" />
21895 <indicator name="name"></indicator>
21904 Page status indicators: Torture test
21908 <indicator name="01">hello world</indicator>
21909 <indicator name="02">[[Main Page]]</indicator>
21910 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21911 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21912 <indicator name="05">* foo
21914 <indicator name="06"><nowiki>foo</nowiki></indicator>
21915 <indicator name="07"> Preformatted</indicator>
21916 <indicator name="08"><div>Broken tag</indicator>
21917 <indicator name="09">{| class=wikitable
21920 <indicator name="10">Two
21922 paragraphs</indicator>
21925 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21926 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" />
21927 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>
21928 05=<ul><li> foo</li>
21932 07=<pre>Preformatted
21934 08=<div>Broken tag</div>
21936 09=<table class="wikitable">
21953 preload: check <noinclude> and <includeonly>
21957 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21963 preload: check <onlyinclude>
21967 Goodbye <onlyinclude>Hello world</onlyinclude>
21973 preload: can pass tags through if we want to
21977 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21979 <includeonly>Hello world</includeonly>
21983 preload: check that it doesn't try to do tricks
21987 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21989 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21993 Play a bit with r67090 and T5158
21995 <div style="width:50% !important"> </div>
21996 <div style="width:50% !important"> </div>
21997 <div style="width:50% !important"> </div>
21998 <div style="border : solid;"> </div>
22000 <div style="width:50% !important"> </div>
22001 <div style="width:50% !important"> </div>
22002 <div style="width:50% !important"> </div>
22003 <div style="border : solid;"> </div>
22006 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22007 <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>
22008 <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>
22009 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22014 HTML5 data attributes
22016 <span data-foo="bar">Baz</span>
22017 <p data-abc-def_hij="">Quuz</p>
22019 <p><span data-foo="bar">Baz</span>
22021 <p data-abc-def_hij="">Quuz</p>
22024 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
22025 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
22029 Strip reserved data attributes
22031 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
22033 <div data-ok="fred">d</div>
22036 <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>
22040 percent-encoding and + signs in internal links (T28410)
22042 [[User:+%]] [[Page+title%]]
22043 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
22044 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
22045 [[%33%45]] [[%33%45+]]
22047 <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>
22048 <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>
22049 <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>
22050 <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>
22053 <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>
22054 <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>
22055 <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>
22056 <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>
22060 Special characters in embedded file links (T29679)
22062 [[File:Contains & ampersand.jpg]]
22063 [[File:Does not exist.jpg|Title with & ampersand]]
22065 <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>
22066 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
22069 <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>
22070 <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>
22074 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
22076 Text's been normalized?
22078 <p>Text's been normalized?
22083 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
22085 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
22087 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
22092 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
22094 [http://www.example.org/ ideograms]
22096 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
22101 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
22103 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
22105 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
22129 T33098 Template which includes system messages which includes the template
22133 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22134 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22139 T33490 Turkish: ucfirst 'blah'
22150 T33490 Turkish: ucfirst 'ix'
22161 T33490 Turkish: lcfirst 'BLAH'
22172 T33490 Turkish: ucfırst (with a dotless i)
22178 <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>
22183 T33490 ucfırst (with a dotless i) with English language
22189 <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>
22194 T28375: TOC with italics
22196 title=[[Main Page]]
22199 == ''Lost'' episodes ==
22201 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22203 <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>
22207 <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>
22212 T28375: TOC with bold
22214 title=[[Main Page]]
22217 == '''should be bold''' then normal text ==
22219 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22221 <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>
22225 <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>
22230 T35845: Headings become cursive in TOC when they contain an image
22232 title=[[Main Page]]
22235 == Image [[Image:foobar.jpg]] ==
22237 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22239 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22243 <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>
22248 T35845 (2): Headings become bold in TOC when they contain a blockquote
22250 title=[[Main Page]]
22253 == <blockquote>Quote</blockquote> ==
22255 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22257 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22261 <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>
22265 <div id="toc" class="toc">
22266 <div id="toctitle">
22270 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22274 <h2><span class="mw-headline" id="Quote"></span></h2>
22276 <p><span class="mw-headline" id="Quote">Quote</span></p>
22278 <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>
22282 Unclosed tags in TOC
22284 title=[[Main Page]]
22288 <small>Hanc marginis exiguitas non caperet.</small>
22291 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22293 <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>
22297 <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>
22298 <p><small>Hanc marginis exiguitas non caperet.</small>
22304 Multiple tags in TOC
22307 == <i>Foo</i> <b>Bar</b> ==
22309 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22311 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22313 <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>
22314 <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>
22318 <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>
22319 <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>
22323 <div id="toc" class="toc">
22324 <div id="toctitle">
22328 <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>
22329 <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>
22333 <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>
22334 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22336 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22338 <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>
22341 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22342 # html5 tag parsing.
22344 Tags with parameters in TOC
22349 == <sup class="in-h2">Hello</sup> ==
22351 == <sup class="a > b">Evilbye</sup> ==
22353 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22355 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22356 <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>
22360 <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>
22361 <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>
22364 <meta property="mw:PageProp/toc" />
22365 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22367 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22371 span tags with directionality in TOC
22374 == <span dir="ltr">C++</span> ==
22376 == <span dir="rtl">זבנג!</span> ==
22378 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22380 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22382 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22384 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22386 <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>
22387 <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>
22388 <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>
22389 <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>
22390 <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>
22394 <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>
22395 <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>
22396 <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>
22397 <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>
22398 <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>
22403 T74884: bdi element in ToC
22406 == <bdi>test</bdi> ==
22408 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22410 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22414 <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>
22419 T35715: s/strike element in ToC
22422 == <s>test</s> test <strike>test</strike> ==
22424 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22426 <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>
22430 <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>
22434 # Note that the html output does not have the <p></p>, but the
22435 # html+tidy output *does*. This is because the empty <p></p> is
22436 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22438 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22443 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22445 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22449 <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>
22453 <div id="toc" class="toc">
22454 <div id="toctitle">
22458 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22462 <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>
22468 == {{int:headline_sample}} ==
22472 T34057: Title needed when expanding <h> nodes.
22474 title=[[Main Page]]
22478 <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>
22483 Strip marker in urlencode
22485 {{urlencode:x<nowiki/>y}}
22486 {{urlencode:x<nowiki/>y|wiki}}
22487 {{urlencode:x<nowiki/>y|path}}
22488 {{urlencode:x<pre id="one">two</pre>y}}
22516 Strip marker in formatNum
22518 {{formatnum:1<nowiki/>2}}
22519 {{formatnum:1<nowiki/>2|R}}
22527 Check noCommafy in formatNum
22531 {{formatnum:123456.78}}
22532 {{formatnum:123456.78|NOSEP}}
22540 Wrong option for formatNum (T58199)
22542 {{formatnum:1,234.56|Random}}
22543 {{formatnum:1,234.56|EVERYTHING}}
22544 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22553 Strip marker in grammar
22557 {{grammar:elative|foo<nowiki/>bar}}
22564 Strip marker in padleft
22566 {{padleft:|2|x<nowiki/>y}}
22573 Strip marker in padright
22575 {{padright:|2|x<nowiki/>y}}
22582 Strip marker in anchorencode
22584 {{anchorencode:x<nowiki/>y}}
22591 nowiki inside link inside heading (T20295)
22593 ==[[foo|x<nowiki>y</nowiki>z]]==
22595 <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>
22600 new support for bdi element (T33817)
22602 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22604 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22609 Ignore pipe between table row attributes
22613 |- id=foo | style='color: red'
22621 <tr id="foo" style="color: red">
22628 Language parser function
22637 Padleft and padright as substr
22639 {{padleft:|3|abcde}}
22640 {{padright:|3|abcde}}
22648 Special parser function
22650 {{#special:RandomPage}}
22651 {{#special:BaDtItLe}}
22652 {{#special:Foobar}}
22661 T36939 - Case insensitive link parsing ([HttP://])
22663 [HttP://MediaWiki.Org/]
22665 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22668 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22672 T36939 - Case insensitive link parsing ([HttP:// title])
22674 [HttP://MediaWiki.Org/ MediaWiki]
22676 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22681 T36939 - Case insensitive link parsing (HttP://)
22683 HttP://MediaWiki.Org/
22685 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22688 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22706 <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>
22707 <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>
22708 <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>
22709 <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>
22710 <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>
22716 ### Parsoid-specific tests
22717 ### Parsoid-PHP parser incompatibilities
22720 1. SOL-sensitive wikitext tokens as template-args
22722 parsoid=wt2html,wt2wt
22728 <span about="#mwt1" typeof="mw:Transclusion">
22729 </span><ul about="#mwt1"><li>a</li>
22731 <span about="#mwt2" typeof="mw:Transclusion">
22732 </span><ol about="#mwt2"><li>a</li>
22734 <span about="#mwt3" typeof="mw:Transclusion">
22735 </span><dl about="#mwt3"><dd>a</dd>
22739 #### -----------------------------------------------------------------
22740 #### Parsoid-specific functionality tests
22741 #### -----------------------------------------------------------------
22743 # T65642/T68749: Formatting elt fixup around images is cleaned up.
22744 # We know wt2wt will fail, but we expect selser to pass.
22745 # Due to the nature of our testing, wt2wt and selser tests will enter the
22746 # blacklist and we'll catch selser regressions based on changes to the
22747 # blacklist entries for selser tests.
22749 1. Bad treebuilder fixup of formatting elt is cleaned up
22751 parsoid=wt2html,wt2wt
22756 [[Image:Foobar.jpg|right|Test]]
22763 <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>
22770 2. Bad treebuilder fixup of formatting elt is cleaned up
22772 parsoid=wt2html,wt2wt
22774 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22776 <small>[[Image:Foobar.jpg|right|300px]]</small>
22780 <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>
22782 <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>
22786 3. Bad treebuilder fixup of formatting elt is cleaned up
22788 parsoid=wt2html,wt2wt
22790 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22792 <p><small><b>foo</b></small></p>
22793 <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>
22794 <p><small><b>bar</b></small></p>
22798 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22800 parsoid=wt2html,wt2wt
22802 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22804 <p><b><small></small></b></p>
22805 <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>
22809 #### ----------------------------------------------------------------
22810 #### Parsoid-only testing of Parsoid's impl of LST
22811 #### Not implemented yet, see
22812 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22813 #### ----------------------------------------------------------------
22815 ## We still need to support serializing the older format while content is stored.
22817 LST Sections: Backwards compatibility
22820 "suppressErrors": true,
22821 "modes": ["html2wt"]
22824 <section begin="2011-05-16" />
22825 <section end="2014-04-10 (MW 1.23wmf22)" />
22827 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22828 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22831 ## The unconventional output is the result of `usePHPPreProcessor` being
22832 ## disabled in parserTests.js. This test is mainly just to show <section> is
22833 ## recognized as an extension tag w/o a native handler.
22835 LST Sections: Newfangled approach
22837 <section begin="2011-05-16" />
22838 <section end="2014-04-10 (MW 1.23wmf22)" />
22840 <p><span typeof="mw:Error mw:Extension/section" about="#mwt1" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null,"errors":[{"key":"mw-api-extexpand-error","message":"Could not expand extension source."}]}'><section begin="2011-05-16" /></span>
22841 <span typeof="mw:Error mw:Extension/section" about="#mwt2" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null,"errors":[{"key":"mw-api-extexpand-error","message":"Could not expand extension source."}]}'><section end="2014-04-10 (MW 1.23wmf22)" /></span></p>
22844 #--------- Test stripping of empty nodes in template content ----------
22846 Empty LI and TR nodes should be stripped from template content
22851 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22855 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22868 Empty LI and TR nodes should not be stripped from top-level content
22895 Empty TR nodes should not be stripped if they have any attributes set
22897 {{EmptyTRWithHTMLAttrTest}}
22899 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22900 <tr align="center"></tr>
22901 <tr><td>foo</td></tr>
22902 <tr align="center"></tr>
22903 <tr><td>bar</td></tr>
22907 #### ----------------------------------------------------------------
22908 #### The following section of tests are primarily to test
22909 #### wikitext escaping capabilities of Parsoid. Given that
22910 #### escaping can be done any number of ways, the wikitext (input)
22911 #### is always adjusted to reflect how Parsoid adds nowiki
22914 #### We are marking several tests as parsoid-only since the
22915 #### HTML in the result section is different from what the
22916 #### PHP parser generates for it.
22917 #### ----------------------------------------------------------------
22920 #### --------------- Headings ---------------
22922 #### 1. Nested inside html <h1>=foo=</h1>
22923 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22924 #### 3. Nested inside html with wikitext split by html tags
22925 #### 4. No escape needed
22926 #### 5. Empty headings <h1></h1>
22927 #### 6. Heading chars in SOL context
22928 #### ----------------------------------------
22930 Headings: 0. Unnested
22940 <p>=foo<i>a</i>=</p>
22942 <nowiki>=foo=</nowiki>
22944 <nowiki> </nowiki>=foo=
22946 <nowiki>=foo=</nowiki>
22948 =foo''a''<nowiki>=</nowiki>
22951 # New headings and existing headings are handled differently
22953 Headings: 1. Nested inside html
22961 <h1 data-parsoid=''>=foo=</h1>
22962 <h2 data-parsoid=''>=foo=</h2>
22963 <h3 data-parsoid=''>=foo=</h3>
22964 <h4 data-parsoid=''>=foo=</h4>
22965 <h5 data-parsoid=''>=foo=</h5>
22966 <h6 data-parsoid=''>=foo=</h6>
22974 =<nowiki>=foo=</nowiki>=
22975 ==<nowiki>=foo=</nowiki>==
22976 ===<nowiki>=foo=</nowiki>===
22977 ====<nowiki>=foo=</nowiki>====
22978 =====<nowiki>=foo=</nowiki>=====
22979 ======<nowiki>=foo=</nowiki>======
22984 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22993 <nowiki>*</nowiki>bar
22999 <nowiki>=bar=</nowiki>
23003 Headings: 3. Nested inside html with wikitext split by html tags
23007 <h1>=<b>bold</b>foo=</h1>
23009 = ='''bold'''foo= =
23013 Headings: 4a. No escaping needed (testing just h1 and h2)
23024 <h1><i>=</i>foo=</h1>
23044 Headings: 4b. No escaping needed (inside p-tags)
23059 Headings: 5. Empty headings
23063 <h1 data-parsoid='{}'></h1>
23065 <h2 data-parsoid='{}'></h2>
23067 <h3 data-parsoid='{}'></h3>
23069 <h4 data-parsoid='{}'></h4>
23071 <h5 data-parsoid='{}'></h5>
23073 <h6 data-parsoid='{}'></h6>
23083 =====<nowiki/>=====
23085 ======<nowiki/>======
23089 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23099 <nowiki>=a=</nowiki>
23101 <nowiki>=a=</nowiki>
23103 <nowiki>=a=</nowiki>
23107 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23120 <nowiki>=a=</nowiki>
23123 <nowiki>=a=</nowiki>
23126 <nowiki>=a=</nowiki>
23131 Headings: 6c. Heading chars in SOL context (leading newline break)
23139 <nowiki>=b=</nowiki>
23143 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23147 <!--c0--><p>=a=</p>
23149 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23151 <!--c0--><nowiki>=a=</nowiki>
23153 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23157 Headings: 6d. Heading chars in SOL context (No escaping needed)
23167 Headings: 7. Insert a newline between new content and headings
23173 <h2 data-parsoid='{}'>A</h2>
23174 <p data-parsoid='{}'>a</p>
23184 #### --------------- Lists ---------------
23185 #### 0. Outside nests (*foo, etc.)
23186 #### 1. Nested inside html <ul><li>*foo</li></ul>
23187 #### 2. Inside definition lists
23188 #### 3. Only bullets at start should be escaped
23189 #### 4. No escapes needed
23190 #### 5. No unnecessary escapes
23191 #### 6. Escape bullets in SOL position
23192 #### 7. Escape bullets in a multi-line context
23193 #### ----------------------------------------
23196 Lists: 0. Outside nests
23206 <nowiki>*</nowiki>foo
23208 <nowiki>#</nowiki>foo
23210 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23213 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23214 ## to test wikitext escaping, and insignificant whitespace diffs
23215 ## cause PHP parser tests to barf
23217 Lists: 1. Nested inside html (No unnecessary escapes)
23226 <li data-parsoid='{}'>*foo</li>
23227 <li data-parsoid='{}'>#foo</li>
23228 <li data-parsoid='{}'>:foo</li>
23229 <li data-parsoid='{}'>;foo</li>
23237 <li data-parsoid='{}'>*foo</li>
23238 <li data-parsoid='{}'>#foo</li>
23239 <li data-parsoid='{}'>:foo</li>
23240 <li data-parsoid='{}'>;foo</li>
23247 *<nowiki>*foo</nowiki>
23248 *<nowiki>#foo</nowiki>
23249 *<nowiki>:foo</nowiki>
23250 *<nowiki>;foo</nowiki>
23256 #<nowiki>*foo</nowiki>
23257 #<nowiki>#foo</nowiki>
23258 #<nowiki>:foo</nowiki>
23259 #<nowiki>;foo</nowiki>
23263 Lists: 2. Inside definition lists
23267 <dl><dt>;foo</dt></dl>
23268 <dl><dt>:foo</dt></dl>
23271 <dl><dd>:foo</dd></dl>
23275 ; <nowiki>:foo</nowiki>
23277 ; <nowiki>:foo</nowiki>
23284 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23290 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23294 *<nowiki>*foo</nowiki>''it''*bar
23298 Lists: 4. No escapes needed
23311 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23315 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23329 Lists: 5. No unnecessary escapes
23333 <ul><li> bar <span>[[foo]]</span></li></ul>
23334 <ul><li> =bar <span>[[foo]]</span></li></ul>
23335 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23336 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23337 <ul><li> =bar <span>foo]]</span>=</li></ul>
23338 <ul><li> <s></s>: a</li></ul>
23339 <ul><li> <i>* foo</i></li></ul>
23342 * bar <span><nowiki>[[foo]]</nowiki></span>
23344 * =bar <span><nowiki>[[foo]]</nowiki></span>
23346 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23348 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23350 * =bar <span>foo]]</span>=
23358 Lists: 6. Escape bullets in SOL position
23362 <p><!--cmt-->*foo</p>
23364 <!--cmt--><nowiki>*</nowiki>foo
23368 Lists: 7. Escape bullets in a multi-line context
23377 <nowiki>*</nowiki>b
23381 Lists: 8. Escape colons only if not present in tags
23385 <dl><dt>a:b<i>c:d</i></dt></dl>
23387 ; <nowiki>a:b</nowiki>''c:d''
23390 #### --------------- HRs ---------------
23391 #### 1. Single line
23392 #### -----------------------------------
23395 HRs: 1. Single line
23403 ----<nowiki>----</nowiki>
23408 #### --------------- Tables ---------------
23409 #### 1a. Simple example
23410 #### 1b. No escaping needed (!foo)
23411 #### 1c. No escaping needed (|foo)
23412 #### 1d. No escaping needed (|}foo)
23414 #### 2a. Nested in td (<td>foo|bar</td>)
23415 #### 2b. Nested in td (<td>foo||bar</td>)
23416 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23418 #### 3a. Nested in th (<th>foo!bar</th>)
23419 #### 3b. Nested in th (<th>foo!!bar</th>)
23420 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23424 #### 4c. No escaping needed
23425 #### --------------------------------------
23428 Tables: 1a. Simple example
23436 <nowiki>{|</nowiki>
23441 Tables: 1b. No escaping needed
23452 Tables: 1c. No escaping needed
23463 Tables: 1d. No escaping needed
23474 Tables: 2a. Nested in td
23479 <td>foo|bar</td></tr>
23480 <tr><td>x<div>a|b</div></td>
23484 |<nowiki>foo|bar</nowiki>
23486 |x<div><nowiki>a|b</nowiki></div>
23502 Tables: 2b. Nested in td
23508 <td>a<i>b||c</i></td>
23509 <td>a<i><div>b||c</div></i></td>
23510 </tr></tbody></table>
23513 |<nowiki>foo||bar</nowiki>
23514 |a''<nowiki>b||c</nowiki>''
23515 |a''<div><nowiki>b||c</nowiki></div>''
23524 <td>a<i><div>b||c</div></i>
23530 Tables: 2c. Nested in td -- no escaping needed
23546 Tables: 3a. Nested in th
23562 Tables: 3b. Nested in th
23567 <tr><th>foo!!bar</th>
23568 <th><i>foo|bar</i></th>
23569 <th><i>foo!!bar</i></th>
23570 <th><i><span>foo!!bar</span></i></th>
23571 </tr></tbody></table>
23574 !<nowiki>foo!!bar</nowiki>
23575 !''<nowiki>foo|bar</nowiki>''
23576 !''<nowiki>foo!!bar</nowiki>''
23577 !''<span><nowiki>foo!!bar</nowiki></span>''
23586 <th><i>foo!!bar</i>
23588 <th><i><span>foo!!bar</span></i>
23594 Tables: 3c. Nested in th
23599 <tr><th>foo||bar</th>
23600 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23601 </tr></tbody></table>
23604 !<nowiki>foo||bar</nowiki>
23605 !<nowiki>foo||bar</nowiki>
23618 Tables: 4a. Escape -
23634 |<nowiki>-bar</nowiki>
23639 Tables: 4b. Escape +
23655 |<nowiki>+bar</nowiki>
23660 Tables: 4c. No escaping needed
23665 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23666 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23672 <div>a|b</div></td>
23717 Tables: 4d. No escaping needed
23722 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23723 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23724 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23735 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23745 T97430: Don't emit empty nowiki pairs around marker meta tags
23749 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23750 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23752 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23753 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23757 Unclosed xmlish element in table line shouldn't eat end delimiters
23762 <tbody><tr><td> <foo</td>
23763 <td> bar></td></tr>
23780 #### --------------- Links ----------------
23781 #### 1. Quote marks in link text
23782 #### 2. Wikilinks: Escapes needed
23783 #### 3. Wikilinks: No escapes needed
23784 #### 4. Extlinks: Escapes needed
23785 #### 5. Extlinks: No escapes needed
23786 #### --------------------------------------
23788 Links 1. WikiLinks: No escapes needed
23792 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23793 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23794 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23798 [[Foo|x [Foobar] x]]
23800 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23801 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23802 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23807 Links 2. WikiLinks: Escapes needed
23811 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23812 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23813 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23814 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23815 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23816 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23817 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23818 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23819 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23820 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23822 [[Foo|<nowiki>Foobar]</nowiki>]]
23823 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23824 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23825 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23826 [[Foo|<nowiki>|Bar</nowiki>]]
23827 [[Foo|<nowiki>]]bar</nowiki>]]
23828 [[Foo|<nowiki>[[bar</nowiki>]]
23829 [[Foo|<nowiki>x [[ y</nowiki>]]
23830 [[Foo|<nowiki>x ]] y</nowiki>]]
23831 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23833 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23834 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23835 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23836 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23837 <a href="/wiki/Foo" title="Foo">|Bar</a>
23838 <a href="/wiki/Foo" title="Foo">]]bar</a>
23839 <a href="/wiki/Foo" title="Foo">[[bar</a>
23840 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23841 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23842 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23847 Links 3. WikiLinks: No escapes needed
23851 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23852 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23857 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23858 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23863 Links 4. ExtLinks: Escapes needed
23867 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23868 <a rel="mw:ExtLink" href="http://google.com">google]</a>
23869 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
23870 <p>[http://google.com]</p>
23871 <p>[http://google.com google]</p>
23872 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23873 <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>
23875 [http://google.com <nowiki>[google]</nowiki>]
23876 [http://google.com <nowiki>google]</nowiki>]
23877 [http://google.com <nowiki>goog] le</nowiki>]
23879 <nowiki>[http://google.com]</nowiki>
23881 <nowiki>[http://google.com google]</nowiki>
23883 [http://google.com<nowiki>]</nowiki>
23885 [{{echo|http://google.com}}<nowiki>]</nowiki>
23887 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23888 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23889 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
23890 </p><p>[http://google.com]
23891 </p><p>[http://google.com google]
23892 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23893 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23898 Links 5. ExtLinks: No escapes needed
23902 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23903 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23905 [http://google.com [google]
23907 [[http://google.com]]
23909 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23910 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23915 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
23919 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23920 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23921 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23922 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23923 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23924 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23925 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23926 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23927 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23928 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23929 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23930 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23931 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23934 x<nowiki/>http://example.com<nowiki/>y
23935 http://example.com<nowiki/>?x
23936 http://example.com<nowiki/>&x
23937 http://example.com<nowiki/>'x
23938 http://example.com<nowiki/>,x
23939 http://example.com<nowiki/>.x
23940 http://example.com<nowiki/>;x
23941 http://example.com<nowiki/>:x
23942 http://example.com<nowiki/>;x
23943 http://example.com<nowiki/>!x
23944 http://example.com<nowiki/>=x
23945 http://example.com<nowiki/>(x)
23946 http://example.com(x<nowiki/>)
23950 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
23955 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23957 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23958 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23959 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23960 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23961 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23967 "http://example.com"
23968 (http://example.com)
23969 (http://example.com) foo
23970 http://example.com,
23971 http://example.com, foo
23974 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23976 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23977 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23978 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23979 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23980 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23985 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
23989 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23990 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23992 http://example.com.,;:!?\
23993 -http://example.com:
23995 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23996 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24001 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
24005 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24006 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24007 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24011 X<nowiki/>RFC 123<nowiki/>y
24015 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
24019 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24020 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24021 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24028 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24029 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24030 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24035 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
24039 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24040 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24041 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24045 X<nowiki/>PMID 123<nowiki/>y
24049 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
24053 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24054 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24055 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24062 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24063 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24064 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24069 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
24073 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24074 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24075 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24078 ISBN 1234567890<nowiki/>1
24079 ISBN 1234567890<nowiki/>x
24080 a<nowiki/>ISBN 1234567890<nowiki/>b
24084 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
24088 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24092 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24097 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24101 <p>this is not a link: http://example.com
24104 this is not a link: <nowiki>http://example.com</nowiki>
24108 Links 15. Link trails can't become link prefixes.
24113 <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>
24115 [[Söfnuður]]-[[00]]
24117 <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>
24121 #### --------------- Quotes ---------------
24122 #### 1. Quotes inside <b> and <i>
24123 #### 2. Link fragments separated by <i> and <b> tags
24124 #### 3. Link fragments inside <i> and <b>
24125 #### 4. No escaping needed
24126 #### --------------------------------------
24128 1a. Quotes inside <b> and <i>
24139 <b>foo'<i>bar'</i>baz</b>
24148 <i>fools'<span> errand</span></i>
24149 <i><span>fool</span>'s errand</i>
24150 '<i>foo</i> bar '<i>baz</i>
24151 a|!*#-:;+-~[]{}b'<i>x</i>
24155 ''<nowiki>''foo''</nowiki>''
24156 ''<nowiki>'''foo'''</nowiki>''
24158 '''<nowiki/>'foo''''
24159 '''<nowiki>''foo''</nowiki>'''
24160 '''<nowiki>'''foo'''</nowiki>'''
24161 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24162 '''foo'''<nowiki/>'s
24168 '''foo'''<nowiki/>'
24169 ''''foo'''<nowiki/>'
24170 ''fools'<span> errand</span>''
24171 ''<span>fool</span>'s errand''
24172 '<nowiki/>''foo'' bar '''baz''
24173 a|!*#-:;+-~[]{}b'''x''
24177 1b. Quotes inside <b> and <i> with other tags on same line
24181 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24182 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24183 <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>
24184 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24185 '<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>
24186 '<i>foo</i> <div title="name">test</div>
24187 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24188 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24189 <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>
24192 '''a'' foo ''[[bar]]''
24193 ''a''' foo ''[[bar]]''
24194 ''a''' foo '''{{echo|[[bar]]}}'''
24195 [[foo]] x'''[[bar]]''
24196 '''foo'' <ref>test</ref>
24197 '''foo'' <div title="name">test</div>
24198 '''foo'' and <br> bar
24203 2. Link fragments separated by <i> and <b> tags
24207 <p>[[<i>foo</i>hello]]</p>
24208 <p>[[<b>foo</b>hello]]</p>
24210 [[''foo''<nowiki>hello]]</nowiki>
24212 [['''foo'''<nowiki>hello]]</nowiki>
24215 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24216 # this is one of the shortcomings of this format
24218 3. Link fragments inside <i> and <b>
24222 <p><i>[[foo</i>]]</p>
24223 <p><b>[[foo</b>]]</p>
24225 ''[[foo''<nowiki>]]</nowiki>
24227 '''[[foo'''<nowiki>]]</nowiki>
24231 4. No escaping needed
24235 <p>'<span><i>bar</i></span>'
24236 '<span><b>bar</b></span>'
24240 '<span>''bar''</span>'
24241 '<span>'''bar'''</span>'
24245 #### ----------- Paragraphs ---------------
24246 #### 1. No unnecessary escapes
24247 #### --------------------------------------
24250 1. No unnecessary escapes
24254 <p>bar <span>[[foo]]</span>
24255 </p><p>=bar <span>[[foo]]</span>
24256 </p><p>[[bar <span>[[foo]]</span>
24257 </p><p>]]bar <span>[[foo]]</span>
24258 </p><p>=bar <span>foo]]</span>=
24261 bar <span><nowiki>[[foo]]</nowiki></span>
24263 =bar <span><nowiki>[[foo]]</nowiki></span>
24265 [[bar <span><nowiki>[[foo]]</nowiki></span>
24267 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24269 =bar <span>foo]]</span><nowiki>=</nowiki>
24272 #### ----------------------- PRE --------------------------
24273 #### 1. Leading whitespace in SOL context should be escaped
24274 #### ------------------------------------------------------
24276 1. Leading whitespace in SOL context should be escaped
24299 <nowiki> </nowiki>a
24301 <nowiki> </nowiki> a
24305 <nowiki> </nowiki> a
24307 <nowiki> </nowiki>a
24310 <nowiki> </nowiki>b
24333 2. Leading whitespace in non-indent-pre contexts should not be escaped
24337 <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>
24338 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24339 <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>
24349 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24368 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24372 <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>
24374 [[File:Foobar.jpg|thumb|caption]]
24378 5. Nowiki escaping should account for indent-pres
24388 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24401 #### --------------- Behavior Switches --------------------
24404 1. Valid behavior switches should be escaped
24411 <nowiki>__TOC__</nowiki>
24412 ''<nowiki>__TOC__</nowiki>''
24416 2. Invalid behavior switches should not be escaped
24427 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24429 Behavior switches should be SOL-transparent
24433 <meta property="mw:PageProp/toc" />
24435 <!-- this one's bogus -->
24438 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24440 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24444 <!-- this one's bogus -->
24453 #### --------------- HTML tags ---------------
24456 #### 3. multi-line html tag
24457 #### 4. extension tags
24458 #### -----------------------------------------
24464 <a href="http://google.com">google</a>
24466 <a href="http://google.com">google</a>
24474 <ul><li> <div>foo</div></li>
24475 <li> <div style="color:red">foo</div></li>
24476 <li> <td></li></ul>
24479 * <nowiki><div>foo</div></nowiki>
24480 * <nowiki><div style="color:red">foo</div></nowiki>
24481 * <nowiki><td></nowiki>
24485 3. multi-line html tag
24504 <p><ref>foo</ref>
24505 </p><p><ref>bar
24506 </p><p>baz</ref>
24509 <nowiki><ref>foo</ref></nowiki>
24511 <nowiki><ref>bar</nowiki>
24513 baz<nowiki></ref></nowiki>
24516 #### --------------- Others ---------------
24522 <p><nowiki>foo</nowiki>
24525 <nowiki>foo</nowiki>
24528 ## The quote-char in the input is necessary for triggering the bug
24530 (T54035) Nowiki-escaping should not get tripped by " :" in text
24539 #----------- End of wikitext escaping tests --------------
24543 Tag-like HTML structures are passed through as text
24565 </p><p>1<d e>f
24570 HTML tag with necessary entities in attributes
24572 <span title="&amp;">foo</span>
24574 <p><span title="&amp;">foo</span>
24579 HTML tag with 'unnecessary' entity encoding in attributes
24581 <span title="&">foo</span>
24583 <p><span title="&">foo</span>
24588 HTML tag with broken attribute value quoting
24590 parsoid=wt2html,html2html
24592 <span title="Hello world>Foo</span>
24594 <p><span title="Hello world">Foo</span>
24597 <p><span title="Hello world">Foo</span></p>
24601 Self-closed tag with broken attribute value quoting
24603 parsoid=wt2html,html2html
24605 <div title="Hello world />Foo
24607 <div title="Hello world"></div>
24610 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24614 Table with broken attribute value quoting
24616 parsoid=wt2html,html2html
24619 | title="Hello world|Foo
24624 <td title="Hello world">Foo
24630 <td title="Hello world">Foo
24636 Table with broken attribute value quoting on consecutive lines
24638 parsoid=wt2html,html2html
24641 | title="Hello world|Foo
24642 | style="color:red|Bar
24647 <td title="Hello world">Foo
24649 <td style="color:red">Bar
24655 <td title="Hello world">Foo
24656 </td><td style="color: red">Bar
24657 </td></tr></tbody></table>
24662 Accept empty td cell attribute
24665 | align="center" | foo || |
24670 <td align="center"> foo </td>
24677 Non-empty attributes in th-cells
24680 ! Foo !! style="color: red" | Bar
24686 <th style="color: red"> Bar
24692 Accept empty attributes in th-cells
24707 Empty table rows go away
24728 ### Parsoid-centric tests for testing RTing of inter-element separators
24729 ### Edge cases not tested by existing parser tests and specific to
24730 ### Parsoid-specific serialization strategies.
24734 RT-ed inter-element separators should be valid separators
24746 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24750 # Parsoid-only since PHP parser relies on Tidy for correct output
24752 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24766 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24767 <p>bar</p></small></td></tr>
24771 <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>
24775 # Note that the "style" attribute is really a template parameter here.
24776 # The = would have to be {{=}} if you wanted the literal.
24778 Empty TD followed by TD with tpl-generated attribute
24783 |{{echo|style='color:red'}}|foo
24797 Indented table with an empty td
24815 ## We have some newline diffs RT-ing this edge case
24816 ## and it is not important enough -- we seem to be emitting
24817 ## at most 2 newlines after a </tr> and this is unrelated to
24818 ## the issue from T85627 that this is testing.
24820 Indented table with blank lines in between (T85627)
24839 Indented block & table
24853 <div data-parsoid='{"stx":"html"}'>foo</div>
24855 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24860 Indent and comment before table row
24875 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24876 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24880 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24882 Empty TR followed by a template-generated TR
24888 {{echo|<tr><td>foo</td></tr>}}
24894 <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}}]}'>
24899 ## PHP and parsoid output differ for this, and since this is primarily
24900 ## for testing Parsoid's serializer, marking this Parsoid only
24902 Empty TR followed by mixed-ws-comment line should RT correctly
24918 <!--c--> </tr><!--d-->
24924 Multi-line image caption generated by templates with/without trailing newlines
24926 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24927 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24929 <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>
24930 <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>
24934 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24938 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24940 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24942 <includeonly>foo</includeonly>
24950 ## PHP emits broken html for this, and since this is primarily
24951 ## a Parsoid serializer test, marking this Parsoid only
24953 Improperly nested inline or quotes tags with whitespace in between
24955 <span> <s>x</span> </s>
24958 <p><span> <s>x</s></span><s> </s>
24959 <b> <i>x</i></b><i> </i>
24964 Encapsulate protected attributes from wt
24966 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24968 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
24972 <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>
24974 <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">
24975 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
24979 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24980 ## Having nested or stray pre tags results in the attempt to add duplicates,
24981 ## causing an assertion fail. This test tries to prevent that situation.
24983 Ensure ParagraphWrapper can deal with stray closing pre tags
24993 1. Ensure fostered text content is wrapped in element nodes
24997 <table>hi</table><table>ho</table>
25006 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25008 parsoid=wt2html,wt2wt
25017 <tbody><tr><td> a</td></tr>
25022 Encapsulation properly handles null DSR information from foster box
25024 parsoid=wt2html,wt2wt
25026 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25028 <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>
25032 1. Encapsulate foster-parented transclusion content
25034 parsoid=wt2wt,wt2html
25036 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25038 <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>
25048 2. Encapsulate foster-parented transclusion content
25050 parsoid=wt2wt,wt2html
25052 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25054 <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>
25065 3. Encapsulate foster-parented transclusion content
25067 parsoid=wt2wt,wt2html
25069 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25071 <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>"]}">
25084 4. Encapsulate foster-parented transclusion content
25086 parsoid=wt2wt,wt2html
25088 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25090 <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>"]}">
25103 5. Encapsulate foster-parented transclusion content
25105 parsoid=wt2wt,wt2html
25107 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25109 <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>
25124 6. Encapsulate foster-parented transclusion content
25126 parsoid=wt2wt,wt2html
25128 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25130 <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>
25146 7. Encapsulate foster-parented transclusion content
25148 parsoid=wt2wt,wt2html
25150 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25152 <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>
25162 # Note that the wt is broken on purpose: the = should be {{=}} if you
25163 # don't want it to be a template parameter key.
25165 8. Encapsulate foster-parented transclusion content
25167 parsoid=wt2wt,wt2html
25170 }}{|{{echo|style='color:red'}}
25175 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25177 <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>
25188 9. Encapsulate foster-parented transclusion content
25190 parsoid=wt2wt,wt2html
25192 <table>{{echo|hi</table>hello}}
25194 <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>
25198 Table in fosterable position
25209 <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">
25211 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25217 # Parsoid only for T66747
25219 Properly encapsulate empty-content transclusions in fosterable positions
25227 <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"}]]}'>
25233 Always encapsulate foster box when template range is expanded to table
25246 T115289: Unclosed table
25248 {{echo|<table>}}<!--c-->[[Category:Two]]
25250 <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>
25254 T115289: Don't migrate newlines out of tables with fostered content
25256 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25258 <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>
25262 T73074: More fostering fun
25264 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25266 <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>
25270 Support <object> element with .data attribute
25274 <object data="test.swf"></object>
25276 <object data="test.swf"></object>
25280 Don't block XML namespace declaration
25282 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25284 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25287 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25290 # -----------------------------------------------------------------
25291 # The following section of tests are primarily to spec requirements
25292 # around Parsoid's serialization (old, new, edited content)
25294 # All these tests are marked Parsoid html2wt and html2html only
25295 # ----------------------------------------------------------------
25298 Ignore rel attribute in a-tags during serialization to url-links
25302 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25303 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25304 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25306 http://en.wikipedia.org/wiki/Foobar
25307 http://en.wikipedia.org/wiki/Foobar
25308 http://en.wikipedia.org/wiki/Foobar
25311 # 'mi' is a localinterwiki prefix as well as a language
25313 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
25317 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25324 New wikilinks should be serialized properly
25328 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25329 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25330 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25331 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25332 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25336 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25337 http://en.wikipedia.org/wiki/Foo
25338 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25342 New wiki links (href variations)
25346 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25347 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25348 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25349 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25354 [[Toxine bactérienne]]
25358 New wiki links (content string variations)
25362 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25363 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25364 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25368 [[Foo_bar|./Foo_bar]]
25372 New category links (href variations)
25376 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25377 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25378 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25380 [[Category:Toxine bactérienne]]
25381 [[Category:Toxine bactérienne]]
25382 [[Category:Toxine bactérienne]]
25386 New sol transparent links don't need indent-pre nowiki protection
25391 <link rel="mw:PageProp/redirect" href="./Main_Page">
25392 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25393 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25395 #WEITERLEITUNG [[Main Page]]
25396 <!-- this is good --> [[Category:Good]]
25397 <!-- this is great --> [[Kategorie:Great]]
25401 New interlanguage links (href variations)
25405 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25406 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25407 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25409 [[es:Toxine bactérienne]]
25410 [[es:Toxine_bactérienne]]
25411 [[es:Toxine_bactérienne]]
25415 Image: Modifying size of an image (1)
25418 "modes": ["wt2wt"],
25420 ["img[height]", "attr", "height", "22"],
25421 ["img[width]", "attr", "width", "200"]
25425 [[Image:Foobar.jpg|230x230px]]
25427 [[Image:Foobar.jpg|200x200px]]
25431 Image: Modifying size of an image (2)
25434 "modes": ["wt2wt"],
25436 ["img[height]", "attr", "height", "100"],
25437 ["img[width]", "attr", "width", "500"]
25441 [[Image:Foobar.jpg|230x230px]]
25443 [[Image:Foobar.jpg|500x500px]]
25446 # Change in size is ignored so long as class='mw-default-size'
25448 Image: Modifying size of an image (3)
25451 "modes": ["wt2wt"],
25453 ["figure[class]", "removeClass", "mw-default-size"],
25454 ["figure img", "attr", "height", "19"],
25455 ["figure img", "attr", "width", "170"]
25459 [[Image:Foobar.jpg|thumb]]
25461 [[Image:Foobar.jpg|thumb|170x170px]]
25465 Image: Modifying alignment of an image (T50665)
25468 "modes": ["wt2wt"],
25470 ["figure[class]", "removeClass", "mw-halign-right"],
25471 ["figure[class]", "addClass", "mw-halign-left"]
25475 [[Image:Foobar.jpg|thumb|caption|right]]
25477 [[Image:Foobar.jpg|thumb|caption|left]]
25481 Image: Modifying mw-default-size of an frameless image (T64805)
25484 "modes": ["wt2wt"],
25486 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25490 [[Image:Foobar.jpg|frameless|right]]
25492 [[Image:Foobar.jpg|frameless|right|220x220px]]
25496 Image: Modifying valign of an image (T51221)
25499 "modes": ["wt2wt"],
25501 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25502 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25506 [[File:Foobar.jpg|20px|middle]]
25508 [[File:Foobar.jpg|20px|text-top]]
25512 Image: Modifying alt attribute of an image (T58400)
25515 "modes": ["wt2wt"],
25517 ["img[alt]", "attr", "alt", "some alternate edited text"]
25521 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25523 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25527 Image: Modifying caption of an image
25530 "modes": ["wt2wt"],
25532 ["figcaption", "text", "new caption"]
25536 [[Image:Foobar.jpg|thumb|original caption]]
25538 [[Image:Foobar.jpg|thumb|new caption]]
25542 Image: empty alt attribute (T50924)
25546 [[File:Foobar.jpg|thumb|alt=|bar]]
25548 <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>
25552 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
25558 <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>
25560 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25564 Image: Block level image should have \n before and after
25567 [[File:Foobar.jpg|right|thumb|150x150px]]
25571 <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>
25576 Image: New block level image should have \n before and after (existing content)
25579 [[File:Foobar.jpg|right|thumb|150x150px]]
25583 <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>
25588 Image: upright option (parsoid)
25590 [[File:Foobar.jpg|thumb|upright|caption]]
25591 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25592 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25594 <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>
25595 <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>
25596 <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>
25600 Image: upright option is ignored on inline and frame images (parsoid)
25602 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25604 <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>
25608 Image: from basic HTML (1)
25612 <span typeof="mw:Image">
25613 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25616 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25620 Image: from basic HTML (2)
25624 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25626 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25630 Image: from basic HTML (3)
25634 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25636 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25640 Image: from basic HTML (4)
25644 <img src="./File:Foobar.jpg">
25646 [[File:Foobar.jpg|link=]]
25650 Image: Invalid title as link
25652 [[File:Foobar.jpg|link=<]]
25654 <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>
25657 <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>
25661 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25666 <li><p>foo</p></li>
25673 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25677 <ul> <li>foo</li></ul>
25683 Don't strip leading whitespace when handling indent-pre suppressing tags
25688 <tr><td> indented row</td></tr>
25691 <b>This is very bold of you!</b>
25694 indented cell (no pre-wrapping!)
25704 '''This is very bold of you!'''
25708 indented cell (no pre-wrapping!)
25716 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25738 <nowiki> </nowiki></span>bar2
25741 <nowiki> </nowiki><span>bar</span>
25744 <nowiki> </nowiki><span>foo</span>
25749 Lists: Dont insert newlines in a serialized list item.
25753 <ul><li>a<br>b</li><li>c</li></ul>
25760 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25763 "modes": ["html2wt"],
25764 "scrubWikitext": false
25767 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25768 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25770 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25771 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25773 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25775 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25777 == hello there [[Category:A1]] ==
25779 == [[Category:A2]] hi pal ==
25781 == <!--foo--> [[Category:A3]] how goes it ==
25783 == it goes well [[Category:A4]] <!--bar--> ==
25785 ==howdy [[Category:A5]]==
25791 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25794 "modes": ["html2wt"],
25795 "scrubWikitext": true
25798 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25799 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25801 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25802 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25804 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25812 <!--foo--> [[Category:A3]]
25817 [[Category:A4]] <!--bar-->
25825 Headings: Don't hoist metas that come from templates
25828 "modes": ["html2wt"],
25829 "scrubWikitext": true
25832 <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>
25834 == {{echo|foo [[Category:Foo]]}} ==
25838 Headings: Category in ref isn't hoisted
25841 "modes": ["html2wt"],
25842 "scrubWikitext": true
25845 <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>
25847 <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>
25850 [[Category:Baz]] </ref> ==
25856 Parsoid: Serialize positional parameters with = in them as named parameter
25860 <p about="#mwt1" typeof="mw:Transclusion"
25861 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25863 <p about="#mwt1" typeof="mw:Transclusion"
25864 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25866 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25867 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25868 <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>
25872 {{echo|1=f=oo|2=bar}}
25874 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25875 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25876 {{echo|<nowiki>f=oo</nowiki>|bar}}
25880 Parsoid: Serialize positional parameters with = in extlink as named parameter
25884 <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>
25886 {{echo|1=http://stuff?is=ok}}
25890 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25894 <div>a<p>b</p></div>
25915 Substrings resembling wikitext in hrefs should not get nowiki escapes
25919 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25925 Enforce single-line context in the serializer
25932 <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">
25933 </span><span about="#mwt1">you</span> </h2>
25935 <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>
25937 <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
25938 there</span></li></ol>
25950 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25957 </tbody></table></dd></dl>
25961 == hi {{bogus|there
25972 * foo '''bar''' baz
25984 Serialize new placeholder space without spans
25988 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25990 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25992 <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>
25998 <ref>foo : bar</ref>ok
26002 #-----------------------
26003 # Tag minimization tests
26004 #-----------------------
26007 1. I/B quote minimization: wikitext-only tags should be combined
26011 <p><i>A</i><i>B</i></p>
26012 <p><b>A</b><b>B</b></p>
26013 <p><i>A</i><b><i>B</i></b></p>
26014 <p><b>A</b><i><b>B</b></i></p>
26015 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26016 <p><i><b>A</b></i><i><b>B</b></i></p>
26017 <p><i><b>A</b></i><b><i>B</i></b></p>
26018 <p><b><i>A</i></b><i><b>B</b></i></p>
26038 2. I/B quote minimization: wikitext and html tags should not be combined
26042 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26043 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26047 ''A''<nowiki/>'''<i>B</i>'''
26051 3. I/B quote minimization: templated content stops minimization
26055 <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>
26056 <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>
26058 ''A''{{echo|''B''}}
26060 ''A''{{echo|'''''B'''''}}
26064 4. I/B quote minimization: new content should be mimimized with adjacent old content
26068 <p><i>A</i><i>B</i></p>
26069 <p><b>A</b><b>B</b></p>
26070 <p><i>A</i><b><i>B</i></b></p>
26080 5a. Merge adjacent quote nodes if they've been edited
26083 "modes": ["wt2wt", "selser"],
26085 ["p", "contents", "remove", ":contains('b')"]
26095 5b. Merge adjacent quote nodes if they've been edited
26098 "modes": ["wt2wt", "selser"],
26104 ''a''<span id="x">b</span>''c''
26110 1. Merge adjacent link nodes as long as at least one element is new
26113 "modes": ["html2wt"],
26114 "scrubWikitext": true
26117 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26118 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26119 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26123 [[Football|Foot]][[Football|ball]]
26127 2. Merge adjacent link nodes and enable additional normalizations
26130 "modes": ["html2wt"],
26131 "scrubWikitext": true
26134 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26136 [[Football|''Football'']]
26140 3. Don't merge adjacent link nodes if scrubWikitext is false
26143 "modes": ["html2wt"],
26144 "scrubWikitext": false
26147 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26149 [[Football|Foot]][[Football|ball]]
26152 #------------------------------
26153 # End of tag minimization tests
26154 #------------------------------
26157 T56262: New entities
26161 <span typeof="mw:Entity"> </span>
26166 ## Note that there is no wikitext output for 'unknownproperty' ##
26167 ## Unknown magic words are silently dropped ##
26174 <meta property='mw:PageProp/toc' />
26175 <meta property='mw:PageProp/notoc' />
26176 <meta property='mw:PageProp/forcetoc' />
26177 <meta property='mw:PageProp/index' />
26178 <meta property='mw:PageProp/noindex' />
26179 <meta property='mw:PageProp/nogallery' />
26180 <meta property='mw:PageProp/noeditsection' />
26181 <meta property='mw:PageProp/notitleconvert' />
26182 <meta property='mw:PageProp/nocontentconvert' />
26183 <meta property='mw:PageProp/unknownproperty' />
26193 __NOCONTENTCONVERT__
26197 Consecutive <pre>s should not get merged
26199 parsoid=html2wt,html2html
26201 <pre>a</pre><pre>b</pre>
26229 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26233 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26235 [[Special:BookSources/1234567890|ISBN 1234567895]]
26239 Edited RFC links not serializable as RFC links should serialize as extlinks
26243 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26245 [//tools.ietf.org/html/rfc123 New RFC]
26249 Edited PMID links not serializable as PMID links should serialize as extlinks
26253 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26255 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26259 WTS of autolinks with trailing/surrounding context
26263 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26264 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26265 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26266 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26267 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26268 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26270 http://cscott.net'''foo'''
26272 http://cscott.net<b>foo</b>
26274 '''http://cscott.net'''
26276 '''http://cscott.net '''
26278 '''http://cscott.net<nowiki/>x'''
26280 http://cscott.net<nowiki/>x
26284 WTS of autolinks with nowikis (round-trip)
26286 x<nowiki/>http://cscott.net<nowiki/>x
26288 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26291 # this is the "easy" test because it leaves in place all the
26292 # data-parsoid information indicating this is an autolink
26294 WTS of autolinks with escapes (editing)
26297 "modes": ["wt2wt"],
26299 [ "span", "remove" ]
26303 x<nowiki/>http://cscott.net<nowiki/>x
26305 x<nowiki/>http://cscott.net<nowiki/>x
26309 WTS of edited autolink-like text (T103364)
26312 "modes": ["wt2wt"],
26314 [ "span[typeof]", "removeAttr", "typeof" ]
26318 Not a link: <nowiki>http://example.com</nowiki>.
26320 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26324 WTS of newly-authored autolink-like text (T103364)
26328 <p>http://example.com is not a link.</p>
26330 <nowiki>http://example.com</nowiki> is not a link.
26334 WTS of autolink-like text after an autolink (T108563)
26338 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26340 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26344 Magic links inside links (not autolinked)
26346 [[Foo|http://example.com]]
26349 [[Foo|ISBN 123456789x]]
26351 [http://foo.com http://example.com]
26352 [http://foo.com RFC 1234]
26353 [http://foo.com PMID 1234]
26354 [http://foo.com ISBN 123456789x]
26356 <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>
26357 <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>
26359 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26360 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26361 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26362 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26364 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26365 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26366 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26367 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26371 Magic links inside image captions (autolinked)
26373 [[File:Foobar.jpg|thumb|http://example.com]]
26374 [[File:Foobar.jpg|thumb|RFC 1234]]
26375 [[File:Foobar.jpg|thumb|PMID 1234]]
26376 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26378 <div class="thumb tright">
26379 <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>
26380 <div class="thumbcaption">
26381 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26382 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26385 <div class="thumb tright">
26386 <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>
26387 <div class="thumbcaption">
26388 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26389 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26392 <div class="thumb tright">
26393 <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>
26394 <div class="thumbcaption">
26395 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26396 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26399 <div class="thumb tright">
26400 <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>
26401 <div class="thumbcaption">
26402 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26403 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26407 <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>
26408 <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>
26409 <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>
26410 <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>
26414 WTS of magic word text (T109371)
26419 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26420 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26422 <nowiki>RFC 1234</nowiki>
26424 [http://foo.com RFC 1234]
26430 Edited Redirect link should emit a non-piped wikitext link
26434 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26440 T75121: Infer extension name from typeOf if data-mw is not present
26442 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26444 <div typeOf="mw:Extension/foo"></div>
26449 # Note that the <p> wrapping isn't present in PHP parser output
26450 # The important thing for this test is that P-wrapping doesn't
26451 # interfere with the <nowiki> protection for leading - in <td>
26452 # (which isn't necessary for <th>).
26454 T88318: p-wrapped dash in table.
26456 parsoid=html2wt,wt2wt
26459 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26460 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26461 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26468 |<nowiki>-</nowiki>
26469 |<nowiki>- </nowiki>
26488 <td><small>-</small></td>
26500 T149209: WTS: Handle newlines in table cells properly
26508 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26510 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26516 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26518 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26540 T149209: Selser: Handle newlines in table cells properly
26543 "modes": ["selser"],
26545 [ "#h1", "html", "a\nb\n" ],
26546 [ "#h2", "html", "a\nb\n" ],
26547 [ "#c1", "html", "a\nb\n" ],
26548 [ "#c2", "html", "<p>a</p>" ],
26549 [ "#c3", "html", "<p>a</p>" ],
26550 [ "#c4", "html", "edit-me<p>a</p>" ]
26555 ! id="h1" |edit-me!!1
26557 ! id="h2" |edit-me||2
26559 | id="c1" |edit-me||3
26561 | id="c2" |edit-me||4
26563 | id="c3" |edit-me||p||q||r
26565 | id="c4" |edit-me||p||q||r
26594 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26599 <td id='mwAc'>foo</td>
26600 <td id='serialize-this'>bar</td>
26605 | id="serialize-this" |bar
26610 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26614 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26616 <div id="hello">ok</div>
26623 "modes": ["wt2wt"],
26625 [ "#xyz", "before", "<b>before</b> stuff " ],
26626 [ "#xyz", "after", " stuff <i>after</i>" ],
26627 [ "#xyz", "html", "x <b>y</b> z" ]
26631 <span id="xyz">hello</span>
26633 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26637 Never serialize a-tag as html, regardless of what data-parsoid has to say
26639 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26641 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26646 ## SSS FIXME: This is broken output nevertheless.
26647 ## What might be a reasonable non-broken output for this?
26648 ## This is an edge case unlikely to be seen in production
26649 ## that I am not wasting more time on this right now.
26651 Never serialize a-tag as html, no matter what attributes it has
26653 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26655 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26657 [http://boo.org http://boohoo.org]
26660 # Misnested is an indication that selser can reuse the source but these have
26661 # shown to sneak through on occasion. See T101768.
26662 # The original wikitext here is: [http://test.com [[one]] two three]
26664 Strip span tags added to mark misnested links
26668 <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>
26670 [http://test.com][[one]] two three
26674 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26678 <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|}"]}'>
26690 ## This test verifies the presence and computation of this attribute indirectly
26691 ## by making an edit and ensuring that the serialization is correct (which it would be
26692 ## only if firstWikitextNode is properly set).
26694 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26697 "modes": ["wt2wt"],
26699 [ "div#x", "remove" ],
26700 [ "div", "before", "<div>new</div>" ]
26704 <div id="x">foo</div>
26706 {{echo|<div>boo</div>
26714 {{echo|<div>boo</div>
26720 # --------------------------------------------
26721 # Tests spec'ing wikitext serialization norms |
26722 # --------------------------------------------
26725 Serialize multi-line indent-pre starting with wikitext syntax
26739 1. Categories should always be serialized on their own line
26743 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26751 2. Categories that are part of templates should not introduce a line break
26753 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26755 <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>
26758 # Careful while editing these next 2 tests. There are \u200f characters
26759 # before and after the <link> tags in the HTML and following some
26760 # of the categories in wikitext
26761 # Do not remove these characters in edits.
26763 # As part of the serialization, these bidi characters will get stripped.
26765 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26768 "modes": ["html2wt"],
26769 "scrubWikitext": true
26772 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26773 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26776 [[קטגוריה: שיטות משפט]]
26780 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26783 "modes": ["html2wt"],
26784 "scrubWikitext": true
26787 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26794 Lists: Add space after bullets
26801 <li><span> baz</span></li>
26806 * <span> baz</span>
26810 1. Headings: Add space before/after == (T53744)
26817 <h2><span> baz</span></h2>
26825 == <span> baz</span> ==
26829 2. Headings: Add space before/after == even after hoisted content
26832 "modes": ["html2wt"],
26833 "scrubWikitext": true
26836 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26844 1. Headings: suppress newly created empty headings
26847 "modes": ["html2wt"],
26848 "scrubWikitext": true
26856 2. Headings: don't suppress empty headings if scrubWikitext is false
26866 3. Headings: suppress empty headings on edits
26869 "modes": ["selser"],
26870 "scrubWikitext": true,
26876 ==<span id="x">foo</span>==
26881 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26884 "modes": ["html2wt"],
26885 "scrubWikitext": true
26888 <h2>foo<br/>bar</h2>
26889 <h2>foo <span><br/>bar</span> baz</h2>
26893 == foo <span> bar</span> baz ==
26897 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26900 "modes": ["html2wt"],
26901 "scrubWikitext": false
26904 <h2>foo<br/>bar</h2>
26910 1. WT Quote Tags: suppress newly created empty style tags
26913 "modes": ["html2wt"],
26914 "scrubWikitext": true
26922 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26928 ''<nowiki/>'''''<nowiki/>'''
26932 3. WT Quote Tags: suppress empty style tags on edits
26935 "modes": ["selser"],
26936 "scrubWikitext": true,
26942 '''<span id="x">foo</span>'''
26947 1. Anchors: suppress newly created empty anchors
26950 "modes": ["html2wt"],
26951 "scrubWikitext": true
26954 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26959 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26962 "modes": ["html2wt"],
26963 "scrubWikitext": false
26966 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26972 3. Anchors: suppress empty anchors on edits
26975 "modes": ["selser"],
26976 "scrubWikitext": true,
26982 [[Test|<span id="x">foo</span>]]
26987 3a. Anchors: do not suppress numbered extlinks
26990 "modes": ["wt2wt"],
26991 "scrubWikitext": true
26996 <a rel="mw:ExtLink" href="http://foo.com"></a>
27000 3b. Anchors: do not suppress numbered extlinks
27003 "modes": ["wt2wt"],
27004 "scrubWikitext": true,
27010 [http://foo.com <span id="x">foo</span>]
27016 Normalizations should be restricted to edited content
27019 "modes": ["selser"],
27020 "scrubWikitext": true,
27022 [ "h1", "before", "<i></i>"]
27036 1. Multiple normalizations (html2wt)
27039 "modes": ["html2wt"],
27040 "scrubWikitext": true
27044 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27045 </a><b><i></i></b>x</p>
27054 2. Multiple normalizations (selser)
27057 "modes": ["selser"],
27058 "scrubWikitext": true,
27060 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27064 <span id="x">foo</span>
27066 <span id="x">foo</span>
27072 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27075 "modes": ["html2wt"],
27076 "scrubWikitext": true
27088 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27095 <nowiki> </nowiki>hi
27097 <nowiki> </nowiki> hello
27101 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27104 "modes": ["html2wt"],
27105 "scrubWikitext": true
27114 baz bang</td></tr></table>
27120 bar<span>boo</span></p>
27136 bar<span>boo</span>
27140 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27143 "modes": ["selser"],
27144 "scrubWikitext": true,
27146 [ "p", "html", " a\n b" ]
27157 1. New links that end in spaces
27160 "modes": ["html2wt"],
27161 "scrubWikitext": false
27164 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27165 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27166 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27168 [[Berlin ]]<nowiki/>is the capital of Germany.
27172 [[Boston ]] is a city.
27176 2. New links that end in spaces
27179 "modes": ["html2wt"],
27180 "scrubWikitext": true
27183 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27184 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27185 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27187 [[Berlin]] is the capital of Germany.
27191 [[Boston]] is a city.
27195 1. Table cells with escapable prefixes
27198 "modes": ["html2wt"],
27199 "scrubWikitext": false
27203 <tr><td>a</td></tr>
27204 <tr><td>-</td></tr>
27205 <tr><td>+</td></tr>
27211 |<nowiki>-</nowiki>
27213 |<nowiki>+</nowiki>
27218 2. Table cells with escapable prefixes
27221 "modes": ["html2wt"],
27222 "scrubWikitext": true
27226 <tr><td>a</td></tr>
27227 <tr><td>-</td></tr>
27228 <tr><td>+</td></tr>
27241 3a. Table cells with escapable prefixes after edits
27244 "modes": ["selser"],
27245 "scrubWikitext": true,
27247 [ "table tbody tr:first-child td:first-child", "remove"]
27261 3b. Table cells with escapable prefixes after edits
27264 "modes": ["selser"],
27265 "scrubWikitext": true,
27267 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27274 |<span id="x">foo</span>+
27283 # FIXME: This test will fail because
27284 # normalization doesn't realize that the id attribute
27285 # will eliminate the escapable scenario
27287 4a. Table cells without escapable prefixes after edits
27290 "modes": ["selser"],
27291 "scrubWikitext": true,
27293 [ "#x", "html", "-" ]
27306 ## This tests normalizer's ability to discriminate between
27307 ## cells having identical content.
27309 4b. Table cells without escapable prefixes after edits
27312 "modes": ["selser"],
27313 "scrubWikitext": true,
27315 [ "td", "html", "-" ]
27328 ## This tests normalizer's ability to not be tripped by
27329 ## comments (and whitespace)
27331 4c. Table cells without escapable prefixes after edits
27334 "modes": ["selser"],
27335 "scrubWikitext": true,
27337 [ "table tbody tr td:first-child", "remove" ]
27352 ## This tests normalizer's ability to handle HTML cells
27354 4d. Table cells without escapable prefixes after edits
27357 "modes": ["selser"],
27358 "scrubWikitext": true,
27360 [ "td", "html", "-" ]
27365 <tr><td>a</td></tr>
27369 <tr><td>-</td></tr>
27373 ## T111151 Remove font elements without attributes
27375 5a. font tags without attributes should be dropped in scrubWikitext mode
27378 "modes": ["html2wt"],
27379 "scrubWikitext": true
27383 <font><font>bar</font></font>
27384 <font class="x">boo</font>
27388 <font class="x">boo</font>
27392 5b. font tags should not be dropped without scrubWikitext being enabled
27395 "modes": ["html2wt"],
27396 "scrubWikitext": false
27405 Escape nowiki DOM elements
27409 <nowiki><i>foo</i></nowiki>
27411 <nowiki>''foo''</nowiki>
27414 # This is meant to be an interim fix while we go about figuring out
27415 # how to not introduce these trailing <nowiki/>s in the first place.
27417 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27421 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27423 <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>
27424 <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>
27437 # ---------------------------------------------------
27438 # End of tests spec'ing wikitext serialization norms |
27439 # ---------------------------------------------------
27443 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27451 <td><b>c</b><p>d</p></td>
27469 # -----------------------------------------------------------------
27470 # End of section for Parsoid-only html2wt tests for serialization
27472 # -----------------------------------------------------------------
27474 # -----------------------------------------------------------------
27475 # The following section of tests are primarily to spec behavior of
27476 # the selective serializer. All these tests have manual selser
27477 # changes. The automated selser changes for all tests handle the
27478 # wide variation of changes, but these tests here capture specs
27479 # deterministically.
27480 # ----------------------------------------------------------------
27484 Selser: New comments should not be lost
27487 "modes": ["selser"],
27489 [ "#a", "after", "<!--c1-->" ],
27490 [ "#b", "before", "<!--c2-->" ]
27494 <span id="a">a</span>
27496 <span id="b">b</span>
27498 <span id="a">a</span><!--c1-->
27500 <!--c2--><span id="b">b</span>
27505 Selser: Check for validity of DSR before using it
27508 "modes": ["selser"],
27510 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27514 <span id="a">a</span>
27516 {{DISPLAYTITLE:foo}}
27517 <span id="a">a</span>
27521 1. DOMDiff: Changes to <ref> content should be looked up using id
27524 "modes": ["selser"],
27526 ["#X", "after", "bar"],
27527 ["#Y", "after", "baz"]
27531 X <ref><span id="X">foo</span></ref>
27534 <ref name="a"><span id="Y">foo</span></ref>
27537 X <ref><span id="X">foo</span>bar</ref>
27540 <ref name="a"><span id="Y">foo</span>baz</ref>
27545 2. DOMDiff: Changes to <ref> content should be looked up using id
27548 "modes": ["selser"],
27550 ["#Z", "after", "bar"]
27554 A <ref>foo bar for a</ref>
27555 B <ref group="X" name="b" />
27559 <references group="X">
27560 <ref name="b"><span id="Z">foo</span></ref>
27563 A <ref>foo bar for a</ref>
27564 B <ref group="X" name="b" />
27568 <references group="X">
27569 <ref name="b"><span id="Z">foo</span>bar</ref>
27574 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27577 "modes": ["selser"],
27579 [ "div:first-child", "text", "bar" ]
27583 <div style="{{1x|color:red;}}%">foo</div>
27585 <div style="{{1x|color:red;}}%">bar</div>
27598 <li class="mw-empty-elt"></li>
27599 <li class="mw-empty-elt"></li>
27607 [[File:Thumb.png|thumb]]
27609 <div class="thumb tright">
27610 <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>
27611 <div class="thumbcaption">
27612 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27619 unclosed internal link XSS (T137264)
27621 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27623 <p>[[#<script>alert(1)</script>|
27626 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>