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="#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="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">Error: Expansion loop detected at <a data-parsoid='{"a":{"href":null},"sa":{"href":"Template:CircularRef"}}'>Template:CircularRef</a></span></li></ol>
302 This is a simple paragraph.
304 <p>This is a simple paragraph.
309 Paragraphs with extra newline spacing
332 Paragraphs with newline spacing with comment lines in between
340 <!--foo--><!--More than 1 comment, still stripped-->
344 <!--foo--> <!----> <!-- bar -->
405 Paragraphs with newline spacing with non-empty white-space lines in between
432 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
440 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
479 Extra newlines: More paragraphs with indented comment
494 Extra newlines followed by heading
509 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
510 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
513 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
518 Extra newlines between heading and content are swallowed
526 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
527 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
534 http://fr.wikipedia.org/wiki/🍺
535 <!-- EasterEgg we love beer, better be able be able to link to it -->
537 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
541 # Note that the html+tidy output removes the spaces after the <li>,
542 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
543 # This is an issue for all tests with lists. We intentionally do
544 # *not* add html+tidy clauses for these, as we don't want to
545 # document/test the broken behavior. (Parsoid matches the non-tidy
546 # output in these cases.)
555 <li> Item 2</li></ul>
563 * plain''italic''plain
564 * plain''italic''plain''italic''plain
565 * plain'''bold'''plain
566 * plain'''bold'''plain'''bold'''plain
567 * plain''italic''plain'''bold'''plain
568 * plain'''bold'''plain''italic''plain
569 * plain''italic'''bold-italic'''italic''plain
570 * plain'''bold''bold-italic''bold'''plain
571 * plain'''''bold-italic'''italic''plain
572 * plain'''''bold-italic''bold'''plain
573 * plain''italic'''bold-italic'''''plain
574 * plain'''bold''bold-italic'''''plain
575 * plain l'''italic''plain
576 * plain l''''bold''' plain
579 <li> plain<i>italic</i>plain</li>
580 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
581 <li> plain<b>bold</b>plain</li>
582 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
583 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
584 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
585 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
586 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
587 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
588 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
589 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
590 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
591 <li> plain l'<i>italic</i>plain</li>
592 <li> plain l'<b>bold</b> plain</li></ul>
596 # this example taken from the [[simple:Moon]] article (bug 47326)
598 Italics and possessives (1)
600 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
602 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
606 # this example taken from [[en:Flaming Pie]] (bug 49926)
608 Italics and possessives (2)
610 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
612 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
616 # this example taken from [[en:Dictionary]] (bug 49926)
618 Italics and possessives (3)
620 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
622 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
628 ### 2-quote opening sequence tests
631 Italics and bold: 2-quote opening sequence: (2,2)
640 Italics and bold: 2-quote opening sequence: (2,3)
649 Italics and bold: 2-quote opening sequence: (2,4)
659 # same html as previous, but wikitext adjusted to match parsoid html2wt
661 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
663 ''foo<nowiki>''</nowiki>''
669 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
671 Italics and bold: 2-quote opening sequence: (2,5)
684 # same html as previous, but wikitext adjusted to match parsoid html2wt
686 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
688 ''foo'''''<nowiki/>'''
699 ### 3-quote opening sequence tests
703 Italics and bold: 3-quote opening sequence: (3,2)
712 Italics and bold: 3-quote opening sequence: (3,3)
721 Italics and bold: 3-quote opening sequence: (3,4)
729 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
731 Italics and bold: 3-quote opening sequence: (3,5)
744 # same html as previous, but wikitext adjusted to match parsoid html2wt
746 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
748 '''foo'''''<nowiki/>''
759 ### 4-quote opening sequence tests
763 Italics and bold: 4-quote opening sequence: (4,2)
773 # same html as previous, but wikitext adjusted to match parsoid html2wt
775 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
777 <nowiki>''</nowiki>''foo''
784 Italics and bold: 4-quote opening sequence: (4,3)
793 Italics and bold: 4-quote opening sequence: (4,4)
803 # same html as previous, but wikitext adjusted to match parsoid html2wt
805 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
813 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
815 Italics and bold: 4-quote opening sequence: (4,5)
824 <p>'<b>foo</b><i></i>
828 # same html as previous, but wikitext adjusted to match parsoid html2wt
830 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
832 '<nowiki/>'''foo'''''<nowiki/>''
837 <p>'<b>foo</b><i></i>
843 ### 5-quote opening sequence tests
847 Italics and bold: 5-quote opening sequence: (5,2)
857 # same html as previous, but wikitext adjusted to match parsoid html2wt
859 Italics and bold: 5-quote opening sequence: (5,2+3)
868 Italics and bold: 5-quote opening sequence: (5,3)
878 # same html as previous, but wikitext adjusted to match parsoid html2wt
880 Italics and bold: 5-quote opening sequence: (5,3+2)
889 Italics and bold: 5-quote opening sequence: (5,4)
895 <p><i><b>foo'</b></i>
900 Italics and bold: 5-quote opening sequence: (5,5)
909 Italics and bold: 5-quote opening sequence: (5,6)
913 <p><i><b>foo'</b></i>
918 ### multiple quote sequences in a line
921 Italics and bold: multiple quote sequences: (2,4,2)
927 <p><i>foo'<b>bar</b></i>
932 # same html as previous, but wikitext adjusted to match parsoid html2wt
934 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
936 ''foo'<nowiki/>'''bar'''''
938 <p><i>foo'<b>bar</b></i>
944 Italics and bold: multiple quote sequences: (2,4,3)
950 <p><i>foo'<b>bar</b></i>
955 # same html as previous, but wikitext adjusted to match parsoid html2wt
957 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
959 ''foo'<nowiki/>'''bar'''''
961 <p><i>foo'<b>bar</b></i>
967 Italics and bold: multiple quote sequences: (2,4,4)
973 <p><i>foo'<b>bar'</b></i>
978 # same html as previous, but wikitext adjusted to match parsoid html2wt
980 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
982 ''foo'<nowiki/>'''bar'<nowiki/>'''''
984 <p><i>foo'<b>bar'</b></i>
989 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
991 Italics and bold: multiple quote sequences: (3,4,2)
1000 <p><b>foo'</b>bar<i></i>
1004 # same html as previous, but wikitext adjusted to match parsoid html2wt
1006 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1010 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1015 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1020 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1022 Italics and bold: multiple quote sequences: (3,4,3)
1031 <p><b>foo'</b>bar<b></b>
1035 # same html as previous, but wikitext adjusted to match parsoid html2wt
1037 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1039 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1044 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1049 ### other quote tests
1052 Italics and bold: other quote tests: (2,3,5)
1054 ''this is about '''foo's family'''''
1056 <p><i>this is about <b>foo's family</b></i>
1062 Italics and bold: other quote tests: (2,(3,3),2)
1064 ''this is about '''foo's''' family''
1066 <p><i>this is about <b>foo's</b> family</i>
1072 Italics and bold: other quote tests: (3,2,3,2)
1076 '''this is about ''foo'''s family''
1078 <p><b>this is about <i>foo</i></b><i>s family</i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: other quote tests: (3,2,3+2+2,2)
1087 '''this is about ''foo'''''<nowiki/>''s family''
1089 <p><b>this is about <i>foo</i></b><i>s family</i>
1095 Italics and bold: other quote tests: (3,2,3,3)
1097 '''this is about ''foo'''s family'''
1099 <p>'<i>this is about </i>foo<b>s family</b>
1105 Italics and bold: other quote tests: (3,(2,2),3)
1107 '''this is about ''foo's'' family'''
1109 <p><b>this is about <i>foo's</i> family</b>
1115 Italicized possessive
1117 The ''[[Main Page]]'''s talk page.
1119 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1122 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1126 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1127 (Requires tidy for PHP parser output to be fixed up)
1129 parsoid=wt2html,wt2wt
1146 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1147 <td><i>a</i></td><td><i>b</i></td></tr>
1156 Non-html5 tags should be accepted
1158 <center>''foo''</center>
1160 <font>''foo''</font>
1161 <strike>''foo''</strike>
1164 <center><i>foo</i></center>
1165 <p><big><i>foo</i></big>
1166 <font><i>foo</i></font>
1167 <strike><i>foo</i></strike>
1173 <wbr> is valid wikitext (bug 52468)
1181 # <strike> is HTML4, <s> is HTML4/5.
1183 <s> or <strike> for strikethrough
1185 <strike>strike</strike>
1189 <p><strike>strike</strike>
1197 Text-level semantic html elements in wikitext
1200 <strong>text</strong>
1216 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1223 <strong>text</strong>
1239 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1247 # test cases taken from
1248 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1250 Ruby markup (W3C-style)
1252 ; Mono-ruby for individual base characters
1253 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1255 : <ruby>今日<rt>きょう</rt></ruby>
1257 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1259 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1261 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1268 <dl><dt> Mono-ruby for individual base characters</dt>
1269 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1270 <dt> Group ruby</dt>
1271 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1272 <dt> Jukugo ruby</dt>
1273 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1274 <dt> Inline ruby</dt>
1275 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1276 <dt> Double-sided ruby</dt>
1277 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1279 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1280 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1281 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1286 # The next two test different paths in the sanitizer.
1288 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1290 <blockquote|>a</blockquote>
1292 <b→> doesn't terminate </b→>
1294 <bä> doesn't terminate </bä>
1296 <boo> doesn't terminate </boo>
1298 <s.foo> doesn't terminate </s.foo>
1302 <p><blockquote|>a</blockquote>
1303 </p><p><b→> doesn't terminate </b→>
1304 </p><p><bä> doesn't terminate </bä>
1305 </p><p><boo> doesn't terminate </boo>
1306 </p><p><s.foo> doesn't terminate </s.foo>
1307 </p><p><sub-ID#1>
1311 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1312 # If the non-word-character tag made it through the sanitizer, tidy
1313 # would munge it up.
1315 Non-word characters don't terminate tag names + tidy
1317 <blockquote|>a</blockquote>
1319 <b→> doesn't terminate </b→>
1321 <bä> doesn't terminate </bä>
1323 <boo> doesn't terminate </boo>
1325 <s.foo> doesn't terminate </s.foo>
1329 <p><blockquote|>a</p>
1330 <p><b→> doesn't terminate </b→></p>
1331 <p><bä> doesn't terminate </bä></p>
1332 <p><boo> doesn't terminate </boo></p>
1333 <p><s.foo> doesn't terminate </s.foo></p>
1334 <p><sub-ID#1></p>
1338 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1339 ### This checks that HTML5 tags (with non-word characters in the tag
1340 ### name) make it safely through the parser -- the Sanitizer will
1341 ### munge them later, as it should.
1344 Non-word characters are valid in extension tags (T19663)
1355 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1359 Isolated close tags should be treated as literal text (bug 52760)
1367 <p><s.foo>s</p>
1369 <p><s.foo>s</p>
1373 ### Special characters
1377 Bare pipe character (bug 52363)
1386 Bare pipe character from a template (bug 52363)
1395 ### <nowiki> test cases
1399 <nowiki> unordered list
1401 <nowiki>* This is not an unordered list item.</nowiki>
1403 <p>* This is not an unordered list item.
1406 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1412 <nowiki>Lorem ipsum dolor
1420 <p>Lorem ipsum dolor
1429 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1439 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1441 <nowiki><span class="error"></nowiki>
1443 <p><span class="error">
1450 :There is not nowiki.
1451 :There is <nowiki>nowiki</nowiki>.
1453 #There is not nowiki.
1454 #There is <nowiki>nowiki</nowiki>.
1456 *There is not nowiki.
1457 *There is <nowiki>nowiki</nowiki>.
1459 <dl><dd>There is not nowiki.</dd>
1460 <dd>There is nowiki.</dd></dl>
1461 <ol><li>There is not nowiki.</li>
1462 <li>There is nowiki.</li></ol>
1463 <ul><li>There is not nowiki.</li>
1464 <li>There is nowiki.</li></ul>
1467 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1468 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1470 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1471 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1473 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1474 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1478 Entities inside <nowiki>
1480 <nowiki><</nowiki>
1487 Entities inside template parameters
1493 <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>
1497 Properly escape nowiki when combined with other wiki markup
1501 <p>* </nowiki> tag</p>
1503 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1507 T93824: Put escaped HTML tags inside nowiki
1511 <p><h2>foo</h2></p>
1513 <nowiki><h2>foo</h2></nowiki>
1517 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1521 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1522 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1523 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1525 This text: L'[[Foo]]
1526 This text: L<nowiki>''</nowiki>[[Foo]]
1527 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1530 # This test fails because wikitext whitespace is not normalized before comparing.
1532 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1536 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1539 This text : L<nowiki>''</nowiki>[[Foo]]
1542 # This test and the next one are html2wt only as they test that incorrect wikitext
1543 # passed in template arguments gets escaped or wrapped in nowikis where required.
1545 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1549 <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>
1550 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1552 {{echo|foo{{!}}bar}}
1553 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1557 T53961: Output correct nowikis in template arguments
1561 <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>
1562 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1563 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1564 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1565 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1568 {{echo|<nowiki>a }} b</nowiki>}}
1569 {{echo|<nowiki>a [[ b</nowiki>}}
1570 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1571 {{echo|a <nowiki>}</nowiki>}}
1575 Cases where "!!" needs nowiki protection
1580 <tr><th>this needs protection !! here</th></tr>
1584 <tr><th>this does not need
1585 protection !! here</th></tr>
1589 !<nowiki>this needs protection !! here</nowiki>
1602 Comments and Indent-Pre
1604 <!-- comment 1 --> asdf
1606 <!-- comment 1 --> asdf
1609 <!-- comment 1 --> asdf
1610 <!-- comment 2 -->xyz
1612 <!-- comment 1 --> asdf
1613 <!-- comment 2 --> xyz
1669 asdf<!-- comment 1 -->jkl
1679 <!-- foo --> b <!-- bar -->
1693 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1699 Comment semantics and delimiters
1701 <!-- --><!----><!-----><!------>
1705 <!-- --><!----><!-----><!------>
1709 Comment semantics and delimiters, redux
1711 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1712 -- foo -- funky huh? ... -->
1716 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1717 -- foo -- funky huh? ... -->
1721 Comment semantics and delimiters: directors cut
1723 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1724 everything starting with < followed by !-- until the first -- and > we see,
1725 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1731 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1732 everything starting with < followed by !-- until the first -- and > we see,
1733 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1738 Comment semantics: nesting
1740 <!--<!-- no, we're not going to do anything fancy here -->-->
1745 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1748 # Parsoid closes the unclosed comment, even if it means a slight
1751 Comment semantics: unclosed comment at end
1753 parsoid=wt2html,html2html
1755 <!--This comment will run out to the end of the document
1759 <!--This comment will run out to the end of the document-->
1763 Comment semantics: normalize comments to play nice with XML and browsers
1765 <!-- Browsers --!> think this is closed -->
1766 <!--> This would normally be text -->
1767 <!---> As would this -->
1768 <!-- XML doesn't like trailing dashes -------->
1769 <!-- Nor doubled hyphens -- anywhere in the data -->
1770 But this is not a comment.
1772 <p>But this is not a comment.
1775 <!-- Browsers --!> think this is closed -->
1776 <!--> This would normally be text -->
1777 <!---> As would this -->
1778 <!-- XML doesn't like trailing dashes -------->
1779 <!-- Nor doubled hyphens -- anywhere in the data -->
1780 <p>But this is not a comment.</p>
1784 Comment semantics: round-trip even text which contains encoded -->
1786 <!-- hello & goodbye - > --> --&gt; --&xx -->
1788 <!-- hello & goodbye - > --> --&gt; --&xx -->
1792 Comment in template title
1801 Comment on its own line post-expand
1813 Comment on its own line post-expand with non-significant whitespace
1825 Multiple comments should still parse as SOL-transparent
1827 parsoid=wt2html,wt2wt
1830 <!--c2--><!--c3--><!--c4-->*b
1839 <!--c2--><!--c3--><!--c4-->
1846 ### paragraph wrapping tests
1861 Block tag on one line (<div>)
1877 Block tag on one line (<blockquote>)
1879 a <blockquote>foo</blockquote>
1883 a <blockquote>foo</blockquote>
1895 Block tag on both lines (<div>)
1912 Block tag on both lines (<blockquote>)
1914 a <blockquote>foo</blockquote>
1916 b <blockquote>foo</blockquote>
1918 a <blockquote>foo</blockquote>
1919 b <blockquote>foo</blockquote>
1933 Multiple lines without block tags
1957 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1958 # So, we have a separate section for Parsoid. We don't want
1959 # to mimic this stripping behavior in Parsoid. It affects
1960 # editing experience and also requires us to maintain additional
1963 Empty lines between lines with block tags
2001 <div data-parsoid='{"stx":"html"}'></div>
2004 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2007 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2009 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2012 <div data-parsoid='{"stx":"html"}'>e</div>
2015 ## PHP parser emits output which is broken
2017 Unclosed HTML p-tags should be handled properly
2030 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2035 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2036 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2039 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2043 a [[Category:A1]] [[Category:A2]]
2048 <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"/>
2052 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2058 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2062 ### Preformatted text
2071 And a [[Main Page|link]]
2077 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2082 Tabs don't trigger preformatted text
2086 This is preformatted text.
2092 <pre>This is preformatted text.
2097 preformatted text.</p>
2098 <pre>This is preformatted text.
2103 Space before tab needs nowiki pre protection
2109 <nowiki> </nowiki> a
2113 Ident preformatting with inline content
2124 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2141 Regression with preformatted in <center>
2155 Bug 52763: Preformatted in <blockquote>
2161 indented cell (no pre-wrapping!)
2171 <p> indented cell (no pre-wrapping!)
2179 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2196 Bug 15491: <ins>/<del> in blockquote
2199 Foo <del>bar</del> <ins>baz</ins> quux
2203 <p>Foo <del>bar</del> <ins>baz</ins> quux
2209 # Note that the p-wrapping is newline sensitive, which could be
2210 # considered a bug: tidy will wrap only the 'Foo' in the example
2211 # below in a <p> tag. (see comment 23-25 of bug #6200)
2213 Bug 15491: <ins>/<del> in blockquote (2)
2215 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2218 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2224 <del>bar</del> <ins>baz</ins> quux</blockquote>
2228 <pre> with attributes (bug 3202)
2230 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2232 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2237 <pre> with width attribute (bug 3202)
2239 <pre width="8">Narrow screen goodies</pre>
2241 <pre width="8">Narrow screen goodies</pre>
2246 <pre> with forbidden attribute (bug 3202)
2248 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2250 <pre width="8">Narrow screen goodies</pre>
2255 Entities inside <pre>
2264 <pre> with forbidden attribute values (bug 3202)
2266 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2268 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2273 <nowiki> inside <pre> (bug 13238)
2281 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2289 <pre><nowiki>Foo</nowiki></pre>
2294 <nowiki> inside of #tag:pre
2296 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2298 <pre>Foo →bar</pre>
2301 <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>
2305 <nowiki> and <pre> preference (first one wins)
2334 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2336 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2339 <p><span typeof="mw:Nowiki">
2348 </pre> inside nowiki
2350 <nowiki></pre></nowiki>
2356 # Parsoid doesn't strip empty tags, like Tidy does.
2358 Empty pre; pre inside other HTML tags (bug 54946)
2360 parsoid=wt2html,wt2wt
2391 HTML pre followed by indent-pre
2401 # Note that tidy removes the empty <p> tags from the start and end.
2402 # Parsoid does not, by design.
2406 <p><pre>foo</pre></p>
2412 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2416 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2424 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2434 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2446 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2467 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2471 {{echo| foo}}{{echo| bar}}
2476 {{echo|<!--cmt--> foo}}
2478 <!--cmt-->{{echo| foo}}
2480 {{echo|{{echo| }}bar}}
2498 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2535 Pres with newline attributes
2540 <pre class="one two">hi</pre>
2544 two" data-parsoid='{"stx":"html"}'>hi</pre>
2548 Things that look like <pre> tags aren't treated as such
2550 Barack Obama <President> of the United States
2551 <President></President>
2553 <p>Barack Obama <President> of the United States
2554 <President></President>
2559 Handle broken pre-like tags (bug 64025)
2563 {{echo|<pre <pre>x</pre>}}
2565 <table><pre </table>
2568 <table><pre </table>
2576 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2585 Parsoid: handle pre with space after attribute
2589 <pre style="width:50%;" >{{echo|foo}}</pre>
2591 <pre style="width:50%;">{{echo|foo}}</pre>
2594 <pre style="width:50%;">{{echo|foo}}</pre>
2597 # TODO / maybe: fix wt2wt for this
2599 Parsoid: Don't paragraph-wrap fosterable content
2625 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2653 #--------------------------------------------------------------------
2654 # Transclusion parameter whitespace stripping tests
2655 # Behavior is different for positional and named parameters
2656 #--------------------------------------------------------------------
2658 Templates: Strip leading and trailing whitespace from named-param values
2662 {{echo|1= {{echo|b}} }}
2675 <ul><li> d</li></ul>
2680 Templates: Don't strip whitespace from positional-param values
2684 {{echo|{{echo|b}} }}
2716 <ul><li> f</li></ul>
2724 Templates: Handle empty comment-and-ws-only lines correctly
2727 <!--should be ignored-->
2728 <!--should be ignored as well-->
2735 <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>
2739 Templates: Handle comments in the target
2742 <!-- should be ignored -->
2746 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2749 {{echo<!-- should be ignored -->
2752 {{echo<!-- should be ignored -->|foo}}
2754 {{<!-- should be ignored -->echo|foo}}
2763 <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>
2765 <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>
2767 <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>
2769 <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>
2771 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2775 Templates: Handle comments in parameter names (bug 67657)
2778 <!-- should be ignored -->
2782 <!-- should be ignored -->
2785 {{echo|1<!-- should be ignored -->=foo}}
2787 {{echo|<!-- should be ignored -->1=foo}}
2795 <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>
2797 <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>
2799 <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>
2801 <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>
2805 Templates: Other wikitext in parameter names (bug 67657)
2812 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2815 #--------------------------------------------------------------------
2816 # Transclusion parameter escaping tests
2817 #--------------------------------------------------------------------
2819 Templates: Parsoid parameter escaping test 1
2821 {{echo|[foo]|{{echo|[bar]}}}}
2825 <p about="#mwt1" typeof="mw:Transclusion"
2826 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2830 Parsoid: Pipes in external links in template parameter
2832 {{echo|[{{echo|http://example.com}} link]}}
2834 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2836 <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>
2840 Parsoid: pipe in transclusion parameter
2842 {{echo|http://foo.com/a|b}}
2844 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2846 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2847 typeof="mw:Transclusion"
2848 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2852 Parsoid: Pipe in external link target and content in template parameter
2854 parsoid=html2wt,wt2wt
2856 {{echo|[http://foo.com/a|b a|b]}}
2858 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2860 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2861 typeof="mw:Transclusion"
2862 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2863 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2867 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2871 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2873 <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>
2877 Templates: Don't escape already nowiki-escaped text in template parameters
2879 parsoid=html2wt,wt2wt
2881 {{echo|foo<nowiki>|</nowiki>bar}}
2882 {{echo|<nowiki><div></nowiki>}}
2883 {{echo|<nowiki></nowiki>}}
2885 <p>foo|bar <div></p>
2887 <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>
2888 <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>
2889 <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>
2895 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2897 parsoid=html2wt,wt2wt
2899 {{echo|{{echo|1=bar}}}}
2903 <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>
2908 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2914 <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>
2919 Templates: Preserve blank parameter names
2925 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2929 Templates: Preserve blank parameter names in other positions
2931 {{blank_param|bar|=foo}}
2935 <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
2940 ### Parsoid-centric tests for testing RT edge cases for pre
2944 1a. Indent-Pre and Comments
2957 1b. Indent-Pre and Comments
2970 1c. Indent-Pre and Comments
2983 1d. Indent-Pre and Comments
2984 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2997 2a. Indent-Pre and tables
3018 2b. Indent-Pre and tables
3034 2c. Indent-Pre and tables (bug 42252)
3051 2d. Indent-Pre and tables
3068 <tbody><tr><td> b</td></tr>
3073 2e. Indent-Pre and table-line syntax
3086 2f. Indent-pre started by table-line syntax
3105 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3110 Text that should be rendered preformatted
3118 <pre>Text that should be rendered preformatted
3127 3a. Indent-Pre and block tags (single-line html)
3131 c <blockquote> foo </blockquote>
3136 c <blockquote> foo </blockquote>
3137 <pre><span> foo </span>
3140 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3141 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3142 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3143 <pre><span> foo </span>
3160 3b. Indent-Pre and block tags (multi-line html)
3165 <pre>a <span>foo</span>
3170 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3171 b <div data-parsoid='{"stx":"html"}'> foo </div>
3181 3c. Indent-Pre and block tags (pre-content on separate line)
3245 4. Indent-Pre and extension tags
3256 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3260 Render paragraphs when indent-pre is suppressed in blocklevels
3277 4. Multiple spaces at start-of-line
3295 ## NOTE: the leading white-space chars on empty line are significant
3297 5a. White-space in indent-pre
3309 ## NOTE: the leading white-space chars on empty line are significant
3311 5b. White-space in indent-pre
3330 5c. White-space in indent-pre
3343 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3366 7a. Indent-pre and category links
3368 parsoid=wt2html,wt2wt
3370 [[Category:foo]] <!-- No pre-wrapping -->
3371 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3374 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3375 <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 -->
3378 ## We used to, but no longer wt2wt this test since the default serializer
3379 ## will normalize all categories to serialize on their own line.
3380 ## This wikitext usage is going to be fairly uncommon in production and
3381 ## selser will take care of preserving formatting in those scenarios.
3383 7b. Indent-pre and category links
3388 [[Category:foo]] {{echo|b}}
3390 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3391 <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>
3395 Indent-Pre: Newlines in comments shouldn't affect sol state
3409 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3413 HTML-pre: 1. embedded newlines
3448 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3450 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3454 <pre data-parsoid='{"stx":"html"}'>
3459 <pre data-parsoid='{"stx":"html"}'>
3467 HTML-pre: big spaces
3503 <pre data-parsoid='{"stx":"html"}'>
3522 HTML-pre: 2: indented text
3535 HTML-pre: 3: other wikitext
3554 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3563 ### Definition lists
3570 <dl><dt> name </dt>
3571 <dd> Definition</dd></dl>
3576 Definition list for indentation only
3580 <dl><dd> Indented text</dd></dl>
3585 Definition list with no space
3590 <dd>Definition</dd></dl>
3595 Definition list with URL link
3597 ; http://example.com/ : definition
3599 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3600 <dd> definition</dd></dl>
3605 Definition list with bracketed URL link
3607 ;[http://www.example.com/ Example]:Something about it
3609 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3610 <dd>Something about it</dd></dl>
3615 Definition list with wikilink containing colon
3617 ; [[Help:FAQ]]: The least-read page on Wikipedia
3619 <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>
3620 <dd> The least-read page on Wikipedia</dd></dl>
3624 # At Brion's and JeLuF's insistence... :)
3626 Definition list with news link containing colon
3628 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3630 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3631 <dd> This isn't even a real newsgroup!</dd></dl>
3634 <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>
3638 Malformed definition list with colon
3640 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3642 <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>
3647 Definition lists: colon in external link text
3649 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3651 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3652 <dd> OK, I made that up</dd></dl>
3657 Definition lists: colon in HTML attribute
3659 ;<b style="display: inline">bold</b>
3661 <dl><dt><b style="display: inline">bold</b></dt></dl>
3666 Definition lists: self-closed tag
3668 ;one<br/>two : two-line fun
3670 <dl><dt>one<br />two </dt>
3671 <dd> two-line fun</dd></dl>
3676 Bug 11748: Literal closing tags
3680 <dd>test test test test test</dd>
3682 <dd>test test test test test</dd>
3687 <dd>test test test test test</dd>
3689 <dd>test test test test test</dd>
3695 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3698 ; term : description
3703 <dl><dt> term </dt>
3704 <dd> description</dd></dl>
3705 <ul><li> unordered</li></ul>
3711 Definition list with empty definition and following paragraph
3723 Nested definition lists using html syntax
3736 Definition Lists: No nesting: Multiple dd's
3749 Definition Lists: Indentation: Regular
3757 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3762 Definition Lists: Indentation: Missing 1st level
3768 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3773 Definition Lists: Indentation: Multi-level indent
3777 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3782 Definition Lists: Hacky use to indent tables
3789 should be left alone
3791 <dl><dd><dl><dd><table>
3796 </td></tr></table></dd></dl></dd></dl>
3798 should be left alone
3803 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3811 should be left alone
3814 <dl><dd><dl><dd><table><tr>
3817 </tr></table><!-- bar --></dd></dl></dd></dl>
3819 should be left alone</p>
3823 Definition Lists: Hacky use to indent tables, with comment before table
3829 <dl><dd><dl><dd><!-- foo --><table><tr>
3831 </tr></table></dd></dl></dd></dl>
3834 # The trailing whitespace in this test is to catch a regression in
3835 # Parsoid after T54473.
3837 Definition Lists: Hacky use to indent tables (WS-insensitive)
3846 </td></tr></table></dd></dl>
3850 <tbody><tr><td>a</td></tr>
3851 </tbody></table> </dd></dl>
3854 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3855 ## as an empty dt item. It also ignores all but the last ";" when followed
3856 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3857 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3860 ## Ex: ";;t2 ::d2" is transformed into:
3872 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3873 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3884 ## All Parsoid only definition list tests have this difference.
3886 ## See also: https://phabricator.wikimedia.org/T8569
3887 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3890 Table / list interaction: indented table with lists in table contents
3905 <ul><li> b</li></ul>
3909 <ul><li> d</li></ul>
3910 </td></tr></table></dd></dl>
3915 Table / list interaction: lists nested in tables nested in indented lists
3938 </td></tr></table></dd></dl>
3945 Definition Lists: Nesting: Multi-level (Parsoid only)
3975 Definition Lists: Nesting: Test 2 (Parsoid only)
4002 Definition Lists: Nesting: Test 3 (Parsoid only)
4045 Definition Lists: Nesting: Test 4
4050 <dl><dd><dl><dd><dl><dt>t3</dt>
4051 <dd>d3</dd></dl></dd></dl></dd></dl>
4056 ## The Parsoid team believes the following three test exposes a
4057 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4058 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4059 ## It also exposes a "misfeature" in tidy, which doesn't like
4060 ## <dl> tags with a single <dt> child; it converts the <dt> into
4061 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4063 Definition Lists: Mixed Lists: Test 1
4069 <dl><dd><dl><dt><ul><li> foo</li>
4070 <li> bar</li></ul></dt></dl>
4071 <dl><dt> baz</dt></dl></dd></dl>
4106 Definition Lists: Mixed Lists: Test 2
4111 <ul><li><dl><dd> d1</dd>
4112 <dd> d2</dd></dl></li></ul>
4118 Definition Lists: Mixed Lists: Test 3
4123 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4124 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4130 Definition Lists: Mixed Lists: Test 4
4135 <ul><li><dl><dt>d1 </dt>
4138 <dd>d4</dd></dl></li></ul>
4144 Definition Lists: Mixed Lists: Test 5
4150 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4156 Definition Lists: Mixed Lists: Test 6
4161 <ol><li><ul><li><dl><dd>d1
4162 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4168 Definition Lists: Mixed Lists: Test 7
4173 <dl><dd><ul><li> d1</li>
4174 <li> d2</li></ul></dd></dl>
4180 Definition Lists: Mixed Lists: Test 8
4185 <dl><dd><ul><li> d1</li></ul>
4186 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4192 Definition Lists: Mixed Lists: Test 9
4196 <ul><li><dl><dt>foo </dt>
4197 <dd>bar</dd></dl></li></ul>
4203 Definition Lists: Mixed Lists: Test 10
4207 <ul><li><ol><li><dl><dt>foo </dt>
4208 <dd>bar</dd></dl></li></ol></li></ul>
4212 # The Parsoid team disagrees with the PHP parser's seemingly-random
4213 # rules regarding dd/dt on the next two tests. Parsoid is more
4214 # consistent, and recognizes the shared nesting and keeps the
4215 # still-open tags around until the nesting is complete.
4216 # (And tidy again converts <dt> to <dd> before 'bar'.)
4219 Definition Lists: Mixed Lists: Test 11
4224 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4225 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4226 <dl><dt>boo </dt>
4227 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4282 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4283 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4287 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4288 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4297 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4299 # * The test is wrong, there are two colons where there should be :;
4300 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4302 Definition Lists: Weird Ones: Test 1
4304 *#;*::;; foo : bar (who uses this?)
4306 <ul><li><ol><li><dl><dt> foo </dt>
4307 <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>
4326 <dt>bar (who uses this?)</dt>
4358 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4359 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4371 Definition Lists: colons occurring in tags
4389 <dt><span>a:b</span></dt>
4416 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4418 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4419 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4420 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4421 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4423 <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>
4424 <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>
4425 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4429 Definition Lists: colons and tables 1
4441 </td></tr></table></dd></dl>
4445 </td></tr></table></dd></dl>
4449 # Parsoid's output (as documented below) differs from php's in this case.
4450 # This is probably a bug. If we fixup parsoid to match php's output, the
4451 # above test should pass and the below test case can be removed. It is
4452 # unclear which output is more desirable.
4455 Definition Lists: colons and tables 2
4467 </td></tr></table></dd>
4471 </td></tr></table></dd></dl>
4475 Definition Lists: template interaction
4477 ::{{definition_list}}
4480 ::{{definition_list}}
4485 <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">
4486 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4488 <dl><dd data-parsoid='{}'>one
4489 <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">
4490 </span><dd about="#mwt2">two
4492 <dd>three</dd></dl></dd>
4493 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4501 External links: non-bracketed
4503 Non-bracketed: http://example.com
4505 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4509 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4511 External links: numbered
4513 Numbered: [http://example.com]
4514 Numbered: [http://example.net]
4515 Numbered: [http://example.com]
4517 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4518 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4519 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4522 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4523 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4524 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4528 External links: specified text
4530 Specified text: [http://example.com link]
4532 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4537 External links: trail
4539 Linktrails should not work for external links: [http://example.com link]s
4541 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4546 External links: dollar sign in URL
4548 http://example.com/1$2345
4550 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4554 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4556 External links: dollar sign in URL (autonumber)
4558 [http://example.com/1$2345]
4560 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4563 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4567 External links: open square bracket forbidden in URL (bug 4377)
4569 parsoid=wt2html,wt2wt,html2html
4571 http://example.com/1[2345
4573 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4576 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4580 External links: open square bracket forbidden in URL (named) (bug 4377)
4582 parsoid=wt2html,html2html
4584 [http://example.com/1[2345]
4586 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4589 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4592 # parsoid adds a space before the link name
4594 External links: open square bracket forbidden in URL (named) (bug 4377)
4597 [http://example.com/1 [2345]
4599 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4604 External links: nowiki in URL link text (bug 6230)
4606 [http://example.com/ <nowiki>''example site''</nowiki>]
4608 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4613 External links: newline forbidden in text (bug 6230 regression check)
4615 [http://example.com/ first
4618 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4624 External links: Pipe char between url and text
4626 [http://example.com | link]
4628 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4633 External links: protocol-relative URL in brackets
4635 [//example.com/ Test]
4637 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4641 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4643 External links: protocol-relative URL in brackets without text
4647 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4650 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4654 External links: protocol-relative URL in free text is left alone
4658 <p>//example.com/Foo
4663 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4665 foo//example.com/Foo
4667 <p>foo//example.com/Foo
4672 External links: with no contents
4674 [http://en.wikipedia.org/wiki/Foo]
4676 [[wikipedia:Foo|Bar]]
4678 [[wikipedia:Foo|<span>Bar</span>]]
4680 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4681 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4682 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4685 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4686 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4687 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4691 External links: Free with trailing punctuation
4701 http://example.com/url_with_(brackets)
4702 (http://example.com/url_without_brackets)
4703 http://example.com/url_with_entity&
4704 http://example.com/url_with_entity&
4705 http://example.com/url_with_entity&
4706 http://example.com/url_with_entity
4707 http://example.com/url_with_entity 
4708 http://example.com/url_with_entity 
4709 http://example.com/url_with_entity<
4710 http://example.com/url_with_entity<
4711 http://example.com/url_with_entity<
4713 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4714 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4715 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4716 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4717 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4718 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4719 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4720 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4721 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4722 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4723 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4724 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4725 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4726 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4727 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4728 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4729 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4730 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4731 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4734 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4735 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4736 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4737 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4738 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4739 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4740 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4741 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4742 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4743 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4744 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4745 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4746 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4747 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4748 <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>
4749 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4750 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4751 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4752 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4756 External links: tricky Parsoid html2html case
4758 parsoid=wt2html,wt2wt,html2html
4760 http://example.com/url_with_entity&amp;
4762 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4765 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4769 External links: Free with trailing quotes (T113666)
4771 '''News:''' Stuff here
4775 <p><b>News:</b> Stuff here
4776 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4779 <p><b>News:</b> Stuff here</p>
4780 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4784 External links: Lone protocols are never linked (T105697)
4803 External links: No preceding word characters allowed (bug 65278)
4805 NOPEhttp://example.com
4806 N0http://example.com
4807 ok:http://example.com
4808 ok-http://example.com
4810 <p>NOPEhttp://example.com
4811 N0http://example.com
4812 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4813 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4818 External links: nofollow domain exception
4820 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4822 <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>.
4829 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4831 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4836 External image from https
4838 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4840 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4845 External image (when not allowed)
4847 wgAllowExternalImages=0
4849 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4851 <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>
4856 Link to non-http image, no img tag
4858 Link to non-http image, no img tag: ftp://example.com/test.jpg
4860 <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>
4865 External links: terminating separator
4867 Terminating separator: http://example.com/thing,
4869 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4874 External links: intervening separator
4876 Intervening separator: http://example.com/1,2,3
4878 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4883 External links: old bug with URL in query
4885 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4887 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4892 External links: old URL-in-URL bug, mixed protocols
4894 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4896 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4900 # Since Parsoid is starting to emit canonical wikitext for links,
4901 # [http://example.com http://example.com] will not RT back to that
4904 External links: URL in text
4908 URL in text: [http://example.com http://example.com]
4910 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4913 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4917 External links: Clickable images
4919 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4921 <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>
4924 <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>
4928 External links: raw ampersand
4930 Old & use: http://x&y
4932 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4937 External links: encoded ampersand
4939 Old & use: http://x&y
4941 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4944 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4948 External links: encoded equals (bug 6102)
4950 http://example.com/?foo=bar
4952 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4955 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4959 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4960 ## does it number them. As discussed in bug 53505, we can identify
4961 ## autonumbered links via CSS.
4965 External links: [raw ampersand]
4967 Old & use: [http://x&y]
4969 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4972 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4975 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4976 # mode will return the [raw ampersand] wikitext
4978 External links: [encoded ampersand]
4980 parsoid=wt2html,wt2wt,html2html
4982 Old & use: [http://x&y]
4984 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4987 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4991 External links: [raw equals]
4993 [http://example.com/?foo=bar]
4995 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4998 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5001 # note that parsoid html is identical to [raw equals] case; so html2wt
5002 # mode will return the [raw equals] wikitext
5004 External links: [encoded equals] (bug 6102)
5006 parsoid=wt2html,wt2wt,html2html
5008 [http://example.com/?foo=bar]
5010 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5013 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5016 # xxx parsoid strips the IDN character, so the round-trip tests will
5017 # obviously fail and are disabled. --cscott
5019 External links: [IDN ignored character reference in hostname; strip it right off]
5021 parsoid=wt2html,wt2wt,html2html
5023 [http://e‌xample.com/]
5025 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5028 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5031 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5032 # Where an external link could easily circumvent the sanitization of the text of
5033 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5034 # test demands a higher standard. That's a bit strange.
5038 # http://example.com -> [http://example.com|http://example.com]
5039 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5041 # The first example is sanitized, but the second is not. Any security benefits
5042 # from this production are trivial to circumvent. Either remove this test and
5043 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5044 # the test accordingly.
5048 # xxx parsoid strips the IDN character, so the round-trip tests will
5049 # obviously fail and are disabled. --cscott
5051 External links: IDN ignored character reference in hostname; strip it right off
5053 parsoid=wt2html,html2html
5055 http://e‌xample.com/
5057 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5060 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5064 External links: www.jpeg.org (bug 554)
5068 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5072 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5074 External links: URL within URL (original bug 2)
5076 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5078 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5081 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5085 BUG 361: URL inside bracketed URL
5087 [http://www.example.com/foo http://www.example.com/bar]
5089 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5094 BUG 361: URL within URL, not bracketed
5096 http://www.example.com/foo?=http://www.example.com/bar
5098 <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>
5103 BUG 289: ">"-token in URL-tail
5105 http://www.example.com/<hello>
5107 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5112 BUG 289: literal ">"-token in URL-tail
5114 http://www.example.com/<b>html</b>
5116 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5119 <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>
5123 BUG 289: ">"-token in bracketed URL
5125 [http://www.example.com/<hello> stuff]
5127 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5132 BUG 289: literal ">"-token in bracketed URL
5134 [http://www.example.com/<b>html</b> stuff]
5136 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5141 BUG 289: literal double quote at end of URL
5143 http://www.example.com/"hello"
5145 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5150 BUG 289: literal double quote in bracketed URL
5152 [http://www.example.com/"hello" stuff]
5154 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5159 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5161 [http://www.example.com test]
5163 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5168 External links: link text with spaces
5170 [http://www.example.com a b c]
5171 [http://www.example.com ''a'' ''b'']
5173 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5174 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5179 External links: wiki links within external link (Bug 3695)
5181 parsoid=wt2html,html2html
5183 [http://example.com [[wikilink]] embedded in ext link]
5185 <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>
5188 <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>
5192 BUG 787: Links with one slash after the url protocol are invalid
5196 [http:/example.com title]
5198 <p>http:/example.com
5199 </p><p>[http:/example.com title]
5204 Bracketed external links with template-generated invalid target
5206 [{{echo|http:/example.com}} title]
5208 <p>[http:/example.com title]
5213 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5215 ''[http://example.com text'']
5216 [http://example.com '''text]'''
5217 ''Something [http://example.com in italic'']
5218 ''Something [http://example.com mixed''''', even bold]'''
5219 '''''Now [http://example.com both''''']
5221 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5222 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5223 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5224 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5225 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5231 Bug 4781: %26 in URL
5233 http://www.example.com/?title=AT%26T
5235 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5238 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5241 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5242 # % is actually legal in HTML5. Any change in output would need testing though.
5244 Bug 4781, 5267: %25 in URL
5246 http://www.example.com/?title=100%25_Bran
5248 <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>
5251 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5255 Bug 4781, 5267: %28, %29 in URL
5257 http://www.example.com/?title=Ben-Hur_%281959_film%29
5259 <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>
5262 <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>
5267 Bug 4781: %26 in autonumber URL
5269 [http://www.example.com/?title=AT%26T]
5271 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5274 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5278 Bug 4781, 5267: %26 in autonumber URL
5280 [http://www.example.com/?title=100%25_Bran]
5282 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5285 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5289 Bug 4781, 5267: %28, %29 in autonumber URL
5291 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5293 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5296 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5301 Bug 4781: %26 in bracketed URL
5303 [http://www.example.com/?title=AT%26T link]
5305 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5308 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5312 Bug 4781, 5267: %25 in bracketed URL
5314 [http://www.example.com/?title=100%25_Bran link]
5316 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5321 Bug 4781, 5267: %28, %29 in bracketed URL
5323 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5325 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5328 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5332 External link containing a period in the anchor. (bug 63947)
5334 [//foo.org/bar#baz. bang]
5336 [//foo.org/bar. bang]
5338 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5339 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5342 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5343 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5347 External link containing a single quote. (bug 63947)
5351 [//foo.org/bar'baz bang]
5353 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5354 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5357 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5358 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5362 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5364 Some [http://example.com/ pretty ''italics'' and stuff]!
5366 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5371 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5373 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5375 <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>
5380 External link containing double-single-quotes with no space separating the url from text in italics
5382 [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]].]
5384 <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>
5387 <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>
5389 <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>
5393 External link with comments in link text
5395 [http://www.google.com Google <!-- comment -->]
5397 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5400 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5404 External link to bare IPv4 address
5406 [http://192.168.0.1 Link]
5408 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5411 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5415 URL-encoding in URL functions (single parameter)
5417 {{localurl:Some page|amp=&}}
5419 <p>/index.php?title=Some_page&amp=&
5424 URL-encoding in URL functions (multiple parameters)
5426 {{localurl:Some page|q=?&=&}}
5428 <p>/index.php?title=Some_page&q=?&amp=&
5435 http://example.com/index.php?foozoid%5B%5D=bar
5437 http://example.com/index.php?foozoid[]=bar
5439 <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>
5440 </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>
5443 <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>
5445 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5449 IPv6 urls, autolink format (T23261)
5451 http://[2404:130:0:1000::187:2]/index.php
5453 Examples from RFC 2373, section 2.2:
5454 * http://[1080::8:800:200C:417A]/unicast
5455 * http://[FF01::101]/multicast
5456 * http://[::1]/loopback
5457 * http://[::]/unspecified
5458 * http://[::13.1.68.3]/ipv4compat
5459 * http://[::FFFF:129.144.52.38]/ipv4compat
5461 Examples from RFC 2732, section 2:
5462 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5463 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5464 * http://[3ffe:2a00:100:7031::1]
5465 * http://[1080::8:800:200C:417A]/foo
5466 * http://[::192.9.5.5]/ipng
5467 * http://[::FFFF:129.144.52.38]:80/index.html
5468 * http://[2010:836B:4179::836B:4179]
5471 <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>
5472 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5474 <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>
5475 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5476 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5477 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5478 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5479 <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>
5480 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5482 <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>
5483 <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>
5484 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5485 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5486 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5487 <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>
5488 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5491 <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>
5493 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5494 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5495 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5496 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5497 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5498 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5499 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5501 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5502 <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>
5503 <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>
5504 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5505 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5506 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5507 <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>
5508 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5512 IPv6 urls, bracketed format (T23261)
5514 [http://[2404:130:0:1000::187:2]/index.php test]
5516 Examples from RFC 2373, section 2.2:
5517 * [http://[1080::8:800:200C:417A] unicast]
5518 * [http://[FF01::101] multicast]
5519 * [http://[::1]/ loopback]
5520 * [http://[::] unspecified]
5521 * [http://[::13.1.68.3] ipv4compat]
5522 * [http://[::FFFF:129.144.52.38] ipv4compat]
5524 Examples from RFC 2732, section 2:
5525 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5526 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5527 * [http://[3ffe:2a00:100:7031::1] 3]
5528 * [http://[1080::8:800:200C:417A]/foo 4]
5529 * [http://[::192.9.5.5]/ipng 5]
5530 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5531 * [http://[2010:836B:4179::836B:4179] 7]
5534 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5535 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5537 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5538 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5539 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5540 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5541 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5542 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5543 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5545 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5546 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5547 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5548 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5549 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5550 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5551 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5554 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5556 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5557 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5558 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5559 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5560 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5561 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5562 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5564 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5565 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5566 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5567 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5568 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5569 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5570 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5571 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5575 Non-extlinks in brackets
5584 [{{echo|foo}} ''bar'']
5585 [{{echo|foo}}l's] errand
5586 [{{echo|foo}}l's errand]
5588 [url=http://example.com]
5589 [http:// bare protocols don't count]
5602 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5603 [http:// bare protocols don't count]
5611 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5612 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5613 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5614 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5615 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5616 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5617 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5618 [http:// bare protocols don't count]</p>
5622 Percent encoding in external links
5624 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5626 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5629 <p><a rel="mw:ExtLink"
5630 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5634 Use url link syntax for links where the content is equal the link target
5638 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5641 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5645 Parenthesis in external links, especially URL links
5649 http://example.com/test)
5651 http://example.com/(test)
5653 http://example.com/((test)
5655 (http://example.com/(test))
5657 (http://example.com/(test)))))
5659 http://example.com/a)b
5661 [http://example.com) foo]
5663 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5664 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5665 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5666 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5667 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5668 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5669 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5670 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5673 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5674 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5675 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5676 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5677 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5678 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5679 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5680 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5684 Parenthesis in external links, w/ transclusion or comment
5686 (http://example.com/{{echo|hi}})
5688 (http://example.com<!-- hi -->)
5690 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5691 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5694 <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>
5696 <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>
5700 Serialize <a> tags with invalid link targets as plain text
5702 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5704 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5705 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5706 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5707 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5710 <nowiki>*</nowiki>text
5711 <nowiki>[[foo]]</nowiki>
5712 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5716 mw:ExtLink -vs- mw:WikiLink (T94723)
5720 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5721 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5722 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5723 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5725 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5726 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5731 [[wikipedia:Foo|Bar]]
5732 [[wikipedia:Foo|Bar]]
5734 [[wikipedia:European_Robin|European Robin]]
5735 [[wikipedia:European_Robin|European Robin]]
5739 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5743 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5745 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5756 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5758 Normal text. '''''Bold italic text.''''' Normal text.
5760 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5761 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5766 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5767 # parser strips. The wikitext contains just the first half of the bold
5770 Unclosed and unmatched quotes
5772 '''''Bold italic text '''with bold deactivated''' in between.'''''
5774 '''''Bold italic text ''with italic deactivated'' in between.'''''
5778 ..spanning two paragraphs (should not work).'''
5780 '''Bold tag left open
5782 ''Italic tag left open
5786 <!-- Unmatching number of opening, closing tags: -->
5787 '''This year''''s election ''should'' beat '''last year''''s.
5789 ''Tom'''s car is bigger than ''Susan'''s.
5791 Plain ''italic'''s plain
5793 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5794 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5795 </p><p><b>Bold text..</b>
5796 </p><p>..spanning two paragraphs (should not work).
5797 </p><p><b>Bold tag left open</b>
5798 </p><p><i>Italic tag left open</i>
5800 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5801 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5802 </p><p>Plain <i>italic'</i>s plain
5805 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5806 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5807 </p><p><b>Bold text..</b>
5808 </p><p>..spanning two paragraphs (should not work).<b></b>
5809 </p><p><b>Bold tag left open</b>
5810 </p><p><i>Italic tag left open</i>
5813 <!-- Unmatching number of opening, closing tags: -->
5814 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5815 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5816 </p><p>Plain <i>italic'</i>s plain
5823 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5826 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5827 # is the bare minimum required by the spec, see:
5828 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5829 # Parsoid team replies: empty table tags are legal in HTML5
5831 A table with no data.
5844 A table with stray table end tags on start tag line (wt2html)
5848 {|style="color: red;"|}
5850 {|style="color: red;" |}
5854 {|style="color: red;"|} id="foo"
5858 {|style="color: red;" |} id="foo"
5862 <table style="color: red;"></table>
5864 <table style="color: red;">
5870 <table style="color: red;" id="foo">
5876 <table style="color: red;" id="foo">
5885 A table with no data (take 2)
5893 # A table with nothing but a caption is invalid XHTML, we might want to render
5894 # this as <p>caption</p>
5895 # Parsoid team replies: table with only a caption is legal in HTML5
5897 A table with nothing but a caption
5905 </caption><tr><td></td></tr></table>
5908 <table><caption> caption</caption></table>
5912 A table with caption with default-spaced attributes and a table row
5915 |+ style="color: red;" | caption1
5921 <caption style="color: red;"> caption1
5930 A table with captions with non-default spaced attributes and a table row
5933 |+style="color: red;"|caption2
5934 |+ style="color: red;"| caption3
5940 <caption style="color: red;">caption2
5942 <caption style="color: red;"> caption3
5951 Table td-cell syntax variations
5955 | foo bar foo || baz
5956 | style='color:red;' | baz
5957 | style='color:red;' || baz
5964 <td> foo bar foo </td>
5967 <td style="color:red;"> baz
5969 <td> style='color:red;' </td>
5997 Simple table but with multiple dashes for row wikitext
6016 Multiplication table
6018 {| border="1" cellpadding="2"
6019 |+Multiplication table
6021 ! × !! 1 !! 2 !! 3
6039 <table border="1" cellpadding="2">
6040 <caption>Multiplication table
6087 Accept "||" in table headings
6102 Accept "!!" in table data
6116 <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>
6121 Accept "||" in indented table headings
6131 </th></tr></table></dd></dl>
6136 Accept "!!" in templates
6150 <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>
6154 Accept "!!" in table headings after newline
6171 <p>b!!c</p></th></tr>
6176 Accept "!!" in table data of mixed wikitext / html syntax
6180 <tr><td>b!!c</td></tr>
6193 <tbody><tr><th>a</th></tr>
6194 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6199 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6216 Accept "| !" at start of line in tables (ignore !-attribute)
6220 | !style="color:red" | bar
6232 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 +/-
6236 |style='color:red;'|+1
6237 |style='color:blue;'|-1
6249 <td style="color:red;">+1
6251 <td style="color:blue;">-1
6275 |rowspan=2| Cell 2, row 1 (and 2)
6286 <td rowspan="2"> Cell 2, row 1 (and 2)
6304 {| bgcolor=#ABCDEF border=2
6309 |the original table again
6317 <table bgcolor="#ABCDEF" border="2">
6325 <td>the original table again
6331 Invalid attributes in table cell (bug 1830)
6345 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6349 | title="foo<nowiki>|</nowiki>" |bar
6350 | title="foo<nowiki>|</nowiki>" bar
6357 <td title="foo|">bar
6359 <td> title="foo|" bar
6364 <tbody><tr><td title="foo">bar</td>
6365 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6366 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6370 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6371 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6372 # *2wt modes will fail.
6374 Table security: embedded pipes
6376 parsoid=wt2html,html2html
6379 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6383 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6384 <td>]" onmouseover="alert(document.cookie)">test
6392 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6396 Element attributes with double ! should not be broken up by <th>
6399 ! hi <div class="!!">ha</div> ho
6404 <th> hi <div class="!!">ha</div> ho
6409 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6414 ! and || in element attributes should not be parsed as <th>/<td>
6417 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6422 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6427 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6431 # FIXME: The output seems broken. Filed as T110268.
6433 ! and || in td attributes should not be parsed as <th>/<td>
6438 | style="color: red !important;" data-contrived="put this here ||" | foo
6443 <td> style="color: red !important;" data-contrived="put this here </td>
6449 <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>
6454 Break on | in element attribute in template
6456 parsoid=wt2html,html2html
6458 {{echo|1=<div class="hi|ho">ha</div>}}
6460 <p>ho">ha</div>
6463 <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>
6466 ## We don't support roundtripping of these attributes in Parsoid.
6467 ## Selective serialization takes care of preventing dirty diffs.
6468 ## But, on edits, we dirty-diff the invalid attribute text.
6470 Invalid text in table attributes should be discarded
6474 {| <span>boo</span> style='border:1px solid black'
6475 | <span>boo</span> style='color:blue' | 1
6476 |<span>boo</span> style='color:blue'| 2
6479 <table style="border:1px solid black">
6481 <td style="color:blue"> 1
6483 <td style="color:blue"> 2
6487 <table style="border:1px solid black">
6489 <td style="color:blue"> 1</td>
6490 <td style="color:blue"> 2</td>
6496 Invalid text in table attributes should be preserved by selective serializer
6499 "modes": ["selser"],
6501 ["td:first-child", "text", "abc"],
6502 ["td + td", "text", "xyz"]
6506 {| <span>boo</span> style='border:1px solid black'
6507 | <span>boo</span> style='color:blue' | 1
6508 |<span>boo</span> style='color:blue'| 2
6511 {| <span>boo</span> style='border:1px solid black'
6512 | <span>boo</span> style='color:blue' |abc
6513 |<span>boo</span> style='color:blue'|xyz
6518 1. Template-generated table cell attributes and cell content
6523 || {{table_attribs_5}}
6524 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6525 |align=center {{table_attribs}}
6526 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6531 <td style="color:red;">Foo
6533 <td style="color:red;">Foo
6535 <td> style="color:red;"</td>
6538 <td style="color:red;">Foo
6540 <td align="center" style="color:red;">Foo
6542 <td align="center" style="color:red;">Foo
6548 2. Template-generated table cell attributes and cell content
6551 |{{table_attribs_2}}
6556 <td style="color:red;">Foo
6564 <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>
6565 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6570 3. Template-generated table cell attributes and cell content
6573 !align=center {{table_header_cells}}
6575 |align=center {{table_cells}}
6580 <th align="center" style="color:red;">Foo</th>
6581 <th style="color:red;"><i>Bar</i></th>
6582 <th style="color:brown;"><i>Foo</i> and Baz
6585 <td align="center" style="color:red;">Foo</td>
6586 <td style="color:red;"><i>Bar</i></td>
6587 <td style="color:brown;"><i>Foo</i> and Baz
6592 <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>
6593 <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>
6598 4. Template-generated table cell attributes and cell content inside a templated table
6601 !align=center {{table_header_cells}}
6603 |align=center {{table_cells}}
6608 <th align="center" style="color:red;">Foo</th>
6609 <th style="color:red;"><i>Bar</i></th>
6610 <th style="color:brown;"><i>Foo</i> and Baz
6613 <td align="center" style="color:red;">Foo</td>
6614 <td style="color:red;"><i>Bar</i></td>
6615 <td style="color:brown;"><i>Foo</i> and Baz
6619 <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}}]}'>
6620 <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>
6622 <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>
6626 ## Edge case fix to prevent future regressions
6628 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6631 |{{table_attribs_7}}
6636 <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="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
6638 <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="#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>
6642 Table with row followed by newlines and table heading
6644 parsoid=wt2html,html2html
6662 Table with empty line following the start tag
6664 parsoid=wt2html,html2html
6682 Table attributes with empty value
6684 parsoid=wt2html,html2html
6697 <tbody><tr><td style=""> hello</td></tr>
6702 Wikitext table with a lot of comments
6725 Wikitext table comments represented in parsoid dom
6727 {|<!--c1--><!--c2-->
6738 <table><!--c1--><!--c2-->
6739 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6740 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6745 Wikitext table with double-line table cell
6762 Table cell with a single comment
6779 Table-cell after a comment-only-empty-line
6796 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6798 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6804 Build table with {{!}}
6806 {{{!}} class="wikitable"
6809 {{!}}- style="color:red;"
6810 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6813 <table class="wikitable">
6819 <tr style="color:red;">
6821 <td style="color:red;"> second data
6827 Build table with pipe as data
6829 {| class="wikitable"
6832 |- style="color:red;"
6833 | data || style="color:red;" | second data
6835 | style="color:red;" | data with | || style="color:red;" | second data with |
6837 || data with | ||| second data with |
6840 <table class="wikitable">
6846 <tr style="color:red;">
6848 <td style="color:red;"> second data
6851 <td style="color:red;"> data with | </td>
6852 <td style="color:red;"> second data with |
6855 <td> data with | </td>
6856 <td> second data with |
6862 Build table with wikilink
6864 {| class="wikitable"
6865 ! header || second header
6866 |- style="color:red;"
6867 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6869 | data || second data [[Main Page|link|text with pipe]]
6872 <table class="wikitable">
6877 <tr style="color:red;">
6878 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6879 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6883 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6888 # The expected HTML structure in this test is debatable. The PHP parser does
6889 # not parse this kind of table at all. The main focus for Parsoid is on
6890 # round-tripping, so this output is ok for now. TODO: revisit!
6892 Wikitext table with html-syntax row
6902 <td>foo</td></tr></tbody></table>
6905 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6906 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6907 ## PHP parser, which tidy then compounds by fostering the content
6908 ## entirely out of the table. Parsoid recognizes the table context
6909 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6910 ## depends on PHP's treatment of broken table markup!
6912 Implicit <td> after a |-
6914 parsoid=wt2html,html2html
6934 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6936 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6938 parsoid=wt2html,html2html
6971 <tr><td><pre>a</pre></td></tr>
6972 <tr><td> b</td></tr>
6977 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6978 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6980 Lists should be recognized in an implicit <td> context
6982 parsoid=wt2html,html2html
7009 Table cells not properly parsed in an implicit-td context
7013 {{table_attribs_4}} || a || b
7018 <td style="background-color:#DC241f;" width="10px"></td>
7025 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7026 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["",{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," "]}'> </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> a </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> b</td></tr>
7031 Parsoid: Round-trip tables directly followed by content (bug 51219)
7033 parsoid=wt2html,wt2wt
7058 Parsoid: Default to a newline after tables in new content (bug 51219)
7063 <tr><td>foo</td></tr></tbody></table> bar
7065 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7070 <nowiki> </nowiki>bar
7078 Parsoid: newline inducing block nodes don't suppress <nowiki>
7090 Parsoid: Row-syntax table headings followed by comment & table cells
7092 parsoid=wt2html,wt2wt
7096 <!-- foo --> || baz || quux
7110 <tbody><tr><th> foo </th><th> bar
7111 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7116 Parsoid: Recover better from broken table attributes
7136 <p>foo</p></td></tr>
7141 Tables: Digest broken attributes on table and tr tag
7157 # T137406: Whitespace in the HTML
7159 1. Generate correct wikitext for tables with thead/tbody/tfoot
7164 <caption>Test</caption>
7205 <caption>Test</caption>
7225 # T137406: No whitespace in the HTML
7227 2. Generate correct wikitext for tables with thead/tbody/tfoot
7231 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7241 Testing serialization after deletion in references
7250 hi <ref><div id="x">ho</div></ref>
7260 Testing serialization after deletion of table cells
7263 "modes": ["wt2wt", "selser"],
7271 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7281 Testing selser after addition of new row before first row (T125419)
7284 "modes": ["wt2wt", "selser"],
7286 [ "tr", "before", "<tr><td>X</td></tr>" ]
7302 Serialize new table rows in a HTML table using HTML tags
7305 "modes": ["wt2wt", "selser"],
7307 [ "tr", "before", "<tr><td>X</td></tr>" ]
7311 <table><tr><td>a</td></tr></table>
7313 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7317 Serialize new table cells in a HTML row using HTML tags
7320 "modes": ["wt2wt", "selser"],
7322 [ "td", "before", "<td>X</td>" ]
7326 <table><tr><td>a</td></tr></table>
7328 <table><tr><td>X</td><td>a</td></tr></table>
7332 Wikitext tables can be nested inside HTML tables
7336 <table data-parsoid='{"stx":"html"}'>
7339 <tr><td>foo</td></tr>
7354 Serialize wikitext list items as HTML list items when embedded in a HTML list
7358 <ul data-parsoid='{"stx": "html"}'>
7359 <li data-parsoid='{}'>a</li>
7369 # SSS FIXME: Is this actually a good thing given the
7370 # odd nested list output that is generated by MW?
7371 # <ul><li>foo<ul>..</ul></li></ul> instead of
7372 # <ul><li>foo</li><ul>..</ul></ul>
7374 Wikitext lists can be nested inside HTML lists
7378 <ul data-parsoid='{"stx": "html"}'>
7379 <li data-parsoid='{"stx": "html"}'>a
7384 <ul data-parsoid='{"stx": "html"}'>
7407 Plain link, capitalized
7411 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7416 Plain link, uncapitalized
7420 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7427 [[Main Page|The Main Page]]
7429 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7434 Piped link with comment in link text
7436 [[Main Page|The Main<!--front--> Page]]
7438 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7443 Piped link with multiple pipe characters in link text
7445 [[Main Page||The|Main|Page|]]
7447 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7450 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7454 Piped link with no link text
7456 [[Thomas Bek (bishop of St David's)|]]
7458 <p>[[Thomas Bek (bishop of St David's)|]]
7461 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7465 Piped link with empty link text
7467 [[Main Page|<nowiki />]] - empty nowiki
7468 [[Main Page| ]] - empty space
7469 [[Main Page| ]] - empty non breaking space
7471 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7472 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7473 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7476 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki />"}'/></a> - empty nowiki
7477 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7478 <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>
7486 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7491 Broken link with fragment
7493 [[Zigzagzogzagzig#zug]]
7495 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7500 Special page link with fragment
7502 [[Special:Version#anchor]]
7504 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7509 Nonexistent special page link with fragment
7511 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7513 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7520 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7522 <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>
7529 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7531 <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>!!!
7542 Bug 43661: Piped links with identical prefixes
7544 [[prefixed article|prefixed articles with spaces]]
7546 [[prefixed article|prefixed articlesaoeu]]
7548 [[Main Page|Main Page test]]
7550 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7551 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7552 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7558 Link with HTML entity in suffix / tail
7560 [[Main Page]]", [[Main Page]]a
7562 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7565 <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>
7569 Link with 3 brackets
7580 Link with 4 brackets
7584 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7589 Piped link with 3 brackets
7591 [[[main page|the main page]]]
7593 <p>[[[main page|the main page]]]
7598 Piped link with extlink-like text
7601 [[Main Page|This is a [bar]]]
7603 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7604 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7607 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7608 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7612 Link with multiple pipes
7614 [[Main Page|The|Main|Page]]
7616 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7621 Anchor containing a #. (bug 63430)
7623 [[Main Page#And#Link]]
7625 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7628 <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>
7634 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7636 <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>
7641 Link with space in namespace
7643 [[User talk:Foo bar]]
7645 <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>
7650 MemoryAlpha:AlphaTest
7652 This is an article in the MemoryAlpha namespace
7653 (which shadows the memoryalpha interwiki link).
7657 Namespace takes precedence over interwiki link (bug 51680)
7659 [[MemoryAlpha:AlphaTest]]
7661 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7665 # The previous test doesn't work correctly in html2*, due to not recognizing the
7666 # link as an internal one. This one checks for the correct behavior.
7668 Link to namespace preferred over interwiki with correct rel attribute
7670 parsoid=html2wt,html2html
7672 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7674 [[MemoryAlpha:AlphaTest]]
7678 Piped link to namespace
7680 [[Meta:Disclaimers|The disclaimers]]
7682 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7689 [[Usually caused by a typo (oops}]]
7691 <p>[[Usually caused by a typo (oops}]]
7698 Just a test of an article title containing a percent.
7702 Link containing % (not as a hex sequence)
7705 [[7% Solution|7%25 Solution]]
7707 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7708 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7711 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7712 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7715 # note that the parsoid HTML is identical to the previous test output,
7716 # so the previous test ensures that the html2wt mode will generate the
7717 # "not as a hex sequence" wikitext.
7719 Link containing % as a single hex sequence interpreted to char
7721 parsoid=wt2wt,wt2html,html2html
7724 [[7%25 Solution|7%25 Solution]]
7726 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7727 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7730 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7731 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7735 Link containing % as a double hex sequence interpreted to hex sequence
7739 <p>[[7%2525 Solution]]
7743 ## Example for such a section: == < ==
7745 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7747 [[%23%3c]][[%23%3e]]
7749 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7752 <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>
7756 Link containing "<#" and ">#" as a hex sequences
7758 [[%3c%23]][[%3e%23]]
7760 <p>[[%3c%23]][[%3e%23]]
7765 Link containing an equals sign
7767 [[Special:BookSources/isbn=4-00-026157-6]]
7769 <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>
7772 <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>
7778 Just a test of an article title containing a tilde.
7781 # note that links containing signatures, like [[Foo~~~~]], are
7782 # massaged by the pre-save transform (PST) and so the tildes are never
7783 # seen by the parser.
7785 Link containing a tilde
7789 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7792 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7796 Link containing double-single-quotes '' (bug 4598)
7798 [[Lista d''e paise d''o munno]]
7800 <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>
7803 <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>
7807 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7809 Some [[Link|pretty ''italics'' and stuff]]!
7811 <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>!
7814 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7818 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7820 ''Some [[Link|pretty ''italics'' and stuff]]!''
7822 <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>
7827 Link with double quotes in title part (literal) and alternate part (interpreted)
7829 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7833 [[''Pentecoste''|Pentecoste]]
7835 [[''Pentecoste''|''Pentecoste'']]
7837 <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>
7838 </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>
7839 </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>
7840 </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>
7843 <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>
7844 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7845 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7846 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7850 Broken image links with HTML captions (bug 39700)
7852 [[File:Nonexistent|<script></script>]]
7853 [[File:Nonexistent|100x100px|<script></script>]]
7854 [[File:Nonexistent|<]]
7855 [[File:Nonexistent|a<i>b</i>c]]
7857 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7858 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7859 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7860 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7863 <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>
7864 <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>
7865 <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>
7866 <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>
7872 [[http://www.example.com]]
7874 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7877 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7881 Plain link to URL with link text
7883 [[http://www.example.com Link text]]
7885 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7890 Plain link to protocol-relative URL
7892 [[//www.example.com]]
7894 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7897 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7901 Plain link to protocol-relative URL with link text
7903 [[//www.example.com Link text]]
7905 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7910 Plain link to page with question mark in title
7916 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7917 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7922 # I'm fairly sure the expected result here is wrong.
7923 # We want these to be URL links, not pseudo-pages with URLs for titles....
7924 # However the current output is also pretty screwy.
7927 # I'm changing it to match the current output--it arguably makes more
7928 # sense in the light of the test above. Old expected result was:
7929 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7931 # But I think this test is bordering on "garbage in, garbage out" anyway.
7936 Piped link to URL: [[http://www.example.com|an example URL]]
7938 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7941 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7945 BUG 2: [[page|http://url/]] should link to page, not http://url/
7947 [[Main Page|http://url/]]
7949 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7952 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7955 # Parsoid does not mark self-links, by design.
7957 BUG 337: Escaped self-links should be bold
7961 [[Bug462]] [[Bug462]]
7963 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7966 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7968 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7972 Self-link to section should not be bold
7976 [[Main Page#section]]
7978 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7989 Self-link to numeric title
7995 <p><strong class="selflink">0</strong>
8000 Link to numeric-equivalent title
8006 <p><a href="/wiki/00" title="00">00</a>
8011 <nowiki> inside a link
8013 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8015 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8020 Non-breaking spaces in title
8022 [[ Main Page ]]
8024 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8029 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
8035 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8040 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8046 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8051 Internal link with en linktrail: no apostrophes (bug 27473)
8057 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8062 Internal link with ca linktrail with apostrophes (bug 27473)
8068 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8073 Internal link with kaa linktrail with apostrophes (bug 27473)
8079 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8084 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8086 [[User:Foo/Test/63636:Bar|Test]]
8088 <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>
8091 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8094 ## Mainly a sanity check for Parsoid
8096 Handle title parsing for subpages
8105 ## FIXME: Add a working php section here
8107 Link to a subpage from a namespace other than main
8113 <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>
8117 Ensure that transclusion titles are not url-decoded
8119 subpage title=[[Test]]
8122 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8124 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8127 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8131 Purely hash wikilink
8133 title=[[User:test/123]]
8137 <p><a href="#a">b</a>
8140 <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>
8144 1. Interaction of linktrail and template encapsulation
8150 <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>
8154 2. Interaction of linktrail and template encapsulation
8158 {{echo|Some [[Fool]]}}s
8160 <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>
8164 3. Interaction of linktrail and template encapsulation
8168 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8170 <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>
8180 Internal link with is link prefix
8184 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8186 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8197 Internal link with is link trail and link prefix
8201 [[mótmælendatrú|xxx]]ar
8203 mótmælenda[[söfnuður]]
8204 mótmælenda[[söfnuður|söfnuðir]]
8205 mótmælenda[[söfnuður|söfnuðir]]xxx
8207 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8208 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8209 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8210 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8211 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8216 Parsoid link trail escaping
8218 parsoid=html2wt,html2html
8220 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8226 Parsoid link prefix escaping
8229 parsoid=html2wt,html2html
8231 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8233 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8237 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8245 [http://wp.org ''foo'']
8247 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8248 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8249 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8250 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8255 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8259 [[Foo|{{echo|a}} b {{echo|c}}]]
8261 <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>
8265 Link with angle bracket after anchor
8269 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8272 <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>
8276 ### Interwiki links (see maintenance/interwiki.sql)
8280 Inline interwiki link
8282 parsoid=wt2html,wt2wt,html2html
8284 [[MeatBall:SoftSecurity]]
8286 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8289 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8293 Inline interwiki link with empty title (bug 2372)
8295 parsoid=wt2html,wt2wt,html2html
8299 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8302 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8306 Interwiki link encoding conversion (bug 1636)
8308 *[[Wikipedia:ro:Olteniţa]]
8309 *[[Wikipedia:ro:Olteniţa]]
8311 <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>
8312 <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>
8316 <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>
8317 <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>
8322 Interwiki link with fragment (bug 2130)
8324 [[MeatBall:SoftSecurity#foo]]
8326 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8331 Link scenarios with escaped fragments
8334 [[Foo#Is this great?]]
8335 [[meatball:Foo#Is this great?]]
8337 <p><a href="#Is_this_great.3F">#Is this great?</a>
8338 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8339 <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>
8342 <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>
8343 <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>
8344 <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>
8347 # Ideally the wikipedia: prefix here should be proto-relative too
8348 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8349 # define the 'en' prefix, and originally the test used 'wikipedia',
8350 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8353 Different interwiki prefixes mapping to the same URL
8361 [[:wikipedia:Foo|Foo]]
8363 [[wikipedia:en:Foo]]
8365 [[:wikipedia:en:Foo]]
8369 <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>
8371 <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>
8373 <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>
8375 <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>
8377 <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>
8379 <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>
8381 <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>
8385 Interwiki links that cannot be represented in wiki syntax
8388 [[meatball:ok#foo|ok with fragment]]
8389 [[meatball:ok_as_well?|ok ending with ? mark]]
8390 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8391 [http://de.wikipedia.org/wiki/#foo is just fragment]
8394 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8395 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8396 <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>
8397 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8398 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8401 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8402 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8403 <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>
8404 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8405 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8409 Interwiki links: trail
8411 [[wikipedia:Foo|Ba]]r
8413 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8416 <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>
8420 Local interwiki link
8422 parsoid=wt2html,wt2wt,html2html
8424 [[local:Template:Foo]]
8426 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8429 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8432 # Parsoid does not mark self-links, by design.
8434 Local interwiki link: self-link to current page
8437 parsoid=wt2html,wt2wt,html2html
8441 <p><strong class="selflink">local:Main Page</strong>
8444 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8448 Local interwiki link: prefix only (bug 64167)
8450 parsoid=wt2html,wt2wt,html2html
8454 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8457 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8461 Local interwiki link: with additional interwiki prefix (bug 61357)
8463 parsoid=wt2html,wt2wt,html2html
8465 [[local:meatball:Hello]]
8467 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8470 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8474 Multiple local interwiki link prefixes
8476 [[local:local:local:local:mi:local:Foo]]
8478 parsoid=wt2html,wt2wt,html2html
8480 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8483 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8487 ### Interlanguage links
8488 ### Language links (so that searching for '### language' matches..)
8500 <p>Blah blah blah</p>
8501 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8504 ## parsoid html2wt will lose the space variations
8506 Interlanguage link with spacing
8508 parsoid=wt2html,wt2wt,html2html
8516 <p>Blah blah blah</p>
8517 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8521 Double interlanguage link
8530 <p>Blah blah blah</p>
8531 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8532 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8535 ## parsoid html2wt will lose the space variations
8537 Interlanguage link variations
8539 parsoid=wt2html,wt2wt,html2html
8549 <p>Blah blah blah</p>
8550 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8551 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8552 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8555 ## parsoid html2wt will normalize the space to _
8557 Space and question mark encoding in interlanguage links (T95473)
8559 parsoid=wt2html,wt2wt,html2html
8567 <p>Blah blah blah</p>
8568 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8572 Interlanguage link, with prefix links
8582 <p>Blah blah blah</p>
8583 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8587 Double interlanguage link, with prefix links (bug 8897)
8598 <p>Blah blah blah</p>
8599 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8600 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8604 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8612 <p>Blah blah blah</p>
8613 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8616 ## PHP parser tests script needs an update
8617 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8619 Language links render as inline links if $wgInterwikiMagic=false
8621 wgInterwikiMagic=false
8622 parsoid=wt2html,wt2wt,html2html
8627 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8630 ## PHP parser tests script needs an update
8631 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8633 Language links render as inline links in the Talk namespace
8636 parsoid=wt2html,wt2wt,html2html
8641 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8645 Parsoid-specific test: Wikilinks with should RT properly
8651 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8656 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8658 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8660 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8661 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8663 He&nbsp;llo [[Foo|He&nbsp;llo]]
8665 He&nbsp;llo He&nbsp;llo
8667 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8668 </p><p>He&nbsp;llo He&nbsp;llo
8672 # html2wt will fail because of title normalization without data-parsoid
8674 Parsoid: handle constructor well
8676 parsoid=wt2html,wt2wt
8682 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8683 </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>
8686 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8688 <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>
8697 # Note that `ko` isn't a known interlanguage prefix
8699 Parsoid: recognize interlanguage links without a target page
8709 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8711 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8714 # Note that `ko` isn't a known interwiki prefix
8716 Parsoid: recognize interwiki links without a target page
8718 parsoid=wt2html,wt2wt,html2html
8724 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8725 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8728 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8729 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8733 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8737 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8740 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8744 Interlanguage link with preceding local interwiki link (bug 68085)
8746 parsoid=wt2html,wt2wt,html2html
8749 [[local:es:Spanish]]
8752 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8756 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8760 Looks like an interlanguage link, but is actually a local interwiki
8762 parsoid=wt2html,wt2wt,html2html
8768 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8772 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8776 ### Redirects, Parsoid-only
8780 1. Simple redirect to page
8782 #REDIRECT [[Main Page]]
8784 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8788 2. Other redirect variants
8790 #REDIRECT [[Main_Page]]
8792 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8795 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8796 # This tests the Parsoid bail-out code.
8798 3. Other redirect variants
8800 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8802 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8806 4. Redirect to a templated destination
8808 #REDIRECT [[{{echo|Foo}}bar]]
8810 <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"}]]}'/>
8816 parsoid=wt2html,wt2wt
8821 <li>REDIRECT [[]]</li></ol>
8825 Optional colon in #REDIRECT
8827 # the colon is archaic syntax. we support it for wt2html, but we
8828 # don't care that it roundtrips back to the modern syntax.
8829 parsoid=wt2html,html2html
8831 #REDIRECT:[[Main Page]]
8833 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8837 Whitespace in #REDIRECT with optional colon
8839 # the colon and gratuitous whitespace is archaic syntax. we support
8840 # it for wt2html, but we don't care that it roundtrips back to the
8841 # modern syntax (without extra whitespace)
8842 parsoid=wt2html,html2html
8849 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8853 Piped link in #REDIRECT
8855 # content after piped link is ignored. we support this syntax,
8856 # but don't care that the piped link is lost when we roundtrip this.
8859 #REDIRECT [[Main Page|bar]]
8861 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8865 Redirect to category (T104502)
8867 parsoid=wt2html,wt2wt
8869 #REDIRECT [[Category:Foo]]
8871 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8875 Redirect to category with URL encoding (T104502)
8879 #REDIRECT [[Category%3AFoo]]
8881 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8885 Redirect to category page
8887 #REDIRECT [[:Category:Foo]]
8889 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8893 Redirect to image page (1)
8895 #REDIRECT [[File:Wiki.png]]
8897 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8901 Redirect to image page (2)
8903 #REDIRECT [[Image:Wiki.png]]
8905 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8908 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8909 # Next test confirms this.
8911 Redirect to language (1) (T104918)
8913 parsoid=wt2html,wt2wt,html2html
8915 #REDIRECT [[en:File:Wiki.png]]
8917 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8921 Redirect to language (2) (T104918)
8923 #REDIRECT [[:en:File:Wiki.png]]
8925 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8929 Redirect to interwiki (T104918)
8931 #REDIRECT [[meatball:File:Wiki.png]]
8933 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8937 Non-English #REDIRECT
8941 #TILVÍSUN [[Main Page]]
8943 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8947 Redirect syntax under text isn't considered a redirect
8950 #redirect [[Main Page]]
8953 <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>
8956 # FIXME: Should hoist the redirect to the top of the page and ensure there
8963 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8983 Broken br tag sanitization
8991 # TODO: Fix html2html mode (bug 51055)!
8993 Parsoid: Broken br tag recognition
9006 Incorrecly removing closing slashes from correctly formed XHTML
9008 <br style="clear:both;" />
9010 <p><br style="clear:both;" />
9015 Failing to transform badly formed HTML into correct XHTML
9017 <br style="clear: left;">
9018 <br style="clear: right;">
9019 <br style="clear: both;">
9021 <p><br style="clear: left;" />
9022 <br style="clear: right;" />
9023 <br style="clear: both;" />
9027 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9028 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9030 Handling html with a div self-closing tag
9039 <p><div title />
9043 <p><div title=bar />
9044 <div title=bar/>
9046 <div title="bar/"></div>
9050 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9051 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9052 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9053 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9054 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9055 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9059 Handling html with a br self-closing tag
9086 Horizontal ruler (should it add that extra space?)
9101 Horizontal ruler -- 4+ dashes render hr
9110 Horizontal ruler -- eats additional dashes on the same line
9119 Horizontal ruler -- does not collapse dashes on consecutive lines
9130 Horizontal ruler -- <4 dashes render as plain text
9139 Horizontal ruler -- Supports content following dashes on same line
9151 ### Block-level elements
9160 <ul><li>Common list</li>
9162 <li>item 3</li></ul>
9173 <ol><li>Numbered list</li>
9175 <li> item 3</li></ol>
9189 ***#Number on level 4
9191 **#Number on level 3
9192 **#Number on level 3
9196 #** Level 3, but ordered
9199 <ol><li> with numbers</li></ol>
9200 <ul><li> and bullets</li></ul>
9201 <ol><li> and numbers</li></ol></li>
9203 <ul><li>bullet level 2
9204 <ul><li>bullet level 3
9205 <ol><li>Number on level 4</li></ol></li></ul></li>
9207 <ol><li>Number on level 3</li>
9208 <li>Number on level 3</li></ol></li></ul>
9209 <ol><li>number level 2</li></ol></li>
9211 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9212 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9217 1. Nested mixed wikitext and html list
9220 * <ul><li>ho</li></ul>
9225 <li> <ul><li>ho</li></ul></li>
9227 <ul><li> ho</li></ul></li></ul>
9231 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9233 <ul><li> ho</li></ul></li></ul>
9237 2. Nested mixed wikitext and html list (incompatible)
9240 : {{echo|<li>ho</li>}}
9243 <dd> <li>ho</li></dd></dl>
9247 <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>
9257 <ul><li>bar</li></ul></li></ul>
9267 <ul><li><ul><li>foo</li></ul></li>
9273 Nested lists 3 (first element empty)
9279 <ul><li>bar</li></ul></li></ul>
9284 Nested lists 4 (first element empty)
9289 <ul><li><ul><li></li></ul></li>
9295 Nested lists 5 (both elements empty)
9300 <ul><li><ul><li></li></ul></li>
9306 Nested lists 6 (both elements empty)
9312 <ul><li></li></ul></li></ul>
9317 Nested lists 7 (skip initial nesting levels)
9321 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9326 Nested lists 8 (multiple nesting transitions)
9334 <ul><li><ul><li> bar</li></ul></li>
9335 <li> baz</li></ul></li>
9341 Nested lists 9 (extension interaction)
9347 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9351 1. Lists with start-of-line-transparent tokens before bullets: Comments
9364 2. Lists with start-of-line-transparent tokens before bullets: Template close
9369 <ul><li>foo bar</li>
9375 List items are not parsed correctly following a <pre> block (bug 785)
9381 <ul><li> <pre>foo</pre></li>
9382 <li> <pre>bar</pre></li>
9386 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9387 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9392 List items from template
9403 * notSOL{{inner list}}
9406 <ul><li> item 1</li>
9407 <li> item 2</li></ul>
9408 <ul><li> item 0</li>
9410 <li> item 2</li></ul>
9411 <ul><li> item 0</li>
9414 <li> item 2</li></ul>
9419 List interrupted by empty line or heading
9427 <ul><li> foo</li></ul>
9428 <ul><li><ul><li> bar</li></ul></li></ul>
9429 <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>
9430 <ul><li> Another list item</li></ul>
9435 Multiple list tags generated by templates
9456 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9459 <!--This line will NOT split the list-->
9461 <!--This line will NOT split the list either-->
9463 <!--foo--> <!----> <!--This line NOT split the list either-->
9474 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9477 <!--This line will NOT split the list-->
9479 <!--This line will NOT split the list either-->
9481 <!--foo--> <!----> <!--This line NOT split the list
9494 (The PHP parser relies on Tidy for the hack)
9496 parsoid=wt2html,wt2wt
9500 * {{echo|<li>templated li-hack}}
9501 * <!--foo--> <li> unsupported li-hack with preceding comments
9504 <li><li>not a li-hack
9511 <li>templated li-hack</li>
9512 <li>unsupported li-hack with preceding comments</li>
9515 <li>not a li-hack</li>
9520 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9547 Parsoid: Test of whitespace serialization with Templated bullets
9554 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9558 # ------------------------------------------------------------------------
9559 # The next set of tests are about Parsoid's ability to handle badly nested
9560 # tags (parse, minimize scope of fixup, and roundtrip back)
9561 # ------------------------------------------------------------------------
9564 Unbalanced closing block tags break a list
9565 (php parser relies on Tidy to fix up)
9583 # Parsoid fails this test, but it might be tricky to support properly.
9586 Unbalanced closing non-block tags don't break a list
9587 (php parser relies on Tidy to fix up)
9594 <li><span>a</span></li>
9595 <li><span>b</span></li>
9609 Unclosed formatting tags that straddle lists are closed and reopened
9610 (php parser relies on Tidy to fix up)
9612 parsoid=wt2html,wt2wt,html2html
9622 <ol><li> <s> a</s></li>
9623 <li><s> b </s></li></ol>
9628 1. List embedded in a formatting tag
9635 <li><small>foo</small></li>
9645 ## Ugly Parsoid output here
9646 ## Not sure what the right output is.
9648 2. List embedded in a formatting tag
9655 <li><small>a</small></li>
9656 <li><small>b</small></li>
9663 <li><small>b</small></li>
9667 # Ugly Parsoid and PHP parser output here
9668 # Not sure if we want to make this a test!
9671 ## 3. Unclosed formatting tags in list elements
9677 ## <li><small>a</small></li>
9678 ## <li><small><small>b</small></small></li>
9682 ## <li><small>a</small></li>
9684 ## <li><small>b</small></li>
9688 # This is a bug in the PHP parser + tidy combination.
9689 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9690 # and then fostered out of the table by tidy.)
9691 # We believe the Parsoid output to be correct.
9693 Table with missing opening <tr> tag
9695 parsoid=wt2html,wt2wt
9713 # Note that the current date is hard-coded as
9714 # 1970-01-01T00:02:03Z (a Thursday)
9715 # when running parser tests. The timezone is also fixed to GMT, so
9716 # local date will be identical to current date.
9719 Magic Word: {{CURRENTDAY}}
9728 Magic Word: {{CURRENTDAY2}}
9737 Magic Word: {{CURRENTDAYNAME}}
9746 Magic Word: {{CURRENTDOW}}
9755 Magic Word: {{CURRENTMONTH}}
9764 Magic Word: {{CURRENTMONTH1}}
9773 Magic Word: {{CURRENTMONTHABBREV}}
9775 {{CURRENTMONTHABBREV}}
9782 Magic Word: {{CURRENTMONTHNAME}}
9784 {{CURRENTMONTHNAME}}
9791 Magic Word: {{CURRENTMONTHNAMEGEN}}
9793 {{CURRENTMONTHNAMEGEN}}
9800 Magic Word: {{CURRENTTIME}}
9809 Magic Word: {{CURRENTHOUR}}
9818 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9827 Magic Word: {{CURRENTYEAR}}
9836 Magic Word: {{CURRENTTIMESTAMP}}
9838 {{CURRENTTIMESTAMP}}
9845 Magic Words LOCAL (UTC)
9849 * {{LOCALMONTHNAME}}
9850 * {{LOCALMONTHNAMEGEN}}
9851 * {{LOCALMONTHABBREV}}
9860 * {{LOCALTIMESTAMP}}
9875 <li> 19700101000203</li></ul>
9880 Magic Word: {{FULLPAGENAME}}
9882 title=[[User:Ævar Arnfjörð Bjarmason]]
9886 <p>User:Ævar Arnfjörð Bjarmason
9891 Magic Word: {{FULLPAGENAMEE}}
9893 title=[[User:Ævar Arnfjörð Bjarmason]]
9897 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9902 Magic Word: {{TALKSPACE}}
9904 title=[[User:Ævar Arnfjörð Bjarmason]]
9913 Magic Word: {{TALKSPACE}}, same namespace
9915 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9924 Magic Word: {{TALKSPACE}}, main namespace
9926 title=[[Parser Test]]
9935 Magic Word: {{TALKSPACEE}}
9937 title=[[User:Ævar Arnfjörð Bjarmason]]
9946 Magic Word: {{SUBJECTSPACE}}
9948 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9957 Magic Word: {{SUBJECTSPACE}}, same namespace
9959 title=[[User:Ævar Arnfjörð Bjarmason]]
9968 Magic Word: {{SUBJECTSPACE}}, main namespace
9970 title=[[Parser Test]]
9978 Magic Word: {{SUBJECTSPACEE}}
9980 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9989 Magic Word: {{NAMESPACE}}
9991 title=[[User:Ævar Arnfjörð Bjarmason]]
10000 Magic Word: {{NAMESPACEE}}
10002 title=[[User:Ævar Arnfjörð Bjarmason]]
10011 Magic Word: {{NAMESPACENUMBER}}
10013 title=[[User:Ævar Arnfjörð Bjarmason]]
10015 {{NAMESPACENUMBER}}
10022 Magic Word: {{SUBPAGENAME}}
10024 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10033 Magic Word: {{SUBPAGENAMEE}}
10035 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10044 Magic Word: {{ROOTPAGENAME}}
10046 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10050 <p>Ævar Arnfjörð Bjarmason
10055 Magic Word: {{ROOTPAGENAMEE}}
10057 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10061 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10066 Magic Word: {{BASEPAGENAME}}
10068 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10072 <p>Ævar Arnfjörð Bjarmason
10077 Magic Word: {{BASEPAGENAMEE}}
10079 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10083 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10088 Magic Word: {{TALKPAGENAME}}
10090 title=[[User:Ævar Arnfjörð Bjarmason]]
10094 <p>User talk:Ævar Arnfjörð Bjarmason
10099 Magic Word: {{TALKPAGENAMEE}}
10101 title=[[User:Ævar Arnfjörð Bjarmason]]
10105 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10110 Magic Word: {{SUBJECTPAGENAME}}
10112 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10114 {{SUBJECTPAGENAME}}
10116 <p>User:Ævar Arnfjörð Bjarmason
10121 Magic Word: {{SUBJECTPAGENAMEE}}
10123 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10125 {{SUBJECTPAGENAMEE}}
10127 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10132 Magic Word: {{NUMBEROFFILES}}
10141 Magic Word: {{PAGENAME}}
10143 title=[[User:Ævar Arnfjörð Bjarmason]]
10147 <p>Ævar Arnfjörð Bjarmason
10152 Magic Word: {{PAGENAME}} with metacharacters
10154 title=[['foo & bar = baz']]
10158 <p><i>'foo & bar = baz'</i>
10161 <p><i>'foo & bar = baz'</i></p>
10165 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10167 title=[[*RFC 1234 http://example.com/]]
10171 <p>*RFC 1234 http://example.com/
10174 <p>*RFC 1234 http://example.com/</p>
10178 Magic Word: {{PAGENAMEE}}
10180 title=[[User:Ævar Arnfjörð Bjarmason]]
10184 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10189 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10191 title=[[*RFC 1234 http://example.com/]]
10195 <p>*RFC_1234_http://example.com/
10198 <p>*RFC_1234_http://example.com/</p>
10202 Magic Word: {{REVISIONID}}
10211 Magic Word: {{SCRIPTPATH}}
10219 Magic Word: {{STYLEPATH}}
10228 Magic Word: {{SERVER}}
10232 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10237 Magic Word: {{SERVERNAME}}
10246 Magic Word: {{SITENAME}}
10255 Case-sensitive magic words, when cased differently, should just be template transclusions
10262 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10263 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10264 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10265 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10270 Case-insensitive magic words should still work with weird casing.
10280 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10284 # From plwiki:PLOS_ONE
10286 Parsoid: Page property magic word with magic word contents
10288 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10290 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10294 Parsoid: Template-generated DISPLAYTITLE
10296 {{{{echo|DISPLAYTITLE}}:Foo}}
10298 <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}}]}'/>
10302 Namespace 1 {{ns:1}}
10311 Namespace 1 {{ns:01}}
10320 Namespace 0 {{ns:0}} (bug 4783)
10328 Namespace 0 {{ns:00}} (bug 4783)
10336 Namespace -1 {{ns:-1}}
10345 Namespace User {{ns:User}}
10354 Namespace User talk {{ns:User_talk}}
10363 Namespace User talk {{ns:uSeR tAlK}}
10372 Namespace File {{ns:File}}
10381 Namespace File {{ns:Image}}
10390 Namespace (lang=de) Benutzer {{ns:User}}
10401 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10407 <p>Benutzer Diskussion
10414 {{urlencode:hi world?!}}
10415 {{urlencode:hi world?!|WIKI}}
10416 {{urlencode:hi world?!|PATH}}
10417 {{urlencode:hi world?!|QUERY}}
10427 Magic Word: prioritize type info over data-parsoid
10431 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10437 Magic Word: serialize on separate line (parsoid)
10439 parsoid=wt2wt,html2wt
10445 foo<meta property="mw:PageProp/notoc"/>bar
10449 Magic Word: rt non-english wikis
10456 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10460 __proto__ is treated as normal wikitext (T105997)
10472 Magic links: internal link to RFC (bug 479)
10476 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10479 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10483 Magic links: RFC (bug 479)
10487 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10490 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10494 Magic links: RFC (bug 65278)
10496 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10498 <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.
10501 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10505 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10507 RFC      822
10511 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10516 <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>
10522 Magic links: ISBN (bug 1937)
10526 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10529 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10533 Magic links: ISBN (bug 65278)
10535 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10537 <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.
10540 <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>
10544 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10546 ISBN      978 0 316 09811 3
10552 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10559 <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>
10567 Magic links: PMID incorrectly converts space to underscore
10571 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10574 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10578 Magic links: PMID (bug 65278)
10580 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10582 <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.
10585 <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>
10589 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10591 PMID      1234
10595 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10600 <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>
10605 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10606 # since these are ExtLinkText, not MagicLinkText
10608 Magic links: use appropriate serialization for "almost" magic links.
10610 X[[Special:BookSources/0978739256|foo]]
10612 X[//tools.ietf.org/html/rfc1234 foo]
10614 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10615 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10618 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10619 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10623 Magic links: All disabled (T47942)
10625 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10631 <p>ISBN 0-306-40615-2
10642 Nonexistent template
10644 {{thistemplatedoesnotexist}}
10646 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10651 Template with invalid target containing tags
10653 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10655 <p>{{a<b>b</b>|foo|a=b|a = b}}
10660 Template with invalid target containing unclosed tag
10662 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10664 <p>{{a<b>|foo|a=b|a = b}}</b>
10669 Template with invalid target containing wikilink
10673 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10676 <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>
10680 Template with just whitespace in it, bug #68421
10684 <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>
10690 This is a test template
10698 <p>This is a test template
10703 Template with explicit namespace
10707 <p>This is a test template
10715 This is a test template with parameter {{{param}}}
10721 {{paramtest|param=foo}}
10723 <p>This is a test template with parameter foo
10728 Template:paramtestnum
10730 [[{{{1}}}|{{{2}}}]]
10734 Template unnamed parameter
10736 {{paramtestnum|Main Page|the main page}}
10738 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10743 Template:templatesimple
10749 Template:templateredirect
10751 #redirect [[Template:templatesimple]]
10755 Template:templateasargtestnum
10761 Template:templateasargtest
10763 {{template{{{templ}}}}}
10767 Template:templateasargtest2
10773 Template with template name as unnamed argument
10775 {{templateasargtestnum|templatesimple}}
10782 Template with template name as argument
10784 {{templateasargtest|templ=simple}}
10791 Template with template name as argument (2)
10793 {{templateasargtest2|templ=templatesimple}}
10800 Template:templateasargtestdefault
10802 {{{{{templ|templatesimple}}}}}
10812 Template with default value
10814 {{templateasargtestdefault}}
10821 Template with default value (value set)
10823 {{templateasargtestdefault|templ=templa}}
10832 {{templateredirect}}
10837 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10841 Template with argument in separate line
10843 {{ templateasargtest |
10851 Template with complex template as argument
10854 param ={{ templateasargtest |
10855 templ = simple }}}}
10857 <p>This is a test template with parameter (test)
10862 Template with thumb image (with link in description)
10864 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10866 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>
10869 <p>This is a test template with parameter</p>
10870 <div class="thumb tright">
10871 <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>
10872 <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>
10876 <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>
10880 Template:complextemplate
10882 {{{1}}} {{paramtest|
10883 param ={{{param}}}}}
10887 Template with complex arguments
10890 param ={{ templateasargtest |
10891 templ = simple }}|[[Template:complextemplate|link]]}}
10893 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10898 BUG 553: link with two variables in a piped link
10901 |[[{{{1}}}|{{{2}}}]]
10906 <td>[[{{{1}}}|{{{2}}}]]
10911 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-parsoid='{"src":"{{{1}}}"}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-parsoid='{"src":"{{{2}}}"}'>{{{2}}}</span>]]</td></tr>
10916 Abort table cell attribute parsing on wikilink
10919 | testing [[one|two]] | three || four
10920 | testing one two | three || four
10921 | testing="[[one|two]]" | three || four
10926 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10932 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10938 <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>
10939 <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>
10940 <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>
10945 Don't abort table cell attribute parsing if wikilink is found in template arg
10948 | Test {{#tag:ref|One two "[[three]]" four}}
10952 <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>
10957 Magic variable as template parameter
10959 {{paramtest|param={{SITENAME}}}}
10961 <p>This is a test template with parameter MediaWiki
10968 [[{{{param}}}|link]]
10972 Template parameter as link source
10974 {{linktest|param=Main Page}}
10976 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10981 Template:paramtest2
10983 including another template, {{paramtest|param={{{arg}}}}}
10987 Template passing argument to another template
10989 {{paramtest2|arg='hmm'}}
10991 <p>including another template, This is a test template with parameter 'hmm'
11002 Template as link source
11006 [[{{linktest2}}|Main Page]]
11008 [[{{linktest2}}]]Page
11010 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11011 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11012 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11030 Template infinite loop
11034 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11039 Template from main namespace
11058 BUG 529: Template with table, not included at beginning of line
11077 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11097 BUG 41: Template parameters shown as broken links
11106 Template with targets containing wikilinks
11110 {{[[{{echo|foo}}]]}}
11112 {{{{echo|[[foo}}]]}}
11114 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11115 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11127 Templates: Double quotes as template target
11134 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11138 ## This test is about making sure Parsoid's data-mw is well formed in the
11139 ## face of multiple templates with intersecting and overlapping ranges. The
11140 ## wikitext itself is wretched.
11142 Templates with intersecting and overlapping ranges
11167 <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":""}]]}'>
11169 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11171 <tbody><tr><td>hi</td></tr>
11176 Template:MSGNW test
11178 ''None'' of '''this''' should be
11180 but rather passed unmodified
11188 # hmm, fix this or just deprecate msgnw and document its behavior?
11192 {{msgnw:MSGNW test}}
11194 <p>''None'' of '''this''' should be
11196  but rather passed unmodified
11197 {{test}}
11201 <!-- comment -->
11208 {{int:youhavenewmessages|lots of money|not!}}
11210 <p>You have lots of money (not!).
11215 int keyword - non-existing message
11226 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11230 <includeonly> and <noinclude> being included
11241 <onlyinclude>Foo</onlyinclude>bar
11245 <onlyinclude> being included
11257 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11261 <onlyinclude> and <includeonly> being included
11270 <includeonly> and <noinclude> on a page
11272 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11279 Un-closed <noinclude>
11286 <onlyinclude> on a page
11288 <onlyinclude>Foo</onlyinclude>bar
11295 Un-closed <onlyinclude>
11302 Self-closed noinclude, includeonly, onlyinclude tags
11313 Unbalanced includeonly and noinclude tags
11317 |b</noinclude></noinclude>
11318 |c</noinclude></includeonly>
11319 |d</includeonly></includeonly>
11328 <td>c</includeonly>
11330 <td>d</includeonly></includeonly>
11336 Template:Includeonly section
11339 ==Includeonly section==
11345 Bug 6563: Edit link generation for section shown by <includeonly>
11347 {{includeonly section}}
11349 <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>
11350 <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>
11354 # Uses same input as the contents of [[Template:Includeonly section]]
11356 Bug 6563: Section extraction for section shown by <includeonly>
11361 ==Includeonly section==
11369 Bug 6563: Edit link generation for section suppressed by <includeonly>
11372 ==Includeonly section==
11376 <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>
11381 Bug 6563: Section extraction for section suppressed by <includeonly>
11386 ==Includeonly section==
11394 Un-closed <includeonly>
11399 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11402 ## We used to, but no longer wt2wt this test since the default serializer
11403 ## will normalize the include directives to serialize on their own line.
11404 ## Selser will take care of preserving formatting in scenarios where they
11405 ## intermingled with other wikitext.
11407 Includes and comments at SOL
11409 parsoid=wt2html,html2html
11411 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11415 </noinclude>* stuff
11418 <includeonly>can have stuff</includeonly>=== here ===
11421 <h2><span class="mw-headline" id="hu">hu</span></h2>
11424 <ul><li> stuff</li>
11425 <li> here</li></ul>
11426 <h3><span class="mw-headline" id="here">here</span></h3>
11429 <!-- 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>
11431 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11433 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11434 <li> here</li></ul>
11436 <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>
11440 # TODO: test with DOM fragment reuse!
11442 Parsoid: DOM fragment reuse
11444 parsoid=wt2wt,wt2html
11446 a{{echo|b<table></table>c}}d
11458 <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>
11460 <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">
11461 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11462 </span><p about="#mwt2">cd</p>
11464 <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">
11466 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11468 </span><p about="#mwt3">b</p>
11472 Parsoid: Merge double tds (T52603)
11477 |{{echo|{{!}} foo}}
11481 <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>
11486 Parsoid: Merge double tds in nested transclusion content (T52603)
11492 |{{echo|{{!}} foo}}
11496 <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}}]}'>
11498 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11504 ### <includeonly> and <noinclude> in attributes
11507 0. includeonly around the entire attribute
11509 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11511 <p><span id="v2">bar</span>
11516 1. includeonly in html attr key
11518 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11520 <p><span id="foo">bar</span>
11525 2. includeonly in html attr value
11527 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11528 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11530 <p><span id="v1">bar</span>
11531 <span id="v1">bar</span>
11536 3. includeonly in part of an attr value
11538 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11540 <p><span style="color:red;">bar</span>
11545 4. includeonly in table attributes
11569 ### Token Stream Patcher tests
11571 ### These tests won't always pass wt2wt and other modes because
11572 ### on serialization, the table will be output on a new line.
11573 ### For now, we are blacklisting them, and using this to test selser.
11577 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11579 parsoid=wt2html,wt2wt
11581 {{echo|}}{| width = '100%'
11585 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11586 <tbody><tr><td>foo</td></tr>
11590 ## We used to, but no longer wt2wt this test since the default serializer
11591 ## will normalize the include directives to serialize on their own line.
11592 ## Selser will take care of preserving formatting in scenarios where they
11593 ## intermingled with other wikitext.
11595 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11599 <includeonly>a</includeonly>{| {{{b}}}
11603 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"dsr\":[31,38,null,null],\"src\":\"{{{b}}}\"}'>{{{b}}}</span>"},{"html":""}]]}'>
11604 <tbody><tr><td>c</td></tr>
11609 Table wikitext syntax outside wiki-tables
11613 ! not a table heading
11616 | class="foo bar" | baz
11624 ! not a table heading
11627 | class="foo bar" | baz
11636 ### Testing parsing of templates where a template arg
11637 ### has the same name as the template itself.
11643 {{{quote|{{{1}}}}}}
11647 Templates: Template Name/Arg clash: 1. Use of positional param
11656 Templates: Template Name/Arg clash: 2. Use of named param
11658 {{quote|quote=foo}}
11665 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11674 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11678 Templates: 1. Simple use
11687 Templates: 2. Inside a block tag
11689 <div>{{echo|Foo}}</div>
11690 <blockquote>{{echo|Foo}}</blockquote>
11693 <blockquote>Foo</blockquote>
11703 Templates: P-wrapping: 1a. Templates on consecutive lines
11714 Templates: P-wrapping: 1b. Templates on consecutive lines
11728 Templates: P-wrapping: 1c. Templates on consecutive lines
11731 {{echo|bar}} <div>baz</div>
11744 Templates: P-wrapping: 1d. Template preceded by comment-only line
11753 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11757 Templates: Inline Text: 1. Multiple template uses
11759 {{echo|Foo}}bar{{echo|baz}}
11766 Templates: Inline Text: 2. Back-to-back template uses
11768 {{echo|Foo}}{{echo|bar}}
11775 Templates: Block Tags: 1. Multiple template uses
11777 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11779 <div>Foo</div><div>bar</div><div>baz</div>
11784 Templates: Block Tags: 2. Back-to-back template uses
11786 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11788 <div>Foo</div><div>bar</div>
11792 # This is an edge case relating to paragraph wrapping.
11794 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11799 <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
11804 Templates: Links: 1. Simple example
11806 {{echo|[[Foo|bar]]}}
11808 <p><a href="/wiki/Foo" title="Foo">bar</a>
11813 Templates: Links: 2. Generation of link href
11815 [[{{echo|Foo}}|bar]]
11817 <p><a href="/wiki/Foo" title="Foo">bar</a>
11822 Templates: Links: 3. Generation of part of a link href
11824 [[Fo{{echo|o}}|bar]]
11826 [[Foo{{echo|bar}}]]
11828 [[Foo{{echo|bar}}baz]]
11830 [[Foo{{echo|bar}}|bar]]
11832 [[:Foo{{echo|bar}}]]
11834 [[:Foo{{echo|bar}}|bar]]
11836 <p><a href="/wiki/Foo" title="Foo">bar</a>
11837 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11838 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11839 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11840 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11841 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11846 Templates: Links: 4. Multiple templates generating link href
11848 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11850 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11855 Templates: Links: 5. Generation of link text
11857 [[Foo|{{echo|bar}}]]
11859 <p><a href="/wiki/Foo" title="Foo">bar</a>
11864 Templates: Links: 5. Nested templates (only outermost template should be marked)
11866 {{echo|[[{{echo|Foo}}|bar]]}}
11868 <p><a href="/wiki/Foo" title="Foo">bar</a>
11873 Templates: HTML Tag: 1. Generation of HTML attr. key
11875 <div {{echo|style}}="color:red;">foo</div>
11877 <div style="color:red;">foo</div>
11882 Templates: HTML Tag: 2. Generation of HTML attr. value
11884 <div style={{echo|'color:red;'}}>foo</div>
11886 <div style="color:red;">foo</div>
11891 Templates: HTML Tag: 3. Generation of HTML attr key and value
11893 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11895 <div style="color:red;">foo</div>
11900 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11902 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11904 <div title="This is a long title with just one piece templated">foo</div>
11909 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11911 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11913 <div title="This is a long title with just one piece templated">foo</div>
11918 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11920 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11922 <div title="This is a long title with just one piece templated">foo</div>
11926 # SSS FIXME: While it is great we added support for all this,
11927 # do we want to make this part of the spec? Maybe we want to
11928 # deprecate this kind of usage in the future?
11930 Templates: HTML Tag: 7. Generation of partial attribute key string
11932 <div st{{echo|yle}}="color:red;">foo</div>
11934 <div style="color:red;">foo</div>
11939 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11941 <div {{echo|1=id="v1"}}>bar</div>
11943 <div id="v1">bar</div>
11948 Templates: HTML Tag: 9. Multiple template-generated attributes
11950 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11952 <div id="v1" title="foo">bar</div>
11957 Templates: Support for templates generating attributes and content
11959 {| {{mixed_attr_content_template}}
11964 <table style="color:red;" title="T48811">
11974 <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|}"]}'>
11983 1. Entities and nowikis inside templated attributes should be handled correctly
11985 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11987 <div style="background:#f9f9f9;">foo</div>
11990 <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>
11994 2. Entities and nowikis inside templated attributes should be handled correctly
11997 |{{table_attribs_3}}
12002 <td style="background:#f9f9f9;">Foo
12007 <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>
12012 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12015 |{{table_attribs_3}}
12020 <td style="background:#f9f9f9;">Foo
12024 <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}}]}'>
12025 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12031 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12034 | {{table_attribs_6}} hi
12039 <td style="background: red;"> hi
12044 <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>
12049 Templates: HTML Tables: 1. Generating start of a HTML table
12051 {{echo|<table><tr><td>foo</td>}}</tr></table>
12053 <table><tr><td>foo</td></tr></table>
12058 Templates: HTML Tables: 2a. Generating middle of a HTML table
12060 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12062 <table><tr><td>foo</td></tr></table>
12067 Templates: HTML Tables: 2b. Generating middle of a HTML table
12069 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12071 <table><tr><td>foo</td></tr></table>
12076 Templates: HTML Tables: 3. Generating end of a HTML table
12078 <table><tr>{{echo|<td>foo</td></tr></table>}}
12080 <table><tr><td>foo</td></tr></table>
12085 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12087 {{echo|<table>}}<tr><td>foo</td></tr></table>
12089 <table><tr><td>foo</td></tr></table>
12094 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12096 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12098 <table><tr><td>foo</td></tr></table>
12103 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12105 <table><tr>{{echo|<td>}}foo</td></tr></table>
12107 <table><tr><td>foo</td></tr></table>
12112 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12114 <table><tr><td>foo{{echo|</td>}}</tr></table>
12116 <table><tr><td>foo</td></tr></table>
12121 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12123 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12125 <table><tr><td>foo</td></tr></table>
12130 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12132 <table><tr><td>foo</td></tr>{{echo|</table>}}
12134 <table><tr><td>foo</td></tr></table>
12139 Templates: HTML Tables: 5. Proper fostering of categories from inside
12141 parsoid=wt2html,wt2wt
12143 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12144 <!--Two categories (Bug 50330)-->
12145 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12147 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12148 <!--Two categories (Bug 50330)-->
12149 <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>
12153 Templates: Wiki Tables: 1a. Fostering of entire template content
12161 <tr><td></td></tr></table>
12173 Templates: Wiki Tables: 1b. Fostering of entire template content
12186 <tr><td></td></tr></table>
12200 Templates: Wiki Tables: 2. Fostering of partial template content
12210 <tr><td></td></tr></table>
12223 Templates: Wiki Tables: 3. td-content via multiple templates
12226 {{echo|{{pipe}}a}}{{echo|b}}
12237 Templates: Wiki Tables: 4. Templated tags, no content
12243 <tr><td></td></tr></table>
12248 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12262 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12275 ## This test case is very specific to Parsoid's internals
12276 ## and is hence only tested for Parsoid's code. Parsoid uses
12277 ## a <meta> marker tag for <ref> tags and they are expanded
12278 ## much later. We are verifying that this <meta> tag usage
12279 ## doesn't prevent foster parenting.
12281 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12283 {{PartialTable}}<ref>foo</ref>
12288 <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span><table about="#mwt2">
12292 <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="#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>
12296 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12306 <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{{!}}}"]}'>
12307 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12311 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12316 Templates: Lists: Multi-line list-items via templates
12318 *{{echo|a {{nonexistent|
12320 *{{echo|b {{nonexistent|
12323 <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>
12324 <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>
12329 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12331 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12333 <p><i>ab</i>c<i>d</i>e
12338 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12339 (PHP parser generates misnested html)
12341 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12343 <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>
12347 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12348 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12350 parsoid=wt2html,wt2wt
12352 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12354 <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>
12355 <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>
12356 <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>
12360 Templates: Ugly nesting: 4. Divs opened/closed across templates
12362 a<div>b{{echo|c</div>d}}e
12373 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12379 |{{echo|foo</table>}}
12383 <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|}"]}'>
12387 <td>foo</td></tr></tbody></table><span about="#mwt1">
12388 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12393 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12403 <td>1. {{echo|foo </table>}}</td>
12405 <td>2. {{echo|baz </table>}}</td>
12418 <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>"]}'>
12423 <td>1. foo </td></tr></tbody></table></td>
12425 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12426 </span><span about="#mwt2">
12427 </span><span about="#mwt2">
12428 </span><span about="#mwt2">abc</span><span about="#mwt2">
12429 </span><span about="#mwt2">
12430 </span><span about="#mwt2">
12431 </span><span about="#mwt2">
12432 </span><span about="#mwt2">
12433 </span><span about="#mwt2">
12434 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12435 </span><span about="#mwt2">
12440 Templates: Ugly templates: 3. newline-only template parameter
12449 # This looks like a bug: a single newline triggers p/br for some reason.
12451 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12460 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12461 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12463 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12469 <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
12470 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12474 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12475 # that are "identical" and generate nesting cycles in the algorithm
12477 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12479 {{echo|<table><tr><td><table>}}
12483 <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"}'>
12484 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12485 </table></td></tr></tbody></table>
12489 Templates: Parameters substituted at the top-level
12491 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12493 <p><i>who</i> me? <b>never!</b>
12496 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12500 Parser Functions: 1. Simple example
12509 Parser Functions: 2. Nested use (only outermost should be marked up)
12518 ### Pre-save transform tests
12521 pre-save transform: subst:
12527 This is a test template
12531 pre-save transform: normal template
12541 pre-save transform: nonexistent template
12545 {{thistemplatedoesnotexist}}
12547 {{thistemplatedoesnotexist}}
12551 pre-save transform: subst magic variables
12560 # This is bug 89, which I fixed. -- wtm
12562 pre-save transform: subst: templates with parameters
12566 {{subst:paramtest|param="something else"}}
12568 This is a test template with parameter "something else"
12572 Template:nowikitest
12574 <nowiki>'''not wiki'''</nowiki>
12578 pre-save transform: nowiki in subst (bug 1188)
12582 {{subst:nowikitest}}
12584 <nowiki>'''not wiki'''</nowiki>
12588 Template:commenttest
12590 This template has <!-- a comment --> in it.
12594 pre-save transform: comment in subst (bug 1936)
12598 {{subst:commenttest}}
12600 This template has <!-- a comment --> in it.
12604 pre-save transform: unclosed tag
12608 <nowiki>'''not wiki'''
12610 <nowiki>'''not wiki'''
12614 pre-save transform: mixed tag case
12618 <NOwiki>'''not wiki'''</noWIKI>
12620 <NOwiki>'''not wiki'''</noWIKI>
12624 pre-save transform: unclosed comment in <nowiki>
12628 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12630 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12633 # Leading @ in this template definition works around a limitation
12634 # in parsoid's parserTests which otherwise strips the <span> from the
12635 # result (confusing it for a template wrapper)
12639 @<span onmouseover="alert('crap')">Oh no</span>
12643 (confirming safety of fix for subst bug 1936)
12645 {{Template:dangerous}}
12647 <p>@<span>Oh no</span>
12652 pre-save transform: comment containing gallery (bug 5024)
12656 <!-- <gallery>data</gallery> -->
12658 <!-- <gallery>data</gallery> -->
12662 pre-save transform: comment containing extension
12666 <!-- <tag>data</tag> -->
12668 <!-- <tag>data</tag> -->
12672 pre-save transform: comment containing nowiki
12676 <!-- <nowiki>data</nowiki> -->
12678 <!-- <nowiki>data</nowiki> -->
12682 pre-save transform: <noinclude> in subst (bug 3298)
12692 pre-save transform: <onlyinclude> in subst (bug 3298)
12696 {{subst:Includes2}}
12704 {{<includeonly>subst:</includeonly>Includes}}
12708 Template:SafeSubstTest
12710 {{<includeonly>safesubst:</includeonly>Includes}}
12714 bug 22297: safesubst: works during PST
12718 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12724 bug 22297: safesubst: works during normal parse
12733 subst: does not work during normal parse
12737 <p>{{subst:Includes}}
12742 pre-save transform: context links ("pipe trick")
12746 [[Article (context)|]]
12749 [[Bar:Article (context)|]]
12750 [[:Bar:Article (context)|]]
12752 [[|Article (context)]]
12756 [[Article (context)|Article]]
12757 [[Bar:Article|Article]]
12758 [[:Bar:Article|Article]]
12759 [[Bar:Article (context)|Article]]
12760 [[:Bar:Article (context)|Article]]
12762 [[Article (context)]]
12763 [[Bar:X (Y) Z|X (Y) Z]]
12764 [[:Bar:X (Y) Z|X (Y) Z]]
12768 pre-save transform: context links ("pipe trick") with interwiki prefix
12772 [[interwiki:Article|]]
12773 [[:interwiki:Article|]]
12774 [[interwiki:Bar:Article|]]
12775 [[:interwiki:Bar:Article|]]
12777 [[interwiki:Article|Article]]
12778 [[:interwiki:Article|Article]]
12779 [[interwiki:Bar:Article|Bar:Article]]
12780 [[:interwiki:Bar:Article|Bar:Article]]
12784 pre-save transform: context links ("pipe trick") with parens in title
12786 pst title=[[Somearticle (context)]]
12790 [[Article (context)|Article]]
12794 pre-save transform: context links ("pipe trick") with comma in title
12796 pst title=[[Someplace, Somewhere]]
12799 [[Otherplace, Elsewhere|]]
12800 [[Otherplace, Elsewhere, Anywhere|]]
12802 [[Otherplace, Somewhere|Otherplace]]
12803 [[Otherplace, Elsewhere|Otherplace]]
12804 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12808 pre-save transform: context links ("pipe trick") with parens and comma
12810 pst title=[[Someplace (IGNORED), Somewhere]]
12813 [[Otherplace (place), Elsewhere|]]
12815 [[Otherplace, Somewhere|Otherplace]]
12816 [[Otherplace (place), Elsewhere|Otherplace]]
12820 pre-save transform: context links ("pipe trick") with comma and parens
12822 pst title=[[Who, me? (context)]]
12825 [[Me, Myself, and I (1937 song)|]]
12827 [[Yes, you. (context)|Yes, you.]]
12828 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12832 pre-save transform: context links ("pipe trick") with namespace
12834 pst title=[[Ns:Somearticle]]
12838 [[Ns:Article|Article]]
12842 pre-save transform: context links ("pipe trick") with namespace and parens
12844 pst title=[[Ns:Somearticle (context)]]
12848 [[Ns:Article (context)|Article]]
12852 pre-save transform: context links ("pipe trick") with namespace and comma
12854 pst title=[[Ns:Somearticle, Context, Whatever]]
12858 [[Ns:Article, Context, Whatever|Article]]
12862 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12864 pst title=[[Ns:Somearticle, Context (context)]]
12868 [[Ns:Article (context)|Article]]
12872 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12874 pst title=[[Ns:Somearticle (IGNORED), Context]]
12878 [[Ns:Article, Context|Article]]
12882 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12886 [[Article(context)|]]
12887 [[Bar:Article(context)|]]
12888 [[:Bar:Article(context)|]]
12889 [[|Article(context)]]
12893 [[Article(context)|Article]]
12894 [[Bar:Article(context)|Article]]
12895 [[:Bar:Article(context)|Article]]
12896 [[Article(context)]]
12897 [[Bar:X(Y)Z|X(Y)Z]]
12898 [[:Bar:X(Y)Z|X(Y)Z]]
12902 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12906 [[Article (context)|]]
12907 [[Bar:Article (context)|]]
12908 [[:Bar:Article (context)|]]
12909 [[|Article (context)]]
12913 [[Article (context)|Article]]
12914 [[Bar:Article (context)|Article]]
12915 [[:Bar:Article (context)|Article]]
12916 [[Article (context)]]
12917 [[Bar:X (Y) Z|X (Y) Z]]
12918 [[:Bar:X (Y) Z|X (Y) Z]]
12922 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12926 [[Article(context)|]]
12927 [[Bar:Article(context)|]]
12928 [[:Bar:Article(context)|]]
12929 [[|Article(context)]]
12933 [[Article(context)|Article]]
12934 [[Bar:Article(context)|Article]]
12935 [[:Bar:Article(context)|Article]]
12936 [[Article(context)]]
12937 [[Bar:X(Y)Z|X(Y)Z]]
12938 [[:Bar:X(Y)Z|X(Y)Z]]
12942 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12946 [[Article (context), context|]]
12947 [[Article (context),context|]]
12948 [[Bar:Article (context), context|]]
12949 [[Bar:Article (context),context|]]
12950 [[:Bar:Article (context), context|]]
12951 [[:Bar:Article (context),context|]]
12953 [[Article (context), context|Article]]
12954 [[Article (context),context|Article]]
12955 [[Bar:Article (context), context|Article]]
12956 [[Bar:Article (context),context|Article]]
12957 [[:Bar:Article (context), context|Article]]
12958 [[:Bar:Article (context),context|Article]]
12962 pre-save transform: trim trailing empty lines
12966 Empty lines are trimmed
12972 Empty lines are trimmed
12976 pre-save transform: Signature expansion
12981 * <noinclude>~~~</noinclude>
12982 * <includeonly>~~~</includeonly>
12983 * <onlyinclude>~~~</onlyinclude>
12985 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12986 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12987 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12988 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12993 pre-save transform: Signature expansion in nowiki tags (bug 93)
12999 <nowiki>~~~~</nowiki>
13001 <includeonly><nowiki>~~~~</nowiki></includeonly>
13003 <noinclude><nowiki>~~~~</nowiki></noinclude>
13005 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13007 {{subst:Foo}} shall be converted to FOO
13009 As well as inside noinclude/onlyinclude
13010 <noinclude>{{subst:Foo}}</noinclude>
13011 <onlyinclude>{{subst:Foo}}</onlyinclude>
13013 But not inside includeonly
13014 <includeonly>{{subst:Foo}}</includeonly>
13018 <nowiki>~~~~</nowiki>
13020 <includeonly><nowiki>~~~~</nowiki></includeonly>
13022 <noinclude><nowiki>~~~~</nowiki></noinclude>
13024 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13026 FOO shall be converted to FOO
13028 As well as inside noinclude/onlyinclude
13029 <noinclude>FOO</noinclude>
13030 <onlyinclude>FOO</onlyinclude>
13032 But not inside includeonly
13033 <includeonly>{{subst:Foo}}</includeonly>
13037 Parsoid: Recognize nowiki with trailing space in tags
13041 <nowiki ><div>[[foo]]</nowiki >
13049 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13056 Parsoid: Recognize nowiki with odd capitalization
13060 <noWikI ><div>[[foo]]</Nowiki >
13062 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13067 Parsoid: Escape nowiki with trailing space in tags
13071 <p><nowiki > foo </nowiki ></p>
13072 <p>a<nowiki />b</p>
13073 <p>c<nowiki/ >d</p>
13075 <nowiki > foo </nowiki >
13083 Parsoid: Escape weird noWikI capitalizations
13087 <p><noWikI > foo </NoWikI ></p>
13089 <noWikI > foo </NoWikI >
13093 ### Message transform tests
13096 message transform: magic variables
13106 message transform: should not transform wiki markup
13116 message transform: <noinclude> in transcluded template (bug 4926)
13126 message transform: <onlyinclude> in transcluded template (bug 4926)
13136 {{#special:}} page name, known
13140 {{#special:Recentchanges}}
13142 Special:RecentChanges
13146 {{#special:}} page name with subpage, known
13150 {{#special:Recentchanges/param}}
13152 Special:RecentChanges/param
13156 {{#special:}} page name, unknown
13160 {{#special:foobar nonexistent}}
13162 Special:Foobar nonexistent
13166 {{#speciale:}} page name, known
13170 {{#speciale:Recentchanges}}
13172 Special:RecentChanges
13176 {{#speciale:}} page name with subpage, known
13180 {{#speciale:Recentchanges/param}}
13182 Special:RecentChanges/param
13186 {{#speciale:}} page name, unknown
13190 {{#speciale:foobar nonexistent}}
13192 Special:Foobar_nonexistent
13198 ### For Parsoid-specific tests, see
13199 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13204 parsoid=wt2html,wt2wt,html2html
13206 [[Image:foobar.jpg]]
13208 <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>
13211 <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>
13215 Simple image (using File: namespace, now canonical)
13217 [[File:Foobar.jpg]]
13219 <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>
13222 <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>
13226 Right-aligned image
13228 [[File:Foobar.jpg|right]]
13230 <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>
13233 <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>
13239 [[File:Foobar.jpg|right|Caption text]]
13241 <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>
13244 <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>
13248 Image with caption, bug 53312 #1
13250 [[File:Foobar.jpg|right|Caption page stuff]]
13252 <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>
13255 <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>
13259 Image with caption, bug 53312 #2
13261 [[File:Foobar.jpg|right|Caption page=]]
13263 <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>
13266 <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>
13270 Image with caption, bug 53312 #3
13272 [[File:Foobar.jpg|right|Caption page=stuff]]
13274 <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>
13277 <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>
13281 Allow empty links in image captions (Bug 60753)
13285 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13290 <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>
13293 <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>
13295 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13296 </figcaption></figure>
13300 Titles in unlinked images (T23454)
13302 [[File:Foobar.jpg|link=|stuff]]
13304 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13309 Link with empty target
13318 Image with link trail
13320 Linktrails should not work for images: [[File:Foobar.jpg]]s
13322 <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
13325 <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>
13329 Image with empty attribute
13331 parsoid=wt2html,wt2wt,html2html
13333 [[File:Foobar.jpg|right||Caption text]]
13335 <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>
13338 <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>
13342 1. Block image with individual attributes from templates
13344 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13346 <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>
13349 <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>
13353 2. Block Image with individual attributes from templates
13355 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13357 <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>
13360 <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>
13364 3. Inline image with individual attributes from templates
13366 [[File:Foobar.jpg|{{echo|50px}}]]
13368 <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>
13371 <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>
13374 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13375 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13377 Image with multiple attributes from the same template
13379 [[File:Foobar.jpg|{{image_attribs}}]]
13381 <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>
13384 <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>
13388 Image with link tails
13392 123[[File:Foobar.jpg]]456
13393 123[[File:Foobar.jpg|right]]456
13394 123[[File:Foobar.jpg|thumb]]456
13396 <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
13398 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
13399 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
13402 <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>
13404 <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>
13406 <div class="thumb tright">
13407 <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>
13408 <div class="thumbcaption">
13409 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13415 <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>
13416 <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>
13417 <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>
13421 Image with multiple captions -- only last one is accepted
13423 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13425 <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>
13428 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption3 - accepted</figcaption></figure>
13432 Image with multiple widths -- use last
13434 [[File:Foobar.jpg|200px|300px|caption]]
13436 <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>
13439 <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>
13443 Image with multiple alignments -- use first (bug 48664)
13447 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13449 [[File:Foobar.jpg|middle|text-top|caption]]
13451 <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>
13452 <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>
13455 <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>
13456 <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>
13460 Image with width attribute at different positions
13462 [[File:Foobar.jpg|200px|right|Caption]]
13463 [[File:Foobar.jpg|right|200px|Caption]]
13464 [[File:Foobar.jpg|right|Caption|200px]]
13466 <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>
13467 <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>
13468 <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>
13471 <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>
13472 <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>
13473 <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>
13476 # a sad bit of backward-compatibility
13478 Image with size specified with pxpx (bug 13500, 51628)
13480 parsoid=wt2html,wt2wt,html2html
13482 [[File:Foobar.jpg|20pxpx]]
13483 [[File:Foobar.jpg|200x20pxpx]]
13485 <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>
13486 <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>
13489 <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>
13493 Image with link parameter, wiki target
13495 [[File:Foobar.jpg|link=Main Page]]
13497 <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>
13500 <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>
13503 # parsoid bug 49293 (part 1)
13505 Image with link parameter, URL target
13507 [[File:Foobar.jpg|link=http://example.com/]]
13509 <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>
13512 <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>
13515 # parsoid bug 49293 (part 2)
13517 Image with link parameter, protocol-less URL target
13519 [[File:Foobar.jpg|link=//example.com/]]
13521 <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>
13524 <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>
13528 Escaping non-block captions (T107435)
13531 "modes": ["wt2wt"],
13533 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13537 [[Image:Foobar.jpg|caption]]
13539 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13542 # wgExternalLinkTarget not supported by Parsoid
13544 Image with link parameter, wgExternalLinkTarget
13546 [[Image:foobar.jpg|link=http://example.com/]]
13548 wgExternalLinkTarget='foobar'
13550 <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>
13555 Image with link parameter, wgNoFollowLinks set to false
13557 [[Image:foobar.jpg|link=http://example.com/]]
13559 wgNoFollowLinks=false
13561 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13566 Image with link parameter, wgNoFollowDomainExceptions
13568 [[Image:foobar.jpg|link=http://example.com/]]
13570 wgNoFollowDomainExceptions='example.com'
13572 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13576 # wgExternalLinkTarget not supported by Parsoid
13578 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13580 [[Image:foobar.jpg|link=http://example.com/|Title]]
13582 wgExternalLinkTarget='foobar'
13584 <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>
13589 Image with empty link parameter
13591 [[File:Foobar.jpg|link=]]
13593 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13596 <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>
13600 Image with link parameter (wiki target) and unnamed parameter
13602 [[File:Foobar.jpg|link=Main_Page|Title]]
13604 <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>
13607 <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>
13611 Image with link parameter (URL target) and unnamed parameter
13613 [[File:Foobar.jpg|link=http://example.com/|Title]]
13615 <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>
13618 <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>
13622 Thumbnail image with link parameter
13625 parsoid=wt2html,wt2wt,html2html
13627 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13629 <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>
13632 <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>
13636 Manually-specified thumbnail image
13640 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13642 <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>
13645 <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>
13649 Manually-specified thumbnail image with explicit link to wiki page
13652 parsoid=wt2html,wt2wt,html2html
13654 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13656 <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>
13659 <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>
13663 Manually-specified thumbnail image with explicit link to url
13666 parsoid=wt2html,wt2wt,html2html
13668 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13670 <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>
13673 <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>
13677 Manually-specified thumbnail image with explicit no link
13680 parsoid=wt2html,wt2wt,html2html
13682 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13684 <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>
13687 <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>
13691 Manually-specified thumbnail image with explicit link and alt text
13694 parsoid=wt2html,wt2wt,html2html
13696 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13698 <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>
13701 <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>
13705 Image with frame and link
13707 parsoid=wt2html,wt2wt,html2html
13709 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13711 <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>
13714 <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>
13718 Image with frame and link and explicit alt
13720 parsoid=wt2html,wt2wt,html2html
13722 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13724 <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>
13727 <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>
13731 Image with wiki markup in implicit alt
13733 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13735 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13737 <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>
13738 </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>
13741 <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>
13743 <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>
13747 Alt image option should handle most kinds of wikitext without barfing
13749 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13751 <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>
13754 <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>
13757 ###################
13758 # Conflicting image format options.
13759 # First option specified should 'win'.
13760 # All three cases in each test should be identical.
13763 Image with 'frameless' first.
13765 parsoid=wt2html,wt2wt,html2html
13767 [[File:Foobar.jpg|frameless|caption]]
13769 [[File:Foobar.jpg|frameless|frame|caption]]
13771 [[File:Foobar.jpg|frameless|thumb|caption]]
13773 <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>
13774 </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>
13775 </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>
13778 <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>
13779 <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>
13780 <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>
13784 Image with 'frame' first.
13786 parsoid=wt2html,wt2wt,html2html
13788 [[File:Foobar.jpg|frame|caption]]
13789 [[File:Foobar.jpg|frame|frameless|caption]]
13790 [[File:Foobar.jpg|frame|thumb|caption]]
13792 <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>
13793 <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>
13794 <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>
13797 <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>
13798 <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>
13799 <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>
13803 Image with 'thumb' first.
13805 parsoid=wt2html,wt2wt,html2html
13807 [[File:Foobar.jpg|thumb|caption]]
13808 [[File:Foobar.jpg|thumb|frameless|caption]]
13809 [[File:Foobar.jpg|thumb|frame|caption]]
13811 <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>
13812 <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>
13813 <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>
13816 <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>
13817 <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>
13818 <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>
13821 ###################
13823 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13824 # and https://phabricator.wikimedia.org/T64258
13825 # Foobar has actual size of 1941x220
13826 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13827 # a scalable format.
13828 # 2. Framed images always ignore size options; always render at default size.
13829 # 3. "Unspecified format" and border are the only types which can be
13833 Image: "unspecified format" and border enlarge
13835 parsoid=wt2html,wt2wt,html2html
13837 [[File:Foobar.jpg|2000px]]
13839 [[File:Foobar.jpg|border|2000px]]
13841 <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>
13842 </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>
13845 <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>
13846 <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>
13850 Image: "unspecified format" and border reduce
13852 parsoid=wt2html,wt2wt,html2html
13854 [[File:Foobar.jpg|1000px]]
13856 [[File:Foobar.jpg|border|1000px]]
13858 <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>
13859 </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>
13862 <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>
13863 <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>
13867 Image: thumbs reduce
13869 parsoid=wt2html,wt2wt,html2html
13871 [[File:Foobar.jpg|thumb|50px]]
13873 <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>
13876 <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>
13880 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13882 parsoid=wt2html,wt2wt,html2html
13884 [[File:Foobar.jpg|thumb|2000px]]
13886 [[File:Foobar.svg|thumb|2000px]]
13888 <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>
13889 <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>
13892 <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>
13893 <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>
13897 Image: frameless can reduce in size
13899 parsoid=wt2html,wt2wt,html2html
13901 [[File:Foobar.jpg|frameless|50px]]
13903 <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>
13906 <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>
13910 Image: bitmap frameless can't be enlarged past original size, but vector can
13912 parsoid=wt2html,wt2wt,html2html
13914 [[File:Foobar.jpg|frameless|2000px]]
13916 [[File:Foobar.svg|frameless|2000px]]
13918 <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>
13919 </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>
13922 <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>
13923 <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>
13927 Image: framed images are always unscaled.
13929 parsoid=wt2html,wt2wt,html2html
13931 [[File:Foobar.jpg|frame]]
13933 [[File:Foobar.jpg|frame|50px]]
13935 [[File:Foobar.jpg|frame|50x50px]]
13937 [[File:Foobar.jpg|frame|2000px]]
13939 <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>
13940 <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>
13941 <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>
13942 <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>
13945 <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>
13946 <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>
13947 <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>
13948 <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>
13951 ###################
13954 Link to image page- image page normally doesn't exists, hence edit link
13955 Add test with existing image page
13956 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13960 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13965 bug 18784 Link to non-existent image page with caption should use caption as link text
13967 [[:Image:test|caption]]
13969 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13974 Frameless image caption with a free URL
13976 [[File:Foobar.jpg|http://example.com]]
13978 <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>
13981 <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>
13985 Thumbnail image caption with a free URL
13989 [[File:Foobar.jpg|thumb|http://example.com]]
13991 <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>
13994 <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>
13998 Thumbnail image caption with a free URL and explicit alt
14001 parsoid=wt2html,wt2wt,html2html
14003 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14005 <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>
14008 <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>
14012 SVG thumbnails with no language set
14015 [[File:Foobar.svg|thumb|caption]]
14017 <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>
14020 <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>
14024 SVG thumbnails with language de
14026 parsoid=wt2html,wt2wt,html2html
14028 [[File:Foobar.svg|thumb|caption|lang=de]]
14030 <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>
14033 <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>
14037 SVG thumbnails with invalid language code
14039 parsoid=wt2html,wt2wt,html2html
14041 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14043 <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>
14046 <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>
14050 BUG 1887: A ISBN with a thumbnail
14052 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14054 <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>
14057 <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>
14061 BUG 1887: A RFC with a thumbnail
14063 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14065 <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>
14068 <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>
14072 BUG 1887: A mailto link with a thumbnail
14074 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14076 <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>
14079 <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>
14082 # Pending resolution to bug 368
14084 BUG 648: Frameless image caption with a link
14086 [[File:Foobar.jpg|text with a [[link]] in it]]
14088 <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>
14091 <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>
14095 BUG 648: Frameless image caption with a link (suffix)
14097 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14099 <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>
14102 <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>
14106 BUG 648: Frameless image caption with an interwiki link
14108 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14110 <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>
14113 <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>
14117 BUG 648: Frameless image caption with a piped interwiki link
14119 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14121 <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>
14124 <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>
14128 T107474: Frameless image caption with <nowiki>
14130 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14132 <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>
14136 Escape HTML special chars in image alt text
14138 [[File:Foobar.jpg|& < > "]]
14140 <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>
14143 <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>
14147 Entities in file name and attributes
14149 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14151 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14154 <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>
14158 BUG 499: Alt text should have Ӓ, not &1234;
14160 [[File:Foobar.jpg|♀]]
14162 <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>
14165 <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>
14169 Broken image caption with link
14171 parsoid=wt2html,wt2wt,html2html
14173 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14175 <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.
14178 <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>
14182 Image caption containing another image
14184 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14186 <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>
14189 <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>
14193 Image: caption containing a newline
14195 [[File:Foobar.jpg|This
14198 <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>
14201 <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>
14205 Image: caption containing leading space
14206 (The leading space should not trigger nowiki escaping in wt2wt mode)
14208 [[File:Foobar.jpg|thumb| bar]]
14210 <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>
14213 <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>
14217 Image: caption containing a table
14219 parsoid=wt2html,wt2wt,html2html
14221 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14227 and some more text.]]
14229 <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>
14232 <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
14235 <tr><th>Foo </th><th>Bar</th></tr>
14238 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14242 Bug 3090: External links other than http: in image captions
14244 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14246 <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>
14249 <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>
14255 parsoid=wt2html,wt2wt,html2html
14257 [[Image:foobar.jpg|a|class=b]]
14259 <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>
14262 <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>
14266 Localized image handling (1).
14268 parsoid=wt2html,wt2wt,html2html
14271 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14273 <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>
14276 <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>
14280 Localized image handling (2).
14283 parsoid=wt2html,wt2wt,html2html
14286 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14288 <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>
14291 <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>
14295 Localized image handling (3).
14300 <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>
14302 [[File:Foobar.jpg|بندانگشتی]]
14306 "border", "frameless" and "class" attributes on an image.
14309 parsoid=wt2html,wt2wt,html2html
14311 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14313 <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>
14316 <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>
14319 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14321 Invalid image attributes (bug 62500)
14324 parsoid=wt2html,wt2wt,html2html
14326 [[File:Foobar.jpg|thumb|float|left|caption]]
14328 [[File:Foobar.jpg|thumb|righ|caption]]
14330 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14332 <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>
14333 <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>
14334 <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>
14337 <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>
14338 <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>
14339 <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>
14345 #REDIRECT [[File:Barfoo.jpg]]
14348 # FIXME: Parsoid should run this test -- but we'd need to teach the
14349 # mockAPI about the redirected Barfoo.jpg image.
14353 [[Image:Barfoo.jpg]]
14355 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14360 Missing image with uploads disabled
14364 [[File:Foobaz.jpg]]
14366 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14369 <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>
14372 # Parsoid-specific testing for images
14373 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14374 # Currently imperfect due to a flaw in the Parsoid testrunner
14376 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14380 Parsoid-specific image handling - simple image with size and middle alignment
14382 [[File:Foobar.jpg|middle|50px]]
14384 <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>
14388 Parsoid-specific image handling - simple image with size, middle alignment,
14389 non-standard namespace alias
14391 parsoid=wt2wt,wt2html,html2html
14393 [[Image:Foobar.jpg|middle|50px]]
14395 <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>
14399 Parsoid-specific image handling - simple image with size and middle alignment
14402 [[File:Foobar.jpg|50px|middle]]
14404 <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>
14408 Parsoid-specific image handling - simple image with size and middle alignment
14409 and non-standard namespace name
14411 parsoid=wt2html,wt2wt,html2html
14413 [[Image:Foobar.jpg|50px|middle]]
14415 <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>
14419 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14421 [[File:Foobar.jpg|500x10px|baseline|caption]]
14423 <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>
14427 Parsoid-specific image handling - simple image with border and size spec
14429 [[File:Foobar.jpg|50px|border|caption]]
14431 <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>
14435 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14437 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14439 <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>
14443 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14446 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14448 <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>
14452 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14454 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14456 <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>
14460 Parsoid-specific image handling - thumbnail with specific size, halign,
14461 valign, and caption (existing content)
14463 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14465 <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>
14469 Parsoid-specific image handling - framed image with specific size and caption
14472 parsoid=wt2html,wt2wt,html2html
14474 [[File:Foobar.jpg|frame|500x50px|caption]]
14476 <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>
14480 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14483 parsoid=wt2html,wt2wt,html2html
14485 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14487 <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>
14491 Parsoid-specific image handling - frameless image with specific size, border, and caption
14493 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14495 <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>
14499 Parsoid-specific image handling - simple image with a formatted caption
14501 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14503 <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>
14507 Parsoid-specific image handling - caption with a template in it
14509 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14511 <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>
14515 Parsoid-specific image handling - caption with unbalanced tags in it
14517 parsoid=wt2html,wt2wt,html2html
14520 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14524 <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>
14529 Parsoid-specific image handling - empty caption (1)
14531 parsoid=wt2html,wt2wt
14533 [[File:Foobar.jpg|thumb|]]
14535 <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>
14538 # empty captions don't get serialized unless we're in the "round trip" case
14540 Parsoid-specific image handling - empty caption (2)
14544 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14545 <a href="./File:Foobar.jpg">
14546 <img resource="./File:Foobar.jpg"
14547 src="//example.com/images/3/3a/Foobar.jpg"
14548 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14549 height="25" width="220"/>
14551 <figcaption></figcaption>
14554 [[File:Foobar.jpg|thumb]]
14558 Parsoid-specific image handling - whitespace caption
14560 [[File:Foobar.jpg|thumb| ]]
14562 <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>
14566 Parsoid-specific image handling - lang option
14569 [[File:Foobar.svg|lang=de|caption]]
14573 <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>
14577 ## Edge case bugs in Parsoid from T93580
14579 T93580: 1. Templated <ref> inside block images
14581 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14585 <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="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
14587 <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="#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>
14591 T93580: 2. <ref> inside inline images
14593 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14597 <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=\"#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>
14599 <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="#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>
14603 T93580: 3. Templated <ref> inside inline images
14605 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14609 <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=\"#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>
14611 <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="#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>
14618 Subpage test/subpage
14626 subpage title=[[Subpage test]]
14630 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14635 Subpage noslash link
14637 subpage title=[[Subpage test]]
14641 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14646 Subpage test/1/2/subpage
14652 Relative subpage noslash link
14654 parsoid=wt2wt,wt2html,html2html
14655 subpage title=[[Subpage test/1/2/3/4]]
14661 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14662 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14665 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14666 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14670 Parsoid: dot-slash prefixed wikilinks
14680 </p><p>[[././baz/]]
14685 </p><p>[[././baz/]]
14690 Render invalid page names as plain text (bug 51090)
14703 [[{{echo|./../foo}}|bar]]
14704 [[{{echo|foo/.}}|bar]]
14705 [[{{echo|foo/..}}|bar]]
14706 [[{{echo|foo~~~~bar}}]]
14707 [[{{echo|foo>bar}}]]
14708 [[{{echo|foo././bar}}]]
14709 [[{{echo|foo{bar}}]]
14710 [[{{echo|foo}bar}}]]
14711 [[{{echo|foo[bar}}]]
14712 [[{{echo|foo]bar}}]]
14713 [[{{echo|foo<bar}}]]
14715 <p>[[./../foo|bar]]
14725 </p><p>[[./../foo|bar]]
14738 <p>[[./../foo|bar]]
14749 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14750 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14751 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14752 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14753 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14754 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14755 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14756 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14757 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14758 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14759 [[<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>
14767 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14772 BUG 561: {{/Subpage}}
14774 subpage title=[[Page]]
14778 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14786 Category:MediaWiki User's Guide
14794 [[:Category:MediaWiki User's Guide]]
14796 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14805 [[Category:MediaWiki User's Guide]]
14807 cat=MediaWiki_User's_Guide sort=
14809 <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"}}'/>
14813 PAGESINCATEGORY invalid title fatal (r33546 fix)
14815 {{PAGESINCATEGORY:<bogus>}}
14822 Category with different sort key
14826 [[Category:MediaWiki User's Guide|Foo]]
14828 cat=MediaWiki_User's_Guide sort=Foo
14830 <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"}}'/>
14834 Category with identical sort key
14838 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14840 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14842 <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"}}'/>
14846 Category with empty sort key
14851 [[Category:MediaWiki User's Guide|]]
14853 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14857 Category with empty sort key and parentheses
14862 [[Category:Foo (bar)|]]
14864 [[Category:Foo (bar)|Foo]]
14868 Category with link tail
14873 123[[Category:Foo]]456
14875 123[[Category:Foo]]456
14879 Category with template
14884 [[Category:{{echo|Foo}}]]
14886 [[Category:{{echo|Foo}}]]
14890 Category with template in sort key
14895 [[Category:Foo|{{echo|Bar}}]]
14897 [[Category:Foo|{{echo|Bar}}]]
14901 Category with template in sort key and title
14906 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14908 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14911 ## We used to, but no longer wt2wt this test since the default serializer
14912 ## will normalize all categories to serialize on their own line.
14913 ## This wikitext usage is going to be fairly uncommon in production and
14914 ## selser will take care of preserving formatting in those scenarios.
14916 Category / paragraph interactions
14920 Foo [[Category:Baz]] Bar
14922 Foo [[Category:Baz]]
14930 [[Category:Baz]] Bar
14943 {{echo|[[Category:Baz]]}}
14956 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14957 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14958 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14959 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14960 <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>
14961 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14964 ## We used to, but no longer wt2wt this test since the default serializer
14965 ## will normalize all categories to serialize on their own line.
14966 ## This wikitext usage is going to be fairly uncommon in production and
14967 ## selser will take care of preserving formatting in those scenarios.
14969 ## The whitespace on the empty line is part of the test. Please do not delete
14971 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14977 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14979 {{echo|[[Category:Foo]] and so should this!}}
14981 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14986 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14988 <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>
14991 ## Parsoid will not try to wt2wt this while preserving newlines because
14992 ## it suppresses excess newlines within list items -- and we don't want to
14993 ## introduce a special case just for categories, which is, in reality somewhat
14994 ## odd behavior -- categories are unlikely to be used in list items like this
14995 ## in top-level pages and are only likely to show up in template-generated
14996 ## list items where this RT-ing is a non-issue.
14998 ## The whitespace on the empty line is part of the test. Please do not delete
15000 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15006 [[Category:Foo]] and this should be part of the same list item
15009 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15011 <ul><li>This and this should be part of the same list item</li>
15012 <li>So should this and this should be part of the same list item</li></ul>
15015 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15016 <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>
15020 ## Newlines and categories that follow the last item of a list
15021 ## are treated differently because this (list followed by categories)
15022 ## is an extremely common pattern on wikis.
15024 3. Categories and newlines: newline suppression for last list item should RT properly
15037 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15039 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15040 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15044 4. Categories and newlines: newline suppression for last list item should RT properly
15052 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15054 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15057 ## only wt2html for this to make sure the algo only applies to the rightmost path
15059 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15072 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15074 <ul><li> d</li></ul></li></ul>
15075 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15078 ## We used to, but no longer wt2wt this test since the default serializer
15079 ## will normalize all categories to serialize on their own line.
15080 ## This wikitext usage is going to be fairly uncommon in production and
15081 ## selser will take care of preserving formatting in those scenarios.
15083 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15087 * a [[Category:Foo]]
15089 <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>
15092 # This test also demonstrates because of newline+category tunneling
15093 # through the list hander, template wrapping doesn't expand to the
15094 # containing list when the list item swallows the category.
15096 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15101 <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
15102 </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>
15106 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15110 {{echo|[[Category:Foo]]
15114 <ul><li> a</li></ul>
15116 <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">
15117 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15118 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15122 Category links with multiple namespaces
15124 [[Category:Project:Foo]]
15126 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15130 Parsoid: Serialize link to category page with colon escape
15136 [[:Category:Foo|Bar]]
15139 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15140 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15144 # We used to, but no longer wt2wt this test since the default serializer
15145 # will normalize all categories to serialize on their own line.
15146 # This wikitext usage is going to be fairly uncommon in production and
15147 # selser will take care of preventing whitespace insertion if this
15148 # occurs in an article.
15150 # html2html disabled for the same reason (whitespace insertion between
15153 # html2wt disabled because it localizes the "Category" namespace.
15155 Link prefix/suffixes aren't applied to category links
15165 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15169 Parsoid: Serialize link to file page with colon escape
15175 [[:File:Foo.png|Bar]]
15178 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15179 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15184 Parsoid: Serialize a genuine category link without colon escape
15189 [[Category:Foo|Bar]]
15191 <link rel="mw:PageProp/Category" href="./Category:Foo">
15192 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15196 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15200 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15202 [[Category:Toxine bactérienne]]
15206 Parsoid: Defaultsort
15208 {{DEFAULTSORT:Foo}}
15210 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15214 Parsoid: Defaultsort (template-generated)
15216 {{{{echo|DEFAULTSORT}}:Foo}}
15218 <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}}]}'/>
15222 ### Inter-language links
15225 Interlanguage links
15233 es:Alimento fr:Nourriture zh:食品
15235 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15236 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15237 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15241 Duplicate interlanguage links (bug 24502)
15252 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15253 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15254 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15255 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15262 Basic section headings
15269 ===Smaller headline===
15272 <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>
15275 <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>
15278 <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>
15284 Section headings with TOC
15287 === Subheadline 1 ===
15288 ===== Skipping a level =====
15289 ====== Skipping a level ======
15293 ===Another headline===
15295 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15297 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15299 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15301 <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>
15303 <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>
15310 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15312 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15318 <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>
15319 <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>
15320 <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>
15321 <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>
15322 <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>
15325 <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>
15330 TOC anchors don't collide
15338 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15340 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15341 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15342 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15343 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15347 <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>
15348 <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>
15349 <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>
15350 <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>
15354 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15356 Handling of sections up to level 6 and beyond
15359 == Level 2 Heading==
15360 === Level 3 Heading===
15361 ==== Level 4 Heading====
15362 ===== Level 5 Heading=====
15363 ====== Level 6 Heading======
15364 ======= Level 7 Heading=======
15365 ======== Level 8 Heading========
15366 ========= Level 9 Heading=========
15367 ========== Level 10 Heading==========
15369 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15371 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15373 <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>
15375 <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>
15377 <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>
15379 <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>
15381 <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>
15382 <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>
15383 <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>
15384 <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>
15385 <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>
15399 <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>
15400 <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>
15401 <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>
15402 <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>
15403 <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>
15404 <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>
15405 <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>
15406 <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>
15407 <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>
15408 <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>
15413 TOC regression (T11764)
15417 ==== title 1.1.1 ====
15422 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15424 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15426 <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>
15428 <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>
15431 <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>
15434 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15436 <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>
15442 <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>
15443 <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>
15444 <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>
15445 <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>
15446 <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>
15447 <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>
15452 TOC for heading containing <span id="..."></span> (T96153)
15455 ==<span id="old-anchor"></span>New title==
15457 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15459 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15463 <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>
15468 TOC with wgMaxTocLevel=3 (bug 6204)
15474 ==== title 1.1.1 ====
15479 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15481 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15483 <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>
15484 <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>
15487 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15489 <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>
15495 <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>
15496 <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>
15497 <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>
15498 <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>
15499 <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>
15500 <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>
15505 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15511 ====Section 1.1.1====
15512 ====Section 1.1.1.1====
15515 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15517 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15519 <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>
15522 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15526 <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>
15527 <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>
15528 <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>
15529 <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>
15530 <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>
15536 Resolving duplicate section names
15541 <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>
15542 <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>
15547 Resolving duplicate section names with differing case (bug 10721)
15552 <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>
15553 <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>
15565 Template with sections, __NOTOC__
15572 <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>
15573 <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>
15574 <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>
15575 <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>
15580 __NOEDITSECTION__ keyword
15586 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15587 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15592 Link inside a section heading
15594 ==Section with a [[Main Page|link]] in it==
15596 <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>
15601 TOC regression (T14077)
15608 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15610 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15612 <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>
15615 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15619 <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>
15620 <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>
15621 <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>
15626 BUG 1219 URL next to image (good)
15628 http://example.com [[File:Foobar.jpg]]
15630 <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>
15633 <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>
15637 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15640 The line above must have a trailing space!
15643 But just in case it doesn't...
15645 <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>
15646 <p>The line above must have a trailing space!
15648 <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>
15649 <p>But just in case it doesn't...
15654 Header with special characters (bug 25462)
15656 The tooltips shall not show entities to the user (ie. be double escaped)
15673 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15675 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15677 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15678 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15679 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15680 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15681 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15685 <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>
15688 <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>
15691 <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>
15694 <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>
15697 <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>
15703 Header with space, plus and underscore as entity
15705 Id should not contain + for spaces
15707 == Space between Text ==
15710 == Space-Entity between Text ==
15713 == Plus+between+Text ==
15716 == Plus-Entity+between+Text ==
15719 == Underscore_between_Text ==
15722 == Underscore-Entity_between_Text ==
15725 [[#Space between Text]]
15726 [[#Space-Entity between Text]]
15727 [[#Plus+between+Text]]
15728 [[#Plus-Entity+between+Text]]
15729 [[#Underscore_between_Text]]
15730 [[#Underscore-Entity_between_Text]]
15732 <p>Id should not contain + for spaces
15734 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15736 <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>
15737 <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>
15738 <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>
15739 <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>
15740 <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>
15741 <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>
15745 <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>
15748 <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>
15751 <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>
15754 <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>
15757 <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>
15760 <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>
15762 </p><p><a href="#Space_between_Text">#Space between Text</a>
15763 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15764 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15765 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15766 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15767 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15772 Headers with excess '=' characters
15773 (Are similar tests necessary beyond the 1st level?)
15777 =''italic'' heading==
15778 ==''italic'' heading=
15780 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15782 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15783 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15784 <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>
15785 <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>
15789 <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>
15790 <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>
15791 <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>
15792 <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>
15797 HTML headers vs TOC (bug 23393)
15798 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15810 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15812 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15814 <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>
15815 <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>
15818 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15820 <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>
15821 <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>
15827 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15828 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15829 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15830 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15831 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15832 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15837 Single-line or multiline-comments can follow headings
15839 parsoid=wt2html,wt2wt
15847 <h2><span class="mw-headline" id="foo">foo</span></h2>
15848 <h2><span class="mw-headline" id="bar">bar</span></h2>
15849 <h2><span class="mw-headline" id="baz">baz</span></h2>
15854 BUG 1219 URL next to image (broken)
15856 http://example.com[[File:Foobar.jpg]]
15858 <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>
15861 <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>
15865 Bug 1186 news: in the middle of text
15867 http://en.wikinews.org/wiki/Wikinews:Workplace
15869 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15875 Namespaced link must have a title
15884 Namespaced link must have a title (bad fragment version)
15886 [[Project:#fragment]]
15888 <p>[[Project:#fragment]]
15894 ### HTML tags and HTML attributes
15898 div with no attributes
15900 <div>HTML rocks</div>
15902 <div>HTML rocks</div>
15907 div with double-quoted attribute
15909 <div id="rock">HTML rocks</div>
15911 <div id="rock">HTML rocks</div>
15916 div with single-quoted attribute
15918 <div id='rock'>HTML rocks</div>
15920 <div id="rock">HTML rocks</div>
15925 div with unquoted attribute
15927 <div id=rock>HTML rocks</div>
15929 <div id="rock">HTML rocks</div>
15934 div with illegal double attributes
15936 <div id="a" id="b">HTML rocks</div>
15938 <div id="b">HTML rocks</div>
15943 div with empty attribute value, space before equals
15945 parsoid=wt2html,html2html
15947 <div class =>HTML rocks</div>
15949 <div class="">HTML rocks</div>
15952 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15956 div with multiple empty attribute values
15958 parsoid=wt2html,html2html
15960 <div id= title=>HTML rocks</div>
15962 <div id="title.3D">HTML rocks</div>
15965 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15969 table with multiple empty attribute values
15971 parsoid=wt2html,html2html
15977 <table title="id=">
15983 <table title="id=">
15984 <tbody><tr><td> hi</td></tr>
15989 div with braces in attribute value
15991 <div title="{}">Foo</div>
15993 <div title="{}">Foo</div>
15996 <div title="{}">Foo</div>
16000 div with empty attribute value, no space before equals
16002 parsoid=wt2html,html2html
16004 <div class=>HTML rocks</div>
16006 <div class="">HTML rocks</div>
16009 <div class="">HTML rocks</div>
16013 HTML multiple attributes correction
16015 <p class="error" class="awesome">Awesome!</p>
16017 <p class="awesome">Awesome!</p>
16022 Table multiple attributes correction
16025 !+ class="error" class="awesome"| status
16030 <th class="awesome"> status
16038 <DIV ID="x">HTML ROCKS</DIV>
16040 <div id="x">HTML ROCKS</div>
16045 Non-ASCII pseudo-tags are rendered as text
16054 Pseudo-tag with URL 'name' renders as url link
16056 <http://example.com/>
16058 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16063 text with amp in the middle of nowhere
16067 <p>Remember AT&T?
16072 text with character entity: eacute
16074 I always thought é was a cute letter.
16076 <p>I always thought é was a cute letter.
16079 <p>I always thought é was a cute letter.</p>
16083 text with entity-escaped character entity-like string: eacute
16085 I always thought &eacute; was a cute letter.
16087 <p>I always thought &eacute; was a cute letter.
16092 text with undefined character entity: xacute
16094 I always thought &xacute; was a cute letter.
16096 <p>I always thought &xacute; was a cute letter.
16103 <data value="5">five</data>
16104 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16105 <mark>This highlighted text</mark>
16107 <p><data value="5">five</data>
16108 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16109 <mark>This highlighted text</mark>
16114 HTML tag with leading space is parsed as text
16118 <p>< div>foo< /div>
16123 ### Nesting tests (see bug 41545, 50604, 51081)
16126 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16127 # Note that html2wt is considerably more difficult if we use <b> in
16128 # the test case, instead of <big>
16130 Ensure that HTML adoption agency algorithm is properly implemented.
16132 <big>X<big>Y</big>Z</big>
16134 <p><big>X<big>Y</big>Z</big>
16138 # This was bug 41545 in the PHP parser.
16139 # Note that tidy doesn't handle this correctly.
16143 <kbd>X<kbd>Y</kbd>Z</kbd>
16145 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16149 # The following cases were bug 51081 in the PHP parser.
16150 # Note that there are some other nestable tags (b, i, etc) which are
16151 # not covered; see bug 51081 for discussion.
16153 # Note that tidy doesn't handle this correctly.
16157 <em>X<em>Y</em>Z</em>
16159 <p><em>X<em>Y</em>Z</em>
16163 # Note that tidy doesn't handle this correctly.
16165 Nesting of <strong>
16167 <strong>X<strong>Y</strong>Z</strong>
16169 <p><strong>X<strong>Y</strong>Z</strong>
16178 <p><q>X<q>Y</q>Z</q></p>
16181 # Note that tidy doesn't handle this correctly.
16185 <ruby>X<ruby>Y</ruby>Z</ruby>
16187 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16191 # Note that tidy doesn't handle this correctly.
16195 <bdo>X<bdo>Y</bdo>Z</bdo>
16197 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16209 [[Media:Foobar.jpg]]
16211 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16216 Media link with text
16218 [[Media:Foobar.jpg|A neat file to look at]]
16220 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16224 # FIXME: this is still bad HTML tag nesting
16225 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16227 Media link with nasty text
16229 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16231 <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>
16234 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16235 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16239 Media link to nonexistent file (bug 1702)
16241 [[Media:No such.jpg]]
16243 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16248 Image link to nonexistent file (bug 1850 - good)
16250 [[File:No_such.jpg]]
16252 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16255 <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>
16259 :Image link to nonexistent file (bug 1850 - bad)
16261 [[:Image:No such.jpg]]
16263 <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>
16266 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16272 Character reference normalization in link text (bug 1938)
16274 [[Main Page|this&that]]
16276 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16283 Test for unicode normalization
16285 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16289 (bug 19451) Links should refer to the normalized form.
16297 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16298 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16299 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16300 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16301 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16306 Empty attribute crash test (bug 2067)
16308 <font color="">foo</font>
16310 <p><font color="">foo</font>
16315 Empty attribute crash test single-quotes (bug 2067)
16317 <font color=''>foo</font>
16319 <p><font color="">foo</font>
16324 Attribute test: equals, then nothing
16326 parsoid=wt2html,html2html
16328 <font color=>foo</font>
16330 <p><font color="">foo</font>
16333 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16337 Attribute test: unquoted value
16339 parsoid=wt2html,html2html
16341 <font color=x>foo</font>
16343 <p><font color="x">foo</font>
16346 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16350 Attribute test: unquoted but illegal value (hash)
16352 <font color=#x>foo</font>
16354 <p><font color="#x">foo</font>
16358 # Parsoid does not serialize to empty attribute syntax,
16359 # so wt2wt and html2wt cases are skipped
16361 Attribute test: no value (T54330)
16363 parsoid=wt2html,html2html
16365 <font color>foo</font>
16367 <p><font color="">foo</font>
16370 <p><font color="">foo</font></p>
16374 Bug 2095: link with three closing brackets
16378 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16381 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16385 Bug 2095: link with pipe and three closing brackets
16387 [[Main Page|link]]]
16389 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16392 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16396 Bug 2095: link with pipe and three closing brackets, version 2
16398 [[Main Page|[http://example.com/]]]
16400 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16403 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16412 Template:Dangerous attribute
16414 " onmouseover="alert(document.cookie)
16418 Template:Dangerous style attribute
16420 border-size: expression(alert(document.cookie))
16426 <div style="float: right; {{{1}}}">Magic div</div>
16430 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16432 <div title="{{test}}"></div>
16434 <div title="This is a test template"></div>
16438 # Parsoid has enough context to handle this case
16440 Bug 2304: HTML attribute safety (dangerous template; 2309)
16442 <div title="{{dangerous attribute}}"></div>
16444 <div title=""></div>
16447 <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>
16451 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16453 <div style="{{dangerous style attribute}}"></div>
16455 <div style="/* insecure input */"></div>
16460 Bug 2304: HTML attribute safety (safe parameter; 2309)
16462 {{div style|width: 200px}}
16464 <div style="float: right; width: 200px">Magic div</div>
16469 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16471 {{div style|width: expression(alert(document.cookie))}}
16473 <div style="/* insecure input */">Magic div</div>
16478 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16480 {{div style|"><script>alert(document.cookie)</script>}}
16482 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16487 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16489 {{div style|" ><script>alert(document.cookie)</script>}}
16491 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16496 Bug 2304: HTML attribute safety (link)
16498 <div title="[[Main Page]]"></div>
16500 <div title="[[Main Page]]"></div>
16505 Bug 2304: HTML attribute safety (italics)
16507 <div title="''foobar''"></div>
16509 <div title="''foobar''"></div>
16514 Bug 2304: HTML attribute safety (bold)
16516 <div title="'''foobar'''"></div>
16518 <div title="'''foobar'''"></div>
16524 Bug 2304: HTML attribute safety (ISBN)
16526 <div title="ISBN 1234567890"></div>
16528 <div title="ISBN 1234567890"></div>
16533 Bug 2304: HTML attribute safety (RFC)
16535 <div title="RFC 1234"></div>
16537 <div title="RFC 1234"></div>
16542 Bug 2304: HTML attribute safety (PMID)
16544 <div title="PMID 1234567890"></div>
16546 <div title="PMID 1234567890"></div>
16551 Bug 2304: HTML attribute safety (web link)
16553 <div title="http://example.com/"></div>
16555 <div title="http://example.com/"></div>
16560 Bug 2304: HTML attribute safety (named web link)
16562 <div title="[http://example.com/ link]"></div>
16564 <div title="[http://example.com/ link]"></div>
16569 Bug 3244: HTML attribute safety (extension; safe)
16571 <div style="<nowiki>background:blue</nowiki>"></div>
16573 <div style="background:blue"></div>
16578 Bug 3244: HTML attribute safety (extension; unsafe)
16580 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16582 <div style="/* insecure input */"></div>
16586 # More MSIE fun discovered by Tom Gilder
16589 MSIE CSS safety test: spurious slash
16591 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16593 <div style="/* insecure input */">evil</div>
16598 MSIE CSS safety test: hex code
16600 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16602 <div style="/* insecure input */">evil</div>
16607 MSIE CSS safety test: comment in url
16609 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16611 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16616 MSIE CSS safety test: comment in expression
16618 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16620 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16625 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16627 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16629 <p style="/* invalid control char */">A</p>
16634 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16636 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16637 <div style="top:EXPRESSION(alert())">B</div>
16639 <p style="/* insecure input */">A</p>
16640 <div style="/* insecure input */">B</div>
16645 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16647 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16648 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16650 <div style="/* insecure input */">A</div>
16651 <p style="/* insecure input */">B</p>
16656 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16658 <div style="background-image:url⁽javascript:alert())">A</div>
16659 <div style="background-image:url₍javascript:alert())">B</div>
16660 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16662 <div style="/* insecure input */">A</div>
16663 <div style="/* insecure input */">B</div>
16664 <p style="/* insecure input */">C</p>
16668 # FIXME: Parsoid fails to sanitize this! See T58846.
16673 title="data:text/html,<img src=1 onerror=alert(1)>"
16674 style="-o-link:attr(title);-o-link-source:current">X</div>
16676 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16681 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16683 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16684 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16685 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16686 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16687 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16688 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16689 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16691 <p style="/* insecure input */">A</p>
16692 <p style="/* insecure input */">B</p>
16693 <p style="/* insecure input */">C</p>
16694 <p style="/* insecure input */">D</p>
16695 <p style="/* insecure input */">E</p>
16696 <p style="/* insecure input */">F</p>
16697 <p style="/* insecure input */">G</p>
16702 Table attribute legitimate extension
16705 !+ style="<nowiki>color:blue</nowiki>"| status
16710 <th style="color:blue"> status
16716 Table attribute safety
16719 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16724 <th style="/* insecure input */"> status
16730 CSS line continuation 1
16732 <div style="background-image: u\ rl(test.jpg);"></div>
16734 <div style="/* insecure input */"></div>
16739 CSS line continuation 2
16741 <div style="background-image: u\ rl(test.jpg); "></div>
16743 <div style="/* invalid control char */"></div>
16754 Expansion of multi-line templates in attribute values (bug 6255)
16756 <div style="background: {{identity|#00FF00}}">-</div>
16758 <div style="background: #00FF00">-</div>
16764 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16766 <div style="background:
16769 <div style="background: #00FF00">-</div>
16772 <div style="background:
16777 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16779 <div style="background: #00FF00">-</div>
16781 <div style="background: #00FF00">-</div>
16786 Tags which are hidden from Tidy cannot pass through the Sanitizer
16788 <mw:toc><script>alert();</script></mw:toc>
16790 <p><mw:toc><script>alert();</script></mw:toc></p>
16794 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16797 Parser hook: empty input
16808 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16811 ## Don't expect parsoid to rt this form.
16813 Parser hook: empty input using terminated empty elements
16815 parsoid=wt2html,html2html
16826 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16830 Parser hook: empty input using terminated empty elements (space before)
16841 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16845 Parser hook: basic input
16856 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16859 ## Don't expect parsoid to rt this form.
16861 Parser hook: case insensitive
16863 parsoid=wt2html,html2html
16874 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16877 ## Don't expect parsoid to rt this form.
16879 Parser hook: case insensitive, redux
16881 parsoid=wt2html,html2html
16892 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16896 Parser hook: nested tags
16898 <tag><tag></tag></tag>
16907 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16911 Parser hook: basic arguments
16913 <tag width="200" height="100" depth="50" square=""></tag>
16926 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16929 ## Don't expect parsoid to rt this form.
16931 Parser hook: basic arguments, variations
16933 parsoid=wt2html,html2html
16935 <tag width=200 height = "100" depth = '50' square></tag>
16948 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16952 Parser hook: argument containing a forward slash (bug 5344)
16954 <tag filename="/tmp/bla"></tag>
16959 'filename' => '/tmp/bla',
16964 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16967 ## Don't expect parsoid to rt this form.
16969 Parser hook: empty input using terminated empty elements (bug 2374)
16971 parsoid=wt2html,html2html
16983 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16986 ## </tag> should be output literally since there is no matching tag that begins it
16987 ## Don't expect parsoid to rt this form.
16989 Parser hook: basic arguments using terminated empty elements (bug 2374)
16993 <tag width=200 height = "100" depth = '50' square/>
17010 <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
17014 ## Don't expect parsoid to rt this form.
17016 Parser hook: Don't allow unclosed extension tags
17022 this is a '''test'''
17024 <p>test <tag>123
17025 </p><p>this is a <b>test</b>
17028 <p>test <tag>123</p>
17030 <p>this is a <b>test</b></p>
17034 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17038 Parser hook: static parser hook not inside a comment
17040 <statictag>hello, world</statictag>
17042 <statictag action="flush" />
17048 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17049 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17053 Parser hook: static parser hook inside a comment
17055 <!-- <statictag>hello, world</statictag> -->
17056 <statictag action="flush" />
17061 <!-- <statictag>hello, world</statictag> -->
17062 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17065 # Nested template calls; this case was broken by Parser.php rev 1.506,
17069 Template:One-parameter
17071 (My parameter is: {{{1}}})
17075 Template:Map-one-parameter
17077 {{{{{1}}}|{{{2}}}}}
17081 Nested template calls
17083 {{Map-one-parameter|One-parameter|param}}
17085 <p>(My parameter is: param)
17094 # HTML+Tidy effectively strips out the empty tags completely
17095 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17096 # which Tidy would have done for the PHP parser had there been content inside it.
17098 Sanitizer: Closing of open tags
17100 <s></s><table></table>
17102 <s></s><table></table>
17105 <p><s></s></p><table></table>
17109 Sanitizer: Closing of open but not closed tags
17118 Sanitizer: Closing of closed but not open tags
17128 Sanitizer: Closing of closed but not open table tags
17132 Table not started</td></tr></table>
17134 <p>Table not started</p>
17136 <p>Table not started</p>
17140 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17142 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17144 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17147 <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>
17150 # In HTML5, the restrictions are that id must contain at least one character,
17151 # and must not contain any space characters.
17153 Sanitizer: Validating the contents of the id attribute (bug 4515)
17157 <br id="" /><br id="a space" />
17162 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17164 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17168 <br id="foo" /><br id="foo" />
17170 Something need to be done. foo-2 ?
17174 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17177 <meta itemprop="hello" content="world">
17178 <meta http-equiv="refresh" content="5">
17179 <meta itemprop="hello" http-equiv="refresh" content="5">
17180 <link itemprop="hello" href="{{SERVER}}">
17181 <link rel="stylesheet" href="{{SERVER}}">
17182 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17186 <p> <meta itemprop="hello" content="world" />
17187 <meta http-equiv="refresh" content="5">
17188 <meta itemprop="hello" content="5" />
17190 <link itemprop="hello" href="http://example.org" />
17191 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17192 <link itemprop="hello" href="http://example.org" />
17198 Language converter: output gets cut off unexpectedly (bug 5757)
17202 this bit is safe: }-
17204 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17206 then we get cut off here: }-
17208 all additional text is vanished
17210 <p>this bit is safe: }-
17211 </p><p>but if we add a conversion instance: xxx
17212 </p><p>then we get cut off here: }-
17213 </p><p>all additional text is vanished
17218 Self closed html pairs (bug 5487)
17221 <center><font id="bug" />Centered text</center>
17222 <div><font id="bug2" />In div text</div>
17224 <center><font id="bug" />Centered text</center>
17225 <div><font id="bug2" />In div text</div>
17234 Punctuation: nbsp before exclamation
17238 <p>C'est grave !
17243 Punctuation: CSS !important (bug 11874)
17245 <div style="width:50% !important">important</div>
17247 <div style="width:50% !important">important</div>
17252 Punctuation: CSS ! important (bug 11874; with space after)
17254 <div style="width:50% ! important">important</div>
17256 <div style="width:50% ! important">important</div>
17261 HTML bullet list, closed tags (bug 5497)
17274 <ul data-parsoid='{"stx":"html"}'>
17275 <li data-parsoid='{"stx":"html"}'>One</li>
17276 <li data-parsoid='{"stx":"html"}'>Two</li>
17282 HTML bullet list, unclosed tags (bug 5497)
17294 <ul data-parsoid='{"stx":"html"}'>
17295 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17296 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17302 HTML ordered list, closed tags (bug 5497)
17315 <ol data-parsoid='{"stx":"html"}'>
17316 <li data-parsoid='{"stx":"html"}'>One</li>
17317 <li data-parsoid='{"stx":"html"}'>Two</li>
17323 HTML ordered list, unclosed tags (bug 5497)
17336 <ol data-parsoid='{"stx":"html"}'>
17337 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17338 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17344 HTML nested bullet list, closed tags (bug 5497)
17367 <ul data-parsoid='{"stx":"html"}'>
17368 <li data-parsoid='{"stx":"html"}'>One</li>
17369 <li data-parsoid='{"stx":"html"}'>Two:
17370 <ul data-parsoid='{"stx":"html"}'>
17371 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17372 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17379 HTML nested bullet list, open tags (bug 5497)
17416 HTML nested ordered list, closed tags (bug 5497)
17441 HTML nested ordered list, open tags (bug 5497)
17478 HTML ordered list item with parameters oddity
17480 <ol><li id="fragment">One</li>
17483 <ol><li id="fragment">One</li>
17488 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17490 bug 5918: autonumbering
17492 [http://first/] [http://second] [ftp://ftp]
17496 [mailto:enclosed@mail.tld With target]
17498 [mailto:enclosed@mail.tld]
17500 mailto:inline@mail.tld
17502 <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>
17503 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17504 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17505 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17506 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17509 <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>
17510 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17511 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17512 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17513 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17518 # Security and HTML correctness
17519 # From Nick Jenkins' fuzz testing
17523 Fuzz testing: Parser13
17538 Fuzz testing: Parser14
17543 <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>
17544 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17546 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17552 <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>
17554 <div id="toc" class="toc">
17555 <div id="toctitle">
17559 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17566 Fuzz testing: Parser14-table
17568 parsoid=wt2html,html2html
17573 <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>
17574 <table style="__TOC__">
17579 <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>
17580 <table style="__TOC__">
17587 <table style="__TOC__"></table>
17590 # Known to produce bogus xml (extra </td>)
17592 Fuzz testing: Parser16
17619 Fuzz testing: Parser21
17622 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17627 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17637 Fuzz testing: Parser22
17639 http://===r:::https://b
17643 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17651 # Known to produce bad XML for now
17653 Fuzz testing: Parser24
17658 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17659 <br style="onmouseover='alert(document.cookie);' " />
17661 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17666 <u class="|">}}}} >
17667 <br style="onmouseover='alert(document.cookie);'" />
17669 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17678 # Note: the current result listed for this is not what the original one was,
17679 # but the original bug was JavaScript injection, which is fixed in any case.
17680 # It's not clear that the original result listed was any more correct than the
17681 # current one. Original result:
17684 # <li class="||">
17685 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17687 Fuzz testing: Parser25 (bug 6055)
17693 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17695 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17700 Fuzz testing: URL adjacent extension (with space, clean)
17702 http://example.com <nowiki>junk</nowiki>
17704 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17707 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17711 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17713 http://example.com<nowiki>junk</nowiki>
17715 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17718 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17722 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17724 http://example.com<pre>junk</pre>
17726 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17729 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17734 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre data-parsoid='{"stx":"html"}'>junk</pre>
17738 Fuzz testing: image with bogus manual thumbnail
17740 [[Image:foobar.jpg|thumbnail= ]]
17742 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17745 <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>
17749 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17751 <pre dir=" "></pre>
17753 <pre dir=" "></pre>
17758 Parsing optional HTML elements (Bug 6171)
17763 <td> Some tabular data</td>
17764 <td> More tabular data ...
17765 <td> And yet som tabular data</td>
17771 <td> Some tabular data</td>
17772 <td> More tabular data ...
17773 </td><td> And yet som tabular data</td>
17780 Correct handling of <td>, <tr> (Bug 6171)
17785 <td> Some tabular data</td>
17786 <td> More tabular data ...</td>
17787 <td> And yet som tabular data</td>
17793 <td> Some tabular data</td>
17794 <td> More tabular data ...</td>
17795 <td> And yet som tabular data</td>
17803 Parsing crashing regression (fr:JavaScript)
17807 <p></body></x>
17812 Inline wiki vs wiki block nesting
17818 <p><b>Bold paragraph</b>
17819 </p><p>New wiki paragraph
17823 # FIXME: The current php output is documented
17824 # and desired output is the parsoid target.
17826 Inline HTML vs wiki block nesting
17832 <p><b>Bold paragraph
17833 </p><p>New wiki paragraph</b>
17836 <p><b>Bold paragraph</b>
17837 </p><p>New wiki paragraph
17841 # Original result was this:
17842 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17844 # While that might be marginally more intuitive, maybe, the six-apostrophe
17845 # construct is clearly pathological and the result stated here (which is what
17846 # the parser actually does) is about as reasonable as anything.
17848 Mixing markup for italics and bold
17851 '''bold''''''bold''bolditalics'''''
17853 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17861 Article for special page transclusion test
17865 Special page transclusion
17868 {{Special:Prefixindex/Xyzzyx}}
17870 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17876 Special page transclusion twice (bug 5021)
17879 {{Special:Prefixindex/Xyzzyx}}
17880 {{Special:Prefixindex/Xyzzyx}}
17882 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17884 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17890 Transclusion of default MediaWiki message
17892 {{MediaWiki:Mainpage}}
17899 Transclusion of nonexistent MediaWiki message
17901 {{MediaWiki:Mainpagexxx}}
17903 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17908 Transclusion of MediaWiki message with underscore
17910 {{MediaWiki:history_short}}
17917 Transclusion of MediaWiki message with space
17919 {{MediaWiki:history short}}
17926 Invalid header with following text
17936 Section extraction test (section 0)
17956 Section extraction test (section 1)
17978 Section extraction test (section 2)
17999 Section extraction test (section 3)
18019 Section extraction test (section 4)
18043 Section extraction test (section 5)
18063 Section extraction test (section 6)
18084 Section extraction test (section 7)
18104 Section extraction test (section 8)
18124 Section extraction test (section 9)
18145 Section extraction test (section 10)
18165 Section extraction test (nonexistent section 11)
18184 Section extraction test with bogus heading (section 1)
18189 ==bogus== not a legal section
18193 ==bogus== not a legal section
18197 Section extraction test with bogus heading (section 2)
18202 ==bogus== not a legal section
18209 Section extraction test with comment after heading (section 1)
18221 Section extraction test with comment after heading (section 2)
18233 Section extraction test with bogus <nowiki> heading (section 1)
18238 ==bogus== <nowiki>not a legal section</nowiki>
18242 ==bogus== <nowiki>not a legal section</nowiki>
18246 Section extraction test with bogus <nowiki> heading (section 2)
18251 ==bogus== <nowiki>not a legal section</nowiki>
18257 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18258 # instead of respecting commented sections
18260 Section extraction prefixed by comment (section 1)
18271 Section extraction prefixed by comment (section 2)
18281 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18282 # instead of respecting HTML-style headings
18284 Section extraction, mixed wiki and html (section 1)
18300 Section extraction, mixed wiki and html (section 2)
18316 # Formerly testing for bug 3342
18318 Section extraction, heading surrounded by <noinclude>
18322 <noinclude>==unmarked==</noinclude>
18328 # Test behavior of bug 19910
18330 Sectiion with all-equals
18335 The line above must have a trailing space
18338 But just in case it doesn't...
18342 But just in case it doesn't...
18346 Section replacement test (section 0)
18377 Section replacement test (section 1)
18406 Section replacement test (section 2)
18436 Section replacement test (section 3)
18467 Section replacement test (section 4)
18494 Section replacement test (section 5)
18525 Section replacement test (section 6)
18555 Section replacement test (section 7)
18586 Section replacement test (section 8)
18617 Section replacement test (section 9)
18646 Section replacement test (section 10)
18676 Section replacement test with initial whitespace (bug 13728)
18680 Preformatted initial line
18684 Preformatted initial line
18691 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18703 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18716 Section extraction, <pre> around bogus header (bug 10309)
18733 Section replacement, <pre> around bogus header (bug 10309)
18755 Handling of 
 in URLs
18759 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18762 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18764 a</a></li></ul></li></ul>
18768 Handling of %0A in URLs
18772 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18775 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18779 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18781 5 quotes, code coverage +1 line
18788 <p><b><i></i></b></p>
18791 # same html as previous, but wikitext adjusted to match parsoid html2wt
18792 # note that wt2html and html2html will put the <i> before the <b>
18794 5 quotes, code coverage +1 line w/ nowiki (1)
18796 parsoid=wt2wt,html2wt
18798 '''''<nowiki/>'''''
18803 <p><b><i></i></b></p>
18806 # same as previous, just swapping the <i> and <b>
18808 5 quotes, code coverage +1 line w/ nowiki (2)
18810 '''''<nowiki/>'''''
18815 <p><i><b></b></i></p>
18819 Special:Search page linking.
18823 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18828 {{!}} is a magic word
18830 {{!}} is a magic word there and {{!}} is still a magic word here
18831 | is not a magic word here but {{!}} is still a magic word here
18833 <p>| is a magic word there and | is still a magic word here
18834 | is not a magic word here but | is still a magic word here
18837 <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
18838 | 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>
18845 title=[[Parser test]]
18850 * {{FULLPAGENAMEE}}
18852 * {{BASEPAGENAMEE}}
18856 * {{ROOTPAGENAMEE}}
18858 * {{TALKPAGENAMEE}}
18859 * {{SUBJECTPAGENAME}}
18860 * {{SUBJECTPAGENAMEE}}
18863 * {{NAMESPACENUMBER}}
18867 * {{SUBJECTSPACEE}}
18868 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18870 <ul><li> Parser test</li>
18871 <li> Parser_test</li>
18872 <li> Parser test</li>
18873 <li> Parser_test</li>
18874 <li> Parser test</li>
18875 <li> Parser_test</li>
18876 <li> Parser test</li>
18877 <li> Parser_test</li>
18878 <li> Parser test</li>
18879 <li> Parser_test</li>
18880 <li> Talk:Parser test</li>
18881 <li> Talk:Parser_test</li>
18882 <li> Parser test</li>
18883 <li> Parser_test</li>
18891 <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>
18894 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18896 ## Parsoid thinks the "centre" here is a property, not a caption.
18901 "modes": ["wt2html"],
18902 "nativeGallery": true
18910 image4 |300px| centre
18911 image5.svg| http://///////
18916 <ul class="gallery mw-gallery-traditional">
18917 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18918 <div class="thumb" style="height: 150px;">Image1.png</div>
18919 <div class="gallerytext">
18922 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18923 <div class="thumb" style="height: 150px;">Image2.gif</div>
18924 <div class="gallerytext">
18927 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18928 <div class="thumb" style="height: 150px;">Image3</div>
18929 <div class="gallerytext">
18932 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18933 <div class="thumb" style="height: 150px;">Image4</div>
18934 <div class="gallerytext">
18939 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18940 <div class="thumb" style="height: 150px;">Image5.svg</div>
18941 <div class="gallerytext">
18942 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18946 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18947 <div class="thumb" style="height: 150px;">* image6</div>
18948 <div class="gallerytext">
18954 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
18955 <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>
18956 <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>
18957 <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>
18958 <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>
18959 <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>
18960 <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>
18965 Gallery (with options, html)
18968 "modes": ["wt2html", "html2html"],
18969 "nativeGallery": true
18972 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
18973 File:Nonexistent.jpg|caption
18974 File:Nonexistent.jpg
18975 image:foobar.jpg|some '''caption''' [[Main Page]]
18977 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18980 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18981 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18982 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18983 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18984 <div class="gallerytext">
18989 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18990 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18991 <div class="gallerytext">
18994 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18995 <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>
18996 <div class="gallerytext">
18997 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19001 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19002 <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>
19003 <div class="gallerytext">
19006 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19007 <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>
19008 <div class="gallerytext">
19016 <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":{}}'>
19017 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19018 <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>
19019 <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>
19020 <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>
19021 <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>
19022 <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>
19027 Gallery (with options, extsrc)
19030 "nativeGallery": false
19033 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19034 File:Nonexistent.jpg|caption
19035 File:Nonexistent.jpg
19036 image:foobar.jpg|some '''caption''' [[Main Page]]
19038 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19041 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19042 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19043 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19044 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19045 <div class="gallerytext">
19050 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19051 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19052 <div class="gallerytext">
19055 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19056 <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>
19057 <div class="gallerytext">
19058 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19062 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19063 <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>
19064 <div class="gallerytext">
19067 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19068 <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>
19069 <div class="gallerytext">
19077 <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"}}'>
19078 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19079 <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>
19080 <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>
19081 <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>
19082 <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>
19083 <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>
19088 Gallery with link that has fragment
19091 "modes": ["wt2html", "html2html"],
19092 "nativeGallery": true
19096 image:foobar.jpg|link=Main_Page
19097 image:foobar.jpg|link=Main_Page#section
19098 image:foobar.jpg|link=Main Page#section|caption
19101 <ul class="gallery mw-gallery-traditional">
19102 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19103 <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>
19104 <div class="gallerytext">
19107 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19108 <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>
19109 <div class="gallerytext">
19112 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19113 <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>
19114 <div class="gallerytext">
19122 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19123 <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>
19124 <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>
19125 <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>
19129 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19131 Gallery with template inside caption
19134 "nativeGallery": true
19137 <gallery caption="{{echo|hi}}">
19138 File:Foobar.jpg|{{echo|ho}}
19141 <ul class="gallery mw-gallery-traditional">
19142 <li class='gallerycaption'>{{echo|hi}}</li>
19143 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19144 <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>
19145 <div class="gallerytext">
19153 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19154 <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>
19155 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span 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>
19160 Gallery with wikitext inside caption
19163 "nativeGallery": true
19167 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19168 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19171 <ul class="gallery mw-gallery-traditional">
19172 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19173 <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>
19174 <div class="gallerytext">
19175 <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>
19179 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19180 <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>
19181 <div class="gallerytext">
19182 <p>This is a test template
19189 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19190 <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>
19191 <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>
19196 Gallery (with showfilename option)
19199 "nativeGallery": true
19202 <gallery showfilename="">
19203 File:Nonexistent.jpg|caption
19204 File:Nonexistent.jpg
19205 File:Foobar.jpg|some '''caption''' [[Main Page]]
19209 <ul class="gallery mw-gallery-traditional">
19210 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19211 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19212 <div class="gallerytext">
19213 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19218 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19219 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19220 <div class="gallerytext">
19221 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19225 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19226 <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>
19227 <div class="gallerytext">
19228 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19229 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19233 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19234 <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>
19235 <div class="gallerytext">
19236 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19243 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19244 <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>
19245 <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>
19246 <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>
19247 <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>
19251 ## Should Parsoid be preserving these variations?
19253 Gallery (with namespace-less filenames)
19256 "modes": ["wt2html", "html2html"],
19257 "nativeGallery": true
19261 File:Nonexistent.jpg
19267 <ul class="gallery mw-gallery-traditional">
19268 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19269 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19270 <div class="gallerytext">
19273 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19274 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19275 <div class="gallerytext">
19278 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19279 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
19280 <div class="gallerytext">
19283 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19284 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
19285 <div class="gallerytext">
19291 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19292 <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>
19293 <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>
19294 <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>
19295 <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>
19300 Gallery override link with WikiLink (T36852)
19303 "nativeGallery": true
19307 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19310 <ul class="gallery mw-gallery-traditional">
19311 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19312 <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>
19313 <div class="gallerytext">
19319 <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":{}}'>
19320 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./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>
19325 Gallery override link with absolute external link (T36852)
19328 "nativeGallery": true
19332 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19335 <ul class="gallery mw-gallery-traditional">
19336 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19337 <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>
19338 <div class="gallerytext">
19344 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19345 <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>
19350 Gallery override link with malicious javascript (T36852)
19353 "modes": ["wt2html", "html2html"],
19354 "nativeGallery": true
19358 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19361 <ul class="gallery mw-gallery-traditional">
19362 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19363 <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>
19364 <div class="gallerytext">
19370 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19371 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./"_onclick="alert('malicious_javascript_code!');"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19376 Gallery with invalid title as link (T45964)
19379 "modes": ["wt2html", "html2html"],
19380 "nativeGallery": true
19384 File:Foobar.jpg|link=<
19387 <ul class="gallery mw-gallery-traditional">
19388 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19389 <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>
19390 <div class="gallerytext">
19396 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19397 <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>
19402 HTML Hex character encoding (spells the word "JavaScript")
19404 parsoid=wt2html,wt2wt,html2html
19406 JavaScript
19408 <p>JavaScript
19413 <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>
19417 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19421 <p>&#xsee;&#XSEE;
19424 <p>&#xsee;&#XSEE;</p>
19428 HTML Hex character encoding mixed case
19430 parsoid=wt2html,wt2wt,html2html
19439 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19442 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19443 # Note that U+000C (form feed) is not a valid XML character, so
19444 # it is banned even though allowed in HTML5.
19446 Illegal character references (T106578)
19451 ; Control (low): 
19452 ; Control (high):  Ÿ
19453 ; Surrogate: ��
19454 ; This is an okay astral character: 💩
19463 <dt>Control (low)</dt>
19465 <dt>Control (high)</dt>
19466 <dd>&#x7F; &#x9F;</dd>
19468 <dd>&#xD83D;&#xDCA9;</dd>
19469 <dt>This is an okay astral character</dt>
19475 __FORCETOC__ override
19487 ISBN 978-0-1234-56 789
19489 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19492 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19494 <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>
19498 ISBN followed by 5 spaces
19509 ISBN ISBN 1234567890
19511 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19514 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19517 # Uppercase X and lowercase x as well
19528 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19529 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19530 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19531 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19532 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19533 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19536 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19537 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19538 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19539 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19540 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19541 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19545 ISBN with empty prefix (parsoid test)
19549 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19552 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19556 Bug 22905: <abbr> followed by ISBN followed by </a>
19558 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19560 <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>
19563 <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>
19571 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19576 Double RFC with a wiki link
19580 <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>
19589 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19592 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19596 Centre-aligned image
19598 [[Image:foobar.jpg|centre]]
19600 <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>
19607 [[Image:foobar.jpg|none]]
19609 <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>
19614 Width + Height sized image (using px) (height is ignored)
19616 [[Image:foobar.jpg|640x480px]]
19618 <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>
19623 Width-sized image (using px, no following whitespace)
19625 [[Image:foobar.jpg|640px]]
19627 <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>
19632 Width-sized image (using px, with following whitespace - test regression from r39467)
19634 [[Image:foobar.jpg|640px ]]
19636 <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>
19641 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19643 [[Image:foobar.jpg| 640px]]
19645 <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>
19650 Image with page parameter
19654 [[File:LoremIpsum.djvu|page=2]]
19656 <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>
19659 <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>
19663 Another italics / bold test
19671 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19677 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19680 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19685 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19687 Images with the "|" character in the comment
19689 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19691 <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>
19694 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=|left|&param2=|x">external</a> URL</figcaption></figure>
19698 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19700 <html><script>alert(1);</script></html>
19702 <p><html><script>alert(1);</script></html>
19707 HTML with raw HTML ($wgRawHtml==true)
19711 <html><script>alert(1);</script></html>
19713 <p><script>alert(1);</script>
19718 Parents of subpages, one level up
19720 subpage title=[[Subpage test/L1/L2/L3]]
19724 <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>
19730 Parents of subpages, one level up, not named
19732 subpage title=[[Subpage test/L1/L2/L3]]
19736 <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>
19743 Parents of subpages, two levels up
19745 subpage title=[[Subpage test/L1/L2/L3]]
19751 <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
19752 </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>
19757 Parents of subpages, two levels up, without trailing slash or name.
19759 subpage title=[[Subpage test/L1/L2/L3]]
19768 Parents of subpages, two levels up, with lots of extra trailing slashes.
19770 subpage title=[[Subpage test/L1/L2/L3]]
19774 <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>
19779 Subpage test/L1/L2/L3Sibling
19785 Transclusion of a sibling page (one level up)
19787 subpage title=[[Subpage test/L1/L2/L3]]
19796 Transclusion of a child page
19798 subpage title=[[Subpage test/L1/L2]]
19806 # This is wt2html only in Parsoid because we add <nowiki>
19807 # because of {{..}} and we don't expect to fix that to
19808 # eliminate the nowikis selective for {{..}} markup.
19810 Non-transclusion because of too many up levels
19812 subpage title=[[Subpage test/L1/L2/L3]]
19815 {{../../../../More than parent}}
19817 <p>{{../../../../More than parent}}
19820 <p>{{../../../../More than parent}}</p>
19824 Definition list code coverage
19830 <dl><dt> title  </dt>
19832 <dt> title </dt>
19838 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19839 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19840 <dt>title</dt><dd> def</dd></dl>
19844 Don't fall for the self-closing div
19846 <div>hello world</div/>
19848 <div>hello world</div>
19857 <p>[[:Template:Msg]]
19866 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19870 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19872 Always escape literal '>' in output, not just after '<'
19886 <p>This is a test template
19887 This is a test template
19899 Inclusion of !userCanEdit() content
19903 <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>
19909 Out-of-order TOC heading levels
19918 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19920 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19922 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19923 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19926 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19928 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19929 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19935 <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>
19936 <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>
19937 <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>
19938 <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>
19939 <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>
19940 <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>
19946 ISBN with a dummy number
19956 ISBN with space-delimited number
19960 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19966 ISBN with multiple spaces, no number
19985 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19986 </p><p>ISBN 12345678901
19992 ISBN with trailing year (bug 8110)
19994 ISBN 1-234-56789-0 - 2006
19996 ISBN 1 234 56789 0 - 2006
19998 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19999 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20007 {{anchorencode:foo bar©#%n}}
20009 <p>foo_bar.C2.A9.23.25n
20014 anchorencode trims spaces
20016 {{anchorencode: __pretty__please__}}
20023 anchorencode deals with links
20025 {{anchorencode: [[hello|world]] [[hi]]}}
20032 anchorencode deals with templates
20034 {{anchorencode: {{Foo}} }}
20041 anchorencode encodes like the TOC generator: (bug 18431)
20043 === _ +:.3A%3A&&]] ===
20044 {{anchorencode: _ +:.3A%3A&&]] }}
20047 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20048 <p>.2B:.3A.253A.26.26.5D.5D
20053 Bug 6200: blockquotes and paragraph formatting
20074 Bug 8293: Use of center tag ruins paragraph formatting
20095 Parsing of overlapping (improperly nested) inline html tags
20097 <span><s>x</span></s>
20099 <p><span><s>x</span></s></span>
20102 <p><span><s>x</s></span>
20107 ### Language variants related tests
20110 Self-link in language variants
20112 title=[[Dunav]] language=sr
20114 Both [[Dunav]] and [[Дунав]] are names for this river.
20116 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
20127 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20129 title=[[Duna]] language=sr
20131 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20133 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <strong class="selflink">Duna</strong> and <strong class="selflink">Dуна</strong> are still self-links.
20138 Link to a section of a variant of this title shouldn't be parsed as self-link
20140 title=[[Duna]] language=sr
20142 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20144 <p><strong class="selflink">Dуна</strong> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
20149 Link to pages in language variants
20153 Main Page can be written as [[Маин Паге]]
20155 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20161 Multiple links to pages in language variants
20165 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20167 <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>.
20173 Simple template in language variants
20179 <p>This is a test template
20185 Template with explicit namespace in language variants
20191 <p>This is a test template
20197 Basic test for template parameter in language variants
20201 {{парамтест|param=foo}}
20203 <p>This is a test template with parameter foo
20208 Simple category in language variants
20212 [[Category:МедиаWики Усер'с Гуиде]]
20214 cat=МедиаWики_Усер'с_Гуиде sort=
20216 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20231 ## We used to, but no longer wt2wt this test since the default serializer
20232 ## will normalize all categories to serialize on their own line.
20233 ## This wikitext usage is going to be fairly uncommon in production and
20234 ## selser will take care of preserving formatting in those scenarios.
20236 Don't convert blue categorylinks to another variant (bug 33210)
20242 [[A]][[Category:分类]]
20246 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
20247 <link rel="mw:PageProp/Category" href="Category:分类"/>
20251 Stripping -{}- tags (language variants)
20255 Latin proverb: -{Ne nuntium necare}-
20257 <p>Latin proverb: Ne nuntium necare
20263 Prevent conversion with -{}- tags (language variants)
20265 language=sr variant=sr-ec
20267 Latinski: -{Ne nuntium necare}-
20269 <p>Латински: Ne nuntium necare
20275 Prevent conversion of text with -{}- tags (language variants)
20277 language=sr variant=sr-ec
20279 Latinski: -{Ne nuntium necare}-
20281 <p>Латински: Ne nuntium necare
20287 Prevent conversion of links with -{}- tags (language variants)
20289 language=sr variant=sr-ec
20293 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20299 -{}- tags within headlines (within html for parserConvert())
20301 language=sr variant=sr-ec
20305 <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>
20311 Explicit definition of language variant alternatives
20313 language=zh variant=zh-tw
20315 -{zh:China;zh-tw:Taiwan}-, not China
20317 <p>Taiwan, not China
20323 Conversion around HTML tags
20325 language=sr variant=sr-ec
20327 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20328 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20331 <span title="ЛаCтин">ски</span>
20337 Explicit session-wise language variant mapping (A flag and - flag)
20339 language=zh variant=zh-tw
20341 Taiwan is not China.
20342 But -{A|zh:China;zh-tw:Taiwan}- is China,
20343 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20344 and -{China}- is China.
20346 <p>Taiwan is not China.
20347 But Taiwan is Taiwan,
20348 (This should be stripped!)
20349 and China is China.
20354 Explicit session-wise language variant mapping (H flag for hide)
20356 language=zh variant=zh-tw
20358 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20361 <p>(This should be stripped!)
20367 Adding explicit conversion rule for title (T flag)
20369 language=zh variant=zh-tw showtitle
20371 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20374 <p>Should be stripped!
20379 Testing that changing the language variant here in the tests actually works
20381 language=zh variant=zh showtitle
20383 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20386 <p>Should be stripped!
20391 Recursive conversion of alt and title attrs shouldn't clear converter state
20393 language=zh variant=zh-cn showtitle
20395 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20396 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20400 Should be stripped<span title="Exclamation">!</span>
20405 Bug 24072: more test on conversion rule for title
20407 language=zh variant=zh-tw showtitle
20409 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20410 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20413 <p>This should be stripped!
20414 This won't take interferes with the title rule.
20419 Partly disable title conversion if variant == main language code
20421 language=zh variant=zh title=[[ZH]] showtitle
20423 -{T|zh-cn:CN;zh-tw:TW}-
20431 Partly disable title conversion if variant == main language code, more
20433 language=zh variant=zh title=[[ZH]] showtitle
20443 Raw output of variant escape tags (R flag)
20445 language=zh variant=zh-tw
20447 Raw: -{R|zh:China;zh-tw:Taiwan}-
20449 <p>Raw: zh:China;zh-tw:Taiwan
20454 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20456 language=zh variant=zh-cn
20458 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20465 Conversion rules from [numeric-only string] to [something else] (T48634)
20467 language=zh variant=zh-cn
20469 -{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
20476 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20478 language=zh variant=zh-cn
20480 -{H|zh-cn:foo;zh-tw:;}-foobar
20487 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20489 language=zh variant=zh-cn
20491 -{H|=>zh-cn:foo;}-foobar
20498 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20500 language=zh variant=zh-cn
20509 Nested using of manual convert syntax
20511 language=zh variant=zh-hk
20513 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20515 <p>Nested: Hello Hong Kong!
20519 # Since Parsoid is starting to emit canonical wikitext for links,
20520 # [http://example.com http://example.com] will not RT back to that
20523 Proper conversion of text in external links
20525 language=sr variant=sr-ec
20528 http://www.google.com
20529 gopher://www.google.com
20530 [http://www.google.com http://www.google.com]
20531 [gopher://www.google.com gopher://www.google.com]
20532 [https://www.google.com irc://www.google.com]
20533 [ftp://www.google.com www.google.com/ftp://dir]
20534 [//www.google.com www.google.com]
20536 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20537 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20538 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20539 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20540 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20541 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20542 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20545 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20546 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20547 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20548 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20549 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20550 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20551 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20555 Do not convert roman numbers to language variants
20557 language=sr variant=sr-ec
20561 <p>Фридрих IV је цар.
20566 Unclosed language converter markup "-{"
20577 Don't convert raw rule "-{R|=>}-" to "=>"
20588 Don't break link parsing if language converter markup is in the caption.
20590 language=sr variant=sr-ec
20592 [[Main Page|-{R|main page}-]]
20594 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20599 T146304: Don't break template parsing if language converter markup is in the parameter.
20601 language=sr variant=sr-ec
20609 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20611 Don't break image parsing if language converter markup is in the caption.
20615 [[File:Foobar.jpg|-{R|caption}-]]
20617 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
20621 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20623 Don't break list handling if language converter markup is in the item.
20625 language=zh variant=zh-cn
20627 ;-{zh-cn:AAA;zh-tw:BBB}-
20629 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20636 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20638 Don't break table handling if language converter markup is in the cell.
20640 language=sr variant=sr-ec
20663 Bug 529: Uncovered bullet
20672 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20673 # Templates in Wikipedia rely on this behavior, as tidy has always been
20674 # enabled there. These tests are normally run *without* tidy, so specify the
20675 # full output here.
20676 # To test realistic parsing behavior, apply a tidy-like transformation to both
20677 # the expected output and your parser's output.
20679 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20681 ******* Foo {{bullet}}
20683 <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>
20689 Bug 529: Uncovered table already at line-start
20712 Bug 529: Uncovered bullet in parser function result
20714 * Foo {{lc:{{bullet}} }}
20722 Bug 5678: Double-parsed template argument
20724 {{lc:{{{1}}}|hello}}
20731 Bug 5678: Double-parsed template invocation
20733 {{lc:{{paramtest {{!}} param = hello }} }}
20735 <p>{{paramtest | param = hello }}
20740 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20743 title=[[Main Page]]
20745 {{PRVNÍVELKÉ:ěščř}}
20746 {{prvnívelké:ěščř}}
20766 Morwen/13: Unclosed link followed by heading
20773 <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>
20778 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20785 <h1><span class="mw-headline" id="heading">heading</span></h1>
20790 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20797 <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>
20812 Paragraphs inside divs (no extra line breaks)
20824 Paragraphs inside divs (extra line break on open)
20839 Paragraphs inside divs (extra line break on close)
20854 Paragraphs inside divs (extra line break on open and close)
20871 Nesting tags, paragraphs on lines which begin with <div>
20873 <div></div><strong>A
20876 <p><strong>A</strong></p>
20877 <p><strong>B</strong></p>
20885 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20887 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20889 <blockquote>Line one
20891 Line two</blockquote>
20893 <blockquote>Line one
20894 Line two</blockquote>
20898 <p>Line one Line two</p>
20903 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20908 Line two</blockquote>
20913 Line two</blockquote>
20918 Line two</blockquote>
20922 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20924 <blockquote>Line one
20929 <blockquote>Line one
20942 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20964 Paragraphs inside blockquotes/divs (no extra line breaks)
20966 <blockquote><div>Line one
20968 Line two</div></blockquote>
20970 <blockquote><div>Line one
20971 Line two</div></blockquote>
20976 Paragraphs inside blockquotes/divs (extra line break on open)
20981 Line two</div></blockquote>
20986 Line two</div></blockquote>
20991 Paragraphs inside blockquotes/divs (extra line break on close)
20993 <blockquote><div>Line one
20996 </div></blockquote>
20998 <blockquote><div>Line one
21001 </div></blockquote>
21006 Paragraphs inside blockquotes/divs (extra line break on open and close)
21012 </div></blockquote>
21018 </div></blockquote>
21023 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21025 wgLinkHolderBatchSize=0
21031 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21032 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21033 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21038 Free external link invading image caption
21040 [[Image:Foobar.jpg|thumb|http://x|hello]]
21042 <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>
21047 Bug 15196: localised external link numbers
21051 [http://en.wikipedia.org/]
21053 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21056 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21060 Multibyte character in padleft
21062 {{padleft:-Hello|7|Æ}}
21069 Multibyte character in padright
21071 {{padright:Hello-|7|Æ}}
21078 formatdate parser function
21080 {{#formatdate:2009-03-24}}
21082 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21087 formatdate parser function, with default format
21089 {{#formatdate:2009-03-24|mdy}}
21091 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21096 Spacing of numbers in formatted dates
21098 {{#formatdate:January 15}}
21100 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21105 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
21107 language=nl title=[[MediaWiki:Common.css]]
21109 {{#formatdate:2009-03-24|dmy}}
21111 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21124 Edit comment with link
21128 I like the [[Main Page]] a lot
21130 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21134 Edit comment with link and link text
21138 I like the [[Main Page|best pages]] a lot
21140 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21144 Edit comment with link and link text with suffix
21148 I like the [[Main Page|best page]]s a lot
21150 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21154 Edit comment with section link (non-local, eg in history list)
21156 comment title=[[Main Page]]
21158 /* External links */ removed bogus entries
21160 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21164 Edit comment with section link and text before it (non-local, eg in history list)
21166 comment title=[[Main Page]]
21168 pre-comment text /* External links */ removed bogus entries
21170 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>
21174 Edit comment with section link (local, eg in diff view)
21176 comment local title=[[Main Page]]
21178 /* External links */ removed bogus entries
21180 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21184 Edit comment with subpage link (bug 14080)
21188 title=[[Subpage test]]
21190 Poked at a [[/subpage]] here...
21192 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21196 Edit comment with subpage link and link text (bug 14080)
21200 title=[[Subpage test]]
21202 Poked at a [[/subpage|neat little page]] here...
21204 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21208 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
21211 title=[[Subpage test]]
21213 Poked at a [[/subpage]] here...
21215 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21219 Edit comment with bare anchor link (local, as on diff)
21223 title=[[Main Page]]
21227 <a href="#section">#section</a>
21231 Edit comment with bare anchor link (non-local, as on history)
21234 title=[[Main Page]]
21238 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21242 Anchor starting with underscore
21248 <p><a href="#_ref">One</a>
21251 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21255 Id starting with underscore
21257 <div id="_ref"></div>
21259 <div id="_ref"></div>
21264 Edit comment with link with more than one pipe (T99346)
21268 [[Main Page|Many|pipes]]
21270 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21274 Complex edit comment with link with more than one pipe (T99346)
21278 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21280 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..."
21284 Space normalisation on autocomment (bug 22784)
21287 title=[[Main Page]]
21289 /* __hello__world__ */
21291 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21295 percent-encoding and + signs in comments (Bug 26410)
21299 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21301 <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>
21304 # Parsoid doesn't support this yet: see bug 73581
21305 # but it *should* omit the 'src' attribute if the image is bad.
21306 # PHP side of tests was disabled in
21307 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21308 # because of issues in the PHP parserTests infrastructure
21309 # (but the output below is indeed what the PHP side emits)
21311 Bad images - basic functionality
21314 !! DISABLED/html/php
21316 <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>
21320 Bad images - bug 16039: text after bad image disappears
21325 !! DISABLED/html/php
21331 <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>
21336 Verify that displaytitle works (bug #22501) no displaytitle
21340 wgAllowDisplayTitle=true
21341 wgRestrictDisplayTitle=false
21343 this is not the the title
21346 <p>this is not the the title
21351 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21356 wgAllowDisplayTitle=true
21357 wgRestrictDisplayTitle=false
21359 this is not the the title
21360 {{DISPLAYTITLE:whatever}}
21363 <p>this is not the the title
21368 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21373 wgAllowDisplayTitle=true
21374 wgRestrictDisplayTitle=true
21376 this is not the the title
21377 {{DISPLAYTITLE:whatever}}
21380 <p>this is not the the title
21385 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21390 wgAllowDisplayTitle=true
21391 wgRestrictDisplayTitle=true
21393 this is not the the title
21394 {{DISPLAYTITLE:screen}}
21397 <p>this is not the the title
21402 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21407 wgAllowDisplayTitle=false
21409 this is not the the title
21410 {{DISPLAYTITLE:screen}}
21413 <p>this is not the the title
21414 <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>
21419 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21424 wgAllowDisplayTitle=false
21426 this is not the the title
21429 <p>this is not the the title
21434 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21439 wgAllowDisplayTitle=true
21440 wgRestrictDisplayTitle=true
21442 this is not the the title
21443 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21445 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21446 <p>this is not the the title
21451 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21456 wgAllowDisplayTitle=true
21457 wgRestrictDisplayTitle=true
21459 this is not the the title
21460 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21462 <span style="color: red;">s</span>creen
21463 <p>this is not the the title
21468 Page status indicators: Empty name is invalid
21472 <indicator name=" "></indicator>
21473 <indicator></indicator>
21475 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21476 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21481 Page status indicators: Weird syntaxes that are okay
21485 <indicator name="empty" />
21486 <indicator name="name"></indicator>
21495 Page status indicators: Torture test
21499 <indicator name="01">hello world</indicator>
21500 <indicator name="02">[[Main Page]]</indicator>
21501 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21502 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21503 <indicator name="05">* foo
21505 <indicator name="06"><nowiki>foo</nowiki></indicator>
21506 <indicator name="07"> Preformatted</indicator>
21507 <indicator name="08"><div>Broken tag</indicator>
21508 <indicator name="09">{| class=wikitable
21511 <indicator name="10">Two
21513 paragraphs</indicator>
21516 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21517 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" />
21518 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>
21519 05=<ul><li> foo</li>
21523 07=<pre>Preformatted
21525 08=<div>Broken tag</div>
21527 09=<table class="wikitable">
21544 preload: check <noinclude> and <includeonly>
21548 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21554 preload: check <onlyinclude>
21558 Goodbye <onlyinclude>Hello world</onlyinclude>
21564 preload: can pass tags through if we want to
21568 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21570 <includeonly>Hello world</includeonly>
21574 preload: check that it doesn't try to do tricks
21578 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21580 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21584 Play a bit with r67090 and bug 3158
21586 <div style="width:50% !important"> </div>
21587 <div style="width:50% !important"> </div>
21588 <div style="width:50% !important"> </div>
21589 <div style="border : solid;"> </div>
21591 <div style="width:50% !important"> </div>
21592 <div style="width:50% !important"> </div>
21593 <div style="width:50% !important"> </div>
21594 <div style="border : solid;"> </div>
21597 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21598 <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>
21599 <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>
21600 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21605 HTML5 data attributes
21607 <span data-foo="bar">Baz</span>
21608 <p data-abc-def_hij="">Quuz</p>
21610 <p><span data-foo="bar">Baz</span>
21612 <p data-abc-def_hij="">Quuz</p>
21615 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21616 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21620 Strip reserved data attributes
21622 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21624 <div data-ok="fred">d</div>
21627 <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>
21631 percent-encoding and + signs in internal links (Bug 26410)
21633 [[User:+%]] [[Page+title%]]
21634 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21635 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21636 [[%33%45]] [[%33%45+]]
21638 <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>
21639 <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>
21640 <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>
21641 <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>
21644 <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>
21645 <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>
21646 <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>
21647 <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>
21651 Special characters in embedded file links (bug 27679)
21653 [[File:Contains & ampersand.jpg]]
21654 [[File:Does not exist.jpg|Title with & ampersand]]
21656 <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>
21657 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21660 <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>
21661 <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>
21665 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21667 Text's been normalized?
21669 <p>Text's been normalized?
21674 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21676 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21678 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21683 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21685 [http://www.example.org/ ideograms]
21687 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21692 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21694 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21696 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21720 Bug 31098 Template which includes system messages which includes the template
21724 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21725 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21730 Bug31490 Turkish: ucfirst 'blah'
21741 Bug31490 Turkish: ucfirst 'ix'
21752 Bug31490 Turkish: lcfirst 'BLAH'
21763 Bug31490 Turkish: ucfırst (with a dotless i)
21769 <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>
21774 Bug31490 ucfırst (with a dotless i) with English language
21780 <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>
21785 Bug 26375: TOC with italics
21787 title=[[Main Page]]
21790 == ''Lost'' episodes ==
21792 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21794 <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>
21798 <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>
21803 Bug 26375: TOC with bold
21805 title=[[Main Page]]
21808 == '''should be bold''' then normal text ==
21810 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21812 <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>
21816 <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>
21821 Bug 33845: Headings become cursive in TOC when they contain an image
21823 title=[[Main Page]]
21826 == Image [[Image:foobar.jpg]] ==
21828 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21830 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21834 <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>
21839 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21841 title=[[Main Page]]
21844 == <blockquote>Quote</blockquote> ==
21846 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21848 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21852 <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>
21856 <div id="toc" class="toc">
21857 <div id="toctitle">
21861 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21865 <h2><span class="mw-headline" id="Quote"></span></h2>
21867 <p><span class="mw-headline" id="Quote">Quote</span></p>
21869 <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>
21873 Unclosed tags in TOC
21875 title=[[Main Page]]
21879 <small>Hanc marginis exiguitas non caperet.</small>
21882 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21884 <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>
21888 <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>
21889 <p><small>Hanc marginis exiguitas non caperet.</small>
21895 Multiple tags in TOC
21898 == <i>Foo</i> <b>Bar</b> ==
21900 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21902 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21904 <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>
21905 <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>
21909 <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>
21910 <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>
21914 <div id="toc" class="toc">
21915 <div id="toctitle">
21919 <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>
21920 <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>
21924 <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>
21925 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21927 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21929 <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>
21932 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21933 # html5 tag parsing.
21935 Tags with parameters in TOC
21940 == <sup class="in-h2">Hello</sup> ==
21942 == <sup class="a > b">Evilbye</sup> ==
21944 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21946 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21947 <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>
21951 <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>
21952 <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>
21955 <meta property="mw:PageProp/toc" />
21956 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21958 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21962 span tags with directionality in TOC
21965 == <span dir="ltr">C++</span> ==
21967 == <span dir="rtl">זבנג!</span> ==
21969 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21971 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21973 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21975 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21977 <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>
21978 <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>
21979 <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>
21980 <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>
21981 <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>
21985 <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>
21986 <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>
21987 <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>
21988 <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>
21989 <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>
21994 Bug 72884: bdi element in ToC
21997 == <bdi>test</bdi> ==
21999 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22001 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22005 <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>
22010 T35715: s/strike element in ToC
22013 == <s>test</s> test <strike>test</strike> ==
22015 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22017 <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>
22021 <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>
22025 # Note that the html output does not have the <p></p>, but the
22026 # html+tidy output *does*. This is because the empty <p></p> is
22027 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22029 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22034 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22036 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22040 <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>
22044 <div id="toc" class="toc">
22045 <div id="toctitle">
22049 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22053 <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>
22059 == {{int:headline_sample}} ==
22063 Bug 32057: Title needed when expanding <h> nodes.
22065 title=[[Main Page]]
22069 <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>
22074 Strip marker in urlencode
22076 {{urlencode:x<nowiki/>y}}
22077 {{urlencode:x<nowiki/>y|wiki}}
22078 {{urlencode:x<nowiki/>y|path}}
22079 {{urlencode:x<pre id="one">two</pre>y}}
22107 Strip marker in formatNum
22109 {{formatnum:1<nowiki/>2}}
22110 {{formatnum:1<nowiki/>2|R}}
22118 Check noCommafy in formatNum
22122 {{formatnum:123456.78}}
22123 {{formatnum:123456.78|NOSEP}}
22131 Wrong option for formatNum (bug 56199)
22133 {{formatnum:1,234.56|Random}}
22134 {{formatnum:1,234.56|EVERYTHING}}
22135 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22144 Strip marker in grammar
22148 {{grammar:elative|foo<nowiki/>bar}}
22155 Strip marker in padleft
22157 {{padleft:|2|x<nowiki/>y}}
22164 Strip marker in padright
22166 {{padright:|2|x<nowiki/>y}}
22173 Strip marker in anchorencode
22175 {{anchorencode:x<nowiki/>y}}
22182 nowiki inside link inside heading (bug 18295)
22184 ==[[foo|x<nowiki>y</nowiki>z]]==
22186 <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>
22191 new support for bdi element (bug 31817)
22193 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22195 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22200 Ignore pipe between table row attributes
22204 |- id=foo | style='color: red'
22212 <tr id="foo" style="color: red">
22219 Language parser function
22228 Padleft and padright as substr
22230 {{padleft:|3|abcde}}
22231 {{padright:|3|abcde}}
22239 Special parser function
22241 {{#special:RandomPage}}
22242 {{#special:BaDtItLe}}
22243 {{#special:Foobar}}
22252 Bug 34939 - Case insensitive link parsing ([HttP://])
22254 [HttP://MediaWiki.Org/]
22256 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22259 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22263 Bug 34939 - Case insensitive link parsing ([HttP:// title])
22265 [HttP://MediaWiki.Org/ MediaWiki]
22267 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22272 Bug 34939 - Case insensitive link parsing (HttP://)
22274 HttP://MediaWiki.Org/
22276 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22279 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22297 <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>
22298 <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>
22299 <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>
22300 <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>
22301 <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>
22307 ### Parsoid-specific tests
22308 ### Parsoid-PHP parser incompatibilities
22311 1. SOL-sensitive wikitext tokens as template-args
22313 parsoid=wt2html,wt2wt
22319 <span about="#mwt1" typeof="mw:Transclusion">
22320 </span><ul about="#mwt1"><li>a</li>
22322 <span about="#mwt2" typeof="mw:Transclusion">
22323 </span><ol about="#mwt2"><li>a</li>
22325 <span about="#mwt3" typeof="mw:Transclusion">
22326 </span><dl about="#mwt3"><dd>a</dd>
22330 #### -----------------------------------------------------------------
22331 #### Parsoid-specific functionality tests
22332 #### -----------------------------------------------------------------
22334 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22335 # We know wt2wt will fail, but we expect selser to pass.
22336 # Due to the nature of our testing, wt2wt and selser tests will enter the
22337 # blacklist and we'll catch selser regressions based on changes to the
22338 # blacklist entries for selser tests.
22340 1. Bad treebuilder fixup of formatting elt is cleaned up
22342 parsoid=wt2html,wt2wt
22347 [[Image:Foobar.jpg|right|Test]]
22354 <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>
22361 2. Bad treebuilder fixup of formatting elt is cleaned up
22363 parsoid=wt2html,wt2wt
22365 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22367 <small>[[Image:Foobar.jpg|right|300px]]</small>
22371 <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>
22373 <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>
22377 3. Bad treebuilder fixup of formatting elt is cleaned up
22379 parsoid=wt2html,wt2wt
22381 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22383 <p><small><b>foo</b></small></p>
22384 <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>
22385 <p><small><b>bar</b></small></p>
22389 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22391 parsoid=wt2html,wt2wt
22393 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22395 <p><b><small></small></b></p>
22396 <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>
22400 #### ----------------------------------------------------------------
22401 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22402 #### tags. Parsoid's output for these tags differs from that of the
22404 #### ----------------------------------------------------------------
22407 Ref: 1. ref-location should be replaced with an index span
22410 B <ref name="x">foo</ref>
22414 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22415 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-2"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2"><span class="mw-reflink-text">[2]</span></a></span>
22416 C <span about="#mwt6" class="mw-ref" id="cite_ref-y_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="#cite_note-y-3"><span class="mw-reflink-text">[3]</span></a></span></p>
22417 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22418 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22419 <li about="#cite_note-x-2" id="cite_note-x-2"><a href="#cite_ref-x_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-x-2" class="mw-reference-text">foo</span></li>
22420 <li about="#cite_note-y-3" id="cite_note-y-3"><a href="#cite_ref-y_3-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-y-3" class="mw-reference-text"></span></li>
22425 Ref: 2. ref-tags with identical names should all get the same index
22427 A <ref name="x">foo</ref>
22431 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22432 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22433 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22434 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22439 Ref: 3. spaces in ref-names should be ignored
22441 A <ref name="x">foo</ref>
22442 B <ref name=" x " />
22446 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22447 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22448 C <span about="#mwt6" class="mw-ref" id="cite_ref-x_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22449 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22450 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a><a href="#cite_ref-x_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22454 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22456 Ref: 4. 'constructor' should be accepted as a valid ref-name
22458 A <ref name="constructor">foo</ref>
22461 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-constructor-1"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22462 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22463 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><a href="#cite_ref-constructor_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
22468 Ref: 5. body should accept generic wikitext
22471 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22476 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22478 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22479 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">This is a <b><a rel="mw:WikiLink" href="Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
22485 Ref: 6. indent-pres should not be output in ref-body
22495 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22497 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22498 <li about="#cite_note-1" id="cite_note-1"><a href="#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
22506 Ref: 7. No p-wrapping in ref-body
22523 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22525 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22526 <li about="#cite_note-1" id="cite_note-1"><a href="#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
22541 Ref: 8. transclusion wikitext has lower precedence
22543 A <ref> foo {{echo|</ref> B C}}
22547 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C}}</p>
22548 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22549 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo {{echo|</span></li>
22554 Ref: 9. unclosed comments should not leak out of ref-body
22556 A <ref> foo <!--</ref> B C
22559 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22560 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22561 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22566 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22568 A <ref> <b> foo </ref> B C
22572 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22575 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22576 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
22581 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22587 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
22588 C <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> D</p>
22589 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22590 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22591 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22596 Ref: 12. ref-tags act as trailing newline migration barrier
22598 <!--the newline at the end of this line moves out of the p tag-->a
22600 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22606 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22609 <p>b<!--the newline at the end of this line stays inside the p tag--> <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22610 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22613 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22614 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"></span></li>
22615 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"></span></li></ol>
22619 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22626 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> A
22627 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> B</p>
22628 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22629 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22630 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar
22635 ## Roundtripping fails because of nowiki'ing
22637 Ref: 14. A nested ref-tag should be emitted as plain text
22641 <ref>foo <ref>bar</ref> baz</ref>
22645 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span> baz</ref></p>
22647 <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="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo <ref>bar</span></li></ol>
22651 Ref: 15. ref-tags with identical names should get identical indexes
22653 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22654 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22658 <p>A1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a-1"},"attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span> A2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22659 B1 <span about="#mwt7" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span> B2 <span about="#mwt8" class="mw-ref" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22661 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-a_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-b_2-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22665 ## We don't bother wt2wt-ing non-standard whitespace
22667 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22675 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22676 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22677 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22681 Ref: 17. Generate valid HTML5 id/about attributes
22683 <ref name="a b">foo</ref>
22687 <p><span class="mw-ref" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_b-1"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22690 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22691 <li about="#cite_note-a_b-1" id="cite_note-a_b-1"><a href="#cite_ref-a_b_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">foo</span></li>
22696 Ref: 18. T58916: Extension attributes should be parsed as plain text
22698 <ref name="{{echo|a}}">foo</ref>
22702 <p><span class="mw-ref" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1"><span class="mw-reflink-text">[1]</span></a></span>
22705 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22706 <li about="#cite_note-.7B.7Becho.7Ca.7D.7D-1" id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><a href="#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1" class="mw-reference-text">foo</span></li>
22711 Ref: 19. ref-tags with identical name encodings should get identical indexes
22713 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22717 <p>1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_.26_b-1"},"attrs":{"name":"a & b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span> 2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22719 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22720 <li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_.26_b_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-a_.26_b_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_.26_b-1" class="mw-reference-text">foo</span></li>
22725 Ref: 20. ref-tags with identical names but different content should keep it
22727 A <ref name="foo">Foo one</ref>
22728 B <ref name="foo">Foo two</ref>
22729 C <ref name="foo" />
22733 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-foo_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-foo-1"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22734 B <span about="#mwt4" class="mw-ref" id="cite_ref-foo_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo two"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22735 C <span about="#mwt6" class="mw-ref" id="cite_ref-foo_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22737 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-foo-1" id="cite_note-foo-1"><span rel="mw:referencedBy"><a href="#cite_ref-foo_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-foo_1-1"><span class="mw-linkback-text">2 </span></a><a href="#cite_ref-foo_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-foo-1" class="mw-reference-text">Foo one</span></li>
22742 References: 1. references tag without any refs should be handled properly
22746 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22750 References: 2. references tag with group only outputs references from that group
22752 A <ref group="a">foo</ref>
22753 B <ref group="b">bar</ref>
22756 <references group="a" />
22758 <references group="b" />
22760 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22761 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"b"}}'><a href="#cite_note-2" data-mw-group="b"><span class="mw-reflink-text">[b 1]</span></a></span>
22762 C <span class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3"><span class="mw-reflink-text">[1]</span></a></span></p>
22764 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22765 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22767 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22768 <li about="#cite_note-3" id="cite_note-3"><a href="#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">baz</span></li>
22770 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22771 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" data-mw-group="b" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22776 References: 3. ref list should be cleared after processing references
22786 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22788 <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="#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>
22791 <p>B <span about="#mwt6" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22793 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22794 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22799 References: 4. only referenced group should be cleared after processing references
22801 A <ref group="a">afoo</ref>
22804 <references group="a" />
22810 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22811 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22813 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">afoo</span></li>
22816 <p>C <span about="#mwt8" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3"><span class="mw-reflink-text">[2]</span></a></span></p>
22818 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bfoo</span></li><li about="#cite_note-3" id="cite_note-3"><a href="#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">cfoo</span></li>
22822 ## Don't expect this to rt since we're dropping content
22824 References: 5. ref tags in references should be processed while ignoring all other content
22826 parsoid=wt2html,html2html
22829 B <ref name="b">bar</ref>
22832 <ref name="a">foo</ref>
22833 This should just get lost.
22836 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22837 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22840 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{},"body":{"html":"\n<span about=\"#mwt8\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-a-1\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>\n"}}'><li about="#cite_note-a-1" id="cite_note-a-1"><a href="#cite_ref-a_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><a href="#cite_ref-b_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22845 References: 6. <references /> from a transclusion
22847 <ref>Foo</ref> {{echo|<references />}}
22849 <p><span about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p> <ol class="mw-references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
22854 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22856 A <ref>foo bar for a</ref>
22857 B <ref group="X" name="b" />
22861 <references group="X">
22862 <ref name="b">foo</ref>
22865 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22866 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="#cite_note-b-2" data-mw-group="X"><span class="mw-reflink-text">[X 1]</span></a></span>
22869 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22870 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo bar for a</span></li>
22873 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","attrs":{"group":"X"},"body":{"html":"\n<span about=\"#mwt10\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-b-2\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"X\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[X 1]</span></a></span>\n"}}'>
22874 <li about="#cite_note-b-2" id="cite_note-b-2"><a href="#cite_ref-b_2-0" data-mw-group="X" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">foo</span></li>
22879 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22881 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22884 <p>X<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>"}},"i":0}}]}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22885 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt7" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</span></li>
22889 # This test only works in wt2html now as the <references /> are always generated
22890 # unless selser is active. Once T72722 is fixed, we should add a changes test
22891 # here to ensure that unrelated changes don't add the new <references />
22892 # when selser is active.
22894 References: 9. Generate missing references list at the end
22897 B <ref group="inexistent">bar</ref>
22899 <p>A <span class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B <span class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"inexistent"}}'><a href="#cite_note-2" data-mw-group="inexistent"><span class="mw-reflink-text">[inexistent 1]</span></a></span></p>
22900 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22901 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
22903 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22904 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" data-mw-group="inexistent" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22909 References: 10. New <references/> shouldn't be added for unrelated edits.
22912 "modes": ["selser"],
22913 "changes": [["#x", "remove"]],
22917 Unrelated text<span id="x"> that's going to disappear</span>.
22925 Entities in ref name
22927 <ref name="test & me">hi</ref>
22930 <p><span about="#mwt2" class="mw-ref" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-test_.26_me-1"},"attrs":{"name":"test &amp; me"}}'><a href="#cite_note-test_.26_me-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22931 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22932 <li about="#cite_note-test_.26_me-1" id="cite_note-test_.26_me-1"><a href="#cite_ref-test_.26_me_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-test_.26_me-1" class="mw-reference-text">hi</span></li>
22936 ## The output here may look funny, but it's what the php parser will do. The
22937 ## unclosed references tag becomes escaped text, and then a new references
22938 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22939 ## nowiki tags, and the auto-generated references tag is only dropped in
22942 Generate references for unclosed references tag
22950 <p>a<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
22952 <p><references></p>
22953 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'><li about="#cite_note-1" id="cite_note-1"><a href="#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>
22957 New reference serializes on its own line
22959 parsoid=wt2wt,html2wt
22964 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22967 #--------- Test stripping of empty nodes in template content ----------
22969 Empty LI and TR nodes should be stripped from template content
22974 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22978 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22991 Empty LI and TR nodes should not be stripped from top-level content
23018 Empty TR nodes should not be stripped if they have any attributes set
23020 {{EmptyTRWithHTMLAttrTest}}
23022 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23023 <tr align="center"></tr>
23024 <tr><td>foo</td></tr>
23025 <tr align="center"></tr>
23026 <tr><td>bar</td></tr>
23030 #### ----------------------------------------------------------------
23031 #### The following section of tests are primarily to test
23032 #### wikitext escaping capabilities of Parsoid. Given that
23033 #### escaping can be done any number of ways, the wikitext (input)
23034 #### is always adjusted to reflect how Parsoid adds nowiki
23037 #### We are marking several tests as parsoid-only since the
23038 #### HTML in the result section is different from what the
23039 #### PHP parser generates for it.
23040 #### ----------------------------------------------------------------
23043 #### --------------- Headings ---------------
23045 #### 1. Nested inside html <h1>=foo=</h1>
23046 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23047 #### 3. Nested inside html with wikitext split by html tags
23048 #### 4. No escape needed
23049 #### 5. Empty headings <h1></h1>
23050 #### 6. Heading chars in SOL context
23051 #### ----------------------------------------
23053 Headings: 0. Unnested
23063 <p>=foo<i>a</i>=</p>
23065 <nowiki>=foo=</nowiki>
23067 <nowiki> </nowiki>=foo=
23069 <nowiki>=foo=</nowiki>
23071 =foo''a''<nowiki>=</nowiki>
23074 # New headings and existing headings are handled differently
23076 Headings: 1. Nested inside html
23084 <h1 data-parsoid=''>=foo=</h1>
23085 <h2 data-parsoid=''>=foo=</h2>
23086 <h3 data-parsoid=''>=foo=</h3>
23087 <h4 data-parsoid=''>=foo=</h4>
23088 <h5 data-parsoid=''>=foo=</h5>
23089 <h6 data-parsoid=''>=foo=</h6>
23097 =<nowiki>=foo=</nowiki>=
23098 ==<nowiki>=foo=</nowiki>==
23099 ===<nowiki>=foo=</nowiki>===
23100 ====<nowiki>=foo=</nowiki>====
23101 =====<nowiki>=foo=</nowiki>=====
23102 ======<nowiki>=foo=</nowiki>======
23107 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23116 <nowiki>*</nowiki>bar
23122 <nowiki>=bar=</nowiki>
23126 Headings: 3. Nested inside html with wikitext split by html tags
23130 <h1>=<b>bold</b>foo=</h1>
23132 = ='''bold'''foo= =
23136 Headings: 4a. No escaping needed (testing just h1 and h2)
23147 <h1><i>=</i>foo=</h1>
23167 Headings: 4b. No escaping needed (inside p-tags)
23182 Headings: 5. Empty headings
23186 <h1 data-parsoid='{}'></h1>
23188 <h2 data-parsoid='{}'></h2>
23190 <h3 data-parsoid='{}'></h3>
23192 <h4 data-parsoid='{}'></h4>
23194 <h5 data-parsoid='{}'></h5>
23196 <h6 data-parsoid='{}'></h6>
23206 =====<nowiki/>=====
23208 ======<nowiki/>======
23212 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23222 <nowiki>=a=</nowiki>
23224 <nowiki>=a=</nowiki>
23226 <nowiki>=a=</nowiki>
23230 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23243 <nowiki>=a=</nowiki>
23246 <nowiki>=a=</nowiki>
23249 <nowiki>=a=</nowiki>
23254 Headings: 6c. Heading chars in SOL context (leading newline break)
23262 <nowiki>=b=</nowiki>
23266 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23270 <!--c0--><p>=a=</p>
23272 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23274 <!--c0--><nowiki>=a=</nowiki>
23276 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23280 Headings: 6d. Heading chars in SOL context (No escaping needed)
23290 Headings: 7. Insert a newline between new content and headings
23296 <h2 data-parsoid='{}'>A</h2>
23297 <p data-parsoid='{}'>a</p>
23307 #### --------------- Lists ---------------
23308 #### 0. Outside nests (*foo, etc.)
23309 #### 1. Nested inside html <ul><li>*foo</li></ul>
23310 #### 2. Inside definition lists
23311 #### 3. Only bullets at start should be escaped
23312 #### 4. No escapes needed
23313 #### 5. No unnecessary escapes
23314 #### 6. Escape bullets in SOL position
23315 #### 7. Escape bullets in a multi-line context
23316 #### ----------------------------------------
23319 Lists: 0. Outside nests
23329 <nowiki>*</nowiki>foo
23331 <nowiki>#</nowiki>foo
23333 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23336 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23337 ## to test wikitext escaping, and insignificant whitespace diffs
23338 ## cause PHP parser tests to barf
23340 Lists: 1. Nested inside html (No unnecessary escapes)
23349 <li data-parsoid='{}'>*foo</li>
23350 <li data-parsoid='{}'>#foo</li>
23351 <li data-parsoid='{}'>:foo</li>
23352 <li data-parsoid='{}'>;foo</li>
23360 <li data-parsoid='{}'>*foo</li>
23361 <li data-parsoid='{}'>#foo</li>
23362 <li data-parsoid='{}'>:foo</li>
23363 <li data-parsoid='{}'>;foo</li>
23370 *<nowiki>*foo</nowiki>
23371 *<nowiki>#foo</nowiki>
23372 *<nowiki>:foo</nowiki>
23373 *<nowiki>;foo</nowiki>
23379 #<nowiki>*foo</nowiki>
23380 #<nowiki>#foo</nowiki>
23381 #<nowiki>:foo</nowiki>
23382 #<nowiki>;foo</nowiki>
23386 Lists: 2. Inside definition lists
23390 <dl><dt>;foo</dt></dl>
23391 <dl><dt>:foo</dt></dl>
23394 <dl><dd>:foo</dd></dl>
23398 ; <nowiki>:foo</nowiki>
23400 ; <nowiki>:foo</nowiki>
23407 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23413 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23417 *<nowiki>*foo</nowiki>''it''*bar
23421 Lists: 4. No escapes needed
23434 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23438 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23452 Lists: 5. No unnecessary escapes
23456 <ul><li> bar <span>[[foo]]</span></li></ul>
23457 <ul><li> =bar <span>[[foo]]</span></li></ul>
23458 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23459 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23460 <ul><li> =bar <span>foo]]</span>=</li></ul>
23461 <ul><li> <s></s>: a</li></ul>
23462 <ul><li> <i>* foo</i></li></ul>
23465 * bar <span><nowiki>[[foo]]</nowiki></span>
23467 * =bar <span><nowiki>[[foo]]</nowiki></span>
23469 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23471 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23473 * =bar <span>foo]]</span>=
23481 Lists: 6. Escape bullets in SOL position
23485 <p><!--cmt-->*foo</p>
23487 <!--cmt--><nowiki>*</nowiki>foo
23491 Lists: 7. Escape bullets in a multi-line context
23500 <nowiki>*</nowiki>b
23504 Lists: 8. Escape colons only if not present in tags
23508 <dl><dt>a:b<i>c:d</i></dt></dl>
23510 ; <nowiki>a:b</nowiki>''c:d''
23513 #### --------------- HRs ---------------
23514 #### 1. Single line
23515 #### -----------------------------------
23518 HRs: 1. Single line
23526 ----<nowiki>----</nowiki>
23531 #### --------------- Tables ---------------
23532 #### 1a. Simple example
23533 #### 1b. No escaping needed (!foo)
23534 #### 1c. No escaping needed (|foo)
23535 #### 1d. No escaping needed (|}foo)
23537 #### 2a. Nested in td (<td>foo|bar</td>)
23538 #### 2b. Nested in td (<td>foo||bar</td>)
23539 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23541 #### 3a. Nested in th (<th>foo!bar</th>)
23542 #### 3b. Nested in th (<th>foo!!bar</th>)
23543 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23547 #### 4c. No escaping needed
23548 #### --------------------------------------
23551 Tables: 1a. Simple example
23559 <nowiki>{|</nowiki>
23564 Tables: 1b. No escaping needed
23575 Tables: 1c. No escaping needed
23586 Tables: 1d. No escaping needed
23597 Tables: 2a. Nested in td
23602 <td>foo|bar</td></tr>
23603 <tr><td>x<div>a|b</div></td>
23607 |<nowiki>foo|bar</nowiki>
23609 |x<div><nowiki>a|b</nowiki></div>
23625 Tables: 2b. Nested in td
23631 <td>a<i>b||c</i></td>
23632 <td>a<i><div>b||c</div></i></td>
23633 </tr></tbody></table>
23636 |<nowiki>foo||bar</nowiki>
23637 |a''<nowiki>b||c</nowiki>''
23638 |a''<div><nowiki>b||c</nowiki></div>''
23647 <td>a<i><div>b||c</div></i>
23653 Tables: 2c. Nested in td -- no escaping needed
23669 Tables: 3a. Nested in th
23685 Tables: 3b. Nested in th
23690 <tr><th>foo!!bar</th>
23691 <th><i>foo|bar</i></th>
23692 <th><i>foo!!bar</i></th>
23693 <th><i><span>foo!!bar</span></i></th>
23694 </tr></tbody></table>
23697 !<nowiki>foo!!bar</nowiki>
23698 !''<nowiki>foo|bar</nowiki>''
23699 !''<nowiki>foo!!bar</nowiki>''
23700 !''<span><nowiki>foo!!bar</nowiki></span>''
23709 <th><i>foo!!bar</i>
23711 <th><i><span>foo!!bar</span></i>
23717 Tables: 3c. Nested in th
23722 <tr><th>foo||bar</th>
23723 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23724 </tr></tbody></table>
23727 !<nowiki>foo||bar</nowiki>
23728 !<nowiki>foo||bar</nowiki>
23741 Tables: 4a. Escape -
23757 |<nowiki>-bar</nowiki>
23762 Tables: 4b. Escape +
23778 |<nowiki>+bar</nowiki>
23783 Tables: 4c. No escaping needed
23788 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23789 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23795 <div>a|b</div></td>
23840 Tables: 4d. No escaping needed
23845 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23846 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23847 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23858 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23868 T97430: Don't emit empty nowiki pairs around marker meta tags
23872 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23873 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23875 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23876 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23880 Unclosed xmlish element in table line shouldn't eat end delimiters
23885 <tbody><tr><td> <foo</td>
23886 <td> bar></td></tr>
23903 #### --------------- Links ----------------
23904 #### 1. Quote marks in link text
23905 #### 2. Wikilinks: Escapes needed
23906 #### 3. Wikilinks: No escapes needed
23907 #### 4. Extlinks: Escapes needed
23908 #### 5. Extlinks: No escapes needed
23909 #### --------------------------------------
23911 Links 1. WikiLinks: No escapes needed
23915 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23916 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23917 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23921 [[Foo|x [Foobar] x]]
23923 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23924 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23925 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23930 Links 2. WikiLinks: Escapes needed
23934 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23935 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23936 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23937 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23938 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23939 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23940 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23941 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23942 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23943 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23945 [[Foo|<nowiki>Foobar]</nowiki>]]
23946 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23947 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23948 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23949 [[Foo|<nowiki>|Bar</nowiki>]]
23950 [[Foo|<nowiki>]]bar</nowiki>]]
23951 [[Foo|<nowiki>[[bar</nowiki>]]
23952 [[Foo|<nowiki>x [[ y</nowiki>]]
23953 [[Foo|<nowiki>x ]] y</nowiki>]]
23954 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23956 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23957 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23958 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23959 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23960 <a href="/wiki/Foo" title="Foo">|Bar</a>
23961 <a href="/wiki/Foo" title="Foo">]]bar</a>
23962 <a href="/wiki/Foo" title="Foo">[[bar</a>
23963 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23964 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23965 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23970 Links 3. WikiLinks: No escapes needed
23974 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23975 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23980 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23981 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23986 Links 4. ExtLinks: Escapes needed
23990 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23991 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23992 <p>[http://google.com]</p>
23993 <p>[http://google.com google]</p>
23994 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23995 <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>
23997 [http://google.com <nowiki>[google]</nowiki>]
23998 [http://google.com <nowiki>google]</nowiki>]
24000 <nowiki>[http://google.com]</nowiki>
24002 <nowiki>[http://google.com google]</nowiki>
24004 [http://google.com<nowiki>]</nowiki>
24006 [{{echo|http://google.com}}<nowiki>]</nowiki>
24008 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24009 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24010 </p><p>[http://google.com]
24011 </p><p>[http://google.com google]
24012 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24013 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24018 Links 5. ExtLinks: No escapes needed
24022 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24023 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24025 [http://google.com [google]
24027 [[http://google.com]]
24029 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24030 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24035 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
24039 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24040 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24041 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24042 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24043 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24044 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24045 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24046 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24047 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24048 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24049 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24050 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24051 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24054 x<nowiki/>http://example.com<nowiki/>y
24055 http://example.com<nowiki/>?x
24056 http://example.com<nowiki/>&x
24057 http://example.com<nowiki/>'x
24058 http://example.com<nowiki/>,x
24059 http://example.com<nowiki/>.x
24060 http://example.com<nowiki/>;x
24061 http://example.com<nowiki/>:x
24062 http://example.com<nowiki/>;x
24063 http://example.com<nowiki/>!x
24064 http://example.com<nowiki/>=x
24065 http://example.com<nowiki/>(x)
24066 http://example.com(x<nowiki/>)
24070 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24075 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24077 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24078 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24079 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24080 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24081 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24087 "http://example.com"
24088 (http://example.com)
24089 (http://example.com) foo
24090 http://example.com,
24091 http://example.com, foo
24094 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24096 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24097 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24098 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24099 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24100 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24105 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24109 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24110 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24112 http://example.com.,;:!?\
24113 -http://example.com:
24115 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24116 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24121 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
24125 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24126 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24127 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24131 X<nowiki/>RFC 123<nowiki/>y
24135 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
24139 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24140 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24141 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24148 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24149 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24150 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24155 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
24159 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24160 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24161 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24165 X<nowiki/>PMID 123<nowiki/>y
24169 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
24173 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24174 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24175 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24182 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24183 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24184 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24189 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
24193 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24194 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24195 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24198 ISBN 1234567890<nowiki/>1
24199 ISBN 1234567890<nowiki/>x
24200 a<nowiki/>ISBN 1234567890<nowiki/>b
24204 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
24208 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24212 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24217 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24221 <p>this is not a link: http://example.com
24224 this is not a link: <nowiki>http://example.com</nowiki>
24228 Links 15. Link trails can't become link prefixes.
24233 <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>
24235 [[Söfnuður]]-[[00]]
24237 <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>
24241 #### --------------- Quotes ---------------
24242 #### 1. Quotes inside <b> and <i>
24243 #### 2. Link fragments separated by <i> and <b> tags
24244 #### 3. Link fragments inside <i> and <b>
24245 #### 4. No escaping needed
24246 #### --------------------------------------
24248 1a. Quotes inside <b> and <i>
24259 <b>foo'<i>bar'</i>baz</b>
24268 <i>fools'<span> errand</span></i>
24269 <i><span>fool</span>'s errand</i>
24270 '<i>foo</i> bar '<i>baz</i>
24271 a|!*#-:;+-~[]{}b'<i>x</i>
24275 ''<nowiki>''foo''</nowiki>''
24276 ''<nowiki>'''foo'''</nowiki>''
24278 '''<nowiki/>'foo''''
24279 '''<nowiki>''foo''</nowiki>'''
24280 '''<nowiki>'''foo'''</nowiki>'''
24281 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24282 '''foo'''<nowiki/>'s
24288 '''foo'''<nowiki/>'
24289 ''''foo'''<nowiki/>'
24290 ''fools'<span> errand</span>''
24291 ''<span>fool</span>'s errand''
24292 '<nowiki/>''foo'' bar '''baz''
24293 a|!*#-:;+-~[]{}b'''x''
24297 1b. Quotes inside <b> and <i> with other tags on same line
24301 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24302 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24303 <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>
24304 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24305 '<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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
24306 '<i>foo</i> <div title="name">test</div>
24307 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24308 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24309 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
24312 '''a'' foo ''[[bar]]''
24313 ''a''' foo ''[[bar]]''
24314 ''a''' foo '''{{echo|[[bar]]}}'''
24315 [[foo]] x'''[[bar]]''
24316 '''foo'' <ref>test</ref>
24317 '''foo'' <div title="name">test</div>
24318 '''foo'' and <br> bar
24323 2. Link fragments separated by <i> and <b> tags
24327 <p>[[<i>foo</i>hello]]</p>
24328 <p>[[<b>foo</b>hello]]</p>
24330 [[''foo''<nowiki>hello]]</nowiki>
24332 [['''foo'''<nowiki>hello]]</nowiki>
24335 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24336 # this is one of the shortcomings of this format
24338 3. Link fragments inside <i> and <b>
24342 <p><i>[[foo</i>]]</p>
24343 <p><b>[[foo</b>]]</p>
24345 ''[[foo''<nowiki>]]</nowiki>
24347 '''[[foo'''<nowiki>]]</nowiki>
24351 4. No escaping needed
24355 <p>'<span><i>bar</i></span>'
24356 '<span><b>bar</b></span>'
24360 '<span>''bar''</span>'
24361 '<span>'''bar'''</span>'
24365 #### ----------- Paragraphs ---------------
24366 #### 1. No unnecessary escapes
24367 #### --------------------------------------
24370 1. No unnecessary escapes
24374 <p>bar <span>[[foo]]</span>
24375 </p><p>=bar <span>[[foo]]</span>
24376 </p><p>[[bar <span>[[foo]]</span>
24377 </p><p>]]bar <span>[[foo]]</span>
24378 </p><p>=bar <span>foo]]</span>=
24381 bar <span><nowiki>[[foo]]</nowiki></span>
24383 =bar <span><nowiki>[[foo]]</nowiki></span>
24385 [[bar <span><nowiki>[[foo]]</nowiki></span>
24387 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24389 =bar <span>foo]]</span><nowiki>=</nowiki>
24392 #### ----------------------- PRE --------------------------
24393 #### 1. Leading whitespace in SOL context should be escaped
24394 #### ------------------------------------------------------
24396 1. Leading whitespace in SOL context should be escaped
24419 <nowiki> </nowiki>a
24421 <nowiki> </nowiki> a
24425 <nowiki> </nowiki> a
24427 <nowiki> </nowiki>a
24430 <nowiki> </nowiki>b
24453 2. Leading whitespace in non-indent-pre contexts should not be escaped
24457 <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
24458 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24459 <li about="#cite_note-1" id="cite_note-1"><a href="#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>
24469 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24488 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24492 <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>
24494 [[File:Foobar.jpg|thumb|caption]]
24498 5. Nowiki escaping should account for indent-pres
24508 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24521 #### --------------- Behavior Switches --------------------
24524 1. Valid behavior switches should be escaped
24531 <nowiki>__TOC__</nowiki>
24532 ''<nowiki>__TOC__</nowiki>''
24536 2. Invalid behavior switches should not be escaped
24547 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24549 Behavior switches should be SOL-transparent
24553 <meta property="mw:PageProp/toc" />
24555 <!-- this one's bogus -->
24558 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24560 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24564 <!-- this one's bogus -->
24573 #### --------------- HTML tags ---------------
24576 #### 3. multi-line html tag
24577 #### 4. extension tags
24578 #### -----------------------------------------
24584 <a href="http://google.com">google</a>
24586 <a href="http://google.com">google</a>
24594 <ul><li> <div>foo</div></li>
24595 <li> <div style="color:red">foo</div></li>
24596 <li> <td></li></ul>
24599 * <nowiki><div>foo</div></nowiki>
24600 * <nowiki><div style="color:red">foo</div></nowiki>
24601 * <nowiki><td></nowiki>
24605 3. multi-line html tag
24624 <p><ref>foo</ref>
24625 </p><p><ref>bar
24626 </p><p>baz</ref>
24629 <nowiki><ref>foo</ref></nowiki>
24631 <nowiki><ref>bar</nowiki>
24633 baz<nowiki></ref></nowiki>
24636 #### --------------- Others ---------------
24642 <p><nowiki>foo</nowiki>
24645 <nowiki>foo</nowiki>
24648 ## The quote-char in the input is necessary for triggering the bug
24650 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24659 #----------- End of wikitext escaping tests --------------
24663 Tag-like HTML structures are passed through as text
24685 </p><p>1<d e>f
24690 HTML tag with necessary entities in attributes
24692 <span title="&amp;">foo</span>
24694 <p><span title="&amp;">foo</span>
24699 HTML tag with 'unnecessary' entity encoding in attributes
24701 <span title="&">foo</span>
24703 <p><span title="&">foo</span>
24708 HTML tag with broken attribute value quoting
24710 parsoid=wt2html,html2html
24712 <span title="Hello world>Foo</span>
24714 <p><span title="Hello world">Foo</span>
24717 <p><span title="Hello world">Foo</span></p>
24721 Self-closed tag with broken attribute value quoting
24723 parsoid=wt2html,html2html
24725 <div title="Hello world />Foo
24727 <div title="Hello world"></div>
24730 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24734 Table with broken attribute value quoting
24736 parsoid=wt2html,html2html
24739 | title="Hello world|Foo
24744 <td title="Hello world">Foo
24750 <td title="Hello world">Foo
24756 Table with broken attribute value quoting on consecutive lines
24758 parsoid=wt2html,html2html
24761 | title="Hello world|Foo
24762 | style="color:red|Bar
24767 <td title="Hello world">Foo
24769 <td style="color:red">Bar
24775 <td title="Hello world">Foo
24776 </td><td style="color: red">Bar
24777 </td></tr></tbody></table>
24782 Accept empty td cell attribute
24785 | align="center" | foo || |
24790 <td align="center"> foo </td>
24797 Non-empty attributes in th-cells
24800 ! Foo !! style="color: red" | Bar
24806 <th style="color: red"> Bar
24812 Accept empty attributes in th-cells
24827 Empty table rows go away
24848 ### Parsoid-centric tests for testing RTing of inter-element separators
24849 ### Edge cases not tested by existing parser tests and specific to
24850 ### Parsoid-specific serialization strategies.
24854 RT-ed inter-element separators should be valid separators
24866 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24870 # Parsoid-only since PHP parser relies on Tidy for correct output
24872 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24886 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24887 <p>bar</p></small></td></tr>
24891 <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>
24895 # Note that the "style" attribute is really a template parameter here.
24896 # The = would have to be {{=}} if you wanted the literal.
24898 Empty TD followed by TD with tpl-generated attribute
24903 |{{echo|style='color:red'}}|foo
24917 Indented table with an empty td
24935 ## We have some newline diffs RT-ing this edge case
24936 ## and it is not important enough -- we seem to be emitting
24937 ## at most 2 newlines after a </tr> and this is unrelated to
24938 ## the issue from T85627 that this is testing.
24940 Indented table with blank lines in between (T85627)
24959 Indented block & table
24973 <div data-parsoid='{"stx":"html"}'>foo</div>
24975 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24980 Indent and comment before table row
24995 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24996 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25000 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25002 Empty TR followed by a template-generated TR
25008 {{echo|<tr><td>foo</td></tr>}}
25014 <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}}]}'>
25019 ## PHP and parsoid output differ for this, and since this is primarily
25020 ## for testing Parsoid's serializer, marking this Parsoid only
25022 Empty TR followed by mixed-ws-comment line should RT correctly
25038 <!--c--> </tr><!--d-->
25044 Multi-line image caption generated by templates with/without trailing newlines
25046 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25047 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25049 <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>
25050 <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>
25054 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25058 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25060 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25062 <includeonly>foo</includeonly>
25070 ## PHP emits broken html for this, and since this is primarily
25071 ## a Parsoid serializer test, marking this Parsoid only
25073 Improperly nested inline or quotes tags with whitespace in between
25075 <span> <s>x</span> </s>
25078 <p><span> <s>x</s></span><s> </s>
25079 <b> <i>x</i></b><i> </i>
25084 Encapsulate protected attributes from wt
25086 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25088 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25092 <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>
25094 <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">
25095 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25099 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25100 ## Having nested or stray pre tags results in the attempt to add duplicates,
25101 ## causing an assertion fail. This test tries to prevent that situation.
25103 Ensure ParagraphWrapper can deal with stray closing pre tags
25113 1. Ensure fostered text content is wrapped in element nodes
25117 <table>hi</table><table>ho</table>
25126 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25128 parsoid=wt2html,wt2wt
25137 <tbody><tr><td> a</td></tr>
25142 Encapsulation properly handles null DSR information from foster box
25144 parsoid=wt2html,wt2wt
25146 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25148 <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>
25152 1. Encapsulate foster-parented transclusion content
25154 parsoid=wt2wt,wt2html
25156 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25158 <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>
25168 2. Encapsulate foster-parented transclusion content
25170 parsoid=wt2wt,wt2html
25172 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25174 <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>
25185 3. Encapsulate foster-parented transclusion content
25187 parsoid=wt2wt,wt2html
25189 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25191 <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>"]}">
25204 4. Encapsulate foster-parented transclusion content
25206 parsoid=wt2wt,wt2html
25208 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25210 <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>"]}">
25223 5. Encapsulate foster-parented transclusion content
25225 parsoid=wt2wt,wt2html
25227 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25229 <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>
25244 6. Encapsulate foster-parented transclusion content
25246 parsoid=wt2wt,wt2html
25248 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25250 <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>
25266 7. Encapsulate foster-parented transclusion content
25268 parsoid=wt2wt,wt2html
25270 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25272 <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>
25282 # Note that the wt is broken on purpose: the = should be {{=}} if you
25283 # don't want it to be a template parameter key.
25285 8. Encapsulate foster-parented transclusion content
25287 parsoid=wt2wt,wt2html
25290 }}{|{{echo|style='color:red'}}
25295 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25297 <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>
25308 9. Encapsulate foster-parented transclusion content
25310 parsoid=wt2wt,wt2html
25312 <table>{{echo|hi</table>hello}}
25314 <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>
25318 Table in fosterable position
25329 <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">
25331 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25337 # Parsoid only for bug 64747
25339 Properly encapsulate empty-content transclusions in fosterable positions
25347 <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"}]]}'>
25353 Always encapsulate foster box when template range is expanded to table
25366 T115289: Unclosed table
25368 {{echo|<table>}}<!--c-->[[Category:Two]]
25370 <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>
25374 T115289: Don't migrate newlines out of tables with fostered content
25376 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25378 <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>
25382 T73074: More fostering fun
25384 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25386 <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>
25390 Support <object> element with .data attribute
25394 <object data="test.swf"></object>
25396 <object data="test.swf"></object>
25400 Don't block XML namespace declaration
25402 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25404 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25407 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25410 # -----------------------------------------------------------------
25411 # The following section of tests are primarily to spec requirements
25412 # around Parsoid's serialization (old, new, edited content)
25414 # All these tests are marked Parsoid html2wt and html2html only
25415 # ----------------------------------------------------------------
25418 Ignore rel attribute in a-tags during serialization to url-links
25422 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25423 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25424 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25426 http://en.wikipedia.org/wiki/Foobar
25427 http://en.wikipedia.org/wiki/Foobar
25428 http://en.wikipedia.org/wiki/Foobar
25431 # 'mi' is a localinterwiki prefix as well as a language
25433 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25437 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25444 New wikilinks should be serialized properly
25448 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25449 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25450 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25451 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25452 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25456 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25457 http://en.wikipedia.org/wiki/Foo
25458 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25462 New wiki links (href variations)
25466 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25467 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25468 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25469 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25474 [[Toxine bactérienne]]
25478 New wiki links (content string variations)
25482 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25483 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25484 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25488 [[Foo_bar|./Foo_bar]]
25492 New category links (href variations)
25496 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25497 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25498 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25500 [[Category:Toxine bactérienne]]
25501 [[Category:Toxine bactérienne]]
25502 [[Category:Toxine bactérienne]]
25506 New sol transparent links don't need indent-pre nowiki protection
25511 <link rel="mw:PageProp/redirect" href="./Main_Page">
25512 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25513 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25515 #WEITERLEITUNG [[Main Page]]
25516 <!-- this is good --> [[Category:Good]]
25517 <!-- this is great --> [[Kategorie:Great]]
25521 New interlanguage links (href variations)
25525 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25526 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25527 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25529 [[es:Toxine bactérienne]]
25530 [[es:Toxine_bactérienne]]
25531 [[es:Toxine_bactérienne]]
25535 Image: Modifying size of an image (1)
25538 "modes": ["wt2wt"],
25540 ["img[height]", "attr", "height", "22"],
25541 ["img[width]", "attr", "width", "200"]
25545 [[Image:Foobar.jpg|230x230px]]
25547 [[Image:Foobar.jpg|200x200px]]
25551 Image: Modifying size of an image (2)
25554 "modes": ["wt2wt"],
25556 ["img[height]", "attr", "height", "100"],
25557 ["img[width]", "attr", "width", "500"]
25561 [[Image:Foobar.jpg|230x230px]]
25563 [[Image:Foobar.jpg|500x500px]]
25566 # Change in size is ignored so long as class='mw-default-size'
25568 Image: Modifying size of an image (3)
25571 "modes": ["wt2wt"],
25573 ["figure[class]", "removeClass", "mw-default-size"],
25574 ["figure img", "attr", "height", "19"],
25575 ["figure img", "attr", "width", "170"]
25579 [[Image:Foobar.jpg|thumb]]
25581 [[Image:Foobar.jpg|thumb|170x170px]]
25585 Image: Modifying alignment of an image (bug 48665)
25588 "modes": ["wt2wt"],
25590 ["figure[class]", "removeClass", "mw-halign-right"],
25591 ["figure[class]", "addClass", "mw-halign-left"]
25595 [[Image:Foobar.jpg|thumb|caption|right]]
25597 [[Image:Foobar.jpg|thumb|caption|left]]
25601 Image: Modifying mw-default-size of an frameless image (bug 62805)
25604 "modes": ["wt2wt"],
25606 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25610 [[Image:Foobar.jpg|frameless|right]]
25612 [[Image:Foobar.jpg|frameless|right|220x220px]]
25616 Image: Modifying valign of an image (bug 49221)
25619 "modes": ["wt2wt"],
25621 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25622 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25626 [[File:Foobar.jpg|20px|middle]]
25628 [[File:Foobar.jpg|20px|text-top]]
25632 Image: Modifying alt attribute of an image (bug 56400)
25635 "modes": ["wt2wt"],
25637 ["img[alt]", "attr", "alt", "some alternate edited text"]
25641 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25643 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25647 Image: Modifying caption of an image
25650 "modes": ["wt2wt"],
25652 ["figcaption", "text", "new caption"]
25656 [[Image:Foobar.jpg|thumb|original caption]]
25658 [[Image:Foobar.jpg|thumb|new caption]]
25662 Image: empty alt attribute (bug 48924)
25666 [[File:Foobar.jpg|thumb|alt=|bar]]
25668 <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>
25672 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25678 <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>
25680 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25684 Image: Block level image should have \n before and after
25687 [[File:Foobar.jpg|right|thumb|150x150px]]
25691 <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>
25696 Image: New block level image should have \n before and after (existing content)
25699 [[File:Foobar.jpg|right|thumb|150x150px]]
25703 <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>
25708 Image: upright option (parsoid)
25710 [[File:Foobar.jpg|thumb|upright|caption]]
25711 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25712 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25714 <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>
25715 <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>
25716 <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>
25720 Image: upright option is ignored on inline and frame images (parsoid)
25722 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25724 <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>
25728 Image: from basic HTML (1)
25732 <span typeof="mw:Image">
25733 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25736 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25740 Image: from basic HTML (2)
25744 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25746 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25750 Image: from basic HTML (3)
25754 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25756 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25760 Image: from basic HTML (4)
25764 <img src="./File:Foobar.jpg">
25766 [[File:Foobar.jpg|link=]]
25770 Image: Invalid title as link
25772 [[File:Foobar.jpg|link=<]]
25774 <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>
25777 <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>
25781 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25786 <li><p>foo</p></li>
25793 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25797 <ul> <li>foo</li></ul>
25803 Don't strip leading whitespace when handling indent-pre suppressing tags
25808 <tr><td> indented row</td></tr>
25811 <b>This is very bold of you!</b>
25814 indented cell (no pre-wrapping!)
25824 '''This is very bold of you!'''
25828 indented cell (no pre-wrapping!)
25836 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25858 <nowiki> </nowiki></span>bar2
25861 <nowiki> </nowiki><span>bar</span>
25864 <nowiki> </nowiki><span>foo</span>
25869 Lists: Dont insert newlines in a serialized list item.
25873 <ul><li>a<br>b</li><li>c</li></ul>
25880 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25883 "modes": ["html2wt"],
25884 "scrubWikitext": false
25887 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25888 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25890 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25891 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25893 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25895 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25897 == hello there [[Category:A1]] ==
25899 == [[Category:A2]] hi pal ==
25901 == <!--foo--> [[Category:A3]] how goes it ==
25903 == it goes well [[Category:A4]] <!--bar--> ==
25905 ==howdy [[Category:A5]]==
25911 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25914 "modes": ["html2wt"],
25915 "scrubWikitext": true
25918 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25919 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25921 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25922 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25924 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25932 <!--foo--> [[Category:A3]]
25937 [[Category:A4]] <!--bar-->
25945 Headings: Don't hoist metas that come from templates
25948 "modes": ["html2wt"],
25949 "scrubWikitext": true
25952 <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>
25954 == {{echo|foo [[Category:Foo]]}} ==
25958 Headings: Category in ref isn't hoisted
25961 "modes": ["html2wt"],
25962 "scrubWikitext": true
25965 <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
25967 <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="#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>
25970 [[Category:Baz]] </ref> ==
25976 Parsoid: Serialize positional parameters with = in them as named parameter
25980 <p about="#mwt1" typeof="mw:Transclusion"
25981 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25983 <p about="#mwt1" typeof="mw:Transclusion"
25984 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25986 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25987 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25988 <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>
25992 {{echo|1=f=oo|2=bar}}
25994 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25995 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25996 {{echo|<nowiki>f=oo</nowiki>|bar}}
26000 Parsoid: Serialize positional parameters with = in extlink as named parameter
26004 <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>
26006 {{echo|1=http://stuff?is=ok}}
26010 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26014 <div>a<p>b</p></div>
26035 Substrings resembling wikitext in hrefs should not get nowiki escapes
26039 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26045 Enforce single-line context in the serializer
26052 <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">
26053 </span><span about="#mwt1">you</span> </h2>
26055 <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="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
26057 <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="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
26058 there</span></li></ol>
26070 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26077 </tbody></table></dd></dl>
26081 == hi {{bogus|there
26092 * foo '''bar''' baz
26104 Serialize new placeholder space without spans
26108 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26110 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26112 <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>
26118 <ref>foo : bar</ref>ok
26122 #-----------------------
26123 # Tag minimization tests
26124 #-----------------------
26127 1. I/B quote minimization: wikitext-only tags should be combined
26131 <p><i>A</i><i>B</i></p>
26132 <p><b>A</b><b>B</b></p>
26133 <p><i>A</i><b><i>B</i></b></p>
26134 <p><b>A</b><i><b>B</b></i></p>
26135 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26136 <p><i><b>A</b></i><i><b>B</b></i></p>
26137 <p><i><b>A</b></i><b><i>B</i></b></p>
26138 <p><b><i>A</i></b><i><b>B</b></i></p>
26158 2. I/B quote minimization: wikitext and html tags should not be combined
26162 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26163 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26167 ''A''<nowiki/>'''<i>B</i>'''
26171 3. I/B quote minimization: templated content stops minimization
26175 <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>
26176 <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>
26178 ''A''{{echo|''B''}}
26180 ''A''{{echo|'''''B'''''}}
26184 4. I/B quote minimization: new content should be mimimized with adjacent old content
26188 <p><i>A</i><i>B</i></p>
26189 <p><b>A</b><b>B</b></p>
26190 <p><i>A</i><b><i>B</i></b></p>
26200 5a. Merge adjacent quote nodes if they've been edited
26203 "modes": ["wt2wt", "selser"],
26205 ["p", "contents", "remove", ":contains('b')"]
26215 5b. Merge adjacent quote nodes if they've been edited
26218 "modes": ["wt2wt", "selser"],
26224 ''a''<span id="x">b</span>''c''
26230 1. Merge adjacent link nodes as long as at least one element is new
26233 "modes": ["html2wt"],
26234 "scrubWikitext": true
26237 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26238 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26239 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26243 [[Football|Foot]][[Football|ball]]
26247 2. Merge adjacent link nodes and enable additional normalizations
26250 "modes": ["html2wt"],
26251 "scrubWikitext": true
26254 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26256 [[Football|''Football'']]
26260 3. Don't merge adjacent link nodes if scrubWikitext is false
26263 "modes": ["html2wt"],
26264 "scrubWikitext": false
26267 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26269 [[Football|Foot]][[Football|ball]]
26272 #------------------------------
26273 # End of tag minimization tests
26274 #------------------------------
26277 Bug 54262: New entities
26281 <span typeof="mw:Entity"> </span>
26286 ## Note that there is no wikitext output for 'unknownproperty' ##
26287 ## Unknown magic words are silently dropped ##
26294 <meta property='mw:PageProp/toc' />
26295 <meta property='mw:PageProp/notoc' />
26296 <meta property='mw:PageProp/forcetoc' />
26297 <meta property='mw:PageProp/index' />
26298 <meta property='mw:PageProp/noindex' />
26299 <meta property='mw:PageProp/nogallery' />
26300 <meta property='mw:PageProp/noeditsection' />
26301 <meta property='mw:PageProp/notitleconvert' />
26302 <meta property='mw:PageProp/nocontentconvert' />
26303 <meta property='mw:PageProp/unknownproperty' />
26313 __NOCONTENTCONVERT__
26317 Consecutive <pre>s should not get merged
26319 parsoid=html2wt,html2html
26321 <pre>a</pre><pre>b</pre>
26349 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26353 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26355 [[Special:BookSources/1234567890|ISBN 1234567895]]
26359 Edited RFC links not serializable as RFC links should serialize as extlinks
26363 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26365 [//tools.ietf.org/html/rfc123 New RFC]
26369 Edited PMID links not serializable as PMID links should serialize as extlinks
26373 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26375 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26379 WTS of autolinks with trailing/surrounding context
26383 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26384 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26385 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26386 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26387 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26388 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26390 http://cscott.net'''foo'''
26392 http://cscott.net<b>foo</b>
26394 '''http://cscott.net'''
26396 '''http://cscott.net '''
26398 '''http://cscott.net<nowiki/>x'''
26400 http://cscott.net<nowiki/>x
26404 WTS of autolinks with nowikis (round-trip)
26406 x<nowiki/>http://cscott.net<nowiki/>x
26408 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26411 # this is the "easy" test because it leaves in place all the
26412 # data-parsoid information indicating this is an autolink
26414 WTS of autolinks with escapes (editing)
26417 "modes": ["wt2wt"],
26419 [ "meta", "remove" ]
26423 x<nowiki/>http://cscott.net<nowiki/>x
26425 x<nowiki/>http://cscott.net<nowiki/>x
26429 WTS of edited autolink-like text (T103364)
26432 "modes": ["wt2wt"],
26434 [ "span[typeof]", "removeAttr", "typeof" ]
26438 Not a link: <nowiki>http://example.com</nowiki>.
26440 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26444 WTS of newly-authored autolink-like text (T103364)
26448 <p>http://example.com is not a link.</p>
26450 <nowiki>http://example.com</nowiki> is not a link.
26454 WTS of autolink-like text after an autolink (T108563)
26458 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26460 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26464 Magic links inside links (not autolinked)
26466 [[Foo|http://example.com]]
26469 [[Foo|ISBN 123456789x]]
26471 [http://foo.com http://example.com]
26472 [http://foo.com RFC 1234]
26473 [http://foo.com PMID 1234]
26474 [http://foo.com ISBN 123456789x]
26476 <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>
26477 <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>
26479 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26480 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26481 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26482 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26484 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26485 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26486 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26487 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26491 Magic links inside image captions (autolinked)
26493 [[File:Foobar.jpg|thumb|http://example.com]]
26494 [[File:Foobar.jpg|thumb|RFC 1234]]
26495 [[File:Foobar.jpg|thumb|PMID 1234]]
26496 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26498 <div class="thumb tright">
26499 <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>
26500 <div class="thumbcaption">
26501 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26502 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26505 <div class="thumb tright">
26506 <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>
26507 <div class="thumbcaption">
26508 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26509 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26512 <div class="thumb tright">
26513 <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>
26514 <div class="thumbcaption">
26515 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26516 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26519 <div class="thumb tright">
26520 <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>
26521 <div class="thumbcaption">
26522 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26523 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26527 <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>
26528 <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>
26529 <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>
26530 <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>
26534 WTS of magic word text (T109371)
26539 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26540 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26542 <nowiki>RFC 1234</nowiki>
26544 [http://foo.com RFC 1234]
26550 Edited Redirect link should emit a non-piped wikitext link
26554 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26560 T75121: Infer extension name from typeOf if data-mw is not present
26562 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26564 <div typeOf="mw:Extension/foo"></div>
26569 # Note that the <p> wrapping isn't present in PHP parser output
26570 # The important thing for this test is that P-wrapping doesn't
26571 # interfere with the <nowiki> protection for leading - in <td>
26572 # (which isn't necessary for <th>).
26574 T88318: p-wrapped dash in table.
26576 parsoid=html2wt,wt2wt
26579 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26580 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26581 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26588 |<nowiki>-</nowiki>
26589 |<nowiki>- </nowiki>
26608 <td><small>-</small></td>
26620 T149209: WTS: Handle newlines in table cells properly
26628 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26630 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26636 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26638 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26660 T149209: Selser: Handle newlines in table cells properly
26663 "modes": ["selser"],
26665 [ "#h1", "html", "a\nb\n" ],
26666 [ "#h2", "html", "a\nb\n" ],
26667 [ "#c1", "html", "a\nb\n" ],
26668 [ "#c2", "html", "<p>a</p>" ],
26669 [ "#c3", "html", "<p>a</p>" ]
26674 ! id="h1" |edit-me!!1
26676 ! id="h2" |edit-me||2
26678 | id="c1" |edit-me||3
26680 | id="c2" |edit-me||4
26682 | id="c3" |edit-me||p||q||r
26707 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26712 <td id='mwAc'>foo</td>
26713 <td id='serialize-this'>bar</td>
26718 | id="serialize-this" |bar
26723 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26727 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26729 <div id="hello">ok</div>
26736 "modes": ["wt2wt"],
26738 [ "#xyz", "before", "<b>before</b> stuff " ],
26739 [ "#xyz", "after", " stuff <i>after</i>" ],
26740 [ "#xyz", "html", "x <b>y</b> z" ]
26744 <span id="xyz">hello</span>
26746 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26750 Never serialize a-tag as html, regardless of what data-parsoid has to say
26752 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26754 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26759 ## SSS FIXME: This is broken output nevertheless.
26760 ## What might be a reasonable non-broken output for this?
26761 ## This is an edge case unlikely to be seen in production
26762 ## that I am not wasting more time on this right now.
26764 Never serialize a-tag as html, no matter what attributes it has
26766 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26768 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26770 [http://boo.org http://boohoo.org]
26773 # Misnested is an indication that selser can reuse the source but these have
26774 # shown to sneak through on occasion. See T101768.
26775 # The original wikitext here is: [http://test.com [[one]] two three]
26777 Strip span tags added to mark misnested links
26781 <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>
26783 [http://test.com][[one]] two three
26787 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26791 <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|}"]}'>
26803 ## This test verifies the presence and computation of this attribute indirectly
26804 ## by making an edit and ensuring that the serialization is correct (which it would be
26805 ## only if firstWikitextNode is properly set).
26807 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26810 "modes": ["wt2wt"],
26812 [ "div#x", "remove" ],
26813 [ "div", "before", "<div>new</div>" ]
26817 <div id="x">foo</div>
26819 {{echo|<div>boo</div>
26827 {{echo|<div>boo</div>
26833 # --------------------------------------------
26834 # Tests spec'ing wikitext serialization norms |
26835 # --------------------------------------------
26838 1. Categories should always be serialized on their own line
26842 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26850 2. Categories that are part of templates should not introduce a line break
26852 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26854 <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>
26857 # Careful while editing these next 2 tests. There are \u200f characters
26858 # before and after the <link> tags in the HTML and following some
26859 # of the categories in wikitext
26860 # Do not remove these characters in edits.
26862 # As part of the serialization, these bidi characters will get stripped.
26864 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26867 "modes": ["html2wt"],
26868 "scrubWikitext": true
26871 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26872 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26875 [[קטגוריה: שיטות משפט]]
26879 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26882 "modes": ["html2wt"],
26883 "scrubWikitext": true
26886 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26893 Lists: Add space after bullets
26900 <li><span> baz</span></li>
26905 * <span> baz</span>
26909 1. Headings: Add space before/after == (T53744)
26916 <h2><span> baz</span></h2>
26924 == <span> baz</span> ==
26928 2. Headings: Add space before/after == even after hoisted content
26931 "modes": ["html2wt"],
26932 "scrubWikitext": true
26935 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26943 1. Headings: suppress newly created empty headings
26946 "modes": ["html2wt"],
26947 "scrubWikitext": true
26955 2. Headings: don't suppress empty headings if scrubWikitext is false
26965 3. Headings: suppress empty headings on edits
26968 "modes": ["selser"],
26969 "scrubWikitext": true,
26975 ==<span id="x">foo</span>==
26980 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26983 "modes": ["html2wt"],
26984 "scrubWikitext": true
26987 <h2>foo<br/>bar</h2>
26988 <h2>foo <span><br/>bar</span> baz</h2>
26992 == foo <span> bar</span> baz ==
26996 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26999 "modes": ["html2wt"],
27000 "scrubWikitext": false
27003 <h2>foo<br/>bar</h2>
27009 1. WT Quote Tags: suppress newly created empty style tags
27012 "modes": ["html2wt"],
27013 "scrubWikitext": true
27021 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27027 ''<nowiki/>'''''<nowiki/>'''
27031 3. WT Quote Tags: suppress empty style tags on edits
27034 "modes": ["selser"],
27035 "scrubWikitext": true,
27041 '''<span id="x">foo</span>'''
27046 1. Anchors: suppress newly created empty anchors
27049 "modes": ["html2wt"],
27050 "scrubWikitext": true
27053 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27058 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27061 "modes": ["html2wt"],
27062 "scrubWikitext": false
27065 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27071 3. Anchors: suppress empty anchors on edits
27074 "modes": ["selser"],
27075 "scrubWikitext": true,
27081 [[Test|<span id="x">foo</span>]]
27086 3a. Anchors: do not suppress numbered extlinks
27089 "modes": ["wt2wt"],
27090 "scrubWikitext": true
27095 <a rel="mw:ExtLink" href="http://foo.com"></a>
27099 3b. Anchors: do not suppress numbered extlinks
27102 "modes": ["wt2wt"],
27103 "scrubWikitext": true,
27109 [http://foo.com <span id="x">foo</span>]
27115 Normalizations should be restricted to edited content
27118 "modes": ["selser"],
27119 "scrubWikitext": true,
27121 [ "h1", "before", "<i></i>"]
27135 1. Multiple normalizations (html2wt)
27138 "modes": ["html2wt"],
27139 "scrubWikitext": true
27143 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27144 </a><b><i></i></b>x</p>
27153 2. Multiple normalizations (selser)
27156 "modes": ["selser"],
27157 "scrubWikitext": true,
27159 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27163 <span id="x">foo</span>
27165 <span id="x">foo</span>
27171 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27174 "modes": ["html2wt"],
27175 "scrubWikitext": true
27187 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27194 <nowiki> </nowiki>hi
27196 <nowiki> </nowiki> hello
27200 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27203 "modes": ["html2wt"],
27204 "scrubWikitext": true
27213 baz bang</td></tr></table>
27219 bar<span>boo</span></p>
27235 bar<span>boo</span>
27239 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27242 "modes": ["selser"],
27243 "scrubWikitext": true,
27245 [ "p", "html", " a\n b" ]
27256 1. New links that end in spaces
27259 "modes": ["html2wt"],
27260 "scrubWikitext": false
27263 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27264 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27265 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27267 [[Berlin ]]<nowiki/>is the capital of Germany.
27271 [[Boston ]] is a city.
27275 2. New links that end in spaces
27278 "modes": ["html2wt"],
27279 "scrubWikitext": true
27282 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27283 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27284 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27286 [[Berlin]] is the capital of Germany.
27290 [[Boston]] is a city.
27294 1. Table cells with escapable prefixes
27297 "modes": ["html2wt"],
27298 "scrubWikitext": false
27302 <tr><td>a</td></tr>
27303 <tr><td>-</td></tr>
27304 <tr><td>+</td></tr>
27310 |<nowiki>-</nowiki>
27312 |<nowiki>+</nowiki>
27317 2. Table cells with escapable prefixes
27320 "modes": ["html2wt"],
27321 "scrubWikitext": true
27325 <tr><td>a</td></tr>
27326 <tr><td>-</td></tr>
27327 <tr><td>+</td></tr>
27340 3a. Table cells with escapable prefixes after edits
27343 "modes": ["selser"],
27344 "scrubWikitext": true,
27346 [ "table tbody tr:first-child td:first-child", "remove"]
27360 3b. Table cells with escapable prefixes after edits
27363 "modes": ["selser"],
27364 "scrubWikitext": true,
27366 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27373 |<span id="x">foo</span>+
27382 # FIXME: This test will fail because
27383 # normalization doesn't realize that the id attribute
27384 # will eliminate the escapable scenario
27386 4a. Table cells without escapable prefixes after edits
27389 "modes": ["selser"],
27390 "scrubWikitext": true,
27392 [ "#x", "html", "-" ]
27405 ## This tests normalizer's ability to discriminate between
27406 ## cells having identical content.
27408 4b. Table cells without escapable prefixes after edits
27411 "modes": ["selser"],
27412 "scrubWikitext": true,
27414 [ "td", "html", "-" ]
27427 ## This tests normalizer's ability to not be tripped by
27428 ## comments (and whitespace)
27430 4c. Table cells without escapable prefixes after edits
27433 "modes": ["selser"],
27434 "scrubWikitext": true,
27436 [ "table tbody tr td:first-child", "remove" ]
27451 ## This tests normalizer's ability to handle HTML cells
27453 4d. Table cells without escapable prefixes after edits
27456 "modes": ["selser"],
27457 "scrubWikitext": true,
27459 [ "td", "html", "-" ]
27464 <tr><td>a</td></tr>
27468 <tr><td>-</td></tr>
27472 ## T111151 Remove font elements without attributes
27474 5a. font tags without attributes should be dropped in scrubWikitext mode
27477 "modes": ["html2wt"],
27478 "scrubWikitext": true
27482 <font><font>bar</font></font>
27483 <font class="x">boo</font>
27487 <font class="x">boo</font>
27491 5b. font tags should not be dropped without scrubWikitext being enabled
27494 "modes": ["html2wt"],
27495 "scrubWikitext": false
27504 Escape nowiki DOM elements
27508 <nowiki><i>foo</i></nowiki>
27510 <nowiki>''foo''</nowiki>
27513 # This is meant to be an interim fix while we go about figuring out
27514 # how to not introduce these trailing <nowiki/>s in the first place.
27516 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27520 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27522 <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>
27523 <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>
27536 # ---------------------------------------------------
27537 # End of tests spec'ing wikitext serialization norms |
27538 # ---------------------------------------------------
27542 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27550 <td><b>c</b><p>d</p></td>
27568 # -----------------------------------------------------------------
27569 # End of section for Parsoid-only html2wt tests for serialization
27571 # -----------------------------------------------------------------
27573 # -----------------------------------------------------------------
27574 # The following section of tests are primarily to spec behavior of
27575 # the selective serializer. All these tests have manual selser
27576 # changes. The automated selser changes for all tests handle the
27577 # wide variation of changes, but these tests here capture specs
27578 # deterministically.
27579 # ----------------------------------------------------------------
27583 Selser: New comments should not be lost
27586 "modes": ["selser"],
27588 [ "#a", "after", "<!--c1-->" ],
27589 [ "#b", "before", "<!--c2-->" ]
27593 <span id="a">a</span>
27595 <span id="b">b</span>
27597 <span id="a">a</span><!--c1-->
27599 <!--c2--><span id="b">b</span>
27604 Selser: Check for validity of DSR before using it
27607 "modes": ["selser"],
27609 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27613 <span id="a">a</span>
27615 {{DISPLAYTITLE:foo}}
27616 <span id="a">a</span>
27620 1. DOMDiff: Changes to <ref> content should be looked up using id
27623 "modes": ["selser"],
27625 ["#X", "after", "bar"],
27626 ["#Y", "after", "baz"]
27630 X <ref><span id="X">foo</span></ref>
27633 <ref name="a"><span id="Y">foo</span></ref>
27636 X <ref><span id="X">foo</span>bar</ref>
27639 <ref name="a"><span id="Y">foo</span>baz</ref>
27644 2. DOMDiff: Changes to <ref> content should be looked up using id
27647 "modes": ["selser"],
27649 ["#Z", "after", "bar"]
27653 A <ref>foo bar for a</ref>
27654 B <ref group="X" name="b" />
27658 <references group="X">
27659 <ref name="b"><span id="Z">foo</span></ref>
27662 A <ref>foo bar for a</ref>
27663 B <ref group="X" name="b" />
27667 <references group="X">
27668 <ref name="b"><span id="Z">foo</span>bar</ref>
27673 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27676 "modes": ["selser"],
27678 [ "div:first-child", "text", "bar" ]
27682 <div style="{{1x|color:red;}}%">foo</div>
27684 <div style="{{1x|color:red;}}%">bar</div>
27697 <li class="mw-empty-elt"></li>
27698 <li class="mw-empty-elt"></li>
27706 [[File:Thumb.png|thumb]]
27708 <div class="thumb tright">
27709 <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>
27710 <div class="thumbcaption">
27711 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27718 unclosed internal link XSS (T137264)
27720 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27722 <p>[[#<script>alert(1)</script>|
27725 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>