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>
532 Heading with line break in nowiki
537 <h2><span class="mw-headline" id="A_B.0AC">A B
538 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
545 http://fr.wikipedia.org/wiki/🍺
546 <!-- EasterEgg we love beer, better be able be able to link to it -->
548 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
552 # Note that the html+tidy output removes the spaces after the <li>,
553 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
554 # This is an issue for all tests with lists. We intentionally do
555 # *not* add html+tidy clauses for these, as we don't want to
556 # document/test the broken behavior. (Parsoid matches the non-tidy
557 # output in these cases.)
566 <li> Item 2</li></ul>
574 * plain''italic''plain
575 * plain''italic''plain''italic''plain
576 * plain'''bold'''plain
577 * plain'''bold'''plain'''bold'''plain
578 * plain''italic''plain'''bold'''plain
579 * plain'''bold'''plain''italic''plain
580 * plain''italic'''bold-italic'''italic''plain
581 * plain'''bold''bold-italic''bold'''plain
582 * plain'''''bold-italic'''italic''plain
583 * plain'''''bold-italic''bold'''plain
584 * plain''italic'''bold-italic'''''plain
585 * plain'''bold''bold-italic'''''plain
586 * plain l'''italic''plain
587 * plain l''''bold''' plain
590 <li> plain<i>italic</i>plain</li>
591 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
592 <li> plain<b>bold</b>plain</li>
593 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
594 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
595 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
596 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
597 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
598 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
599 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
600 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
601 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
602 <li> plain l'<i>italic</i>plain</li>
603 <li> plain l'<b>bold</b> plain</li></ul>
607 # this example taken from the [[simple:Moon]] article (bug 47326)
609 Italics and possessives (1)
611 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
613 <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
617 # this example taken from [[en:Flaming Pie]] (bug 49926)
619 Italics and possessives (2)
621 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
623 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
627 # this example taken from [[en:Dictionary]] (bug 49926)
629 Italics and possessives (3)
631 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''.
633 <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>.
639 ### 2-quote opening sequence tests
642 Italics and bold: 2-quote opening sequence: (2,2)
651 Italics and bold: 2-quote opening sequence: (2,3)
660 Italics and bold: 2-quote opening sequence: (2,4)
670 # same html as previous, but wikitext adjusted to match parsoid html2wt
672 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
674 ''foo<nowiki>''</nowiki>''
680 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
682 Italics and bold: 2-quote opening sequence: (2,5)
695 # same html as previous, but wikitext adjusted to match parsoid html2wt
697 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
699 ''foo'''''<nowiki/>'''
710 ### 3-quote opening sequence tests
714 Italics and bold: 3-quote opening sequence: (3,2)
723 Italics and bold: 3-quote opening sequence: (3,3)
732 Italics and bold: 3-quote opening sequence: (3,4)
740 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
742 Italics and bold: 3-quote opening sequence: (3,5)
755 # same html as previous, but wikitext adjusted to match parsoid html2wt
757 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
759 '''foo'''''<nowiki/>''
770 ### 4-quote opening sequence tests
774 Italics and bold: 4-quote opening sequence: (4,2)
784 # same html as previous, but wikitext adjusted to match parsoid html2wt
786 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
788 <nowiki>''</nowiki>''foo''
795 Italics and bold: 4-quote opening sequence: (4,3)
804 Italics and bold: 4-quote opening sequence: (4,4)
814 # same html as previous, but wikitext adjusted to match parsoid html2wt
816 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
824 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
826 Italics and bold: 4-quote opening sequence: (4,5)
835 <p>'<b>foo</b><i></i>
839 # same html as previous, but wikitext adjusted to match parsoid html2wt
841 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
843 '<nowiki/>'''foo'''''<nowiki/>''
848 <p>'<b>foo</b><i></i>
854 ### 5-quote opening sequence tests
858 Italics and bold: 5-quote opening sequence: (5,2)
868 # same html as previous, but wikitext adjusted to match parsoid html2wt
870 Italics and bold: 5-quote opening sequence: (5,2+3)
879 Italics and bold: 5-quote opening sequence: (5,3)
889 # same html as previous, but wikitext adjusted to match parsoid html2wt
891 Italics and bold: 5-quote opening sequence: (5,3+2)
900 Italics and bold: 5-quote opening sequence: (5,4)
906 <p><i><b>foo'</b></i>
911 Italics and bold: 5-quote opening sequence: (5,5)
920 Italics and bold: 5-quote opening sequence: (5,6)
924 <p><i><b>foo'</b></i>
929 ### multiple quote sequences in a line
932 Italics and bold: multiple quote sequences: (2,4,2)
938 <p><i>foo'<b>bar</b></i>
943 # same html as previous, but wikitext adjusted to match parsoid html2wt
945 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
947 ''foo'<nowiki/>'''bar'''''
949 <p><i>foo'<b>bar</b></i>
955 Italics and bold: multiple quote sequences: (2,4,3)
961 <p><i>foo'<b>bar</b></i>
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
970 ''foo'<nowiki/>'''bar'''''
972 <p><i>foo'<b>bar</b></i>
978 Italics and bold: multiple quote sequences: (2,4,4)
984 <p><i>foo'<b>bar'</b></i>
989 # same html as previous, but wikitext adjusted to match parsoid html2wt
991 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
993 ''foo'<nowiki/>'''bar'<nowiki/>'''''
995 <p><i>foo'<b>bar'</b></i>
1000 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1002 Italics and bold: multiple quote sequences: (3,4,2)
1011 <p><b>foo'</b>bar<i></i>
1015 # same html as previous, but wikitext adjusted to match parsoid html2wt
1017 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1021 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1026 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1031 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1033 Italics and bold: multiple quote sequences: (3,4,3)
1042 <p><b>foo'</b>bar<b></b>
1046 # same html as previous, but wikitext adjusted to match parsoid html2wt
1048 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1050 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1055 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1060 ### other quote tests
1063 Italics and bold: other quote tests: (2,3,5)
1065 ''this is about '''foo's family'''''
1067 <p><i>this is about <b>foo's family</b></i>
1073 Italics and bold: other quote tests: (2,(3,3),2)
1075 ''this is about '''foo's''' family''
1077 <p><i>this is about <b>foo's</b> family</i>
1083 Italics and bold: other quote tests: (3,2,3,2)
1087 '''this is about ''foo'''s family''
1089 <p><b>this is about <i>foo</i></b><i>s family</i>
1094 # same html as previous, but wikitext adjusted to match parsoid html2wt
1096 Italics and bold: other quote tests: (3,2,3+2+2,2)
1098 '''this is about ''foo'''''<nowiki/>''s family''
1100 <p><b>this is about <i>foo</i></b><i>s family</i>
1106 Italics and bold: other quote tests: (3,2,3,3)
1108 '''this is about ''foo'''s family'''
1110 <p>'<i>this is about </i>foo<b>s family</b>
1116 Italics and bold: other quote tests: (3,(2,2),3)
1118 '''this is about ''foo's'' family'''
1120 <p><b>this is about <i>foo's</i> family</b>
1126 Italicized possessive
1128 The ''[[Main Page]]'''s talk page.
1130 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1133 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1137 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1138 (Requires tidy for PHP parser output to be fixed up)
1140 parsoid=wt2html,wt2wt
1157 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1158 <td><i>a</i></td><td><i>b</i></td></tr>
1167 Non-html5 tags should be accepted
1169 <center>''foo''</center>
1171 <font>''foo''</font>
1172 <strike>''foo''</strike>
1175 <center><i>foo</i></center>
1176 <p><big><i>foo</i></big>
1177 <font><i>foo</i></font>
1178 <strike><i>foo</i></strike>
1184 <wbr> is valid wikitext (bug 52468)
1192 # <strike> is HTML4, <s> is HTML4/5.
1194 <s> or <strike> for strikethrough
1196 <strike>strike</strike>
1200 <p><strike>strike</strike>
1208 Text-level semantic html elements in wikitext
1211 <strong>text</strong>
1227 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1234 <strong>text</strong>
1250 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1258 # test cases taken from
1259 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1261 Ruby markup (W3C-style)
1263 ; Mono-ruby for individual base characters
1264 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1266 : <ruby>今日<rt>きょう</rt></ruby>
1268 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1270 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1272 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1274 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1275 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1276 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1279 <dl><dt> Mono-ruby for individual base characters</dt>
1280 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1281 <dt> Group ruby</dt>
1282 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1283 <dt> Jukugo ruby</dt>
1284 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1285 <dt> Inline ruby</dt>
1286 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1287 <dt> Double-sided ruby</dt>
1288 <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>
1290 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1291 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1292 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1297 # The next two test different paths in the sanitizer.
1299 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</blockquote>
1314 </p><p><b→> doesn't terminate </b→>
1315 </p><p><bä> doesn't terminate </bä>
1316 </p><p><boo> doesn't terminate </boo>
1317 </p><p><s.foo> doesn't terminate </s.foo>
1318 </p><p><sub-ID#1>
1322 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1323 # If the non-word-character tag made it through the sanitizer, tidy
1324 # would munge it up.
1326 Non-word characters don't terminate tag names + tidy
1328 <blockquote|>a</blockquote>
1330 <b→> doesn't terminate </b→>
1332 <bä> doesn't terminate </bä>
1334 <boo> doesn't terminate </boo>
1336 <s.foo> doesn't terminate </s.foo>
1340 <p><blockquote|>a</p>
1341 <p><b→> doesn't terminate </b→></p>
1342 <p><bä> doesn't terminate </bä></p>
1343 <p><boo> doesn't terminate </boo></p>
1344 <p><s.foo> doesn't terminate </s.foo></p>
1345 <p><sub-ID#1></p>
1349 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1350 ### This checks that HTML5 tags (with non-word characters in the tag
1351 ### name) make it safely through the parser -- the Sanitizer will
1352 ### munge them later, as it should.
1355 Non-word characters are valid in extension tags (T19663)
1366 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1370 Isolated close tags should be treated as literal text (bug 52760)
1378 <p><s.foo>s</p>
1380 <p><s.foo>s</p>
1384 ### Special characters
1388 Bare pipe character (bug 52363)
1397 Bare pipe character from a template (bug 52363)
1406 ### <nowiki> test cases
1410 <nowiki> unordered list
1412 <nowiki>* This is not an unordered list item.</nowiki>
1414 <p>* This is not an unordered list item.
1417 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1423 <nowiki>Lorem ipsum dolor
1431 <p>Lorem ipsum dolor
1440 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1450 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1452 <nowiki><span class="error"></nowiki>
1454 <p><span class="error">
1461 :There is not nowiki.
1462 :There is <nowiki>nowiki</nowiki>.
1464 #There is not nowiki.
1465 #There is <nowiki>nowiki</nowiki>.
1467 *There is not nowiki.
1468 *There is <nowiki>nowiki</nowiki>.
1470 <dl><dd>There is not nowiki.</dd>
1471 <dd>There is nowiki.</dd></dl>
1472 <ol><li>There is not nowiki.</li>
1473 <li>There is nowiki.</li></ol>
1474 <ul><li>There is not nowiki.</li>
1475 <li>There is nowiki.</li></ul>
1478 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1479 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1481 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1482 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1484 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1485 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1489 Entities inside <nowiki>
1491 <nowiki><</nowiki>
1498 Entities inside template parameters
1504 <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>
1508 Properly escape nowiki when combined with other wiki markup
1512 <p>* </nowiki> tag</p>
1514 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1518 T93824: Put escaped HTML tags inside nowiki
1522 <p><h2>foo</h2></p>
1524 <nowiki><h2>foo</h2></nowiki>
1528 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1532 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1533 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1534 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1536 This text: L'[[Foo]]
1537 This text: L<nowiki>''</nowiki>[[Foo]]
1538 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1541 # This test fails because wikitext whitespace is not normalized before comparing.
1543 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1547 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1550 This text : L<nowiki>''</nowiki>[[Foo]]
1553 # This test and the next one are html2wt only as they test that incorrect wikitext
1554 # passed in template arguments gets escaped or wrapped in nowikis where required.
1556 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1560 <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>
1561 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1563 {{echo|foo{{!}}bar}}
1564 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1568 T53961: Output correct nowikis in template arguments
1572 <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>
1573 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1574 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1575 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1576 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1579 {{echo|<nowiki>a }} b</nowiki>}}
1580 {{echo|<nowiki>a [[ b</nowiki>}}
1581 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1582 {{echo|a <nowiki>}</nowiki>}}
1586 Cases where "!!" needs nowiki protection
1591 <tr><th>this needs protection !! here</th></tr>
1595 <tr><th>this does not need
1596 protection !! here</th></tr>
1600 !<nowiki>this needs protection !! here</nowiki>
1613 Comments and Indent-Pre
1615 <!-- comment 1 --> asdf
1617 <!-- comment 1 --> asdf
1620 <!-- comment 1 --> asdf
1621 <!-- comment 2 -->xyz
1623 <!-- comment 1 --> asdf
1624 <!-- comment 2 --> xyz
1680 asdf<!-- comment 1 -->jkl
1690 <!-- foo --> b <!-- bar -->
1704 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1710 Comment semantics and delimiters
1712 <!-- --><!----><!-----><!------>
1716 <!-- --><!----><!-----><!------>
1720 Comment semantics and delimiters, redux
1722 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1723 -- foo -- funky huh? ... -->
1727 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1728 -- foo -- funky huh? ... -->
1732 Comment semantics and delimiters: directors cut
1734 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1735 everything starting with < followed by !-- until the first -- and > we see,
1736 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1742 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1743 everything starting with < followed by !-- until the first -- and > we see,
1744 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1749 Comment semantics: nesting
1751 <!--<!-- no, we're not going to do anything fancy here -->-->
1756 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1759 # Parsoid closes the unclosed comment, even if it means a slight
1762 Comment semantics: unclosed comment at end
1764 parsoid=wt2html,html2html
1766 <!--This comment will run out to the end of the document
1770 <!--This comment will run out to the end of the document-->
1774 Comment semantics: normalize comments to play nice with XML and browsers
1776 <!-- Browsers --!> think this is closed -->
1777 <!--> This would normally be text -->
1778 <!---> As would this -->
1779 <!-- XML doesn't like trailing dashes -------->
1780 <!-- Nor doubled hyphens -- anywhere in the data -->
1781 But this is not a comment.
1783 <p>But this is not a comment.
1786 <!-- Browsers --!> think this is closed -->
1787 <!--> This would normally be text -->
1788 <!---> As would this -->
1789 <!-- XML doesn't like trailing dashes -------->
1790 <!-- Nor doubled hyphens -- anywhere in the data -->
1791 <p>But this is not a comment.</p>
1795 Comment semantics: round-trip even text which contains encoded -->
1797 <!-- hello & goodbye - > --> --&gt; --&xx -->
1799 <!-- hello & goodbye - > --> --&gt; --&xx -->
1803 Comment in template title
1812 Comment on its own line post-expand
1824 Comment on its own line post-expand with non-significant whitespace
1836 Multiple comments should still parse as SOL-transparent
1838 parsoid=wt2html,wt2wt
1841 <!--c2--><!--c3--><!--c4-->*b
1850 <!--c2--><!--c3--><!--c4-->
1857 ### paragraph wrapping tests
1872 Block tag on one line (<div>)
1888 Block tag on one line (<blockquote>)
1890 a <blockquote>foo</blockquote>
1894 a <blockquote>foo</blockquote>
1906 Block tag on both lines (<div>)
1923 Block tag on both lines (<blockquote>)
1925 a <blockquote>foo</blockquote>
1927 b <blockquote>foo</blockquote>
1929 a <blockquote>foo</blockquote>
1930 b <blockquote>foo</blockquote>
1944 Multiple lines without block tags
1968 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1969 # So, we have a separate section for Parsoid. We don't want
1970 # to mimic this stripping behavior in Parsoid. It affects
1971 # editing experience and also requires us to maintain additional
1974 Empty lines between lines with block tags
2012 <div data-parsoid='{"stx":"html"}'></div>
2015 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2018 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2020 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2023 <div data-parsoid='{"stx":"html"}'>e</div>
2026 ## PHP parser emits output which is broken
2028 Unclosed HTML p-tags should be handled properly
2041 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2046 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2047 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2050 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2054 a [[Category:A1]] [[Category:A2]]
2059 <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"/>
2063 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2069 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2073 ### Preformatted text
2082 And a [[Main Page|link]]
2088 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2093 Tabs don't trigger preformatted text
2097 This is preformatted text.
2103 <pre>This is preformatted text.
2108 preformatted text.</p>
2109 <pre>This is preformatted text.
2114 Space before tab needs nowiki pre protection
2120 <nowiki> </nowiki> a
2124 Ident preformatting with inline content
2135 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2152 Regression with preformatted in <center>
2166 Bug 52763: Preformatted in <blockquote>
2172 indented cell (no pre-wrapping!)
2182 <p> indented cell (no pre-wrapping!)
2190 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2207 Bug 15491: <ins>/<del> in blockquote
2210 Foo <del>bar</del> <ins>baz</ins> quux
2214 <p>Foo <del>bar</del> <ins>baz</ins> quux
2220 # Note that the p-wrapping is newline sensitive, which could be
2221 # considered a bug: tidy will wrap only the 'Foo' in the example
2222 # below in a <p> tag. (see comment 23-25 of bug #6200)
2224 Bug 15491: <ins>/<del> in blockquote (2)
2226 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2229 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2235 <del>bar</del> <ins>baz</ins> quux</blockquote>
2239 <pre> with attributes (bug 3202)
2241 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2243 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2248 <pre> with width attribute (bug 3202)
2250 <pre width="8">Narrow screen goodies</pre>
2252 <pre width="8">Narrow screen goodies</pre>
2257 <pre> with forbidden attribute (bug 3202)
2259 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2261 <pre width="8">Narrow screen goodies</pre>
2266 Entities inside <pre>
2275 <pre> with forbidden attribute values (bug 3202)
2277 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2279 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2284 <nowiki> inside <pre> (bug 13238)
2292 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2300 <pre><nowiki>Foo</nowiki></pre>
2305 <nowiki> inside of #tag:pre
2307 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2309 <pre>Foo →bar</pre>
2312 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2316 <nowiki> and <pre> preference (first one wins)
2345 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2347 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2350 <p><span typeof="mw:Nowiki">
2359 </pre> inside nowiki
2361 <nowiki></pre></nowiki>
2367 # Parsoid doesn't strip empty tags, like Tidy does.
2369 Empty pre; pre inside other HTML tags (bug 54946)
2371 parsoid=wt2html,wt2wt
2402 HTML pre followed by indent-pre
2412 # Note that tidy removes the empty <p> tags from the start and end.
2413 # Parsoid does not, by design.
2417 <p><pre>foo</pre></p>
2423 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2427 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2435 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2445 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2457 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2478 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2482 {{echo| foo}}{{echo| bar}}
2487 {{echo|<!--cmt--> foo}}
2489 <!--cmt-->{{echo| foo}}
2491 {{echo|{{echo| }}bar}}
2509 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2546 Pres with newline attributes
2551 <pre class="one two">hi</pre>
2555 two" data-parsoid='{"stx":"html"}'>hi</pre>
2559 Things that look like <pre> tags aren't treated as such
2561 Barack Obama <President> of the United States
2562 <President></President>
2564 <p>Barack Obama <President> of the United States
2565 <President></President>
2570 Handle broken pre-like tags (bug 64025)
2574 {{echo|<pre <pre>x</pre>}}
2576 <table><pre </table>
2579 <table><pre </table>
2587 <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>
2596 Parsoid: handle pre with space after attribute
2600 <pre style="width:50%;" >{{echo|foo}}</pre>
2602 <pre style="width:50%;">{{echo|foo}}</pre>
2605 <pre style="width:50%;">{{echo|foo}}</pre>
2608 # TODO / maybe: fix wt2wt for this
2610 Parsoid: Don't paragraph-wrap fosterable content
2636 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2664 #--------------------------------------------------------------------
2665 # Transclusion parameter whitespace stripping tests
2666 # Behavior is different for positional and named parameters
2667 #--------------------------------------------------------------------
2669 Templates: Strip leading and trailing whitespace from named-param values
2673 {{echo|1= {{echo|b}} }}
2686 <ul><li> d</li></ul>
2691 Templates: Don't strip whitespace from positional-param values
2695 {{echo|{{echo|b}} }}
2727 <ul><li> f</li></ul>
2735 Templates: Handle empty comment-and-ws-only lines correctly
2738 <!--should be ignored-->
2739 <!--should be ignored as well-->
2746 <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>
2750 Templates: Handle comments in the target
2753 <!-- should be ignored -->
2757 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2760 {{echo<!-- should be ignored -->
2763 {{echo<!-- should be ignored -->|foo}}
2765 {{<!-- should be ignored -->echo|foo}}
2774 <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>
2776 <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>
2778 <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>
2780 <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>
2782 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2786 Templates: Handle comments in parameter names (bug 67657)
2789 <!-- should be ignored -->
2793 <!-- should be ignored -->
2796 {{echo|1<!-- should be ignored -->=foo}}
2798 {{echo|<!-- should be ignored -->1=foo}}
2806 <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>
2808 <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>
2810 <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>
2812 <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>
2816 Templates: Other wikitext in parameter names (bug 67657)
2823 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2826 #--------------------------------------------------------------------
2827 # Transclusion parameter escaping tests
2828 #--------------------------------------------------------------------
2830 Templates: Parsoid parameter escaping test 1
2832 {{echo|[foo]|{{echo|[bar]}}}}
2836 <p about="#mwt1" typeof="mw:Transclusion"
2837 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2841 Parsoid: Pipes in external links in template parameter
2843 {{echo|[{{echo|http://example.com}} link]}}
2845 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2847 <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>
2851 Parsoid: pipe in transclusion parameter
2853 {{echo|http://foo.com/a|b}}
2855 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2857 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2858 typeof="mw:Transclusion"
2859 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>
2863 Parsoid: Pipe in external link target and content in template parameter
2865 parsoid=html2wt,wt2wt
2867 {{echo|[http://foo.com/a|b a|b]}}
2869 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2871 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2872 typeof="mw:Transclusion"
2873 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2874 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2878 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2882 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2884 <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>
2888 Templates: Don't escape already nowiki-escaped text in template parameters
2890 parsoid=html2wt,wt2wt
2892 {{echo|foo<nowiki>|</nowiki>bar}}
2893 {{echo|<nowiki><div></nowiki>}}
2894 {{echo|<nowiki></nowiki>}}
2896 <p>foo|bar <div></p>
2898 <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>
2899 <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>
2900 <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>
2906 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2908 parsoid=html2wt,wt2wt
2910 {{echo|{{echo|1=bar}}}}
2914 <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>
2919 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2925 <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>
2930 Templates: Preserve blank parameter names
2936 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2940 Templates: Preserve blank parameter names in other positions
2942 {{blank_param|bar|=foo}}
2946 <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
2951 ### Parsoid-centric tests for testing RT edge cases for pre
2955 1a. Indent-Pre and Comments
2968 1b. Indent-Pre and Comments
2981 1c. Indent-Pre and Comments
2994 1d. Indent-Pre and Comments
2995 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3008 2a. Indent-Pre and tables
3029 2b. Indent-Pre and tables
3045 2c. Indent-Pre and tables (bug 42252)
3062 2d. Indent-Pre and tables
3079 <tbody><tr><td> b</td></tr>
3084 2e. Indent-Pre and table-line syntax
3097 2f. Indent-pre started by table-line syntax
3116 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3121 Text that should be rendered preformatted
3129 <pre>Text that should be rendered preformatted
3138 3a. Indent-Pre and block tags (single-line html)
3142 c <blockquote> foo </blockquote>
3147 c <blockquote> foo </blockquote>
3148 <pre><span> foo </span>
3151 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3152 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3153 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3154 <pre><span> foo </span>
3171 3b. Indent-Pre and block tags (multi-line html)
3176 <pre>a <span>foo</span>
3181 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3182 b <div data-parsoid='{"stx":"html"}'> foo </div>
3192 3c. Indent-Pre and block tags (pre-content on separate line)
3256 4. Indent-Pre and extension tags
3267 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3271 Render paragraphs when indent-pre is suppressed in blocklevels
3288 4. Multiple spaces at start-of-line
3306 ## NOTE: the leading white-space chars on empty line are significant
3308 5a. White-space in indent-pre
3320 ## NOTE: the leading white-space chars on empty line are significant
3322 5b. White-space in indent-pre
3341 5c. White-space in indent-pre
3354 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3377 7a. Indent-pre and category links
3379 parsoid=wt2html,wt2wt
3381 [[Category:foo]] <!-- No pre-wrapping -->
3382 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3385 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3386 <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 -->
3389 ## We used to, but no longer wt2wt this test since the default serializer
3390 ## will normalize all categories to serialize on their own line.
3391 ## This wikitext usage is going to be fairly uncommon in production and
3392 ## selser will take care of preserving formatting in those scenarios.
3394 7b. Indent-pre and category links
3399 [[Category:foo]] {{echo|b}}
3401 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3402 <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>
3406 Indent-Pre: Newlines in comments shouldn't affect sol state
3420 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3424 HTML-pre: 1. embedded newlines
3459 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3461 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3465 <pre data-parsoid='{"stx":"html"}'>
3470 <pre data-parsoid='{"stx":"html"}'>
3478 HTML-pre: big spaces
3514 <pre data-parsoid='{"stx":"html"}'>
3533 HTML-pre: 2: indented text
3546 HTML-pre: 3: other wikitext
3565 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3574 ### Definition lists
3581 <dl><dt> name </dt>
3582 <dd> Definition</dd></dl>
3587 Definition list for indentation only
3591 <dl><dd> Indented text</dd></dl>
3596 Definition list with no space
3601 <dd>Definition</dd></dl>
3606 Definition list with URL link
3608 ; http://example.com/ : definition
3610 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3611 <dd> definition</dd></dl>
3616 Definition list with bracketed URL link
3618 ;[http://www.example.com/ Example]:Something about it
3620 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3621 <dd>Something about it</dd></dl>
3626 Definition list with wikilink containing colon
3628 ; [[Help:FAQ]]: The least-read page on Wikipedia
3630 <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>
3631 <dd> The least-read page on Wikipedia</dd></dl>
3635 # At Brion's and JeLuF's insistence... :)
3637 Definition list with news link containing colon
3639 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3641 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3642 <dd> This isn't even a real newsgroup!</dd></dl>
3645 <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>
3649 Malformed definition list with colon
3651 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3653 <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>
3658 Definition lists: colon in external link text
3660 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3662 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3663 <dd> OK, I made that up</dd></dl>
3668 Definition lists: colon in HTML attribute
3670 ;<b style="display: inline">bold</b>
3672 <dl><dt><b style="display: inline">bold</b></dt></dl>
3677 Definition lists: self-closed tag
3679 ;one<br/>two : two-line fun
3681 <dl><dt>one<br />two </dt>
3682 <dd> two-line fun</dd></dl>
3687 Bug 11748: Literal closing tags
3691 <dd>test test test test test</dd>
3693 <dd>test test test test test</dd>
3698 <dd>test test test test test</dd>
3700 <dd>test test test test test</dd>
3706 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3709 ; term : description
3714 <dl><dt> term </dt>
3715 <dd> description</dd></dl>
3716 <ul><li> unordered</li></ul>
3722 Definition list with empty definition and following paragraph
3734 Nested definition lists using html syntax
3747 Definition Lists: No nesting: Multiple dd's
3760 Definition Lists: Indentation: Regular
3768 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3773 Definition Lists: Indentation: Missing 1st level
3779 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3784 Definition Lists: Indentation: Multi-level indent
3788 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3793 Definition Lists: Hacky use to indent tables
3800 should be left alone
3802 <dl><dd><dl><dd><table>
3807 </td></tr></table></dd></dl></dd></dl>
3809 should be left alone
3814 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3822 should be left alone
3825 <dl><dd><dl><dd><table><tr>
3828 </tr></table><!-- bar --></dd></dl></dd></dl>
3830 should be left alone</p>
3834 Definition Lists: Hacky use to indent tables, with comment before table
3840 <dl><dd><dl><dd><!-- foo --><table><tr>
3842 </tr></table></dd></dl></dd></dl>
3845 # The trailing whitespace in this test is to catch a regression in
3846 # Parsoid after T54473.
3848 Definition Lists: Hacky use to indent tables (WS-insensitive)
3857 </td></tr></table></dd></dl>
3861 <tbody><tr><td>a</td></tr>
3862 </tbody></table> </dd></dl>
3865 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3866 ## as an empty dt item. It also ignores all but the last ";" when followed
3867 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3868 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3871 ## Ex: ";;t2 ::d2" is transformed into:
3883 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3884 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3895 ## All Parsoid only definition list tests have this difference.
3897 ## See also: https://phabricator.wikimedia.org/T8569
3898 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3901 Table / list interaction: indented table with lists in table contents
3916 <ul><li> b</li></ul>
3920 <ul><li> d</li></ul>
3921 </td></tr></table></dd></dl>
3926 Table / list interaction: lists nested in tables nested in indented lists
3949 </td></tr></table></dd></dl>
3956 Definition Lists: Nesting: Multi-level (Parsoid only)
3986 Definition Lists: Nesting: Test 2 (Parsoid only)
4013 Definition Lists: Nesting: Test 3 (Parsoid only)
4056 Definition Lists: Nesting: Test 4
4061 <dl><dd><dl><dd><dl><dt>t3</dt>
4062 <dd>d3</dd></dl></dd></dl></dd></dl>
4067 ## The Parsoid team believes the following three test exposes a
4068 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4069 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4070 ## It also exposes a "misfeature" in tidy, which doesn't like
4071 ## <dl> tags with a single <dt> child; it converts the <dt> into
4072 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4074 Definition Lists: Mixed Lists: Test 1
4080 <dl><dd><dl><dt><ul><li> foo</li>
4081 <li> bar</li></ul></dt></dl>
4082 <dl><dt> baz</dt></dl></dd></dl>
4117 Definition Lists: Mixed Lists: Test 2
4122 <ul><li><dl><dd> d1</dd>
4123 <dd> d2</dd></dl></li></ul>
4129 Definition Lists: Mixed Lists: Test 3
4134 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4135 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4141 Definition Lists: Mixed Lists: Test 4
4146 <ul><li><dl><dt>d1 </dt>
4149 <dd>d4</dd></dl></li></ul>
4155 Definition Lists: Mixed Lists: Test 5
4161 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4167 Definition Lists: Mixed Lists: Test 6
4172 <ol><li><ul><li><dl><dd>d1
4173 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4179 Definition Lists: Mixed Lists: Test 7
4184 <dl><dd><ul><li> d1</li>
4185 <li> d2</li></ul></dd></dl>
4191 Definition Lists: Mixed Lists: Test 8
4196 <dl><dd><ul><li> d1</li></ul>
4197 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4203 Definition Lists: Mixed Lists: Test 9
4207 <ul><li><dl><dt>foo </dt>
4208 <dd>bar</dd></dl></li></ul>
4214 Definition Lists: Mixed Lists: Test 10
4218 <ul><li><ol><li><dl><dt>foo </dt>
4219 <dd>bar</dd></dl></li></ol></li></ul>
4223 # The Parsoid team disagrees with the PHP parser's seemingly-random
4224 # rules regarding dd/dt on the next two tests. Parsoid is more
4225 # consistent, and recognizes the shared nesting and keeps the
4226 # still-open tags around until the nesting is complete.
4227 # (And tidy again converts <dt> to <dd> before 'bar'.)
4230 Definition Lists: Mixed Lists: Test 11
4235 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4236 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4237 <dl><dt>boo </dt>
4238 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4293 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4294 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4298 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4299 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4308 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4310 # * The test is wrong, there are two colons where there should be :;
4311 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4313 Definition Lists: Weird Ones: Test 1
4315 *#;*::;; foo : bar (who uses this?)
4317 <ul><li><ol><li><dl><dt> foo </dt>
4318 <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>
4337 <dt>bar (who uses this?)</dt>
4369 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4370 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4382 Definition Lists: colons occurring in tags
4400 <dt><span>a:b</span></dt>
4427 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4429 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4430 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4431 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4432 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4434 <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>
4435 <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>
4436 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4440 Definition Lists: colons and tables 1
4452 </td></tr></table></dd></dl>
4456 </td></tr></table></dd></dl>
4460 # Parsoid's output (as documented below) differs from php's in this case.
4461 # This is probably a bug. If we fixup parsoid to match php's output, the
4462 # above test should pass and the below test case can be removed. It is
4463 # unclear which output is more desirable.
4466 Definition Lists: colons and tables 2
4478 </td></tr></table></dd>
4482 </td></tr></table></dd></dl>
4486 Definition Lists: template interaction
4488 ::{{definition_list}}
4491 ::{{definition_list}}
4496 <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">
4497 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4499 <dl><dd data-parsoid='{}'>one
4500 <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">
4501 </span><dd about="#mwt2">two
4503 <dd>three</dd></dl></dd>
4504 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4512 External links: non-bracketed
4514 Non-bracketed: http://example.com
4516 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4520 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4522 External links: numbered
4524 Numbered: [http://example.com]
4525 Numbered: [http://example.net]
4526 Numbered: [http://example.com]
4528 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4529 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4530 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4533 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4534 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4535 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4539 External links: specified text
4541 Specified text: [http://example.com link]
4543 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4548 External links: trail
4550 Linktrails should not work for external links: [http://example.com link]s
4552 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4557 External links: dollar sign in URL
4559 http://example.com/1$2345
4561 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4565 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4567 External links: dollar sign in URL (autonumber)
4569 [http://example.com/1$2345]
4571 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4574 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4578 External links: open square bracket forbidden in URL (bug 4377)
4580 parsoid=wt2html,wt2wt,html2html
4582 http://example.com/1[2345
4584 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4587 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4591 External links: open square bracket forbidden in URL (named) (bug 4377)
4593 parsoid=wt2html,html2html
4595 [http://example.com/1[2345]
4597 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4600 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4603 # parsoid adds a space before the link name
4605 External links: open square bracket forbidden in URL (named) (bug 4377)
4608 [http://example.com/1 [2345]
4610 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4615 External links: nowiki in URL link text (bug 6230)
4617 [http://example.com/ <nowiki>''example site''</nowiki>]
4619 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4624 External links: newline forbidden in text (bug 6230 regression check)
4626 [http://example.com/ first
4629 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4635 External links: Pipe char between url and text
4637 [http://example.com | link]
4639 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4644 External links: protocol-relative URL in brackets
4646 [//example.com/ Test]
4648 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4652 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4654 External links: protocol-relative URL in brackets without text
4658 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4661 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4665 External links: protocol-relative URL in free text is left alone
4669 <p>//example.com/Foo
4674 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4676 foo//example.com/Foo
4678 <p>foo//example.com/Foo
4683 External links: with no contents
4685 [http://en.wikipedia.org/wiki/Foo]
4687 [[wikipedia:Foo|Bar]]
4689 [[wikipedia:Foo|<span>Bar</span>]]
4691 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4692 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4693 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4696 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4697 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4698 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4702 External links: Free with trailing punctuation
4712 http://example.com/url_with_(brackets)
4713 (http://example.com/url_without_brackets)
4714 http://example.com/url_with_entity&
4715 http://example.com/url_with_entity&
4716 http://example.com/url_with_entity&
4717 http://example.com/url_with_entity
4718 http://example.com/url_with_entity 
4719 http://example.com/url_with_entity 
4720 http://example.com/url_with_entity<
4721 http://example.com/url_with_entity<
4722 http://example.com/url_with_entity<
4724 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4725 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4726 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4727 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4728 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4729 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4730 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4731 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4732 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4733 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4734 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4735 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4736 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4737 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4738 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4739 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4740 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4741 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4742 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4745 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4746 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4747 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4748 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4749 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4750 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4751 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4752 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4753 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4754 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4755 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4756 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4757 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4758 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4759 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4760 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4761 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4762 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4763 <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>
4767 External links: tricky Parsoid html2html case
4769 parsoid=wt2html,wt2wt,html2html
4771 http://example.com/url_with_entity&amp;
4773 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4776 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4780 External links: Free with trailing quotes (T113666)
4782 '''News:''' Stuff here
4786 <p><b>News:</b> Stuff here
4787 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4790 <p><b>News:</b> Stuff here</p>
4791 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4795 External links: Lone protocols are never linked (T105697)
4814 External links: No preceding word characters allowed (bug 65278)
4816 NOPEhttp://example.com
4817 N0http://example.com
4818 ok:http://example.com
4819 ok-http://example.com
4821 <p>NOPEhttp://example.com
4822 N0http://example.com
4823 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4824 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4829 External links: nofollow domain exception
4831 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4833 <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>.
4840 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4842 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4847 External image from https
4849 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4851 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4856 External image (when not allowed)
4858 wgAllowExternalImages=0
4860 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4862 <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>
4867 Link to non-http image, no img tag
4869 Link to non-http image, no img tag: ftp://example.com/test.jpg
4871 <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>
4876 External links: terminating separator
4878 Terminating separator: http://example.com/thing,
4880 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4885 External links: intervening separator
4887 Intervening separator: http://example.com/1,2,3
4889 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4894 External links: old bug with URL in query
4896 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4898 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4903 External links: old URL-in-URL bug, mixed protocols
4905 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4907 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4911 # Since Parsoid is starting to emit canonical wikitext for links,
4912 # [http://example.com http://example.com] will not RT back to that
4915 External links: URL in text
4919 URL in text: [http://example.com http://example.com]
4921 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4924 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4928 External links: Clickable images
4930 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4932 <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>
4935 <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>
4939 External links: raw ampersand
4941 Old & use: http://x&y
4943 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4948 External links: encoded ampersand
4950 Old & use: http://x&y
4952 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4955 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4959 External links: encoded equals (bug 6102)
4961 http://example.com/?foo=bar
4963 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4966 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4970 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4971 ## does it number them. As discussed in bug 53505, we can identify
4972 ## autonumbered links via CSS.
4976 External links: [raw ampersand]
4978 Old & use: [http://x&y]
4980 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4983 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4986 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4987 # mode will return the [raw ampersand] wikitext
4989 External links: [encoded ampersand]
4991 parsoid=wt2html,wt2wt,html2html
4993 Old & use: [http://x&y]
4995 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4998 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5002 External links: [raw equals]
5004 [http://example.com/?foo=bar]
5006 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5009 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5012 # note that parsoid html is identical to [raw equals] case; so html2wt
5013 # mode will return the [raw equals] wikitext
5015 External links: [encoded equals] (bug 6102)
5017 parsoid=wt2html,wt2wt,html2html
5019 [http://example.com/?foo=bar]
5021 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5024 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5027 # xxx parsoid strips the IDN character, so the round-trip tests will
5028 # obviously fail and are disabled. --cscott
5030 External links: [IDN ignored character reference in hostname; strip it right off]
5032 parsoid=wt2html,wt2wt,html2html
5034 [http://e‌xample.com/]
5036 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5039 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5042 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5043 # Where an external link could easily circumvent the sanitization of the text of
5044 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5045 # test demands a higher standard. That's a bit strange.
5049 # http://example.com -> [http://example.com|http://example.com]
5050 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5052 # The first example is sanitized, but the second is not. Any security benefits
5053 # from this production are trivial to circumvent. Either remove this test and
5054 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5055 # the test accordingly.
5059 # xxx parsoid strips the IDN character, so the round-trip tests will
5060 # obviously fail and are disabled. --cscott
5062 External links: IDN ignored character reference in hostname; strip it right off
5064 parsoid=wt2html,html2html
5066 http://e‌xample.com/
5068 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5071 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5075 External links: www.jpeg.org (bug 554)
5079 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5083 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5085 External links: URL within URL (original bug 2)
5087 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5089 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5092 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5096 BUG 361: URL inside bracketed URL
5098 [http://www.example.com/foo http://www.example.com/bar]
5100 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5105 BUG 361: URL within URL, not bracketed
5107 http://www.example.com/foo?=http://www.example.com/bar
5109 <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>
5114 BUG 289: ">"-token in URL-tail
5116 http://www.example.com/<hello>
5118 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5123 BUG 289: literal ">"-token in URL-tail
5125 http://www.example.com/<b>html</b>
5127 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5130 <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>
5134 BUG 289: ">"-token in bracketed URL
5136 [http://www.example.com/<hello> stuff]
5138 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5143 BUG 289: literal ">"-token in bracketed URL
5145 [http://www.example.com/<b>html</b> stuff]
5147 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5152 BUG 289: literal double quote at end of URL
5154 http://www.example.com/"hello"
5156 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5161 BUG 289: literal double quote in bracketed URL
5163 [http://www.example.com/"hello" stuff]
5165 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5170 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5172 [http://www.example.com test]
5174 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5179 External links: link text with spaces
5181 [http://www.example.com a b c]
5182 [http://www.example.com ''a'' ''b'']
5184 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5185 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5190 External links: wiki links within external link (Bug 3695)
5192 parsoid=wt2html,html2html
5194 [http://example.com [[wikilink]] embedded in ext link]
5196 <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>
5199 <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>
5203 BUG 787: Links with one slash after the url protocol are invalid
5207 [http:/example.com title]
5209 <p>http:/example.com
5210 </p><p>[http:/example.com title]
5215 Bracketed external links with template-generated invalid target
5217 [{{echo|http:/example.com}} title]
5219 <p>[http:/example.com title]
5224 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5226 ''[http://example.com text'']
5227 [http://example.com '''text]'''
5228 ''Something [http://example.com in italic'']
5229 ''Something [http://example.com mixed''''', even bold]'''
5230 '''''Now [http://example.com both''''']
5232 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5233 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5234 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5235 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5236 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5242 Bug 4781: %26 in URL
5244 http://www.example.com/?title=AT%26T
5246 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5249 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5252 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5253 # % is actually legal in HTML5. Any change in output would need testing though.
5255 Bug 4781, 5267: %25 in URL
5257 http://www.example.com/?title=100%25_Bran
5259 <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>
5262 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5266 Bug 4781, 5267: %28, %29 in URL
5268 http://www.example.com/?title=Ben-Hur_%281959_film%29
5270 <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>
5273 <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>
5278 Bug 4781: %26 in autonumber URL
5280 [http://www.example.com/?title=AT%26T]
5282 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5285 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5289 Bug 4781, 5267: %26 in autonumber URL
5291 [http://www.example.com/?title=100%25_Bran]
5293 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5296 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5300 Bug 4781, 5267: %28, %29 in autonumber URL
5302 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5304 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5307 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5312 Bug 4781: %26 in bracketed URL
5314 [http://www.example.com/?title=AT%26T link]
5316 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5319 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5323 Bug 4781, 5267: %25 in bracketed URL
5325 [http://www.example.com/?title=100%25_Bran link]
5327 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5332 Bug 4781, 5267: %28, %29 in bracketed URL
5334 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5336 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5339 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5343 External link containing a period in the anchor. (bug 63947)
5345 [//foo.org/bar#baz. bang]
5347 [//foo.org/bar. bang]
5349 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5350 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5353 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5354 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5358 External link containing a single quote. (bug 63947)
5362 [//foo.org/bar'baz bang]
5364 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5365 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5368 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5369 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5373 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5375 Some [http://example.com/ pretty ''italics'' and stuff]!
5377 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5382 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5384 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5386 <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>
5391 External link containing double-single-quotes with no space separating the url from text in italics
5393 [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]].]
5395 <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>
5398 <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>
5400 <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>
5404 External link with comments in link text
5406 [http://www.google.com Google <!-- comment -->]
5408 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5411 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5415 External link to bare IPv4 address
5417 [http://192.168.0.1 Link]
5419 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5422 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5426 URL-encoding in URL functions (single parameter)
5428 {{localurl:Some page|amp=&}}
5430 <p>/index.php?title=Some_page&amp=&
5435 URL-encoding in URL functions (multiple parameters)
5437 {{localurl:Some page|q=?&=&}}
5439 <p>/index.php?title=Some_page&q=?&amp=&
5446 http://example.com/index.php?foozoid%5B%5D=bar
5448 http://example.com/index.php?foozoid[]=bar
5450 <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>
5451 </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>
5454 <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>
5456 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5460 IPv6 urls, autolink format (T23261)
5462 http://[2404:130:0:1000::187:2]/index.php
5464 Examples from RFC 2373, section 2.2:
5465 * http://[1080::8:800:200C:417A]/unicast
5466 * http://[FF01::101]/multicast
5467 * http://[::1]/loopback
5468 * http://[::]/unspecified
5469 * http://[::13.1.68.3]/ipv4compat
5470 * http://[::FFFF:129.144.52.38]/ipv4compat
5472 Examples from RFC 2732, section 2:
5473 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5474 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5475 * http://[3ffe:2a00:100:7031::1]
5476 * http://[1080::8:800:200C:417A]/foo
5477 * http://[::192.9.5.5]/ipng
5478 * http://[::FFFF:129.144.52.38]:80/index.html
5479 * http://[2010:836B:4179::836B:4179]
5482 <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>
5483 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5485 <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>
5486 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5487 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5488 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5489 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5490 <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>
5491 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5493 <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>
5494 <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>
5495 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5496 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5497 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5498 <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>
5499 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5502 <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>
5504 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5505 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5506 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5507 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5512 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5513 <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>
5514 <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>
5515 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5516 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5517 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5518 <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>
5519 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5523 IPv6 urls, bracketed format (T23261)
5525 [http://[2404:130:0:1000::187:2]/index.php test]
5527 Examples from RFC 2373, section 2.2:
5528 * [http://[1080::8:800:200C:417A] unicast]
5529 * [http://[FF01::101] multicast]
5530 * [http://[::1]/ loopback]
5531 * [http://[::] unspecified]
5532 * [http://[::13.1.68.3] ipv4compat]
5533 * [http://[::FFFF:129.144.52.38] ipv4compat]
5535 Examples from RFC 2732, section 2:
5536 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5537 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5538 * [http://[3ffe:2a00:100:7031::1] 3]
5539 * [http://[1080::8:800:200C:417A]/foo 4]
5540 * [http://[::192.9.5.5]/ipng 5]
5541 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5542 * [http://[2010:836B:4179::836B:4179] 7]
5545 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5546 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5548 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5549 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5550 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5551 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5552 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5553 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5554 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5556 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5557 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5558 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5559 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5560 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5561 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5562 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5565 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5567 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5568 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5569 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5570 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5571 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5572 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5573 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5575 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5576 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5577 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5578 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5579 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5580 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5581 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5582 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5586 Non-extlinks in brackets
5595 [{{echo|foo}} ''bar'']
5596 [{{echo|foo}}l's] errand
5597 [{{echo|foo}}l's errand]
5599 [url=http://example.com]
5600 [http:// bare protocols don't count]
5613 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5614 [http:// bare protocols don't count]
5622 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5623 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5624 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5625 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5626 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5627 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5628 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5629 [http:// bare protocols don't count]</p>
5633 Percent encoding in external links
5635 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5637 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5640 <p><a rel="mw:ExtLink"
5641 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5645 Use url link syntax for links where the content is equal the link target
5649 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5652 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5656 Parenthesis in external links, especially URL links
5660 http://example.com/test)
5662 http://example.com/(test)
5664 http://example.com/((test)
5666 (http://example.com/(test))
5668 (http://example.com/(test)))))
5670 http://example.com/a)b
5672 [http://example.com) foo]
5674 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5675 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5676 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5677 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5678 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5679 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5680 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5681 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5684 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5685 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5686 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5687 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5688 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5689 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5690 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5691 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5695 Parenthesis in external links, w/ transclusion or comment
5697 (http://example.com/{{echo|hi}})
5699 (http://example.com<!-- hi -->)
5701 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5702 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5705 <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>
5707 <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>
5711 Serialize <a> tags with invalid link targets as plain text
5713 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5715 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5716 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5717 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5718 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5721 <nowiki>*</nowiki>text
5722 <nowiki>[[foo]]</nowiki>
5723 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5727 mw:ExtLink -vs- mw:WikiLink (T94723)
5731 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5732 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5733 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5734 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5736 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5737 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5742 [[wikipedia:Foo|Bar]]
5743 [[wikipedia:Foo|Bar]]
5745 [[wikipedia:European_Robin|European Robin]]
5746 [[wikipedia:European_Robin|European Robin]]
5750 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5754 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5756 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5767 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5769 Normal text. '''''Bold italic text.''''' Normal text.
5771 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5772 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5777 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5778 # parser strips. The wikitext contains just the first half of the bold
5781 Unclosed and unmatched quotes
5783 '''''Bold italic text '''with bold deactivated''' in between.'''''
5785 '''''Bold italic text ''with italic deactivated'' in between.'''''
5789 ..spanning two paragraphs (should not work).'''
5791 '''Bold tag left open
5793 ''Italic tag left open
5797 <!-- Unmatching number of opening, closing tags: -->
5798 '''This year''''s election ''should'' beat '''last year''''s.
5800 ''Tom'''s car is bigger than ''Susan'''s.
5802 Plain ''italic'''s plain
5804 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5805 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5806 </p><p><b>Bold text..</b>
5807 </p><p>..spanning two paragraphs (should not work).
5808 </p><p><b>Bold tag left open</b>
5809 </p><p><i>Italic tag left open</i>
5811 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5812 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5813 </p><p>Plain <i>italic'</i>s plain
5816 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5817 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5818 </p><p><b>Bold text..</b>
5819 </p><p>..spanning two paragraphs (should not work).<b></b>
5820 </p><p><b>Bold tag left open</b>
5821 </p><p><i>Italic tag left open</i>
5824 <!-- Unmatching number of opening, closing tags: -->
5825 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5826 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5827 </p><p>Plain <i>italic'</i>s plain
5834 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5837 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5838 # is the bare minimum required by the spec, see:
5839 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5840 # Parsoid team replies: empty table tags are legal in HTML5
5842 A table with no data.
5855 A table with stray table end tags on start tag line (wt2html)
5859 {|style="color: red;"|}
5861 {|style="color: red;" |}
5865 {|style="color: red;"|} id="foo"
5869 {|style="color: red;" |} id="foo"
5873 <table style="color: red;"></table>
5875 <table style="color: red;">
5881 <table style="color: red;" id="foo">
5887 <table style="color: red;" id="foo">
5896 A table with no data (take 2)
5904 # A table with nothing but a caption is invalid XHTML, we might want to render
5905 # this as <p>caption</p>
5906 # Parsoid team replies: table with only a caption is legal in HTML5
5908 A table with nothing but a caption
5916 </caption><tr><td></td></tr></table>
5919 <table><caption> caption</caption></table>
5923 A table with caption with default-spaced attributes and a table row
5926 |+ style="color: red;" | caption1
5932 <caption style="color: red;"> caption1
5941 A table with captions with non-default spaced attributes and a table row
5944 |+style="color: red;"|caption2
5945 |+ style="color: red;"| caption3
5951 <caption style="color: red;">caption2
5953 <caption style="color: red;"> caption3
5962 Table td-cell syntax variations
5966 | foo bar foo || baz
5967 | style='color:red;' | baz
5968 | style='color:red;' || baz
5975 <td> foo bar foo </td>
5978 <td style="color:red;"> baz
5980 <td> style='color:red;' </td>
6008 Simple table but with multiple dashes for row wikitext
6027 Multiplication table
6029 {| border="1" cellpadding="2"
6030 |+Multiplication table
6032 ! × !! 1 !! 2 !! 3
6050 <table border="1" cellpadding="2">
6051 <caption>Multiplication table
6098 Accept "||" in table headings
6113 Accept "!!" in table data
6127 <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>
6132 Accept "||" in indented table headings
6142 </th></tr></table></dd></dl>
6147 Accept "!!" in templates
6161 <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>
6165 Accept "!!" in table headings after newline
6182 <p>b!!c</p></th></tr>
6187 Accept "!!" in table data of mixed wikitext / html syntax
6191 <tr><td>b!!c</td></tr>
6204 <tbody><tr><th>a</th></tr>
6205 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6210 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6227 Accept "| !" at start of line in tables (ignore !-attribute)
6231 | !style="color:red" | bar
6243 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 +/-
6247 |style='color:red;'|+1
6248 |style='color:blue;'|-1
6260 <td style="color:red;">+1
6262 <td style="color:blue;">-1
6286 |rowspan=2| Cell 2, row 1 (and 2)
6297 <td rowspan="2"> Cell 2, row 1 (and 2)
6315 {| bgcolor=#ABCDEF border=2
6320 |the original table again
6328 <table bgcolor="#ABCDEF" border="2">
6336 <td>the original table again
6342 Invalid attributes in table cell (bug 1830)
6356 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6360 | title="foo<nowiki>|</nowiki>" |bar
6361 | title="foo<nowiki>|</nowiki>" bar
6368 <td title="foo|">bar
6370 <td> title="foo|" bar
6375 <tbody><tr><td title="foo">bar</td>
6376 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6377 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6381 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6382 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6383 # *2wt modes will fail.
6385 Table security: embedded pipes
6387 parsoid=wt2html,html2html
6390 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6394 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6395 <td>]" onmouseover="alert(document.cookie)">test
6403 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6407 Element attributes with double ! should not be broken up by <th>
6410 ! hi <div class="!!">ha</div> ho
6415 <th> hi <div class="!!">ha</div> ho
6420 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6425 ! and || in element attributes should not be parsed as <th>/<td>
6428 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6433 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6438 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6442 # FIXME: The output seems broken. Filed as T110268.
6444 ! and || in td attributes should not be parsed as <th>/<td>
6449 | style="color: red !important;" data-contrived="put this here ||" | foo
6454 <td> style="color: red !important;" data-contrived="put this here </td>
6460 <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>
6465 Break on | in element attribute in template
6467 parsoid=wt2html,html2html
6469 {{echo|1=<div class="hi|ho">ha</div>}}
6471 <p>ho">ha</div>
6474 <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>
6477 ## We don't support roundtripping of these attributes in Parsoid.
6478 ## Selective serialization takes care of preventing dirty diffs.
6479 ## But, on edits, we dirty-diff the invalid attribute text.
6481 Invalid text in table attributes should be discarded
6485 {| <span>boo</span> style='border:1px solid black'
6486 | <span>boo</span> style='color:blue' | 1
6487 |<span>boo</span> style='color:blue'| 2
6490 <table style="border:1px solid black">
6492 <td style="color:blue"> 1
6494 <td style="color:blue"> 2
6498 <table style="border:1px solid black">
6500 <td style="color:blue"> 1</td>
6501 <td style="color:blue"> 2</td>
6507 Invalid text in table attributes should be preserved by selective serializer
6510 "modes": ["selser"],
6512 ["td:first-child", "text", "abc"],
6513 ["td + td", "text", "xyz"]
6517 {| <span>boo</span> style='border:1px solid black'
6518 | <span>boo</span> style='color:blue' | 1
6519 |<span>boo</span> style='color:blue'| 2
6522 {| <span>boo</span> style='border:1px solid black'
6523 | <span>boo</span> style='color:blue' |abc
6524 |<span>boo</span> style='color:blue'|xyz
6529 1. Template-generated table cell attributes and cell content
6534 || {{table_attribs_5}}
6535 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6536 |align=center {{table_attribs}}
6537 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6542 <td style="color:red;">Foo
6544 <td style="color:red;">Foo
6546 <td> style="color:red;"</td>
6549 <td style="color:red;">Foo
6551 <td align="center" style="color:red;">Foo
6553 <td align="center" style="color:red;">Foo
6559 2. Template-generated table cell attributes and cell content
6562 |{{table_attribs_2}}
6567 <td style="color:red;">Foo
6575 <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>
6576 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6581 3. Template-generated table cell attributes and cell content
6584 !align=center {{table_header_cells}}
6586 |align=center {{table_cells}}
6591 <th align="center" style="color:red;">Foo</th>
6592 <th style="color:red;"><i>Bar</i></th>
6593 <th style="color:brown;"><i>Foo</i> and Baz
6596 <td align="center" style="color:red;">Foo</td>
6597 <td style="color:red;"><i>Bar</i></td>
6598 <td style="color:brown;"><i>Foo</i> and Baz
6603 <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>
6604 <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>
6609 4. Template-generated table cell attributes and cell content inside a templated table
6612 !align=center {{table_header_cells}}
6614 |align=center {{table_cells}}
6619 <th align="center" style="color:red;">Foo</th>
6620 <th style="color:red;"><i>Bar</i></th>
6621 <th style="color:brown;"><i>Foo</i> and Baz
6624 <td align="center" style="color:red;">Foo</td>
6625 <td style="color:red;"><i>Bar</i></td>
6626 <td style="color:brown;"><i>Foo</i> and Baz
6630 <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}}]}'>
6631 <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>
6633 <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>
6637 ## Edge case fix to prevent future regressions
6639 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6642 |{{table_attribs_7}}
6647 <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>
6649 <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>
6653 Table with row followed by newlines and table heading
6655 parsoid=wt2html,html2html
6673 Table with empty line following the start tag
6675 parsoid=wt2html,html2html
6693 Table attributes with empty value
6695 parsoid=wt2html,html2html
6708 <tbody><tr><td style=""> hello</td></tr>
6713 Wikitext table with a lot of comments
6736 Wikitext table comments represented in parsoid dom
6738 {|<!--c1--><!--c2-->
6749 <table><!--c1--><!--c2-->
6750 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6751 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6756 Wikitext table with double-line table cell
6773 Table cell with a single comment
6790 Table-cell after a comment-only-empty-line
6807 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6809 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6815 Build table with {{!}}
6817 {{{!}} class="wikitable"
6820 {{!}}- style="color:red;"
6821 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6824 <table class="wikitable">
6830 <tr style="color:red;">
6832 <td style="color:red;"> second data
6838 Build table with pipe as data
6840 {| class="wikitable"
6843 |- style="color:red;"
6844 | data || style="color:red;" | second data
6846 | style="color:red;" | data with | || style="color:red;" | second data with |
6848 || data with | ||| second data with |
6851 <table class="wikitable">
6857 <tr style="color:red;">
6859 <td style="color:red;"> second data
6862 <td style="color:red;"> data with | </td>
6863 <td style="color:red;"> second data with |
6866 <td> data with | </td>
6867 <td> second data with |
6873 Build table with wikilink
6875 {| class="wikitable"
6876 ! header || second header
6877 |- style="color:red;"
6878 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6880 | data || second data [[Main Page|link|text with pipe]]
6883 <table class="wikitable">
6888 <tr style="color:red;">
6889 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6890 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6894 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6899 # The expected HTML structure in this test is debatable. The PHP parser does
6900 # not parse this kind of table at all. The main focus for Parsoid is on
6901 # round-tripping, so this output is ok for now. TODO: revisit!
6903 Wikitext table with html-syntax row
6913 <td>foo</td></tr></tbody></table>
6916 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6917 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6918 ## PHP parser, which tidy then compounds by fostering the content
6919 ## entirely out of the table. Parsoid recognizes the table context
6920 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6921 ## depends on PHP's treatment of broken table markup!
6923 Implicit <td> after a |-
6925 parsoid=wt2html,html2html
6945 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6947 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6949 parsoid=wt2html,html2html
6982 <tr><td><pre>a</pre></td></tr>
6983 <tr><td> b</td></tr>
6988 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6989 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6991 Lists should be recognized in an implicit <td> context
6993 parsoid=wt2html,html2html
7020 Table cells not properly parsed in an implicit-td context
7024 {{table_attribs_4}} || a || b
7029 <td style="background-color:#DC241f;" width="10px"></td>
7036 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7037 <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>
7042 Parsoid: Round-trip tables directly followed by content (bug 51219)
7044 parsoid=wt2html,wt2wt
7069 Parsoid: Default to a newline after tables in new content (bug 51219)
7074 <tr><td>foo</td></tr></tbody></table> bar
7076 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7081 <nowiki> </nowiki>bar
7089 Parsoid: newline inducing block nodes don't suppress <nowiki>
7101 Parsoid: Row-syntax table headings followed by comment & table cells
7103 parsoid=wt2html,wt2wt
7107 <!-- foo --> || baz || quux
7121 <tbody><tr><th> foo </th><th> bar
7122 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7127 Parsoid: Recover better from broken table attributes
7147 <p>foo</p></td></tr>
7152 Tables: Digest broken attributes on table and tr tag
7168 # T137406: Whitespace in the HTML
7170 1. Generate correct wikitext for tables with thead/tbody/tfoot
7175 <caption>Test</caption>
7216 <caption>Test</caption>
7236 # T137406: No whitespace in the HTML
7238 2. Generate correct wikitext for tables with thead/tbody/tfoot
7242 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7252 Testing serialization after deletion in references
7261 hi <ref><div id="x">ho</div></ref>
7271 Testing serialization after deletion of table cells
7274 "modes": ["wt2wt", "selser"],
7282 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7292 Testing selser after addition of new row before first row (T125419)
7295 "modes": ["wt2wt", "selser"],
7297 [ "tr", "before", "<tr><td>X</td></tr>" ]
7313 Serialize new table rows in a HTML table using HTML tags
7316 "modes": ["wt2wt", "selser"],
7318 [ "tr", "before", "<tr><td>X</td></tr>" ]
7322 <table><tr><td>a</td></tr></table>
7324 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7328 Serialize new table cells in a HTML row using HTML tags
7331 "modes": ["wt2wt", "selser"],
7333 [ "td", "before", "<td>X</td>" ]
7337 <table><tr><td>a</td></tr></table>
7339 <table><tr><td>X</td><td>a</td></tr></table>
7343 Wikitext tables can be nested inside HTML tables
7347 <table data-parsoid='{"stx":"html"}'>
7350 <tr><td>foo</td></tr>
7365 Serialize wikitext list items as HTML list items when embedded in a HTML list
7369 <ul data-parsoid='{"stx": "html"}'>
7370 <li data-parsoid='{}'>a</li>
7380 # SSS FIXME: Is this actually a good thing given the
7381 # odd nested list output that is generated by MW?
7382 # <ul><li>foo<ul>..</ul></li></ul> instead of
7383 # <ul><li>foo</li><ul>..</ul></ul>
7385 Wikitext lists can be nested inside HTML lists
7389 <ul data-parsoid='{"stx": "html"}'>
7390 <li data-parsoid='{"stx": "html"}'>a
7395 <ul data-parsoid='{"stx": "html"}'>
7418 Plain link, capitalized
7422 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7427 Plain link, uncapitalized
7431 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7438 [[Main Page|The Main Page]]
7440 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7445 Piped link with comment in link text
7447 [[Main Page|The Main<!--front--> Page]]
7449 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7454 Piped link with multiple pipe characters in link text
7456 [[Main Page||The|Main|Page|]]
7458 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7461 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7465 Piped link with no link text
7467 [[Thomas Bek (bishop of St David's)|]]
7469 <p>[[Thomas Bek (bishop of St David's)|]]
7472 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7476 Piped link with empty link text
7478 [[Main Page|<nowiki />]] - empty nowiki
7479 [[Main Page| ]] - empty space
7480 [[Main Page| ]] - empty non breaking space
7482 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7483 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7484 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7487 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki />"}'/></a> - empty nowiki
7488 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7489 <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>
7497 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7502 Broken link with fragment
7504 [[Zigzagzogzagzig#zug]]
7506 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7511 Special page link with fragment
7513 [[Special:Version#anchor]]
7515 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7520 Nonexistent special page link with fragment
7522 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7524 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7531 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7533 <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>
7540 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7542 <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>!!!
7553 Bug 43661: Piped links with identical prefixes
7555 [[prefixed article|prefixed articles with spaces]]
7557 [[prefixed article|prefixed articlesaoeu]]
7559 [[Main Page|Main Page test]]
7561 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7562 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7563 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7569 Link with HTML entity in suffix / tail
7571 [[Main Page]]", [[Main Page]]a
7573 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7576 <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>
7580 Link with 3 brackets
7591 Link with 4 brackets
7595 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7600 Piped link with 3 brackets
7602 [[[main page|the main page]]]
7604 <p>[[[main page|the main page]]]
7609 Piped link with extlink-like text
7612 [[Main Page|This is a [bar]]]
7614 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7615 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7618 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7619 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7623 Link with multiple pipes
7625 [[Main Page|The|Main|Page]]
7627 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7632 Anchor containing a #. (bug 63430)
7634 [[Main Page#And#Link]]
7636 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7639 <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>
7645 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7647 <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>
7652 Link with space in namespace
7654 [[User talk:Foo bar]]
7656 <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>
7661 MemoryAlpha:AlphaTest
7663 This is an article in the MemoryAlpha namespace
7664 (which shadows the memoryalpha interwiki link).
7668 Namespace takes precedence over interwiki link (bug 51680)
7670 [[MemoryAlpha:AlphaTest]]
7672 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7676 # The previous test doesn't work correctly in html2*, due to not recognizing the
7677 # link as an internal one. This one checks for the correct behavior.
7679 Link to namespace preferred over interwiki with correct rel attribute
7681 parsoid=html2wt,html2html
7683 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7685 [[MemoryAlpha:AlphaTest]]
7689 Piped link to namespace
7691 [[Meta:Disclaimers|The disclaimers]]
7693 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7700 [[Usually caused by a typo (oops}]]
7702 <p>[[Usually caused by a typo (oops}]]
7709 Just a test of an article title containing a percent.
7713 Link containing % (not as a hex sequence)
7716 [[7% Solution|7%25 Solution]]
7718 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7719 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7722 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7723 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7726 # note that the parsoid HTML is identical to the previous test output,
7727 # so the previous test ensures that the html2wt mode will generate the
7728 # "not as a hex sequence" wikitext.
7730 Link containing % as a single hex sequence interpreted to char
7732 parsoid=wt2wt,wt2html,html2html
7735 [[7%25 Solution|7%25 Solution]]
7737 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7738 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7741 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7742 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7746 Link containing % as a double hex sequence interpreted to hex sequence
7750 <p>[[7%2525 Solution]]
7754 ## Example for such a section: == < ==
7756 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7758 [[%23%3c]][[%23%3e]]
7760 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7763 <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>
7767 Link containing "<#" and ">#" as a hex sequences
7769 [[%3c%23]][[%3e%23]]
7771 <p>[[%3c%23]][[%3e%23]]
7776 Link containing an equals sign
7778 [[Special:BookSources/isbn=4-00-026157-6]]
7780 <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>
7783 <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>
7789 Just a test of an article title containing a tilde.
7792 # note that links containing signatures, like [[Foo~~~~]], are
7793 # massaged by the pre-save transform (PST) and so the tildes are never
7794 # seen by the parser.
7796 Link containing a tilde
7800 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7803 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7807 Link containing double-single-quotes '' (bug 4598)
7809 [[Lista d''e paise d''o munno]]
7811 <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>
7814 <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>
7818 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7820 Some [[Link|pretty ''italics'' and stuff]]!
7822 <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>!
7825 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7829 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7831 ''Some [[Link|pretty ''italics'' and stuff]]!''
7833 <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>
7838 Link with double quotes in title part (literal) and alternate part (interpreted)
7840 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7844 [[''Pentecoste''|Pentecoste]]
7846 [[''Pentecoste''|''Pentecoste'']]
7848 <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>
7849 </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>
7850 </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>
7851 </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>
7854 <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>
7855 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7856 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7857 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7861 Broken image links with HTML captions (bug 39700)
7863 [[File:Nonexistent|<script></script>]]
7864 [[File:Nonexistent|100x100px|<script></script>]]
7865 [[File:Nonexistent|<]]
7866 [[File:Nonexistent|a<i>b</i>c]]
7868 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7869 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7870 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7871 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7874 <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>
7875 <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>
7876 <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>
7877 <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>
7883 [[http://www.example.com]]
7885 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7888 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7892 Plain link to URL with link text
7894 [[http://www.example.com Link text]]
7896 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7901 Plain link to protocol-relative URL
7903 [[//www.example.com]]
7905 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7908 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7912 Plain link to protocol-relative URL with link text
7914 [[//www.example.com Link text]]
7916 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7921 Plain link to page with question mark in title
7927 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7928 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7933 # I'm fairly sure the expected result here is wrong.
7934 # We want these to be URL links, not pseudo-pages with URLs for titles....
7935 # However the current output is also pretty screwy.
7938 # I'm changing it to match the current output--it arguably makes more
7939 # sense in the light of the test above. Old expected result was:
7940 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7942 # But I think this test is bordering on "garbage in, garbage out" anyway.
7947 Piped link to URL: [[http://www.example.com|an example URL]]
7949 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7952 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7956 BUG 2: [[page|http://url/]] should link to page, not http://url/
7958 [[Main Page|http://url/]]
7960 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7963 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7966 # Parsoid does not mark self-links, by design.
7968 BUG 337: Escaped self-links should be bold
7972 [[Bug462]] [[Bug462]]
7974 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7977 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7979 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7983 Self-link to section should not be bold
7987 [[Main Page#section]]
7989 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8000 Self-link to numeric title
8006 <p><strong class="selflink">0</strong>
8011 Link to numeric-equivalent title
8017 <p><a href="/wiki/00" title="00">00</a>
8022 <nowiki> inside a link
8024 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8026 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8031 Non-breaking spaces in title
8033 [[ Main Page ]]
8035 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8040 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
8046 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8051 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8057 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8062 Internal link with en linktrail: no apostrophes (bug 27473)
8068 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8073 Internal link with ca linktrail with apostrophes (bug 27473)
8079 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8084 Internal link with kaa linktrail with apostrophes (bug 27473)
8090 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8095 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8097 [[User:Foo/Test/63636:Bar|Test]]
8099 <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>
8102 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8105 ## Mainly a sanity check for Parsoid
8107 Handle title parsing for subpages
8116 ## FIXME: Add a working php section here
8118 Link to a subpage from a namespace other than main
8124 <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>
8128 Ensure that transclusion titles are not url-decoded
8130 subpage title=[[Test]]
8133 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8135 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8138 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8142 Purely hash wikilink
8144 title=[[User:test/123]]
8148 <p><a href="#a">b</a>
8151 <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>
8155 1. Interaction of linktrail and template encapsulation
8161 <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>
8165 2. Interaction of linktrail and template encapsulation
8169 {{echo|Some [[Fool]]}}s
8171 <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>
8175 3. Interaction of linktrail and template encapsulation
8179 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8181 <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>
8191 Internal link with is link prefix
8195 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8197 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8208 Internal link with is link trail and link prefix
8212 [[mótmælendatrú|xxx]]ar
8214 mótmælenda[[söfnuður]]
8215 mótmælenda[[söfnuður|söfnuðir]]
8216 mótmælenda[[söfnuður|söfnuðir]]xxx
8218 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8219 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8220 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8221 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8222 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8227 Parsoid link trail escaping
8229 parsoid=html2wt,html2html
8231 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8237 Parsoid link prefix escaping
8240 parsoid=html2wt,html2html
8242 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8244 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8248 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8256 [http://wp.org ''foo'']
8258 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8259 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8260 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8261 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8266 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8270 [[Foo|{{echo|a}} b {{echo|c}}]]
8272 <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>
8276 Link with angle bracket after anchor
8280 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8283 <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>
8287 ### Interwiki links (see maintenance/interwiki.sql)
8291 Inline interwiki link
8293 parsoid=wt2html,wt2wt,html2html
8295 [[MeatBall:SoftSecurity]]
8297 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8300 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8304 Inline interwiki link with empty title (bug 2372)
8306 parsoid=wt2html,wt2wt,html2html
8310 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8313 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8317 Interwiki link encoding conversion (bug 1636)
8319 *[[Wikipedia:ro:Olteniţa]]
8320 *[[Wikipedia:ro:Olteniţa]]
8322 <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>
8323 <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>
8327 <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>
8328 <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>
8333 Interwiki link with fragment (bug 2130)
8335 [[MeatBall:SoftSecurity#foo]]
8337 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8342 Link scenarios with escaped fragments
8345 [[Foo#Is this great?]]
8346 [[meatball:Foo#Is this great?]]
8348 <p><a href="#Is_this_great.3F">#Is this great?</a>
8349 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8350 <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>
8353 <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>
8354 <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>
8355 <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>
8358 # Ideally the wikipedia: prefix here should be proto-relative too
8359 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8360 # define the 'en' prefix, and originally the test used 'wikipedia',
8361 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8364 Different interwiki prefixes mapping to the same URL
8372 [[:wikipedia:Foo|Foo]]
8374 [[wikipedia:en:Foo]]
8376 [[:wikipedia:en:Foo]]
8380 <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>
8382 <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>
8384 <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>
8386 <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>
8388 <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>
8390 <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>
8392 <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>
8396 Interwiki links that cannot be represented in wiki syntax
8399 [[meatball:ok#foo|ok with fragment]]
8400 [[meatball:ok_as_well?|ok ending with ? mark]]
8401 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8402 [http://de.wikipedia.org/wiki/#foo is just fragment]
8405 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8406 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8407 <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>
8408 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8409 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8412 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8413 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8414 <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>
8415 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8416 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8420 Interwiki links: trail
8422 [[wikipedia:Foo|Ba]]r
8424 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8427 <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>
8431 Local interwiki link
8433 parsoid=wt2html,wt2wt,html2html
8435 [[local:Template:Foo]]
8437 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8440 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8443 # Parsoid does not mark self-links, by design.
8445 Local interwiki link: self-link to current page
8448 parsoid=wt2html,wt2wt,html2html
8452 <p><strong class="selflink">local:Main Page</strong>
8455 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8459 Local interwiki link: prefix only (bug 64167)
8461 parsoid=wt2html,wt2wt,html2html
8465 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8468 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8472 Local interwiki link: with additional interwiki prefix (bug 61357)
8474 parsoid=wt2html,wt2wt,html2html
8476 [[local:meatball:Hello]]
8478 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8481 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8485 Multiple local interwiki link prefixes
8487 [[local:local:local:local:mi:local:Foo]]
8489 parsoid=wt2html,wt2wt,html2html
8491 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8494 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8498 ### Interlanguage links
8499 ### Language links (so that searching for '### language' matches..)
8511 <p>Blah blah blah</p>
8512 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8515 ## parsoid html2wt will lose the space variations
8517 Interlanguage link with spacing
8519 parsoid=wt2html,wt2wt,html2html
8527 <p>Blah blah blah</p>
8528 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8532 Double interlanguage link
8541 <p>Blah blah blah</p>
8542 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8543 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8546 ## parsoid html2wt will lose the space variations
8548 Interlanguage link variations
8550 parsoid=wt2html,wt2wt,html2html
8560 <p>Blah blah blah</p>
8561 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8562 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8563 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8566 ## parsoid html2wt will normalize the space to _
8568 Space and question mark encoding in interlanguage links (T95473)
8570 parsoid=wt2html,wt2wt,html2html
8578 <p>Blah blah blah</p>
8579 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8583 Interlanguage link, with prefix links
8593 <p>Blah blah blah</p>
8594 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8598 Double interlanguage link, with prefix links (bug 8897)
8609 <p>Blah blah blah</p>
8610 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8611 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8615 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8623 <p>Blah blah blah</p>
8624 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8627 ## PHP parser tests script needs an update
8628 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8630 Language links render as inline links if $wgInterwikiMagic=false
8632 wgInterwikiMagic=false
8633 parsoid=wt2html,wt2wt,html2html
8638 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8641 ## PHP parser tests script needs an update
8642 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8644 Language links render as inline links in the Talk namespace
8647 parsoid=wt2html,wt2wt,html2html
8652 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8656 Parsoid-specific test: Wikilinks with should RT properly
8662 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8667 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8669 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8671 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8672 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8674 He&nbsp;llo [[Foo|He&nbsp;llo]]
8676 He&nbsp;llo He&nbsp;llo
8678 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8679 </p><p>He&nbsp;llo He&nbsp;llo
8683 # html2wt will fail because of title normalization without data-parsoid
8685 Parsoid: handle constructor well
8687 parsoid=wt2html,wt2wt
8693 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8694 </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>
8697 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8699 <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>
8708 # Note that `ko` isn't a known interlanguage prefix
8710 Parsoid: recognize interlanguage links without a target page
8720 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8722 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8725 # Note that `ko` isn't a known interwiki prefix
8727 Parsoid: recognize interwiki links without a target page
8729 parsoid=wt2html,wt2wt,html2html
8735 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8736 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8739 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8740 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8744 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8748 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8751 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8755 Interlanguage link with preceding local interwiki link (bug 68085)
8757 parsoid=wt2html,wt2wt,html2html
8760 [[local:es:Spanish]]
8763 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8767 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8771 Looks like an interlanguage link, but is actually a local interwiki
8773 parsoid=wt2html,wt2wt,html2html
8779 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8783 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8787 ### Redirects, Parsoid-only
8791 1. Simple redirect to page
8793 #REDIRECT [[Main Page]]
8795 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8799 2. Other redirect variants
8801 #REDIRECT [[Main_Page]]
8803 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8806 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8807 # This tests the Parsoid bail-out code.
8809 3. Other redirect variants
8811 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8813 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8817 4. Redirect to a templated destination
8819 #REDIRECT [[{{echo|Foo}}bar]]
8821 <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"}]]}'/>
8827 parsoid=wt2html,wt2wt
8832 <li>REDIRECT [[]]</li></ol>
8836 Optional colon in #REDIRECT
8838 # the colon is archaic syntax. we support it for wt2html, but we
8839 # don't care that it roundtrips back to the modern syntax.
8840 parsoid=wt2html,html2html
8842 #REDIRECT:[[Main Page]]
8844 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8848 Whitespace in #REDIRECT with optional colon
8850 # the colon and gratuitous whitespace is archaic syntax. we support
8851 # it for wt2html, but we don't care that it roundtrips back to the
8852 # modern syntax (without extra whitespace)
8853 parsoid=wt2html,html2html
8860 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8864 Piped link in #REDIRECT
8866 # content after piped link is ignored. we support this syntax,
8867 # but don't care that the piped link is lost when we roundtrip this.
8870 #REDIRECT [[Main Page|bar]]
8872 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8876 Redirect to category (T104502)
8878 parsoid=wt2html,wt2wt
8880 #REDIRECT [[Category:Foo]]
8882 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8886 Redirect to category with URL encoding (T104502)
8890 #REDIRECT [[Category%3AFoo]]
8892 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8896 Redirect to category page
8898 #REDIRECT [[:Category:Foo]]
8900 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8904 Redirect to image page (1)
8906 #REDIRECT [[File:Wiki.png]]
8908 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8912 Redirect to image page (2)
8914 #REDIRECT [[Image:Wiki.png]]
8916 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8919 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8920 # Next test confirms this.
8922 Redirect to language (1) (T104918)
8924 parsoid=wt2html,wt2wt,html2html
8926 #REDIRECT [[en:File:Wiki.png]]
8928 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8932 Redirect to language (2) (T104918)
8934 #REDIRECT [[:en:File:Wiki.png]]
8936 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8940 Redirect to interwiki (T104918)
8942 #REDIRECT [[meatball:File:Wiki.png]]
8944 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8948 Non-English #REDIRECT
8952 #TILVÍSUN [[Main Page]]
8954 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8958 Redirect syntax under text isn't considered a redirect
8961 #redirect [[Main Page]]
8964 <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>
8967 # FIXME: Should hoist the redirect to the top of the page and ensure there
8974 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8994 Broken br tag sanitization
9002 # TODO: Fix html2html mode (bug 51055)!
9004 Parsoid: Broken br tag recognition
9017 Incorrecly removing closing slashes from correctly formed XHTML
9019 <br style="clear:both;" />
9021 <p><br style="clear:both;" />
9026 Failing to transform badly formed HTML into correct XHTML
9028 <br style="clear: left;">
9029 <br style="clear: right;">
9030 <br style="clear: both;">
9032 <p><br style="clear: left;" />
9033 <br style="clear: right;" />
9034 <br style="clear: both;" />
9038 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9039 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9041 Handling html with a div self-closing tag
9050 <p><div title />
9054 <p><div title=bar />
9055 <div title=bar/>
9057 <div title="bar/"></div>
9061 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9062 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9063 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9064 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9065 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9066 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9070 Handling html with a br self-closing tag
9097 Horizontal ruler (should it add that extra space?)
9112 Horizontal ruler -- 4+ dashes render hr
9121 Horizontal ruler -- eats additional dashes on the same line
9130 Horizontal ruler -- does not collapse dashes on consecutive lines
9141 Horizontal ruler -- <4 dashes render as plain text
9150 Horizontal ruler -- Supports content following dashes on same line
9162 ### Block-level elements
9171 <ul><li>Common list</li>
9173 <li>item 3</li></ul>
9184 <ol><li>Numbered list</li>
9186 <li> item 3</li></ol>
9200 ***#Number on level 4
9202 **#Number on level 3
9203 **#Number on level 3
9207 #** Level 3, but ordered
9210 <ol><li> with numbers</li></ol>
9211 <ul><li> and bullets</li></ul>
9212 <ol><li> and numbers</li></ol></li>
9214 <ul><li>bullet level 2
9215 <ul><li>bullet level 3
9216 <ol><li>Number on level 4</li></ol></li></ul></li>
9218 <ol><li>Number on level 3</li>
9219 <li>Number on level 3</li></ol></li></ul>
9220 <ol><li>number level 2</li></ol></li>
9222 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9223 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9228 1. Nested mixed wikitext and html list
9231 * <ul><li>ho</li></ul>
9236 <li> <ul><li>ho</li></ul></li>
9238 <ul><li> ho</li></ul></li></ul>
9242 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9244 <ul><li> ho</li></ul></li></ul>
9248 2. Nested mixed wikitext and html list (incompatible)
9251 : {{echo|<li>ho</li>}}
9254 <dd> <li>ho</li></dd></dl>
9258 <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>
9268 <ul><li>bar</li></ul></li></ul>
9278 <ul><li><ul><li>foo</li></ul></li>
9284 Nested lists 3 (first element empty)
9290 <ul><li>bar</li></ul></li></ul>
9295 Nested lists 4 (first element empty)
9300 <ul><li><ul><li></li></ul></li>
9306 Nested lists 5 (both elements empty)
9311 <ul><li><ul><li></li></ul></li>
9317 Nested lists 6 (both elements empty)
9323 <ul><li></li></ul></li></ul>
9328 Nested lists 7 (skip initial nesting levels)
9332 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9337 Nested lists 8 (multiple nesting transitions)
9345 <ul><li><ul><li> bar</li></ul></li>
9346 <li> baz</li></ul></li>
9352 Nested lists 9 (extension interaction)
9358 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9362 1. Lists with start-of-line-transparent tokens before bullets: Comments
9375 2. Lists with start-of-line-transparent tokens before bullets: Template close
9380 <ul><li>foo bar</li>
9386 List items are not parsed correctly following a <pre> block (bug 785)
9392 <ul><li> <pre>foo</pre></li>
9393 <li> <pre>bar</pre></li>
9397 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9398 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9403 List items from template
9414 * notSOL{{inner list}}
9417 <ul><li> item 1</li>
9418 <li> item 2</li></ul>
9419 <ul><li> item 0</li>
9421 <li> item 2</li></ul>
9422 <ul><li> item 0</li>
9425 <li> item 2</li></ul>
9430 List interrupted by empty line or heading
9438 <ul><li> foo</li></ul>
9439 <ul><li><ul><li> bar</li></ul></li></ul>
9440 <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>
9441 <ul><li> Another list item</li></ul>
9446 Multiple list tags generated by templates
9467 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9470 <!--This line will NOT split the list-->
9472 <!--This line will NOT split the list either-->
9474 <!--foo--> <!----> <!--This line NOT split the list either-->
9485 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9488 <!--This line will NOT split the list-->
9490 <!--This line will NOT split the list either-->
9492 <!--foo--> <!----> <!--This line NOT split the list
9505 (The PHP parser relies on Tidy for the hack)
9507 parsoid=wt2html,wt2wt
9511 * {{echo|<li>templated li-hack}}
9512 * <!--foo--> <li> unsupported li-hack with preceding comments
9515 <li><li>not a li-hack
9522 <li>templated li-hack</li>
9523 <li>unsupported li-hack with preceding comments</li>
9526 <li>not a li-hack</li>
9531 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9558 Parsoid: Test of whitespace serialization with Templated bullets
9565 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9569 # ------------------------------------------------------------------------
9570 # The next set of tests are about Parsoid's ability to handle badly nested
9571 # tags (parse, minimize scope of fixup, and roundtrip back)
9572 # ------------------------------------------------------------------------
9575 Unbalanced closing block tags break a list
9576 (php parser relies on Tidy to fix up)
9594 # Parsoid fails this test, but it might be tricky to support properly.
9597 Unbalanced closing non-block tags don't break a list
9598 (php parser relies on Tidy to fix up)
9605 <li><span>a</span></li>
9606 <li><span>b</span></li>
9620 Unclosed formatting tags that straddle lists are closed and reopened
9621 (php parser relies on Tidy to fix up)
9623 parsoid=wt2html,wt2wt,html2html
9633 <ol><li> <s> a</s></li>
9634 <li><s> b </s></li></ol>
9639 1. List embedded in a formatting tag
9646 <li><small>foo</small></li>
9656 ## Ugly Parsoid output here
9657 ## Not sure what the right output is.
9659 2. List embedded in a formatting tag
9666 <li><small>a</small></li>
9667 <li><small>b</small></li>
9674 <li><small>b</small></li>
9678 # Ugly Parsoid and PHP parser output here
9679 # Not sure if we want to make this a test!
9682 ## 3. Unclosed formatting tags in list elements
9688 ## <li><small>a</small></li>
9689 ## <li><small><small>b</small></small></li>
9693 ## <li><small>a</small></li>
9695 ## <li><small>b</small></li>
9699 # This is a bug in the PHP parser + tidy combination.
9700 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9701 # and then fostered out of the table by tidy.)
9702 # We believe the Parsoid output to be correct.
9704 Table with missing opening <tr> tag
9706 parsoid=wt2html,wt2wt
9724 # Note that the current date is hard-coded as
9725 # 1970-01-01T00:02:03Z (a Thursday)
9726 # when running parser tests. The timezone is also fixed to GMT, so
9727 # local date will be identical to current date.
9730 Magic Word: {{CURRENTDAY}}
9739 Magic Word: {{CURRENTDAY2}}
9748 Magic Word: {{CURRENTDAYNAME}}
9757 Magic Word: {{CURRENTDOW}}
9766 Magic Word: {{CURRENTMONTH}}
9775 Magic Word: {{CURRENTMONTH1}}
9784 Magic Word: {{CURRENTMONTHABBREV}}
9786 {{CURRENTMONTHABBREV}}
9793 Magic Word: {{CURRENTMONTHNAME}}
9795 {{CURRENTMONTHNAME}}
9802 Magic Word: {{CURRENTMONTHNAMEGEN}}
9804 {{CURRENTMONTHNAMEGEN}}
9811 Magic Word: {{CURRENTTIME}}
9820 Magic Word: {{CURRENTHOUR}}
9829 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9838 Magic Word: {{CURRENTYEAR}}
9847 Magic Word: {{CURRENTTIMESTAMP}}
9849 {{CURRENTTIMESTAMP}}
9856 Magic Words LOCAL (UTC)
9860 * {{LOCALMONTHNAME}}
9861 * {{LOCALMONTHNAMEGEN}}
9862 * {{LOCALMONTHABBREV}}
9871 * {{LOCALTIMESTAMP}}
9886 <li> 19700101000203</li></ul>
9891 Magic Word: {{FULLPAGENAME}}
9893 title=[[User:Ævar Arnfjörð Bjarmason]]
9897 <p>User:Ævar Arnfjörð Bjarmason
9902 Magic Word: {{FULLPAGENAMEE}}
9904 title=[[User:Ævar Arnfjörð Bjarmason]]
9908 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9913 Magic Word: {{TALKSPACE}}
9915 title=[[User:Ævar Arnfjörð Bjarmason]]
9924 Magic Word: {{TALKSPACE}}, same namespace
9926 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9935 Magic Word: {{TALKSPACE}}, main namespace
9937 title=[[Parser Test]]
9946 Magic Word: {{TALKSPACEE}}
9948 title=[[User:Ævar Arnfjörð Bjarmason]]
9957 Magic Word: {{SUBJECTSPACE}}
9959 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9968 Magic Word: {{SUBJECTSPACE}}, same namespace
9970 title=[[User:Ævar Arnfjörð Bjarmason]]
9979 Magic Word: {{SUBJECTSPACE}}, main namespace
9981 title=[[Parser Test]]
9989 Magic Word: {{SUBJECTSPACEE}}
9991 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10000 Magic Word: {{NAMESPACE}}
10002 title=[[User:Ævar Arnfjörð Bjarmason]]
10011 Magic Word: {{NAMESPACEE}}
10013 title=[[User:Ævar Arnfjörð Bjarmason]]
10022 Magic Word: {{NAMESPACENUMBER}}
10024 title=[[User:Ævar Arnfjörð Bjarmason]]
10026 {{NAMESPACENUMBER}}
10033 Magic Word: {{SUBPAGENAME}}
10035 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10044 Magic Word: {{SUBPAGENAMEE}}
10046 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10055 Magic Word: {{ROOTPAGENAME}}
10057 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10061 <p>Ævar Arnfjörð Bjarmason
10066 Magic Word: {{ROOTPAGENAMEE}}
10068 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10072 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10077 Magic Word: {{BASEPAGENAME}}
10079 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10083 <p>Ævar Arnfjörð Bjarmason
10088 Magic Word: {{BASEPAGENAMEE}}
10090 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10094 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10099 Magic Word: {{TALKPAGENAME}}
10101 title=[[User:Ævar Arnfjörð Bjarmason]]
10105 <p>User talk:Ævar Arnfjörð Bjarmason
10110 Magic Word: {{TALKPAGENAMEE}}
10112 title=[[User:Ævar Arnfjörð Bjarmason]]
10116 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10121 Magic Word: {{SUBJECTPAGENAME}}
10123 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10125 {{SUBJECTPAGENAME}}
10127 <p>User:Ævar Arnfjörð Bjarmason
10132 Magic Word: {{SUBJECTPAGENAMEE}}
10134 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10136 {{SUBJECTPAGENAMEE}}
10138 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10143 Magic Word: {{NUMBEROFFILES}}
10152 Magic Word: {{PAGENAME}}
10154 title=[[User:Ævar Arnfjörð Bjarmason]]
10158 <p>Ævar Arnfjörð Bjarmason
10163 Magic Word: {{PAGENAME}} with metacharacters
10165 title=[['foo & bar = baz']]
10169 <p><i>'foo & bar = baz'</i>
10172 <p><i>'foo & bar = baz'</i></p>
10176 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10178 title=[[*RFC 1234 http://example.com/]]
10182 <p>*RFC 1234 http://example.com/
10185 <p>*RFC 1234 http://example.com/</p>
10189 Magic Word: {{PAGENAMEE}}
10191 title=[[User:Ævar Arnfjörð Bjarmason]]
10195 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10200 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10202 title=[[*RFC 1234 http://example.com/]]
10206 <p>*RFC_1234_http://example.com/
10209 <p>*RFC_1234_http://example.com/</p>
10213 Magic Word: {{REVISIONID}}
10222 Magic Word: {{SCRIPTPATH}}
10230 Magic Word: {{STYLEPATH}}
10239 Magic Word: {{SERVER}}
10243 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10248 Magic Word: {{SERVERNAME}}
10257 Magic Word: {{SITENAME}}
10266 Case-sensitive magic words, when cased differently, should just be template transclusions
10273 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10274 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10275 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10276 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10281 Case-insensitive magic words should still work with weird casing.
10291 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10295 # From plwiki:PLOS_ONE
10297 Parsoid: Page property magic word with magic word contents
10299 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10301 <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>"}]]}'/>
10305 Parsoid: Template-generated DISPLAYTITLE
10307 {{{{echo|DISPLAYTITLE}}:Foo}}
10309 <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}}]}'/>
10313 Namespace 1 {{ns:1}}
10322 Namespace 1 {{ns:01}}
10331 Namespace 0 {{ns:0}} (bug 4783)
10339 Namespace 0 {{ns:00}} (bug 4783)
10347 Namespace -1 {{ns:-1}}
10356 Namespace User {{ns:User}}
10365 Namespace User talk {{ns:User_talk}}
10374 Namespace User talk {{ns:uSeR tAlK}}
10383 Namespace File {{ns:File}}
10392 Namespace File {{ns:Image}}
10401 Namespace (lang=de) Benutzer {{ns:User}}
10412 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10418 <p>Benutzer Diskussion
10425 {{urlencode:hi world?!}}
10426 {{urlencode:hi world?!|WIKI}}
10427 {{urlencode:hi world?!|PATH}}
10428 {{urlencode:hi world?!|QUERY}}
10438 Magic Word: prioritize type info over data-parsoid
10442 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10448 Magic Word: serialize on separate line (parsoid)
10450 parsoid=wt2wt,html2wt
10456 foo<meta property="mw:PageProp/notoc"/>bar
10460 Magic Word: rt non-english wikis
10467 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10471 __proto__ is treated as normal wikitext (T105997)
10483 Magic links: internal link to RFC (bug 479)
10487 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10490 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10494 Magic links: RFC (bug 479)
10498 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10501 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10505 Magic links: RFC (bug 65278)
10507 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10509 <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.
10512 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10516 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10518 RFC      822
10522 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10527 <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>
10533 Magic links: ISBN (bug 1937)
10537 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10540 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10544 Magic links: ISBN (bug 65278)
10546 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10548 <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.
10551 <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>
10555 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10557 ISBN      978 0 316 09811 3
10563 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10570 <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>
10578 Magic links: PMID incorrectly converts space to underscore
10582 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10585 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10589 Magic links: PMID (bug 65278)
10591 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10593 <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.
10596 <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>
10600 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10602 PMID      1234
10606 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10611 <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>
10616 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10617 # since these are ExtLinkText, not MagicLinkText
10619 Magic links: use appropriate serialization for "almost" magic links.
10621 X[[Special:BookSources/0978739256|foo]]
10623 X[//tools.ietf.org/html/rfc1234 foo]
10625 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10626 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10629 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10630 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10634 Magic links: All disabled (T47942)
10636 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10642 <p>ISBN 0-306-40615-2
10653 Nonexistent template
10655 {{thistemplatedoesnotexist}}
10657 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10662 Template with invalid target containing tags
10664 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10666 <p>{{a<b>b</b>|foo|a=b|a = b}}
10671 Template with invalid target containing unclosed tag
10673 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10675 <p>{{a<b>|foo|a=b|a = b}}</b>
10680 Template with invalid target containing wikilink
10684 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10687 <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>
10691 Template with just whitespace in it, bug #68421
10695 <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>
10701 This is a test template
10709 <p>This is a test template
10714 Template with explicit namespace
10718 <p>This is a test template
10726 This is a test template with parameter {{{param}}}
10732 {{paramtest|param=foo}}
10734 <p>This is a test template with parameter foo
10739 Template:paramtestnum
10741 [[{{{1}}}|{{{2}}}]]
10745 Template unnamed parameter
10747 {{paramtestnum|Main Page|the main page}}
10749 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10754 Template:templatesimple
10760 Template:templateredirect
10762 #redirect [[Template:templatesimple]]
10766 Template:templateasargtestnum
10772 Template:templateasargtest
10774 {{template{{{templ}}}}}
10778 Template:templateasargtest2
10784 Template with template name as unnamed argument
10786 {{templateasargtestnum|templatesimple}}
10793 Template with template name as argument
10795 {{templateasargtest|templ=simple}}
10802 Template with template name as argument (2)
10804 {{templateasargtest2|templ=templatesimple}}
10811 Template:templateasargtestdefault
10813 {{{{{templ|templatesimple}}}}}
10823 Template with default value
10825 {{templateasargtestdefault}}
10832 Template with default value (value set)
10834 {{templateasargtestdefault|templ=templa}}
10843 {{templateredirect}}
10848 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10852 Template with argument in separate line
10854 {{ templateasargtest |
10862 Template with complex template as argument
10865 param ={{ templateasargtest |
10866 templ = simple }}}}
10868 <p>This is a test template with parameter (test)
10873 Template with thumb image (with link in description)
10875 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10877 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>
10880 <p>This is a test template with parameter</p>
10881 <div class="thumb tright">
10882 <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>
10883 <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>
10887 <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>
10891 Template:complextemplate
10893 {{{1}}} {{paramtest|
10894 param ={{{param}}}}}
10898 Template with complex arguments
10901 param ={{ templateasargtest |
10902 templ = simple }}|[[Template:complextemplate|link]]}}
10904 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10909 BUG 553: link with two variables in a piped link
10912 |[[{{{1}}}|{{{2}}}]]
10917 <td>[[{{{1}}}|{{{2}}}]]
10922 <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>
10927 Abort table cell attribute parsing on wikilink
10930 | testing [[one|two]] | three || four
10931 | testing one two | three || four
10932 | testing="[[one|two]]" | three || four
10937 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10943 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10949 <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>
10950 <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>
10951 <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>
10956 Don't abort table cell attribute parsing if wikilink is found in template arg
10959 | Test {{#tag:ref|One two "[[three]]" four}}
10963 <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>
10968 Magic variable as template parameter
10970 {{paramtest|param={{SITENAME}}}}
10972 <p>This is a test template with parameter MediaWiki
10979 [[{{{param}}}|link]]
10983 Template parameter as link source
10985 {{linktest|param=Main Page}}
10987 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10992 Template:paramtest2
10994 including another template, {{paramtest|param={{{arg}}}}}
10998 Template passing argument to another template
11000 {{paramtest2|arg='hmm'}}
11002 <p>including another template, This is a test template with parameter 'hmm'
11013 Template as link source
11017 [[{{linktest2}}|Main Page]]
11019 [[{{linktest2}}]]Page
11021 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11022 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11023 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11041 Template infinite loop
11045 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11050 Template from main namespace
11069 BUG 529: Template with table, not included at beginning of line
11088 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11108 BUG 41: Template parameters shown as broken links
11117 Template with targets containing wikilinks
11121 {{[[{{echo|foo}}]]}}
11123 {{{{echo|[[foo}}]]}}
11125 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11126 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11138 Templates: Double quotes as template target
11145 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11149 ## This test is about making sure Parsoid's data-mw is well formed in the
11150 ## face of multiple templates with intersecting and overlapping ranges. The
11151 ## wikitext itself is wretched.
11153 Templates with intersecting and overlapping ranges
11178 <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":""}]]}'>
11180 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11182 <tbody><tr><td>hi</td></tr>
11187 Template:MSGNW test
11189 ''None'' of '''this''' should be
11191 but rather passed unmodified
11199 # hmm, fix this or just deprecate msgnw and document its behavior?
11203 {{msgnw:MSGNW test}}
11205 <p>''None'' of '''this''' should be
11207  but rather passed unmodified
11208 {{test}}
11212 <!-- comment -->
11219 {{int:youhavenewmessages|lots of money|not!}}
11221 <p>You have lots of money (not!).
11226 int keyword - non-existing message
11237 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11241 <includeonly> and <noinclude> being included
11252 <onlyinclude>Foo</onlyinclude>bar
11256 <onlyinclude> being included
11268 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11272 <onlyinclude> and <includeonly> being included
11281 <includeonly> and <noinclude> on a page
11283 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11290 Un-closed <noinclude>
11297 <onlyinclude> on a page
11299 <onlyinclude>Foo</onlyinclude>bar
11306 Un-closed <onlyinclude>
11313 Self-closed noinclude, includeonly, onlyinclude tags
11324 Unbalanced includeonly and noinclude tags
11328 |b</noinclude></noinclude>
11329 |c</noinclude></includeonly>
11330 |d</includeonly></includeonly>
11339 <td>c</includeonly>
11341 <td>d</includeonly></includeonly>
11347 Template:Includeonly section
11350 ==Includeonly section==
11356 Bug 6563: Edit link generation for section shown by <includeonly>
11358 {{includeonly section}}
11360 <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>
11361 <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>
11365 # Uses same input as the contents of [[Template:Includeonly section]]
11367 Bug 6563: Section extraction for section shown by <includeonly>
11372 ==Includeonly section==
11380 Bug 6563: Edit link generation for section suppressed by <includeonly>
11383 ==Includeonly section==
11387 <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>
11392 Bug 6563: Section extraction for section suppressed by <includeonly>
11397 ==Includeonly section==
11405 Un-closed <includeonly>
11410 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11413 ## We used to, but no longer wt2wt this test since the default serializer
11414 ## will normalize the include directives to serialize on their own line.
11415 ## Selser will take care of preserving formatting in scenarios where they
11416 ## intermingled with other wikitext.
11418 Includes and comments at SOL
11420 parsoid=wt2html,html2html
11422 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11426 </noinclude>* stuff
11429 <includeonly>can have stuff</includeonly>=== here ===
11432 <h2><span class="mw-headline" id="hu">hu</span></h2>
11435 <ul><li> stuff</li>
11436 <li> here</li></ul>
11437 <h3><span class="mw-headline" id="here">here</span></h3>
11440 <!-- 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>
11442 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11444 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11445 <li> here</li></ul>
11447 <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>
11451 # TODO: test with DOM fragment reuse!
11453 Parsoid: DOM fragment reuse
11455 parsoid=wt2wt,wt2html
11457 a{{echo|b<table></table>c}}d
11469 <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>
11471 <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">
11472 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11473 </span><p about="#mwt2">cd</p>
11475 <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">
11477 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11479 </span><p about="#mwt3">b</p>
11483 Parsoid: Merge double tds (T52603)
11488 |{{echo|{{!}} foo}}
11492 <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>
11497 Parsoid: Merge double tds in nested transclusion content (T52603)
11503 |{{echo|{{!}} foo}}
11507 <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}}]}'>
11509 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11515 ### <includeonly> and <noinclude> in attributes
11518 0. includeonly around the entire attribute
11520 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11522 <p><span id="v2">bar</span>
11527 1. includeonly in html attr key
11529 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11531 <p><span id="foo">bar</span>
11536 2. includeonly in html attr value
11538 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11539 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11541 <p><span id="v1">bar</span>
11542 <span id="v1">bar</span>
11547 3. includeonly in part of an attr value
11549 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11551 <p><span style="color:red;">bar</span>
11556 4. includeonly in table attributes
11580 ### Token Stream Patcher tests
11582 ### These tests won't always pass wt2wt and other modes because
11583 ### on serialization, the table will be output on a new line.
11584 ### For now, we are blacklisting them, and using this to test selser.
11588 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11590 parsoid=wt2html,wt2wt
11592 {{echo|}}{| width = '100%'
11596 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11597 <tbody><tr><td>foo</td></tr>
11601 ## We used to, but no longer wt2wt this test since the default serializer
11602 ## will normalize the include directives to serialize on their own line.
11603 ## Selser will take care of preserving formatting in scenarios where they
11604 ## intermingled with other wikitext.
11606 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11610 <includeonly>a</includeonly>{| {{{b}}}
11614 <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":""}]]}'>
11615 <tbody><tr><td>c</td></tr>
11620 Table wikitext syntax outside wiki-tables
11624 ! not a table heading
11627 | class="foo bar" | baz
11635 ! not a table heading
11638 | class="foo bar" | baz
11647 ### Testing parsing of templates where a template arg
11648 ### has the same name as the template itself.
11654 {{{quote|{{{1}}}}}}
11658 Templates: Template Name/Arg clash: 1. Use of positional param
11667 Templates: Template Name/Arg clash: 2. Use of named param
11669 {{quote|quote=foo}}
11676 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11685 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11689 Templates: 1. Simple use
11698 Templates: 2. Inside a block tag
11700 <div>{{echo|Foo}}</div>
11701 <blockquote>{{echo|Foo}}</blockquote>
11704 <blockquote>Foo</blockquote>
11714 Templates: P-wrapping: 1a. Templates on consecutive lines
11725 Templates: P-wrapping: 1b. Templates on consecutive lines
11739 Templates: P-wrapping: 1c. Templates on consecutive lines
11742 {{echo|bar}} <div>baz</div>
11755 Templates: P-wrapping: 1d. Template preceded by comment-only line
11764 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11768 Templates: Inline Text: 1. Multiple template uses
11770 {{echo|Foo}}bar{{echo|baz}}
11777 Templates: Inline Text: 2. Back-to-back template uses
11779 {{echo|Foo}}{{echo|bar}}
11786 Templates: Block Tags: 1. Multiple template uses
11788 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11790 <div>Foo</div><div>bar</div><div>baz</div>
11795 Templates: Block Tags: 2. Back-to-back template uses
11797 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11799 <div>Foo</div><div>bar</div>
11803 # This is an edge case relating to paragraph wrapping.
11805 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11810 <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
11815 Templates: Links: 1. Simple example
11817 {{echo|[[Foo|bar]]}}
11819 <p><a href="/wiki/Foo" title="Foo">bar</a>
11824 Templates: Links: 2. Generation of link href
11826 [[{{echo|Foo}}|bar]]
11828 <p><a href="/wiki/Foo" title="Foo">bar</a>
11833 Templates: Links: 3. Generation of part of a link href
11835 [[Fo{{echo|o}}|bar]]
11837 [[Foo{{echo|bar}}]]
11839 [[Foo{{echo|bar}}baz]]
11841 [[Foo{{echo|bar}}|bar]]
11843 [[:Foo{{echo|bar}}]]
11845 [[:Foo{{echo|bar}}|bar]]
11847 <p><a href="/wiki/Foo" title="Foo">bar</a>
11848 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11849 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11850 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11851 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11852 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11857 Templates: Links: 4. Multiple templates generating link href
11859 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11861 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11866 Templates: Links: 5. Generation of link text
11868 [[Foo|{{echo|bar}}]]
11870 <p><a href="/wiki/Foo" title="Foo">bar</a>
11875 Templates: Links: 5. Nested templates (only outermost template should be marked)
11877 {{echo|[[{{echo|Foo}}|bar]]}}
11879 <p><a href="/wiki/Foo" title="Foo">bar</a>
11884 Templates: HTML Tag: 1. Generation of HTML attr. key
11886 <div {{echo|style}}="color:red;">foo</div>
11888 <div style="color:red;">foo</div>
11893 Templates: HTML Tag: 2. Generation of HTML attr. value
11895 <div style={{echo|'color:red;'}}>foo</div>
11897 <div style="color:red;">foo</div>
11902 Templates: HTML Tag: 3. Generation of HTML attr key and value
11904 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11906 <div style="color:red;">foo</div>
11911 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11913 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11915 <div title="This is a long title with just one piece templated">foo</div>
11920 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11922 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11924 <div title="This is a long title with just one piece templated">foo</div>
11929 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11931 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11933 <div title="This is a long title with just one piece templated">foo</div>
11937 # SSS FIXME: While it is great we added support for all this,
11938 # do we want to make this part of the spec? Maybe we want to
11939 # deprecate this kind of usage in the future?
11941 Templates: HTML Tag: 7. Generation of partial attribute key string
11943 <div st{{echo|yle}}="color:red;">foo</div>
11945 <div style="color:red;">foo</div>
11950 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11952 <div {{echo|1=id="v1"}}>bar</div>
11954 <div id="v1">bar</div>
11959 Templates: HTML Tag: 9. Multiple template-generated attributes
11961 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11963 <div id="v1" title="foo">bar</div>
11968 Templates: Support for templates generating attributes and content
11970 {| {{mixed_attr_content_template}}
11975 <table style="color:red;" title="T48811">
11985 <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|}"]}'>
11994 1. Entities and nowikis inside templated attributes should be handled correctly
11996 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11998 <div style="background:#f9f9f9;">foo</div>
12001 <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>
12005 2. Entities and nowikis inside templated attributes should be handled correctly
12008 |{{table_attribs_3}}
12013 <td style="background:#f9f9f9;">Foo
12018 <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>
12023 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12026 |{{table_attribs_3}}
12031 <td style="background:#f9f9f9;">Foo
12035 <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}}]}'>
12036 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12042 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12045 | {{table_attribs_6}} hi
12050 <td style="background: red;"> hi
12055 <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>
12060 Templates: HTML Tables: 1. Generating start of a HTML table
12062 {{echo|<table><tr><td>foo</td>}}</tr></table>
12064 <table><tr><td>foo</td></tr></table>
12069 Templates: HTML Tables: 2a. Generating middle of a HTML table
12071 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12073 <table><tr><td>foo</td></tr></table>
12078 Templates: HTML Tables: 2b. Generating middle of a HTML table
12080 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12082 <table><tr><td>foo</td></tr></table>
12087 Templates: HTML Tables: 3. Generating end of a HTML table
12089 <table><tr>{{echo|<td>foo</td></tr></table>}}
12091 <table><tr><td>foo</td></tr></table>
12096 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12098 {{echo|<table>}}<tr><td>foo</td></tr></table>
12100 <table><tr><td>foo</td></tr></table>
12105 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12107 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12109 <table><tr><td>foo</td></tr></table>
12114 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12116 <table><tr>{{echo|<td>}}foo</td></tr></table>
12118 <table><tr><td>foo</td></tr></table>
12123 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12125 <table><tr><td>foo{{echo|</td>}}</tr></table>
12127 <table><tr><td>foo</td></tr></table>
12132 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12134 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12136 <table><tr><td>foo</td></tr></table>
12141 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12143 <table><tr><td>foo</td></tr>{{echo|</table>}}
12145 <table><tr><td>foo</td></tr></table>
12150 Templates: HTML Tables: 5. Proper fostering of categories from inside
12152 parsoid=wt2html,wt2wt
12154 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12155 <!--Two categories (Bug 50330)-->
12156 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12158 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12159 <!--Two categories (Bug 50330)-->
12160 <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>
12164 Templates: Wiki Tables: 1a. Fostering of entire template content
12172 <tr><td></td></tr></table>
12184 Templates: Wiki Tables: 1b. Fostering of entire template content
12197 <tr><td></td></tr></table>
12211 Templates: Wiki Tables: 2. Fostering of partial template content
12221 <tr><td></td></tr></table>
12234 Templates: Wiki Tables: 3. td-content via multiple templates
12237 {{echo|{{pipe}}a}}{{echo|b}}
12248 Templates: Wiki Tables: 4. Templated tags, no content
12254 <tr><td></td></tr></table>
12259 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12273 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12286 ## This test case is very specific to Parsoid's internals
12287 ## and is hence only tested for Parsoid's code. Parsoid uses
12288 ## a <meta> marker tag for <ref> tags and they are expanded
12289 ## much later. We are verifying that this <meta> tag usage
12290 ## doesn't prevent foster parenting.
12292 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12294 {{PartialTable}}<ref>foo</ref>
12299 <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">
12303 <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>
12307 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12317 <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{{!}}}"]}'>
12318 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12322 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12327 Templates: Lists: Multi-line list-items via templates
12329 *{{echo|a {{nonexistent|
12331 *{{echo|b {{nonexistent|
12334 <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>
12335 <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>
12340 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12342 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12344 <p><i>ab</i>c<i>d</i>e
12349 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12350 (PHP parser generates misnested html)
12352 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12354 <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>
12358 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12359 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12361 parsoid=wt2html,wt2wt
12363 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12365 <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>
12366 <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>
12367 <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>
12371 Templates: Ugly nesting: 4. Divs opened/closed across templates
12373 a<div>b{{echo|c</div>d}}e
12384 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12390 |{{echo|foo</table>}}
12394 <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|}"]}'>
12398 <td>foo</td></tr></tbody></table><span about="#mwt1">
12399 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12404 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12414 <td>1. {{echo|foo </table>}}</td>
12416 <td>2. {{echo|baz </table>}}</td>
12429 <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>"]}'>
12434 <td>1. foo </td></tr></tbody></table></td>
12436 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12437 </span><span about="#mwt2">
12438 </span><span about="#mwt2">
12439 </span><span about="#mwt2">abc</span><span about="#mwt2">
12440 </span><span about="#mwt2">
12441 </span><span about="#mwt2">
12442 </span><span about="#mwt2">
12443 </span><span about="#mwt2">
12444 </span><span about="#mwt2">
12445 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12446 </span><span about="#mwt2">
12451 Templates: Ugly templates: 3. newline-only template parameter
12460 # This looks like a bug: a single newline triggers p/br for some reason.
12462 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12471 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12472 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12474 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12480 <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
12481 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12485 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12486 # that are "identical" and generate nesting cycles in the algorithm
12488 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12490 {{echo|<table><tr><td><table>}}
12494 <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"}'>
12495 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12496 </table></td></tr></tbody></table>
12500 Templates: Parameters substituted at the top-level
12502 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12504 <p><i>who</i> me? <b>never!</b>
12507 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12511 Parser Functions: 1. Simple example
12520 Parser Functions: 2. Nested use (only outermost should be marked up)
12529 ### Pre-save transform tests
12532 pre-save transform: subst:
12538 This is a test template
12542 pre-save transform: normal template
12552 pre-save transform: nonexistent template
12556 {{thistemplatedoesnotexist}}
12558 {{thistemplatedoesnotexist}}
12562 pre-save transform: subst magic variables
12571 # This is bug 89, which I fixed. -- wtm
12573 pre-save transform: subst: templates with parameters
12577 {{subst:paramtest|param="something else"}}
12579 This is a test template with parameter "something else"
12583 Template:nowikitest
12585 <nowiki>'''not wiki'''</nowiki>
12589 pre-save transform: nowiki in subst (bug 1188)
12593 {{subst:nowikitest}}
12595 <nowiki>'''not wiki'''</nowiki>
12599 Template:commenttest
12601 This template has <!-- a comment --> in it.
12605 pre-save transform: comment in subst (bug 1936)
12609 {{subst:commenttest}}
12611 This template has <!-- a comment --> in it.
12615 pre-save transform: unclosed tag
12619 <nowiki>'''not wiki'''
12621 <nowiki>'''not wiki'''
12625 pre-save transform: mixed tag case
12629 <NOwiki>'''not wiki'''</noWIKI>
12631 <NOwiki>'''not wiki'''</noWIKI>
12635 pre-save transform: unclosed comment in <nowiki>
12639 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12641 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12644 # Leading @ in this template definition works around a limitation
12645 # in parsoid's parserTests which otherwise strips the <span> from the
12646 # result (confusing it for a template wrapper)
12650 @<span onmouseover="alert('crap')">Oh no</span>
12654 (confirming safety of fix for subst bug 1936)
12656 {{Template:dangerous}}
12658 <p>@<span>Oh no</span>
12663 pre-save transform: comment containing gallery (bug 5024)
12667 <!-- <gallery>data</gallery> -->
12669 <!-- <gallery>data</gallery> -->
12673 pre-save transform: comment containing extension
12677 <!-- <tag>data</tag> -->
12679 <!-- <tag>data</tag> -->
12683 pre-save transform: comment containing nowiki
12687 <!-- <nowiki>data</nowiki> -->
12689 <!-- <nowiki>data</nowiki> -->
12693 pre-save transform: <noinclude> in subst (bug 3298)
12703 pre-save transform: <onlyinclude> in subst (bug 3298)
12707 {{subst:Includes2}}
12715 {{<includeonly>subst:</includeonly>Includes}}
12719 Template:SafeSubstTest
12721 {{<includeonly>safesubst:</includeonly>Includes}}
12725 bug 22297: safesubst: works during PST
12729 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12735 bug 22297: safesubst: works during normal parse
12744 subst: does not work during normal parse
12748 <p>{{subst:Includes}}
12753 pre-save transform: context links ("pipe trick")
12757 [[Article (context)|]]
12760 [[Bar:Article (context)|]]
12761 [[:Bar:Article (context)|]]
12763 [[|Article (context)]]
12767 [[Article (context)|Article]]
12768 [[Bar:Article|Article]]
12769 [[:Bar:Article|Article]]
12770 [[Bar:Article (context)|Article]]
12771 [[:Bar:Article (context)|Article]]
12773 [[Article (context)]]
12774 [[Bar:X (Y) Z|X (Y) Z]]
12775 [[:Bar:X (Y) Z|X (Y) Z]]
12779 pre-save transform: context links ("pipe trick") with interwiki prefix
12783 [[interwiki:Article|]]
12784 [[:interwiki:Article|]]
12785 [[interwiki:Bar:Article|]]
12786 [[:interwiki:Bar:Article|]]
12788 [[interwiki:Article|Article]]
12789 [[:interwiki:Article|Article]]
12790 [[interwiki:Bar:Article|Bar:Article]]
12791 [[:interwiki:Bar:Article|Bar:Article]]
12795 pre-save transform: context links ("pipe trick") with parens in title
12797 pst title=[[Somearticle (context)]]
12801 [[Article (context)|Article]]
12805 pre-save transform: context links ("pipe trick") with comma in title
12807 pst title=[[Someplace, Somewhere]]
12810 [[Otherplace, Elsewhere|]]
12811 [[Otherplace, Elsewhere, Anywhere|]]
12813 [[Otherplace, Somewhere|Otherplace]]
12814 [[Otherplace, Elsewhere|Otherplace]]
12815 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12819 pre-save transform: context links ("pipe trick") with parens and comma
12821 pst title=[[Someplace (IGNORED), Somewhere]]
12824 [[Otherplace (place), Elsewhere|]]
12826 [[Otherplace, Somewhere|Otherplace]]
12827 [[Otherplace (place), Elsewhere|Otherplace]]
12831 pre-save transform: context links ("pipe trick") with comma and parens
12833 pst title=[[Who, me? (context)]]
12836 [[Me, Myself, and I (1937 song)|]]
12838 [[Yes, you. (context)|Yes, you.]]
12839 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12843 pre-save transform: context links ("pipe trick") with namespace
12845 pst title=[[Ns:Somearticle]]
12849 [[Ns:Article|Article]]
12853 pre-save transform: context links ("pipe trick") with namespace and parens
12855 pst title=[[Ns:Somearticle (context)]]
12859 [[Ns:Article (context)|Article]]
12863 pre-save transform: context links ("pipe trick") with namespace and comma
12865 pst title=[[Ns:Somearticle, Context, Whatever]]
12869 [[Ns:Article, Context, Whatever|Article]]
12873 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12875 pst title=[[Ns:Somearticle, Context (context)]]
12879 [[Ns:Article (context)|Article]]
12883 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12885 pst title=[[Ns:Somearticle (IGNORED), Context]]
12889 [[Ns:Article, Context|Article]]
12893 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12897 [[Article(context)|]]
12898 [[Bar:Article(context)|]]
12899 [[:Bar:Article(context)|]]
12900 [[|Article(context)]]
12904 [[Article(context)|Article]]
12905 [[Bar:Article(context)|Article]]
12906 [[:Bar:Article(context)|Article]]
12907 [[Article(context)]]
12908 [[Bar:X(Y)Z|X(Y)Z]]
12909 [[:Bar:X(Y)Z|X(Y)Z]]
12913 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12917 [[Article (context)|]]
12918 [[Bar:Article (context)|]]
12919 [[:Bar:Article (context)|]]
12920 [[|Article (context)]]
12924 [[Article (context)|Article]]
12925 [[Bar:Article (context)|Article]]
12926 [[:Bar:Article (context)|Article]]
12927 [[Article (context)]]
12928 [[Bar:X (Y) Z|X (Y) Z]]
12929 [[:Bar:X (Y) Z|X (Y) Z]]
12933 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12937 [[Article(context)|]]
12938 [[Bar:Article(context)|]]
12939 [[:Bar:Article(context)|]]
12940 [[|Article(context)]]
12944 [[Article(context)|Article]]
12945 [[Bar:Article(context)|Article]]
12946 [[:Bar:Article(context)|Article]]
12947 [[Article(context)]]
12948 [[Bar:X(Y)Z|X(Y)Z]]
12949 [[:Bar:X(Y)Z|X(Y)Z]]
12953 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12957 [[Article (context), context|]]
12958 [[Article (context),context|]]
12959 [[Bar:Article (context), context|]]
12960 [[Bar:Article (context),context|]]
12961 [[:Bar:Article (context), context|]]
12962 [[:Bar:Article (context),context|]]
12964 [[Article (context), context|Article]]
12965 [[Article (context),context|Article]]
12966 [[Bar:Article (context), context|Article]]
12967 [[Bar:Article (context),context|Article]]
12968 [[:Bar:Article (context), context|Article]]
12969 [[:Bar:Article (context),context|Article]]
12973 pre-save transform: trim trailing empty lines
12977 Empty lines are trimmed
12983 Empty lines are trimmed
12987 pre-save transform: Signature expansion
12992 * <noinclude>~~~</noinclude>
12993 * <includeonly>~~~</includeonly>
12994 * <onlyinclude>~~~</onlyinclude>
12996 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12997 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12998 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12999 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13004 pre-save transform: Signature expansion in nowiki tags (bug 93)
13010 <nowiki>~~~~</nowiki>
13012 <includeonly><nowiki>~~~~</nowiki></includeonly>
13014 <noinclude><nowiki>~~~~</nowiki></noinclude>
13016 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13018 {{subst:Foo}} shall be converted to FOO
13020 As well as inside noinclude/onlyinclude
13021 <noinclude>{{subst:Foo}}</noinclude>
13022 <onlyinclude>{{subst:Foo}}</onlyinclude>
13024 But not inside includeonly
13025 <includeonly>{{subst:Foo}}</includeonly>
13029 <nowiki>~~~~</nowiki>
13031 <includeonly><nowiki>~~~~</nowiki></includeonly>
13033 <noinclude><nowiki>~~~~</nowiki></noinclude>
13035 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13037 FOO shall be converted to FOO
13039 As well as inside noinclude/onlyinclude
13040 <noinclude>FOO</noinclude>
13041 <onlyinclude>FOO</onlyinclude>
13043 But not inside includeonly
13044 <includeonly>{{subst:Foo}}</includeonly>
13048 Parsoid: Recognize nowiki with trailing space in tags
13052 <nowiki ><div>[[foo]]</nowiki >
13060 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13067 Parsoid: Recognize nowiki with odd capitalization
13071 <noWikI ><div>[[foo]]</Nowiki >
13073 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13078 Parsoid: Escape nowiki with trailing space in tags
13082 <p><nowiki > foo </nowiki ></p>
13083 <p>a<nowiki />b</p>
13084 <p>c<nowiki/ >d</p>
13086 <nowiki > foo </nowiki >
13094 Parsoid: Escape weird noWikI capitalizations
13098 <p><noWikI > foo </NoWikI ></p>
13100 <noWikI > foo </NoWikI >
13104 ### Message transform tests
13107 message transform: magic variables
13117 message transform: should not transform wiki markup
13127 message transform: <noinclude> in transcluded template (bug 4926)
13137 message transform: <onlyinclude> in transcluded template (bug 4926)
13147 {{#special:}} page name, known
13151 {{#special:Recentchanges}}
13153 Special:RecentChanges
13157 {{#special:}} page name with subpage, known
13161 {{#special:Recentchanges/param}}
13163 Special:RecentChanges/param
13167 {{#special:}} page name, unknown
13171 {{#special:foobar nonexistent}}
13173 Special:Foobar nonexistent
13177 {{#speciale:}} page name, known
13181 {{#speciale:Recentchanges}}
13183 Special:RecentChanges
13187 {{#speciale:}} page name with subpage, known
13191 {{#speciale:Recentchanges/param}}
13193 Special:RecentChanges/param
13197 {{#speciale:}} page name, unknown
13201 {{#speciale:foobar nonexistent}}
13203 Special:Foobar_nonexistent
13209 ### For Parsoid-specific tests, see
13210 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13215 parsoid=wt2html,wt2wt,html2html
13217 [[Image: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 Simple image (using File: namespace, now canonical)
13228 [[File:Foobar.jpg]]
13230 <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>
13233 <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>
13237 Right-aligned image
13239 [[File:Foobar.jpg|right]]
13241 <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>
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></figure>
13250 [[File:Foobar.jpg|right|Caption text]]
13252 <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>
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 text</figcaption></figure>
13259 Image with caption, bug 53312 #1
13261 [[File:Foobar.jpg|right|Caption page stuff]]
13263 <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>
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 stuff</figcaption></figure>
13270 Image with caption, bug 53312 #2
13272 [[File:Foobar.jpg|right|Caption page=]]
13274 <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>
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=</figcaption></figure>
13281 Image with caption, bug 53312 #3
13283 [[File:Foobar.jpg|right|Caption page=stuff]]
13285 <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>
13288 <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>
13292 Allow empty links in image captions (Bug 60753)
13296 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13301 <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>
13304 <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>
13306 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13307 </figcaption></figure>
13311 Titles in unlinked images (T23454)
13313 [[File:Foobar.jpg|link=|stuff]]
13315 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13320 Link with empty target
13329 Image with link trail
13331 Linktrails should not work for images: [[File:Foobar.jpg]]s
13333 <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
13336 <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>
13340 Image with empty attribute
13342 parsoid=wt2html,wt2wt,html2html
13344 [[File:Foobar.jpg|right||Caption text]]
13346 <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>
13349 <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>
13353 1. Block image with individual attributes from templates
13355 [[File:Foobar.jpg|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="#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>
13364 2. Block Image with individual attributes from templates
13366 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13368 <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>
13371 <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>
13375 3. Inline image with individual attributes from templates
13377 [[File:Foobar.jpg|{{echo|50px}}]]
13379 <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>
13382 <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>
13385 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13386 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13388 Image with multiple attributes from the same template
13390 [[File:Foobar.jpg|{{image_attribs}}]]
13392 <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>
13395 <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>
13399 Image with link tails
13403 123[[File:Foobar.jpg]]456
13404 123[[File:Foobar.jpg|right]]456
13405 123[[File:Foobar.jpg|thumb]]456
13407 <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
13409 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
13410 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
13413 <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>
13415 <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>
13417 <div class="thumb tright">
13418 <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>
13419 <div class="thumbcaption">
13420 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13426 <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>
13427 <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>
13428 <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>
13432 Image with multiple captions -- only last one is accepted
13434 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13436 <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>
13439 <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>
13443 Image with multiple widths -- use last
13445 [[File:Foobar.jpg|200px|300px|caption]]
13447 <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>
13450 <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>
13454 Image with multiple alignments -- use first (bug 48664)
13458 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13460 [[File:Foobar.jpg|middle|text-top|caption]]
13462 <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>
13463 <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>
13466 <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>
13467 <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>
13471 Image with width attribute at different positions
13473 [[File:Foobar.jpg|200px|right|Caption]]
13474 [[File:Foobar.jpg|right|200px|Caption]]
13475 [[File:Foobar.jpg|right|Caption|200px]]
13477 <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>
13478 <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>
13479 <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>
13482 <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>
13483 <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>
13484 <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>
13487 # a sad bit of backward-compatibility
13489 Image with size specified with pxpx (bug 13500, 51628)
13491 parsoid=wt2html,wt2wt,html2html
13493 [[File:Foobar.jpg|20pxpx]]
13494 [[File:Foobar.jpg|200x20pxpx]]
13496 <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>
13497 <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>
13500 <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>
13504 Image with link parameter, wiki target
13506 [[File:Foobar.jpg|link=Main Page]]
13508 <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>
13511 <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>
13514 # parsoid bug 49293 (part 1)
13516 Image with link parameter, URL target
13518 [[File:Foobar.jpg|link=http://example.com/]]
13520 <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>
13523 <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>
13526 # parsoid bug 49293 (part 2)
13528 Image with link parameter, protocol-less URL target
13530 [[File:Foobar.jpg|link=//example.com/]]
13532 <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>
13535 <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>
13539 Escaping non-block captions (T107435)
13542 "modes": ["wt2wt"],
13544 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13548 [[Image:Foobar.jpg|caption]]
13550 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13553 # wgExternalLinkTarget not supported by Parsoid
13555 Image with link parameter, wgExternalLinkTarget
13557 [[Image:foobar.jpg|link=http://example.com/]]
13559 wgExternalLinkTarget='foobar'
13561 <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>
13566 Image with link parameter, wgNoFollowLinks set to false
13568 [[Image:foobar.jpg|link=http://example.com/]]
13570 wgNoFollowLinks=false
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>
13577 Image with link parameter, wgNoFollowDomainExceptions
13579 [[Image:foobar.jpg|link=http://example.com/]]
13581 wgNoFollowDomainExceptions='example.com'
13583 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13587 # wgExternalLinkTarget not supported by Parsoid
13589 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13591 [[Image:foobar.jpg|link=http://example.com/|Title]]
13593 wgExternalLinkTarget='foobar'
13595 <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>
13600 Image with empty link parameter
13602 [[File:Foobar.jpg|link=]]
13604 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13607 <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>
13611 Image with link parameter (wiki target) and unnamed parameter
13613 [[File:Foobar.jpg|link=Main_Page|Title]]
13615 <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>
13618 <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>
13622 Image with link parameter (URL target) and unnamed parameter
13624 [[File:Foobar.jpg|link=http://example.com/|Title]]
13626 <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>
13629 <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>
13633 Thumbnail image with link parameter
13636 parsoid=wt2html,wt2wt,html2html
13638 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13640 <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>
13643 <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>
13647 Manually-specified thumbnail image
13651 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13653 <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>
13656 <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>
13660 Manually-specified thumbnail image with explicit link to wiki page
13663 parsoid=wt2html,wt2wt,html2html
13665 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13667 <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>
13670 <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>
13674 Manually-specified thumbnail image with explicit link to url
13677 parsoid=wt2html,wt2wt,html2html
13679 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13681 <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>
13684 <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>
13688 Manually-specified thumbnail image with explicit no link
13691 parsoid=wt2html,wt2wt,html2html
13693 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13695 <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>
13698 <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>
13702 Manually-specified thumbnail image with explicit link and alt text
13705 parsoid=wt2html,wt2wt,html2html
13707 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13709 <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>
13712 <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>
13716 Image with frame and link
13718 parsoid=wt2html,wt2wt,html2html
13720 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13722 <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>
13725 <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>
13729 Image with frame and link and explicit alt
13731 parsoid=wt2html,wt2wt,html2html
13733 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13735 <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>
13738 <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>
13742 Image with wiki markup in implicit alt
13744 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13746 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13748 <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>
13749 </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>
13752 <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>
13754 <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>
13758 Alt image option should handle most kinds of wikitext without barfing
13760 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13762 <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>
13765 <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>
13768 ###################
13769 # Conflicting image format options.
13770 # First option specified should 'win'.
13771 # All three cases in each test should be identical.
13774 Image with 'frameless' first.
13776 parsoid=wt2html,wt2wt,html2html
13778 [[File:Foobar.jpg|frameless|caption]]
13780 [[File:Foobar.jpg|frameless|frame|caption]]
13782 [[File:Foobar.jpg|frameless|thumb|caption]]
13784 <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>
13785 </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>
13786 </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>
13789 <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>
13790 <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>
13791 <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>
13795 Image with 'frame' first.
13797 parsoid=wt2html,wt2wt,html2html
13799 [[File:Foobar.jpg|frame|caption]]
13800 [[File:Foobar.jpg|frame|frameless|caption]]
13801 [[File:Foobar.jpg|frame|thumb|caption]]
13803 <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>
13804 <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>
13805 <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>
13808 <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>
13809 <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>
13810 <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>
13814 Image with 'thumb' first.
13816 parsoid=wt2html,wt2wt,html2html
13818 [[File:Foobar.jpg|thumb|caption]]
13819 [[File:Foobar.jpg|thumb|frameless|caption]]
13820 [[File:Foobar.jpg|thumb|frame|caption]]
13822 <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>
13823 <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>
13824 <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>
13827 <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>
13828 <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>
13829 <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>
13832 ###################
13834 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13835 # and https://phabricator.wikimedia.org/T64258
13836 # Foobar has actual size of 1941x220
13837 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13838 # a scalable format.
13839 # 2. Framed images always ignore size options; always render at default size.
13840 # 3. "Unspecified format" and border are the only types which can be
13844 Image: "unspecified format" and border enlarge
13846 parsoid=wt2html,wt2wt,html2html
13848 [[File:Foobar.jpg|2000px]]
13850 [[File:Foobar.jpg|border|2000px]]
13852 <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>
13853 </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>
13856 <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>
13857 <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>
13861 Image: "unspecified format" and border reduce
13863 parsoid=wt2html,wt2wt,html2html
13865 [[File:Foobar.jpg|1000px]]
13867 [[File:Foobar.jpg|border|1000px]]
13869 <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>
13870 </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>
13873 <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>
13874 <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>
13878 Image: thumbs reduce
13880 parsoid=wt2html,wt2wt,html2html
13882 [[File:Foobar.jpg|thumb|50px]]
13884 <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>
13887 <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>
13891 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13893 parsoid=wt2html,wt2wt,html2html
13895 [[File:Foobar.jpg|thumb|2000px]]
13897 [[File:Foobar.svg|thumb|2000px]]
13899 <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>
13900 <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>
13903 <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>
13904 <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>
13908 Image: frameless can reduce in size
13910 parsoid=wt2html,wt2wt,html2html
13912 [[File:Foobar.jpg|frameless|50px]]
13914 <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>
13917 <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>
13921 Image: bitmap frameless can't be enlarged past original size, but vector can
13923 parsoid=wt2html,wt2wt,html2html
13925 [[File:Foobar.jpg|frameless|2000px]]
13927 [[File:Foobar.svg|frameless|2000px]]
13929 <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>
13930 </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>
13933 <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>
13934 <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>
13938 Image: framed images are always unscaled.
13940 parsoid=wt2html,wt2wt,html2html
13942 [[File:Foobar.jpg|frame]]
13944 [[File:Foobar.jpg|frame|50px]]
13946 [[File:Foobar.jpg|frame|50x50px]]
13948 [[File:Foobar.jpg|frame|2000px]]
13950 <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>
13951 <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>
13952 <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>
13953 <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>
13956 <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>
13957 <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>
13958 <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>
13959 <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>
13962 ###################
13965 Link to image page- image page normally doesn't exists, hence edit link
13966 Add test with existing image page
13967 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13971 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13976 bug 18784 Link to non-existent image page with caption should use caption as link text
13978 [[:Image:test|caption]]
13980 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13985 Frameless image caption with a free URL
13987 [[File:Foobar.jpg|http://example.com]]
13989 <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>
13992 <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>
13996 Thumbnail image caption with a free URL
14000 [[File:Foobar.jpg|thumb|http://example.com]]
14002 <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>
14005 <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>
14009 Thumbnail image caption with a free URL and explicit alt
14012 parsoid=wt2html,wt2wt,html2html
14014 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14016 <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>
14019 <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>
14023 SVG thumbnails with no language set
14026 [[File:Foobar.svg|thumb|caption]]
14028 <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>
14031 <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>
14035 SVG thumbnails with language de
14037 parsoid=wt2html,wt2wt,html2html
14039 [[File:Foobar.svg|thumb|caption|lang=de]]
14041 <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>
14044 <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>
14048 SVG thumbnails with invalid language code
14050 parsoid=wt2html,wt2wt,html2html
14052 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14054 <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>
14057 <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>
14061 BUG 1887: A ISBN with a thumbnail
14063 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
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><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</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><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
14072 BUG 1887: A RFC with a thumbnail
14074 [[File:Foobar.jpg|thumb|This is RFC 12354]]
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>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</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>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
14083 BUG 1887: A mailto link with a thumbnail
14085 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14087 <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>
14090 <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>
14093 # Pending resolution to bug 368
14095 BUG 648: Frameless image caption with a link
14097 [[File:Foobar.jpg|text with a [[link]] in it]]
14099 <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>
14102 <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>
14106 BUG 648: Frameless image caption with a link (suffix)
14108 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14110 <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>
14113 <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>
14117 BUG 648: Frameless image caption with an interwiki link
14119 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14121 <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>
14124 <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>
14128 BUG 648: Frameless image caption with a piped interwiki link
14130 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14132 <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>
14135 <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>
14139 T107474: Frameless image caption with <nowiki>
14141 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14143 <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>
14147 Escape HTML special chars in image alt text
14149 [[File:Foobar.jpg|& < > "]]
14151 <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>
14154 <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>
14158 Entities in file name and attributes
14160 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14162 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14165 <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>
14169 BUG 499: Alt text should have Ӓ, not &1234;
14171 [[File:Foobar.jpg|♀]]
14173 <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>
14176 <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>
14180 Broken image caption with link
14182 parsoid=wt2html,wt2wt,html2html
14184 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14186 <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.
14189 <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>
14193 Image caption containing another image
14195 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14197 <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>
14200 <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>
14204 Image: caption containing a newline
14206 [[File:Foobar.jpg|This
14209 <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>
14212 <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>
14216 Image: caption containing leading space
14217 (The leading space should not trigger nowiki escaping in wt2wt mode)
14219 [[File:Foobar.jpg|thumb| bar]]
14221 <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>
14224 <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>
14228 Image: caption containing a table
14230 parsoid=wt2html,wt2wt,html2html
14232 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14238 and some more text.]]
14240 <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>
14243 <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
14246 <tr><th>Foo </th><th>Bar</th></tr>
14249 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14253 Bug 3090: External links other than http: in image captions
14255 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14257 <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>
14260 <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>
14266 parsoid=wt2html,wt2wt,html2html
14268 [[Image:foobar.jpg|a|class=b]]
14270 <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>
14273 <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>
14277 Localized image handling (1).
14279 parsoid=wt2html,wt2wt,html2html
14282 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14284 <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>
14287 <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>
14291 Localized image handling (2).
14294 parsoid=wt2html,wt2wt,html2html
14297 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14299 <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>
14302 <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>
14306 Localized image handling (3).
14311 <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>
14313 [[File:Foobar.jpg|بندانگشتی]]
14317 "border", "frameless" and "class" attributes on an image.
14320 parsoid=wt2html,wt2wt,html2html
14322 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14324 <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>
14327 <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>
14330 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14332 Invalid image attributes (bug 62500)
14335 parsoid=wt2html,wt2wt,html2html
14337 [[File:Foobar.jpg|thumb|float|left|caption]]
14339 [[File:Foobar.jpg|thumb|righ|caption]]
14341 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14343 <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>
14344 <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>
14345 <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>
14348 <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>
14349 <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>
14350 <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>
14356 #REDIRECT [[File:Barfoo.jpg]]
14359 # FIXME: Parsoid should run this test -- but we'd need to teach the
14360 # mockAPI about the redirected Barfoo.jpg image.
14364 [[Image:Barfoo.jpg]]
14366 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14371 Missing image with uploads disabled
14375 [[File:Foobaz.jpg]]
14377 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14380 <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>
14383 # Parsoid-specific testing for images
14384 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14385 # Currently imperfect due to a flaw in the Parsoid testrunner
14387 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14391 Parsoid-specific image handling - simple image with size and middle alignment
14393 [[File: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, middle alignment,
14400 non-standard namespace alias
14402 parsoid=wt2wt,wt2html,html2html
14404 [[Image:Foobar.jpg|middle|50px]]
14406 <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>
14410 Parsoid-specific image handling - simple image with size and middle alignment
14413 [[File:Foobar.jpg|50px|middle]]
14415 <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>
14419 Parsoid-specific image handling - simple image with size and middle alignment
14420 and non-standard namespace name
14422 parsoid=wt2html,wt2wt,html2html
14424 [[Image:Foobar.jpg|50px|middle]]
14426 <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>
14430 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14432 [[File:Foobar.jpg|500x10px|baseline|caption]]
14434 <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>
14438 Parsoid-specific image handling - simple image with border and size spec
14440 [[File:Foobar.jpg|50px|border|caption]]
14442 <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>
14446 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14448 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14450 <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>
14454 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14457 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14459 <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>
14463 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14465 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14467 <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>
14471 Parsoid-specific image handling - thumbnail with specific size, halign,
14472 valign, and caption (existing content)
14474 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14476 <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>
14480 Parsoid-specific image handling - framed image with specific size and caption
14483 parsoid=wt2html,wt2wt,html2html
14485 [[File:Foobar.jpg|frame|500x50px|caption]]
14487 <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>
14491 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14494 parsoid=wt2html,wt2wt,html2html
14496 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14498 <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>
14502 Parsoid-specific image handling - frameless image with specific size, border, and caption
14504 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14506 <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>
14510 Parsoid-specific image handling - simple image with a formatted caption
14512 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14514 <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>
14518 Parsoid-specific image handling - caption with a template in it
14520 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14522 <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>
14526 Parsoid-specific image handling - caption with unbalanced tags in it
14528 parsoid=wt2html,wt2wt,html2html
14531 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14535 <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>
14540 Parsoid-specific image handling - empty caption (1)
14542 parsoid=wt2html,wt2wt
14544 [[File:Foobar.jpg|thumb|]]
14546 <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>
14549 # empty captions don't get serialized unless we're in the "round trip" case
14551 Parsoid-specific image handling - empty caption (2)
14555 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14556 <a href="./File:Foobar.jpg">
14557 <img resource="./File:Foobar.jpg"
14558 src="//example.com/images/3/3a/Foobar.jpg"
14559 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14560 height="25" width="220"/>
14562 <figcaption></figcaption>
14565 [[File:Foobar.jpg|thumb]]
14569 Parsoid-specific image handling - whitespace caption
14571 [[File:Foobar.jpg|thumb| ]]
14573 <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>
14577 Parsoid-specific image handling - lang option
14580 [[File:Foobar.svg|lang=de|caption]]
14584 <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>
14588 ## Edge case bugs in Parsoid from T93580
14590 T93580: 1. Templated <ref> inside block images
14592 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14596 <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>
14598 <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>
14602 T93580: 2. <ref> inside inline images
14604 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14608 <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>
14610 <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>
14614 T93580: 3. Templated <ref> inside inline images
14616 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14620 <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>
14622 <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>
14629 Subpage test/subpage
14637 subpage title=[[Subpage test]]
14641 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14646 Subpage noslash link
14648 subpage title=[[Subpage test]]
14652 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14657 Subpage test/1/2/subpage
14663 Relative subpage noslash link
14665 parsoid=wt2wt,wt2html,html2html
14666 subpage title=[[Subpage test/1/2/3/4]]
14672 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14673 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14676 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14677 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14681 Parsoid: dot-slash prefixed wikilinks
14691 </p><p>[[././baz/]]
14696 </p><p>[[././baz/]]
14701 Render invalid page names as plain text (bug 51090)
14714 [[{{echo|./../foo}}|bar]]
14715 [[{{echo|foo/.}}|bar]]
14716 [[{{echo|foo/..}}|bar]]
14717 [[{{echo|foo~~~~bar}}]]
14718 [[{{echo|foo>bar}}]]
14719 [[{{echo|foo././bar}}]]
14720 [[{{echo|foo{bar}}]]
14721 [[{{echo|foo}bar}}]]
14722 [[{{echo|foo[bar}}]]
14723 [[{{echo|foo]bar}}]]
14724 [[{{echo|foo<bar}}]]
14726 <p>[[./../foo|bar]]
14736 </p><p>[[./../foo|bar]]
14749 <p>[[./../foo|bar]]
14760 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14761 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14762 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14763 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14764 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14765 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14766 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14767 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14768 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14769 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14770 [[<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>
14778 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14783 BUG 561: {{/Subpage}}
14785 subpage title=[[Page]]
14789 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14797 Category:MediaWiki User's Guide
14805 [[:Category:MediaWiki User's Guide]]
14807 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14816 [[Category:MediaWiki User's Guide]]
14818 cat=MediaWiki_User's_Guide sort=
14820 <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"}}'/>
14824 PAGESINCATEGORY invalid title fatal (r33546 fix)
14826 {{PAGESINCATEGORY:<bogus>}}
14833 Category with different sort key
14837 [[Category:MediaWiki User's Guide|Foo]]
14839 cat=MediaWiki_User's_Guide sort=Foo
14841 <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"}}'/>
14845 Category with identical sort key
14849 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14851 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14853 <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"}}'/>
14857 Category with empty sort key
14862 [[Category:MediaWiki User's Guide|]]
14864 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14868 Category with empty sort key and parentheses
14873 [[Category:Foo (bar)|]]
14875 [[Category:Foo (bar)|Foo]]
14879 Category with link tail
14884 123[[Category:Foo]]456
14886 123[[Category:Foo]]456
14890 Category with template
14895 [[Category:{{echo|Foo}}]]
14897 [[Category:{{echo|Foo}}]]
14901 Category with template in sort key
14906 [[Category:Foo|{{echo|Bar}}]]
14908 [[Category:Foo|{{echo|Bar}}]]
14912 Category with template in sort key and title
14917 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14919 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14922 ## We used to, but no longer wt2wt this test since the default serializer
14923 ## will normalize all categories to serialize on their own line.
14924 ## This wikitext usage is going to be fairly uncommon in production and
14925 ## selser will take care of preserving formatting in those scenarios.
14927 Category / paragraph interactions
14931 Foo [[Category:Baz]] Bar
14933 Foo [[Category:Baz]]
14941 [[Category:Baz]] Bar
14954 {{echo|[[Category:Baz]]}}
14967 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14968 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14969 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14970 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14971 <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>
14972 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14975 ## We used to, but no longer wt2wt this test since the default serializer
14976 ## will normalize all categories to serialize on their own line.
14977 ## This wikitext usage is going to be fairly uncommon in production and
14978 ## selser will take care of preserving formatting in those scenarios.
14980 ## The whitespace on the empty line is part of the test. Please do not delete
14982 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14988 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14990 {{echo|[[Category:Foo]] and so should this!}}
14992 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14997 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14999 <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>
15002 ## Parsoid will not try to wt2wt this while preserving newlines because
15003 ## it suppresses excess newlines within list items -- and we don't want to
15004 ## introduce a special case just for categories, which is, in reality somewhat
15005 ## odd behavior -- categories are unlikely to be used in list items like this
15006 ## in top-level pages and are only likely to show up in template-generated
15007 ## list items where this RT-ing is a non-issue.
15009 ## The whitespace on the empty line is part of the test. Please do not delete
15011 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15017 [[Category:Foo]] and this should be part of the same list item
15020 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15022 <ul><li>This and this should be part of the same list item</li>
15023 <li>So should this and this should be part of the same list item</li></ul>
15026 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15027 <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>
15031 ## Newlines and categories that follow the last item of a list
15032 ## are treated differently because this (list followed by categories)
15033 ## is an extremely common pattern on wikis.
15035 3. Categories and newlines: newline suppression for last list item should RT properly
15048 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15050 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15051 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15055 4. Categories and newlines: newline suppression for last list item should RT properly
15063 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15065 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15068 ## only wt2html for this to make sure the algo only applies to the rightmost path
15070 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15083 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15085 <ul><li> d</li></ul></li></ul>
15086 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15089 ## We used to, but no longer wt2wt this test since the default serializer
15090 ## will normalize all categories to serialize on their own line.
15091 ## This wikitext usage is going to be fairly uncommon in production and
15092 ## selser will take care of preserving formatting in those scenarios.
15094 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15098 * a [[Category:Foo]]
15100 <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>
15103 # This test also demonstrates because of newline+category tunneling
15104 # through the list hander, template wrapping doesn't expand to the
15105 # containing list when the list item swallows the category.
15107 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15112 <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
15113 </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>
15117 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15121 {{echo|[[Category:Foo]]
15125 <ul><li> a</li></ul>
15127 <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">
15128 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15129 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15133 Category links with multiple namespaces
15135 [[Category:Project:Foo]]
15137 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15141 Parsoid: Serialize link to category page with colon escape
15147 [[:Category:Foo|Bar]]
15150 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15151 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15155 # We used to, but no longer wt2wt this test since the default serializer
15156 # will normalize all categories to serialize on their own line.
15157 # This wikitext usage is going to be fairly uncommon in production and
15158 # selser will take care of preventing whitespace insertion if this
15159 # occurs in an article.
15161 # html2html disabled for the same reason (whitespace insertion between
15164 # html2wt disabled because it localizes the "Category" namespace.
15166 Link prefix/suffixes aren't applied to category links
15176 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15180 Parsoid: Serialize link to file page with colon escape
15186 [[:File:Foo.png|Bar]]
15189 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15190 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15195 Parsoid: Serialize a genuine category link without colon escape
15200 [[Category:Foo|Bar]]
15202 <link rel="mw:PageProp/Category" href="./Category:Foo">
15203 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15207 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15211 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15213 [[Category:Toxine bactérienne]]
15217 Parsoid: Defaultsort
15219 {{DEFAULTSORT:Foo}}
15221 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15225 Parsoid: Defaultsort (template-generated)
15227 {{{{echo|DEFAULTSORT}}:Foo}}
15229 <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}}]}'/>
15233 ### Inter-language links
15236 Interlanguage links
15244 es:Alimento fr:Nourriture zh:食品
15246 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15247 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15248 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15252 Duplicate interlanguage links (bug 24502)
15263 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15264 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15265 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15266 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15273 Basic section headings
15280 ===Smaller headline===
15283 <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>
15286 <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>
15289 <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>
15295 Section headings with TOC
15298 === Subheadline 1 ===
15299 ===== Skipping a level =====
15300 ====== Skipping a level ======
15304 ===Another headline===
15306 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15308 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15310 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15312 <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>
15314 <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>
15321 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15323 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15329 <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>
15330 <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>
15331 <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>
15332 <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>
15333 <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>
15336 <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>
15341 TOC anchors don't collide
15349 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15351 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15352 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15353 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15354 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15358 <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>
15359 <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>
15360 <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>
15361 <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>
15365 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15367 Handling of sections up to level 6 and beyond
15370 == Level 2 Heading==
15371 === Level 3 Heading===
15372 ==== Level 4 Heading====
15373 ===== Level 5 Heading=====
15374 ====== Level 6 Heading======
15375 ======= Level 7 Heading=======
15376 ======== Level 8 Heading========
15377 ========= Level 9 Heading=========
15378 ========== Level 10 Heading==========
15380 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15382 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15384 <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>
15386 <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>
15388 <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>
15390 <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>
15392 <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>
15393 <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>
15394 <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>
15395 <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>
15396 <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>
15410 <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>
15411 <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>
15412 <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>
15413 <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>
15414 <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>
15415 <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>
15416 <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>
15417 <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>
15418 <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>
15419 <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>
15424 TOC regression (T11764)
15428 ==== title 1.1.1 ====
15433 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15435 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15437 <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>
15439 <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>
15442 <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>
15445 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15447 <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>
15453 <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>
15454 <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>
15455 <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>
15456 <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>
15457 <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>
15458 <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>
15463 TOC for heading containing <span id="..."></span> (T96153)
15466 ==<span id="old-anchor"></span>New title==
15468 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15470 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15474 <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>
15479 TOC with wgMaxTocLevel=3 (bug 6204)
15485 ==== title 1.1.1 ====
15490 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15492 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15494 <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>
15495 <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>
15498 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15500 <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>
15506 <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>
15507 <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>
15508 <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>
15509 <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>
15510 <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>
15511 <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>
15516 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15522 ====Section 1.1.1====
15523 ====Section 1.1.1.1====
15526 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15528 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15530 <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>
15533 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15537 <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>
15538 <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>
15539 <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>
15540 <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>
15541 <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>
15547 Resolving duplicate section names
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>
15558 Resolving duplicate section names with differing case (bug 10721)
15563 <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>
15564 <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>
15576 Template with sections, __NOTOC__
15583 <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>
15584 <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>
15585 <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>
15586 <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>
15591 __NOEDITSECTION__ keyword
15597 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15598 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15603 Link inside a section heading
15605 ==Section with a [[Main Page|link]] in it==
15607 <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>
15612 TOC regression (T14077)
15619 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15621 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15623 <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>
15626 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15630 <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>
15631 <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>
15632 <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>
15637 BUG 1219 URL next to image (good)
15639 http://example.com [[File:Foobar.jpg]]
15641 <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>
15644 <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>
15648 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15651 The line above must have a trailing space!
15654 But just in case it doesn't...
15656 <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>
15657 <p>The line above must have a trailing space!
15659 <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>
15660 <p>But just in case it doesn't...
15665 Header with special characters (bug 25462)
15667 The tooltips shall not show entities to the user (ie. be double escaped)
15684 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15686 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15688 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15689 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15690 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15691 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15692 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15696 <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>
15699 <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>
15702 <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>
15705 <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>
15708 <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>
15714 Header with space, plus and underscore as entity
15716 Id should not contain + for spaces
15718 == Space between Text ==
15721 == Space-Entity between Text ==
15724 == Plus+between+Text ==
15727 == Plus-Entity+between+Text ==
15730 == Underscore_between_Text ==
15733 == Underscore-Entity_between_Text ==
15736 [[#Space between Text]]
15737 [[#Space-Entity between Text]]
15738 [[#Plus+between+Text]]
15739 [[#Plus-Entity+between+Text]]
15740 [[#Underscore_between_Text]]
15741 [[#Underscore-Entity_between_Text]]
15743 <p>Id should not contain + for spaces
15745 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15747 <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>
15748 <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>
15749 <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>
15750 <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>
15751 <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>
15752 <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>
15756 <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>
15759 <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>
15762 <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>
15765 <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>
15768 <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>
15771 <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>
15773 </p><p><a href="#Space_between_Text">#Space between Text</a>
15774 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15775 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15776 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15777 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15778 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15783 Headers with excess '=' characters
15784 (Are similar tests necessary beyond the 1st level?)
15788 =''italic'' heading==
15789 ==''italic'' heading=
15791 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15793 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15794 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15795 <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>
15796 <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>
15800 <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>
15801 <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>
15802 <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>
15803 <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>
15808 HTML headers vs TOC (bug 23393)
15809 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15821 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15823 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15825 <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>
15826 <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>
15829 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15831 <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>
15832 <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>
15838 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15839 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15840 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15841 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15842 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15843 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15848 Single-line or multiline-comments can follow headings
15850 parsoid=wt2html,wt2wt
15858 <h2><span class="mw-headline" id="foo">foo</span></h2>
15859 <h2><span class="mw-headline" id="bar">bar</span></h2>
15860 <h2><span class="mw-headline" id="baz">baz</span></h2>
15865 BUG 1219 URL next to image (broken)
15867 http://example.com[[File:Foobar.jpg]]
15869 <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>
15872 <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>
15876 Bug 1186 news: in the middle of text
15878 http://en.wikinews.org/wiki/Wikinews:Workplace
15880 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15886 Namespaced link must have a title
15895 Namespaced link must have a title (bad fragment version)
15897 [[Project:#fragment]]
15899 <p>[[Project:#fragment]]
15905 ### HTML tags and HTML attributes
15909 div with no attributes
15911 <div>HTML rocks</div>
15913 <div>HTML rocks</div>
15918 div with double-quoted attribute
15920 <div id="rock">HTML rocks</div>
15922 <div id="rock">HTML rocks</div>
15927 div with single-quoted attribute
15929 <div id='rock'>HTML rocks</div>
15931 <div id="rock">HTML rocks</div>
15936 div with unquoted attribute
15938 <div id=rock>HTML rocks</div>
15940 <div id="rock">HTML rocks</div>
15945 div with illegal double attributes
15947 <div id="a" id="b">HTML rocks</div>
15949 <div id="b">HTML rocks</div>
15954 div with empty attribute value, space before equals
15956 parsoid=wt2html,html2html
15958 <div class =>HTML rocks</div>
15960 <div class="">HTML rocks</div>
15963 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15967 div with multiple empty attribute values
15969 parsoid=wt2html,html2html
15971 <div id= title=>HTML rocks</div>
15973 <div id="title.3D">HTML rocks</div>
15976 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15980 table with multiple empty attribute values
15982 parsoid=wt2html,html2html
15988 <table title="id=">
15994 <table title="id=">
15995 <tbody><tr><td> hi</td></tr>
16000 div with braces in attribute value
16002 <div title="{}">Foo</div>
16004 <div title="{}">Foo</div>
16007 <div title="{}">Foo</div>
16011 div with empty attribute value, no space before equals
16013 parsoid=wt2html,html2html
16015 <div class=>HTML rocks</div>
16017 <div class="">HTML rocks</div>
16020 <div class="">HTML rocks</div>
16024 HTML multiple attributes correction
16026 <p class="error" class="awesome">Awesome!</p>
16028 <p class="awesome">Awesome!</p>
16033 Table multiple attributes correction
16036 !+ class="error" class="awesome"| status
16041 <th class="awesome"> status
16049 <DIV ID="x">HTML ROCKS</DIV>
16051 <div id="x">HTML ROCKS</div>
16056 Non-ASCII pseudo-tags are rendered as text
16065 Pseudo-tag with URL 'name' renders as url link
16067 <http://example.com/>
16069 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16074 text with amp in the middle of nowhere
16078 <p>Remember AT&T?
16083 text with character entity: eacute
16085 I always thought é was a cute letter.
16087 <p>I always thought é was a cute letter.
16090 <p>I always thought é was a cute letter.</p>
16094 text with entity-escaped character entity-like string: eacute
16096 I always thought &eacute; was a cute letter.
16098 <p>I always thought &eacute; was a cute letter.
16103 text with undefined character entity: xacute
16105 I always thought &xacute; was a cute letter.
16107 <p>I always thought &xacute; was a cute letter.
16114 <data value="5">five</data>
16115 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16116 <mark>This highlighted text</mark>
16118 <p><data value="5">five</data>
16119 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16120 <mark>This highlighted text</mark>
16125 HTML tag with leading space is parsed as text
16129 <p>< div>foo< /div>
16134 ### Nesting tests (see bug 41545, 50604, 51081)
16137 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16138 # Note that html2wt is considerably more difficult if we use <b> in
16139 # the test case, instead of <big>
16141 Ensure that HTML adoption agency algorithm is properly implemented.
16143 <big>X<big>Y</big>Z</big>
16145 <p><big>X<big>Y</big>Z</big>
16149 # This was bug 41545 in the PHP parser.
16150 # Note that tidy doesn't handle this correctly.
16154 <kbd>X<kbd>Y</kbd>Z</kbd>
16156 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16160 # The following cases were bug 51081 in the PHP parser.
16161 # Note that there are some other nestable tags (b, i, etc) which are
16162 # not covered; see bug 51081 for discussion.
16164 # Note that tidy doesn't handle this correctly.
16168 <em>X<em>Y</em>Z</em>
16170 <p><em>X<em>Y</em>Z</em>
16174 # Note that tidy doesn't handle this correctly.
16176 Nesting of <strong>
16178 <strong>X<strong>Y</strong>Z</strong>
16180 <p><strong>X<strong>Y</strong>Z</strong>
16189 <p><q>X<q>Y</q>Z</q></p>
16192 # Note that tidy doesn't handle this correctly.
16196 <ruby>X<ruby>Y</ruby>Z</ruby>
16198 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16202 # Note that tidy doesn't handle this correctly.
16206 <bdo>X<bdo>Y</bdo>Z</bdo>
16208 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16220 [[Media:Foobar.jpg]]
16222 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16227 Media link with text
16229 [[Media:Foobar.jpg|A neat file to look at]]
16231 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16235 # FIXME: this is still bad HTML tag nesting
16236 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16238 Media link with nasty text
16240 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16242 <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>
16245 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16246 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16250 Media link to nonexistent file (bug 1702)
16252 [[Media:No such.jpg]]
16254 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16259 Image link to nonexistent file (bug 1850 - good)
16261 [[File:No_such.jpg]]
16263 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16266 <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>
16270 :Image link to nonexistent file (bug 1850 - bad)
16272 [[:Image:No such.jpg]]
16274 <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>
16277 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16283 Character reference normalization in link text (bug 1938)
16285 [[Main Page|this&that]]
16287 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16294 Test for unicode normalization
16296 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16300 (bug 19451) Links should refer to the normalized form.
16308 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16309 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16310 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16311 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16312 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16317 Empty attribute crash test (bug 2067)
16319 <font color="">foo</font>
16321 <p><font color="">foo</font>
16326 Empty attribute crash test single-quotes (bug 2067)
16328 <font color=''>foo</font>
16330 <p><font color="">foo</font>
16335 Attribute test: equals, then nothing
16337 parsoid=wt2html,html2html
16339 <font color=>foo</font>
16341 <p><font color="">foo</font>
16344 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16348 Attribute test: unquoted value
16350 parsoid=wt2html,html2html
16352 <font color=x>foo</font>
16354 <p><font color="x">foo</font>
16357 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16361 Attribute test: unquoted but illegal value (hash)
16363 <font color=#x>foo</font>
16365 <p><font color="#x">foo</font>
16369 # Parsoid does not serialize to empty attribute syntax,
16370 # so wt2wt and html2wt cases are skipped
16372 Attribute test: no value (T54330)
16374 parsoid=wt2html,html2html
16376 <font color>foo</font>
16378 <p><font color="">foo</font>
16381 <p><font color="">foo</font></p>
16385 Bug 2095: link with three closing brackets
16389 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16392 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16396 Bug 2095: link with pipe and three closing brackets
16398 [[Main Page|link]]]
16400 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16403 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16407 Bug 2095: link with pipe and three closing brackets, version 2
16409 [[Main Page|[http://example.com/]]]
16411 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16414 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16423 Template:Dangerous attribute
16425 " onmouseover="alert(document.cookie)
16429 Template:Dangerous style attribute
16431 border-size: expression(alert(document.cookie))
16437 <div style="float: right; {{{1}}}">Magic div</div>
16441 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16443 <div title="{{test}}"></div>
16445 <div title="This is a test template"></div>
16449 # Parsoid has enough context to handle this case
16451 Bug 2304: HTML attribute safety (dangerous template; 2309)
16453 <div title="{{dangerous attribute}}"></div>
16455 <div title=""></div>
16458 <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>
16462 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16464 <div style="{{dangerous style attribute}}"></div>
16466 <div style="/* insecure input */"></div>
16471 Bug 2304: HTML attribute safety (safe parameter; 2309)
16473 {{div style|width: 200px}}
16475 <div style="float: right; width: 200px">Magic div</div>
16480 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16482 {{div style|width: expression(alert(document.cookie))}}
16484 <div style="/* insecure input */">Magic div</div>
16489 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16491 {{div style|"><script>alert(document.cookie)</script>}}
16493 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16498 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16500 {{div style|" ><script>alert(document.cookie)</script>}}
16502 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16507 Bug 2304: HTML attribute safety (link)
16509 <div title="[[Main Page]]"></div>
16511 <div title="[[Main Page]]"></div>
16516 Bug 2304: HTML attribute safety (italics)
16518 <div title="''foobar''"></div>
16520 <div title="''foobar''"></div>
16525 Bug 2304: HTML attribute safety (bold)
16527 <div title="'''foobar'''"></div>
16529 <div title="'''foobar'''"></div>
16535 Bug 2304: HTML attribute safety (ISBN)
16537 <div title="ISBN 1234567890"></div>
16539 <div title="ISBN 1234567890"></div>
16544 Bug 2304: HTML attribute safety (RFC)
16546 <div title="RFC 1234"></div>
16548 <div title="RFC 1234"></div>
16553 Bug 2304: HTML attribute safety (PMID)
16555 <div title="PMID 1234567890"></div>
16557 <div title="PMID 1234567890"></div>
16562 Bug 2304: HTML attribute safety (web link)
16564 <div title="http://example.com/"></div>
16566 <div title="http://example.com/"></div>
16571 Bug 2304: HTML attribute safety (named web link)
16573 <div title="[http://example.com/ link]"></div>
16575 <div title="[http://example.com/ link]"></div>
16580 Bug 3244: HTML attribute safety (extension; safe)
16582 <div style="<nowiki>background:blue</nowiki>"></div>
16584 <div style="background:blue"></div>
16589 Bug 3244: HTML attribute safety (extension; unsafe)
16591 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16593 <div style="/* insecure input */"></div>
16597 # More MSIE fun discovered by Tom Gilder
16600 MSIE CSS safety test: spurious slash
16602 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16604 <div style="/* insecure input */">evil</div>
16609 MSIE CSS safety test: hex code
16611 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16613 <div style="/* insecure input */">evil</div>
16618 MSIE CSS safety test: comment in url
16620 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16622 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16627 MSIE CSS safety test: comment in expression
16629 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16631 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16636 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16638 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16640 <p style="/* invalid control char */">A</p>
16645 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16647 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16648 <div style="top:EXPRESSION(alert())">B</div>
16650 <p style="/* insecure input */">A</p>
16651 <div style="/* insecure input */">B</div>
16656 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16658 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16659 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16661 <div style="/* insecure input */">A</div>
16662 <p style="/* insecure input */">B</p>
16667 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16669 <div style="background-image:url⁽javascript:alert())">A</div>
16670 <div style="background-image:url₍javascript:alert())">B</div>
16671 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16673 <div style="/* insecure input */">A</div>
16674 <div style="/* insecure input */">B</div>
16675 <p style="/* insecure input */">C</p>
16679 # FIXME: Parsoid fails to sanitize this! See T58846.
16684 title="data:text/html,<img src=1 onerror=alert(1)>"
16685 style="-o-link:attr(title);-o-link-source:current">X</div>
16687 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16692 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16694 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16695 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16696 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16697 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16698 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16699 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16700 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16702 <p style="/* insecure input */">A</p>
16703 <p style="/* insecure input */">B</p>
16704 <p style="/* insecure input */">C</p>
16705 <p style="/* insecure input */">D</p>
16706 <p style="/* insecure input */">E</p>
16707 <p style="/* insecure input */">F</p>
16708 <p style="/* insecure input */">G</p>
16713 Table attribute legitimate extension
16716 !+ style="<nowiki>color:blue</nowiki>"| status
16721 <th style="color:blue"> status
16727 Table attribute safety
16730 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16735 <th style="/* insecure input */"> status
16741 CSS line continuation 1
16743 <div style="background-image: u\ rl(test.jpg);"></div>
16745 <div style="/* insecure input */"></div>
16750 CSS line continuation 2
16752 <div style="background-image: u\ rl(test.jpg); "></div>
16754 <div style="/* invalid control char */"></div>
16765 Expansion of multi-line templates in attribute values (bug 6255)
16767 <div style="background: {{identity|#00FF00}}">-</div>
16769 <div style="background: #00FF00">-</div>
16775 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16777 <div style="background:
16780 <div style="background: #00FF00">-</div>
16783 <div style="background:
16788 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16790 <div style="background: #00FF00">-</div>
16792 <div style="background: #00FF00">-</div>
16797 Tags which are hidden from Tidy cannot pass through the Sanitizer
16799 <mw:toc><script>alert();</script></mw:toc>
16801 <p><mw:toc><script>alert();</script></mw:toc></p>
16805 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16808 Parser hook: empty input
16819 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16822 ## Don't expect parsoid to rt this form.
16824 Parser hook: empty input using terminated empty elements
16826 parsoid=wt2html,html2html
16837 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16841 Parser hook: empty input using terminated empty elements (space before)
16852 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16856 Parser hook: basic input
16867 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16870 ## Don't expect parsoid to rt this form.
16872 Parser hook: case insensitive
16874 parsoid=wt2html,html2html
16885 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16888 ## Don't expect parsoid to rt this form.
16890 Parser hook: case insensitive, redux
16892 parsoid=wt2html,html2html
16903 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16907 Parser hook: nested tags
16909 <tag><tag></tag></tag>
16918 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16922 Parser hook: basic arguments
16924 <tag width="200" height="100" depth="50" square=""></tag>
16937 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16940 ## Don't expect parsoid to rt this form.
16942 Parser hook: basic arguments, variations
16944 parsoid=wt2html,html2html
16946 <tag width=200 height = "100" depth = '50' square></tag>
16959 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16963 Parser hook: argument containing a forward slash (bug 5344)
16965 <tag filename="/tmp/bla"></tag>
16970 'filename' => '/tmp/bla',
16975 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16978 ## Don't expect parsoid to rt this form.
16980 Parser hook: empty input using terminated empty elements (bug 2374)
16982 parsoid=wt2html,html2html
16994 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16997 ## </tag> should be output literally since there is no matching tag that begins it
16998 ## Don't expect parsoid to rt this form.
17000 Parser hook: basic arguments using terminated empty elements (bug 2374)
17004 <tag width=200 height = "100" depth = '50' square/>
17021 <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
17025 ## Don't expect parsoid to rt this form.
17027 Parser hook: Don't allow unclosed extension tags
17033 this is a '''test'''
17035 <p>test <tag>123
17036 </p><p>this is a <b>test</b>
17039 <p>test <tag>123</p>
17041 <p>this is a <b>test</b></p>
17045 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17049 Parser hook: static parser hook not inside a comment
17051 <statictag>hello, world</statictag>
17053 <statictag action="flush" />
17059 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17060 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17064 Parser hook: static parser hook inside a comment
17066 <!-- <statictag>hello, world</statictag> -->
17067 <statictag action="flush" />
17072 <!-- <statictag>hello, world</statictag> -->
17073 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17076 # Nested template calls; this case was broken by Parser.php rev 1.506,
17080 Template:One-parameter
17082 (My parameter is: {{{1}}})
17086 Template:Map-one-parameter
17088 {{{{{1}}}|{{{2}}}}}
17092 Nested template calls
17094 {{Map-one-parameter|One-parameter|param}}
17096 <p>(My parameter is: param)
17105 # HTML+Tidy effectively strips out the empty tags completely
17106 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17107 # which Tidy would have done for the PHP parser had there been content inside it.
17109 Sanitizer: Closing of open tags
17111 <s></s><table></table>
17113 <s></s><table></table>
17116 <p><s></s></p><table></table>
17120 Sanitizer: Closing of open but not closed tags
17129 Sanitizer: Closing of closed but not open tags
17139 Sanitizer: Closing of closed but not open table tags
17143 Table not started</td></tr></table>
17145 <p>Table not started</p>
17147 <p>Table not started</p>
17151 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17153 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17155 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17158 <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>
17161 # In HTML5, the restrictions are that id must contain at least one character,
17162 # and must not contain any space characters.
17164 Sanitizer: Validating the contents of the id attribute (bug 4515)
17168 <br id="" /><br id="a space" />
17173 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17175 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17179 <br id="foo" /><br id="foo" />
17181 Something need to be done. foo-2 ?
17185 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17188 <meta itemprop="hello" content="world">
17189 <meta http-equiv="refresh" content="5">
17190 <meta itemprop="hello" http-equiv="refresh" content="5">
17191 <link itemprop="hello" href="{{SERVER}}">
17192 <link rel="stylesheet" href="{{SERVER}}">
17193 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17197 <p> <meta itemprop="hello" content="world" />
17198 <meta http-equiv="refresh" content="5">
17199 <meta itemprop="hello" content="5" />
17201 <link itemprop="hello" href="http://example.org" />
17202 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17203 <link itemprop="hello" href="http://example.org" />
17209 Language converter: output gets cut off unexpectedly (bug 5757)
17213 this bit is safe: }-
17215 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17217 then we get cut off here: }-
17219 all additional text is vanished
17221 <p>this bit is safe: }-
17222 </p><p>but if we add a conversion instance: xxx
17223 </p><p>then we get cut off here: }-
17224 </p><p>all additional text is vanished
17229 Self closed html pairs (bug 5487)
17232 <center><font id="bug" />Centered text</center>
17233 <div><font id="bug2" />In div text</div>
17235 <center><font id="bug" />Centered text</center>
17236 <div><font id="bug2" />In div text</div>
17245 Punctuation: nbsp before exclamation
17249 <p>C'est grave !
17254 Punctuation: CSS !important (bug 11874)
17256 <div style="width:50% !important">important</div>
17258 <div style="width:50% !important">important</div>
17263 Punctuation: CSS ! important (bug 11874; with space after)
17265 <div style="width:50% ! important">important</div>
17267 <div style="width:50% ! important">important</div>
17272 HTML bullet list, closed tags (bug 5497)
17285 <ul data-parsoid='{"stx":"html"}'>
17286 <li data-parsoid='{"stx":"html"}'>One</li>
17287 <li data-parsoid='{"stx":"html"}'>Two</li>
17293 HTML bullet list, unclosed tags (bug 5497)
17305 <ul data-parsoid='{"stx":"html"}'>
17306 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17307 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17313 HTML ordered list, closed tags (bug 5497)
17326 <ol data-parsoid='{"stx":"html"}'>
17327 <li data-parsoid='{"stx":"html"}'>One</li>
17328 <li data-parsoid='{"stx":"html"}'>Two</li>
17334 HTML ordered list, unclosed tags (bug 5497)
17347 <ol data-parsoid='{"stx":"html"}'>
17348 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17349 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17355 HTML nested bullet list, closed tags (bug 5497)
17378 <ul data-parsoid='{"stx":"html"}'>
17379 <li data-parsoid='{"stx":"html"}'>One</li>
17380 <li data-parsoid='{"stx":"html"}'>Two:
17381 <ul data-parsoid='{"stx":"html"}'>
17382 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17383 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17390 HTML nested bullet list, open tags (bug 5497)
17427 HTML nested ordered list, closed tags (bug 5497)
17452 HTML nested ordered list, open tags (bug 5497)
17489 HTML ordered list item with parameters oddity
17491 <ol><li id="fragment">One</li>
17494 <ol><li id="fragment">One</li>
17499 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17501 bug 5918: autonumbering
17503 [http://first/] [http://second] [ftp://ftp]
17507 [mailto:enclosed@mail.tld With target]
17509 [mailto:enclosed@mail.tld]
17511 mailto:inline@mail.tld
17513 <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>
17514 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17515 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17516 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17517 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17520 <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>
17521 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17522 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17523 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17524 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17529 # Security and HTML correctness
17530 # From Nick Jenkins' fuzz testing
17534 Fuzz testing: Parser13
17549 Fuzz testing: Parser14
17554 <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>
17555 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17557 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17563 <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>
17565 <div id="toc" class="toc">
17566 <div id="toctitle">
17570 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17577 Fuzz testing: Parser14-table
17579 parsoid=wt2html,html2html
17584 <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>
17585 <table style="__TOC__">
17590 <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>
17591 <table style="__TOC__">
17598 <table style="__TOC__"></table>
17601 # Known to produce bogus xml (extra </td>)
17603 Fuzz testing: Parser16
17630 Fuzz testing: Parser21
17633 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17638 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17648 Fuzz testing: Parser22
17650 http://===r:::https://b
17654 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17662 # Known to produce bad XML for now
17664 Fuzz testing: Parser24
17669 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17670 <br style="onmouseover='alert(document.cookie);' " />
17672 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17677 <u class="|">}}}} >
17678 <br style="onmouseover='alert(document.cookie);'" />
17680 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17689 # Note: the current result listed for this is not what the original one was,
17690 # but the original bug was JavaScript injection, which is fixed in any case.
17691 # It's not clear that the original result listed was any more correct than the
17692 # current one. Original result:
17695 # <li class="||">
17696 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17698 Fuzz testing: Parser25 (bug 6055)
17704 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17706 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17711 Fuzz testing: URL adjacent extension (with space, clean)
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; nowiki)
17724 http://example.com<nowiki>junk</nowiki>
17726 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17729 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17733 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17735 http://example.com<pre>junk</pre>
17737 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17740 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17745 <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>
17749 Fuzz testing: image with bogus manual thumbnail
17751 [[Image:foobar.jpg|thumbnail= ]]
17753 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17756 <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>
17760 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17762 <pre dir=" "></pre>
17764 <pre dir=" "></pre>
17769 Parsing optional HTML elements (Bug 6171)
17774 <td> Some tabular data</td>
17775 <td> More tabular data ...
17776 <td> And yet som tabular data</td>
17782 <td> Some tabular data</td>
17783 <td> More tabular data ...
17784 </td><td> And yet som tabular data</td>
17791 Correct handling of <td>, <tr> (Bug 6171)
17796 <td> Some tabular data</td>
17797 <td> More tabular data ...</td>
17798 <td> And yet som tabular data</td>
17804 <td> Some tabular data</td>
17805 <td> More tabular data ...</td>
17806 <td> And yet som tabular data</td>
17814 Parsing crashing regression (fr:JavaScript)
17818 <p></body></x>
17823 Inline wiki vs wiki block nesting
17829 <p><b>Bold paragraph</b>
17830 </p><p>New wiki paragraph
17834 # FIXME: The current php output is documented
17835 # and desired output is the parsoid target.
17837 Inline HTML vs wiki block nesting
17843 <p><b>Bold paragraph
17844 </p><p>New wiki paragraph</b>
17847 <p><b>Bold paragraph</b>
17848 </p><p>New wiki paragraph
17852 # Original result was this:
17853 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17855 # While that might be marginally more intuitive, maybe, the six-apostrophe
17856 # construct is clearly pathological and the result stated here (which is what
17857 # the parser actually does) is about as reasonable as anything.
17859 Mixing markup for italics and bold
17862 '''bold''''''bold''bolditalics'''''
17864 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17872 Article for special page transclusion test
17876 Special page transclusion
17879 {{Special:Prefixindex/Xyzzyx}}
17881 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17887 Special page transclusion twice (bug 5021)
17890 {{Special:Prefixindex/Xyzzyx}}
17891 {{Special:Prefixindex/Xyzzyx}}
17893 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17895 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17901 Transclusion of default MediaWiki message
17903 {{MediaWiki:Mainpage}}
17910 Transclusion of nonexistent MediaWiki message
17912 {{MediaWiki:Mainpagexxx}}
17914 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17919 Transclusion of MediaWiki message with underscore
17921 {{MediaWiki:history_short}}
17928 Transclusion of MediaWiki message with space
17930 {{MediaWiki:history short}}
17937 Invalid header with following text
17947 Section extraction test (section 0)
17967 Section extraction test (section 1)
17989 Section extraction test (section 2)
18010 Section extraction test (section 3)
18030 Section extraction test (section 4)
18054 Section extraction test (section 5)
18074 Section extraction test (section 6)
18095 Section extraction test (section 7)
18115 Section extraction test (section 8)
18135 Section extraction test (section 9)
18156 Section extraction test (section 10)
18176 Section extraction test (nonexistent section 11)
18195 Section extraction test with bogus heading (section 1)
18200 ==bogus== not a legal section
18204 ==bogus== not a legal section
18208 Section extraction test with bogus heading (section 2)
18213 ==bogus== not a legal section
18220 Section extraction test with comment after heading (section 1)
18232 Section extraction test with comment after heading (section 2)
18244 Section extraction test with bogus <nowiki> heading (section 1)
18249 ==bogus== <nowiki>not a legal section</nowiki>
18253 ==bogus== <nowiki>not a legal section</nowiki>
18257 Section extraction test with bogus <nowiki> heading (section 2)
18262 ==bogus== <nowiki>not a legal section</nowiki>
18268 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18269 # instead of respecting commented sections
18271 Section extraction prefixed by comment (section 1)
18282 Section extraction prefixed by comment (section 2)
18292 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18293 # instead of respecting HTML-style headings
18295 Section extraction, mixed wiki and html (section 1)
18311 Section extraction, mixed wiki and html (section 2)
18327 # Formerly testing for bug 3342
18329 Section extraction, heading surrounded by <noinclude>
18333 <noinclude>==unmarked==</noinclude>
18339 # Test behavior of bug 19910
18341 Sectiion with all-equals
18346 The line above must have a trailing space
18349 But just in case it doesn't...
18353 But just in case it doesn't...
18357 Section replacement test (section 0)
18388 Section replacement test (section 1)
18417 Section replacement test (section 2)
18447 Section replacement test (section 3)
18478 Section replacement test (section 4)
18505 Section replacement test (section 5)
18536 Section replacement test (section 6)
18566 Section replacement test (section 7)
18597 Section replacement test (section 8)
18628 Section replacement test (section 9)
18657 Section replacement test (section 10)
18687 Section replacement test with initial whitespace (bug 13728)
18691 Preformatted initial line
18695 Preformatted initial line
18702 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18714 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18727 Section extraction, <pre> around bogus header (bug 10309)
18744 Section replacement, <pre> around bogus header (bug 10309)
18766 Handling of 
 in URLs
18770 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18773 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18775 a</a></li></ul></li></ul>
18779 Handling of %0A in URLs
18783 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18786 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18790 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18792 5 quotes, code coverage +1 line
18799 <p><b><i></i></b></p>
18802 # same html as previous, but wikitext adjusted to match parsoid html2wt
18803 # note that wt2html and html2html will put the <i> before the <b>
18805 5 quotes, code coverage +1 line w/ nowiki (1)
18807 parsoid=wt2wt,html2wt
18809 '''''<nowiki/>'''''
18814 <p><b><i></i></b></p>
18817 # same as previous, just swapping the <i> and <b>
18819 5 quotes, code coverage +1 line w/ nowiki (2)
18821 '''''<nowiki/>'''''
18826 <p><i><b></b></i></p>
18830 Special:Search page linking.
18834 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18839 {{!}} is a magic word
18841 {{!}} is a magic word there and {{!}} is still a magic word here
18842 | is not a magic word here but {{!}} is still a magic word here
18844 <p>| is a magic word there and | is still a magic word here
18845 | is not a magic word here but | is still a magic word here
18848 <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
18849 | 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>
18856 title=[[Parser test]]
18861 * {{FULLPAGENAMEE}}
18863 * {{BASEPAGENAMEE}}
18867 * {{ROOTPAGENAMEE}}
18869 * {{TALKPAGENAMEE}}
18870 * {{SUBJECTPAGENAME}}
18871 * {{SUBJECTPAGENAMEE}}
18874 * {{NAMESPACENUMBER}}
18878 * {{SUBJECTSPACEE}}
18879 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18881 <ul><li> Parser test</li>
18882 <li> Parser_test</li>
18883 <li> Parser test</li>
18884 <li> Parser_test</li>
18885 <li> Parser test</li>
18886 <li> Parser_test</li>
18887 <li> Parser test</li>
18888 <li> Parser_test</li>
18889 <li> Parser test</li>
18890 <li> Parser_test</li>
18891 <li> Talk:Parser test</li>
18892 <li> Talk:Parser_test</li>
18893 <li> Parser test</li>
18894 <li> Parser_test</li>
18902 <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>
18905 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18907 ## Parsoid thinks the "centre" here is a property, not a caption.
18912 "modes": ["wt2html"],
18913 "nativeGallery": true
18921 image4 |300px| centre
18922 image5.svg| http://///////
18927 <ul class="gallery mw-gallery-traditional">
18928 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18929 <div class="thumb" style="height: 150px;">Image1.png</div>
18930 <div class="gallerytext">
18933 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18934 <div class="thumb" style="height: 150px;">Image2.gif</div>
18935 <div class="gallerytext">
18938 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18939 <div class="thumb" style="height: 150px;">Image3</div>
18940 <div class="gallerytext">
18943 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18944 <div class="thumb" style="height: 150px;">Image4</div>
18945 <div class="gallerytext">
18950 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18951 <div class="thumb" style="height: 150px;">Image5.svg</div>
18952 <div class="gallerytext">
18953 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18957 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18958 <div class="thumb" style="height: 150px;">* image6</div>
18959 <div class="gallerytext">
18965 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
18966 <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>
18967 <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>
18968 <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>
18969 <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>
18970 <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>
18971 <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>
18976 Gallery (with options, html)
18979 "modes": ["wt2html", "html2html"],
18980 "nativeGallery": true
18983 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
18984 File:Nonexistent.jpg|caption
18985 File:Nonexistent.jpg
18986 image:foobar.jpg|some '''caption''' [[Main Page]]
18988 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18991 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18992 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18993 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18994 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18995 <div class="gallerytext">
19000 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19001 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19002 <div class="gallerytext">
19005 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19006 <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>
19007 <div class="gallerytext">
19008 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19012 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19013 <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>
19014 <div class="gallerytext">
19017 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19018 <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>
19019 <div class="gallerytext">
19027 <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":{}}'>
19028 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19029 <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>
19030 <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>
19031 <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>
19032 <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>
19033 <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>
19038 Gallery (with options, extsrc)
19041 "nativeGallery": false
19044 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19045 File:Nonexistent.jpg|caption
19046 File:Nonexistent.jpg
19047 image:foobar.jpg|some '''caption''' [[Main Page]]
19049 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19052 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19053 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19054 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19055 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19056 <div class="gallerytext">
19061 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19062 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19063 <div class="gallerytext">
19066 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19067 <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>
19068 <div class="gallerytext">
19069 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19073 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19074 <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>
19075 <div class="gallerytext">
19078 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19079 <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>
19080 <div class="gallerytext">
19088 <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"}}'>
19089 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19090 <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>
19091 <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>
19092 <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>
19093 <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>
19094 <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>
19099 Gallery with link that has fragment
19102 "modes": ["wt2html", "html2html"],
19103 "nativeGallery": true
19107 image:foobar.jpg|link=Main_Page
19108 image:foobar.jpg|link=Main_Page#section
19109 image:foobar.jpg|link=Main Page#section|caption
19112 <ul class="gallery mw-gallery-traditional">
19113 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19114 <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>
19115 <div class="gallerytext">
19118 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19119 <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>
19120 <div class="gallerytext">
19123 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19124 <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>
19125 <div class="gallerytext">
19133 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19134 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span 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>
19135 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span 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>
19136 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span 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>
19140 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19142 Gallery with template inside caption
19145 "nativeGallery": true
19148 <gallery caption="{{echo|hi}}">
19149 File:Foobar.jpg|{{echo|ho}}
19152 <ul class="gallery mw-gallery-traditional">
19153 <li class='gallerycaption'>{{echo|hi}}</li>
19154 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19155 <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>
19156 <div class="gallerytext">
19164 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19165 <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>
19166 <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>
19171 Gallery with wikitext inside caption
19174 "nativeGallery": true
19178 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19179 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19182 <ul class="gallery mw-gallery-traditional">
19183 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19184 <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>
19185 <div class="gallerytext">
19186 <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>
19190 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19191 <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>
19192 <div class="gallerytext">
19193 <p>This is a test template
19200 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19201 <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>
19202 <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>
19207 Gallery (with showfilename option)
19210 "nativeGallery": true
19213 <gallery showfilename="">
19214 File:Nonexistent.jpg|caption
19215 File:Nonexistent.jpg
19216 File:Foobar.jpg|some '''caption''' [[Main Page]]
19220 <ul class="gallery mw-gallery-traditional">
19221 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19222 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19223 <div class="gallerytext">
19224 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19229 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19230 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19231 <div class="gallerytext">
19232 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19236 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19237 <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>
19238 <div class="gallerytext">
19239 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19240 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19244 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19245 <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>
19246 <div class="gallerytext">
19247 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19254 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19255 <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>
19256 <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>
19257 <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>
19258 <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>
19262 ## Should Parsoid be preserving these variations?
19264 Gallery (with namespace-less filenames)
19267 "modes": ["wt2html", "html2html"],
19268 "nativeGallery": true
19272 File:Nonexistent.jpg
19278 <ul class="gallery mw-gallery-traditional">
19279 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19280 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19281 <div class="gallerytext">
19284 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19285 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19286 <div class="gallerytext">
19289 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19290 <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>
19291 <div class="gallerytext">
19294 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19295 <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>
19296 <div class="gallerytext">
19302 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19303 <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>
19304 <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>
19305 <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>
19306 <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>
19311 Gallery override link with WikiLink (T36852)
19314 "nativeGallery": true
19318 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19321 <ul class="gallery mw-gallery-traditional">
19322 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19323 <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>
19324 <div class="gallerytext">
19330 <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":{}}'>
19331 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./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>
19336 Gallery override link with absolute external link (T36852)
19339 "nativeGallery": true
19343 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19346 <ul class="gallery mw-gallery-traditional">
19347 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19348 <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>
19349 <div class="gallerytext">
19355 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19356 <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>
19361 Gallery override link with malicious javascript (T36852)
19364 "modes": ["wt2html", "html2html"],
19365 "nativeGallery": true
19369 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19372 <ul class="gallery mw-gallery-traditional">
19373 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19374 <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>
19375 <div class="gallerytext">
19381 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19382 <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>
19387 Gallery with invalid title as link (T45964)
19390 "modes": ["wt2html", "html2html"],
19391 "nativeGallery": true
19395 File:Foobar.jpg|link=<
19398 <ul class="gallery mw-gallery-traditional">
19399 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19400 <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>
19401 <div class="gallerytext">
19407 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19408 <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>
19413 HTML Hex character encoding (spells the word "JavaScript")
19415 parsoid=wt2html,wt2wt,html2html
19417 JavaScript
19419 <p>JavaScript
19424 <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>
19428 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19432 <p>&#xsee;&#XSEE;
19435 <p>&#xsee;&#XSEE;</p>
19439 HTML Hex character encoding mixed case
19441 parsoid=wt2html,wt2wt,html2html
19450 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19453 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19454 # Note that U+000C (form feed) is not a valid XML character, so
19455 # it is banned even though allowed in HTML5.
19457 Illegal character references (T106578)
19462 ; Control (low): 
19463 ; Control (high):  Ÿ
19464 ; Surrogate: ��
19465 ; This is an okay astral character: 💩
19474 <dt>Control (low)</dt>
19476 <dt>Control (high)</dt>
19477 <dd>&#x7F; &#x9F;</dd>
19479 <dd>&#xD83D;&#xDCA9;</dd>
19480 <dt>This is an okay astral character</dt>
19486 __FORCETOC__ override
19498 ISBN 978-0-1234-56 789
19500 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19503 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19505 <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>
19509 ISBN followed by 5 spaces
19520 ISBN ISBN 1234567890
19522 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19525 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19528 # Uppercase X and lowercase x as well
19539 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19540 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19541 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19542 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19543 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19544 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19547 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19548 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19549 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19550 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19551 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19552 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19556 ISBN with empty prefix (parsoid test)
19560 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19563 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19567 Bug 22905: <abbr> followed by ISBN followed by </a>
19569 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19571 <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>
19574 <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>
19582 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19587 Double RFC with a wiki link
19591 <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>
19600 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19603 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19607 Centre-aligned image
19609 [[Image:foobar.jpg|centre]]
19611 <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>
19618 [[Image:foobar.jpg|none]]
19620 <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>
19625 Width + Height sized image (using px) (height is ignored)
19627 [[Image:foobar.jpg|640x480px]]
19629 <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>
19634 Width-sized image (using px, no following whitespace)
19636 [[Image:foobar.jpg|640px]]
19638 <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>
19643 Width-sized image (using px, with following whitespace - test regression from r39467)
19645 [[Image:foobar.jpg|640px ]]
19647 <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>
19652 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19654 [[Image:foobar.jpg| 640px]]
19656 <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>
19661 Image with page parameter
19665 [[File:LoremIpsum.djvu|page=2]]
19667 <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>
19670 <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>
19674 Another italics / bold test
19682 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19688 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19691 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19696 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19698 Images with the "|" character in the comment
19700 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19702 <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>
19705 <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>
19709 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19711 <html><script>alert(1);</script></html>
19713 <p><html><script>alert(1);</script></html>
19718 HTML with raw HTML ($wgRawHtml==true)
19722 <html><script>alert(1);</script></html>
19724 <p><script>alert(1);</script>
19729 Parents of subpages, one level up
19731 subpage title=[[Subpage test/L1/L2/L3]]
19735 <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>
19741 Parents of subpages, one level up, not named
19743 subpage title=[[Subpage test/L1/L2/L3]]
19747 <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>
19754 Parents of subpages, two levels up
19756 subpage title=[[Subpage test/L1/L2/L3]]
19762 <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
19763 </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>
19768 Parents of subpages, two levels up, without trailing slash or name.
19770 subpage title=[[Subpage test/L1/L2/L3]]
19779 Parents of subpages, two levels up, with lots of extra trailing slashes.
19781 subpage title=[[Subpage test/L1/L2/L3]]
19785 <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>
19790 Subpage test/L1/L2/L3Sibling
19796 Transclusion of a sibling page (one level up)
19798 subpage title=[[Subpage test/L1/L2/L3]]
19807 Transclusion of a child page
19809 subpage title=[[Subpage test/L1/L2]]
19817 # This is wt2html only in Parsoid because we add <nowiki>
19818 # because of {{..}} and we don't expect to fix that to
19819 # eliminate the nowikis selective for {{..}} markup.
19821 Non-transclusion because of too many up levels
19823 subpage title=[[Subpage test/L1/L2/L3]]
19826 {{../../../../More than parent}}
19828 <p>{{../../../../More than parent}}
19831 <p>{{../../../../More than parent}}</p>
19835 Definition list code coverage
19841 <dl><dt> title  </dt>
19843 <dt> title </dt>
19849 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19850 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19851 <dt>title</dt><dd> def</dd></dl>
19855 Don't fall for the self-closing div
19857 <div>hello world</div/>
19859 <div>hello world</div>
19868 <p>[[:Template:Msg]]
19877 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19881 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19883 Always escape literal '>' in output, not just after '<'
19897 <p>This is a test template
19898 This is a test template
19910 Inclusion of !userCanEdit() content
19914 <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>
19920 Out-of-order TOC heading levels
19929 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19931 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19933 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19934 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19937 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19939 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19940 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19946 <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>
19947 <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>
19948 <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>
19949 <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>
19950 <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>
19951 <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>
19957 ISBN with a dummy number
19967 ISBN with space-delimited number
19971 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19977 ISBN with multiple spaces, no number
19996 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19997 </p><p>ISBN 12345678901
20003 ISBN with trailing year (bug 8110)
20005 ISBN 1-234-56789-0 - 2006
20007 ISBN 1 234 56789 0 - 2006
20009 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20010 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20018 {{anchorencode:foo bar©#%n}}
20020 <p>foo_bar.C2.A9.23.25n
20025 anchorencode trims spaces
20027 {{anchorencode: __pretty__please__}}
20034 anchorencode deals with links
20036 {{anchorencode: [[hello|world]] [[hi]]}}
20043 anchorencode deals with templates
20045 {{anchorencode: {{Foo}} }}
20052 anchorencode encodes like the TOC generator: (bug 18431)
20054 === _ +:.3A%3A&&]] ===
20055 {{anchorencode: _ +:.3A%3A&&]] }}
20058 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20059 <p>.2B:.3A.253A.26.26.5D.5D
20064 Bug 6200: blockquotes and paragraph formatting
20085 Bug 8293: Use of center tag ruins paragraph formatting
20106 Parsing of overlapping (improperly nested) inline html tags
20108 <span><s>x</span></s>
20110 <p><span><s>x</span></s></span>
20113 <p><span><s>x</s></span>
20118 ### Language variants related tests
20121 Self-link in language variants
20123 title=[[Dunav]] language=sr
20125 Both [[Dunav]] and [[Дунав]] are names for this river.
20127 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
20138 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20140 title=[[Duna]] language=sr
20142 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20144 <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.
20149 Link to a section of a variant of this title shouldn't be parsed as self-link
20151 title=[[Duna]] language=sr
20153 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20155 <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.
20160 Link to pages in language variants
20164 Main Page can be written as [[Маин Паге]]
20166 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20172 Multiple links to pages in language variants
20176 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20178 <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>.
20184 Simple template in language variants
20190 <p>This is a test template
20196 Template with explicit namespace in language variants
20202 <p>This is a test template
20208 Basic test for template parameter in language variants
20212 {{парамтест|param=foo}}
20214 <p>This is a test template with parameter foo
20219 Simple category in language variants
20223 [[Category:МедиаWики Усер'с Гуиде]]
20225 cat=МедиаWики_Усер'с_Гуиде sort=
20227 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20242 ## We used to, but no longer wt2wt this test since the default serializer
20243 ## will normalize all categories to serialize on their own line.
20244 ## This wikitext usage is going to be fairly uncommon in production and
20245 ## selser will take care of preserving formatting in those scenarios.
20247 Don't convert blue categorylinks to another variant (bug 33210)
20253 [[A]][[Category:分类]]
20257 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
20258 <link rel="mw:PageProp/Category" href="Category:分类"/>
20262 Stripping -{}- tags (language variants)
20266 Latin proverb: -{Ne nuntium necare}-
20268 <p>Latin proverb: Ne nuntium necare
20274 Prevent conversion with -{}- tags (language variants)
20276 language=sr variant=sr-ec
20278 Latinski: -{Ne nuntium necare}-
20280 <p>Латински: Ne nuntium necare
20286 Prevent conversion of text with -{}- tags (language variants)
20288 language=sr variant=sr-ec
20290 Latinski: -{Ne nuntium necare}-
20292 <p>Латински: Ne nuntium necare
20298 Prevent conversion of links with -{}- tags (language variants)
20300 language=sr variant=sr-ec
20304 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20310 -{}- tags within headlines (within html for parserConvert())
20312 language=sr variant=sr-ec
20316 <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>
20322 Explicit definition of language variant alternatives
20324 language=zh variant=zh-tw
20326 -{zh:China;zh-tw:Taiwan}-, not China
20328 <p>Taiwan, not China
20334 Conversion around HTML tags
20336 language=sr variant=sr-ec
20338 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20339 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20342 <span title="ЛаCтин">ски</span>
20348 Explicit session-wise language variant mapping (A flag and - flag)
20350 language=zh variant=zh-tw
20352 Taiwan is not China.
20353 But -{A|zh:China;zh-tw:Taiwan}- is China,
20354 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20355 and -{China}- is China.
20357 <p>Taiwan is not China.
20358 But Taiwan is Taiwan,
20359 (This should be stripped!)
20360 and China is China.
20365 Explicit session-wise language variant mapping (H flag for hide)
20367 language=zh variant=zh-tw
20369 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20372 <p>(This should be stripped!)
20378 Adding explicit conversion rule for title (T flag)
20380 language=zh variant=zh-tw showtitle
20382 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20385 <p>Should be stripped!
20390 Testing that changing the language variant here in the tests actually works
20392 language=zh variant=zh showtitle
20394 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20397 <p>Should be stripped!
20402 Recursive conversion of alt and title attrs shouldn't clear converter state
20404 language=zh variant=zh-cn showtitle
20406 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20407 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20411 Should be stripped<span title="Exclamation">!</span>
20416 Bug 24072: more test on conversion rule for title
20418 language=zh variant=zh-tw showtitle
20420 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20421 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20424 <p>This should be stripped!
20425 This won't take interferes with the title rule.
20430 Partly disable title conversion if variant == main language code
20432 language=zh variant=zh title=[[ZH]] showtitle
20434 -{T|zh-cn:CN;zh-tw:TW}-
20442 Partly disable title conversion if variant == main language code, more
20444 language=zh variant=zh title=[[ZH]] showtitle
20454 Raw output of variant escape tags (R flag)
20456 language=zh variant=zh-tw
20458 Raw: -{R|zh:China;zh-tw:Taiwan}-
20460 <p>Raw: zh:China;zh-tw:Taiwan
20465 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20467 language=zh variant=zh-cn
20469 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20476 Conversion rules from [numeric-only string] to [something else] (T48634)
20478 language=zh variant=zh-cn
20480 -{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
20487 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20489 language=zh variant=zh-cn
20491 -{H|zh-cn:foo;zh-tw:;}-foobar
20498 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20500 language=zh variant=zh-cn
20502 -{H|=>zh-cn:foo;}-foobar
20509 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20511 language=zh variant=zh-cn
20520 Nested using of manual convert syntax
20522 language=zh variant=zh-hk
20524 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20526 <p>Nested: Hello Hong Kong!
20530 # Since Parsoid is starting to emit canonical wikitext for links,
20531 # [http://example.com http://example.com] will not RT back to that
20534 Proper conversion of text in external links
20536 language=sr variant=sr-ec
20539 http://www.google.com
20540 gopher://www.google.com
20541 [http://www.google.com http://www.google.com]
20542 [gopher://www.google.com gopher://www.google.com]
20543 [https://www.google.com irc://www.google.com]
20544 [ftp://www.google.com www.google.com/ftp://dir]
20545 [//www.google.com www.google.com]
20547 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20548 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20549 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20550 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20551 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20552 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20553 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20556 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20557 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20558 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20559 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20560 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20561 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20562 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20566 Do not convert roman numbers to language variants
20568 language=sr variant=sr-ec
20572 <p>Фридрих IV је цар.
20577 Unclosed language converter markup "-{"
20588 Don't convert raw rule "-{R|=>}-" to "=>"
20599 Don't break link parsing if language converter markup is in the caption.
20601 language=sr variant=sr-ec
20603 [[Main Page|-{R|main page}-]]
20605 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20610 T146304: Don't break template parsing if language converter markup is in the parameter.
20612 language=sr variant=sr-ec
20621 T146305: Don't break image parsing if language converter markup is in the caption.
20625 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
20627 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећај"></a></div>caption:</div></div></div>
20630 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./Датотека:Foobar.jpg"><img resource="./Датотека:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"caption:"}'></span></figcaption></figure>
20634 T146305: Don't break image parsing if nested language converter markup is in the caption.
20636 language=zh variant=zh-cn
20638 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
20640 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="放大"></a></div>blog (hk: WEBJOURNAL, tw: WEBLOG)</div></div></div>
20643 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"blog (hk: <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[42,64,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"WEBJOURNAL\"}'></span>, tw: <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[70,88,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"WEBLOG\"}'></span>)"}],"show":true}'></span></figcaption></figure>
20647 Don't break gallery if language converter markup is inside.
20652 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
20653 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
20656 <ul class="gallery mw-gallery-traditional">
20657 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20658 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="bat" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20659 <div class="gallerytext">
20660 <p><a href="/wiki/File:Foobar.jpg" class="image" title="bar"><img alt="foo" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
20664 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20665 <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>
20666 <div class="gallerytext">
20667 <p>This is a test template
20675 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20677 Don't break list handling if language converter markup is in the item.
20679 language=zh variant=zh-cn
20681 ;-{zh-cn:AAA;zh-tw:BBB}-
20683 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20690 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20692 Don't break table handling if language converter markup is in the cell.
20694 language=sr variant=sr-ec
20717 Bug 529: Uncovered bullet
20726 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20727 # Templates in Wikipedia rely on this behavior, as tidy has always been
20728 # enabled there. These tests are normally run *without* tidy, so specify the
20729 # full output here.
20730 # To test realistic parsing behavior, apply a tidy-like transformation to both
20731 # the expected output and your parser's output.
20733 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20735 ******* Foo {{bullet}}
20737 <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>
20743 Bug 529: Uncovered table already at line-start
20766 Bug 529: Uncovered bullet in parser function result
20768 * Foo {{lc:{{bullet}} }}
20776 Bug 5678: Double-parsed template argument
20778 {{lc:{{{1}}}|hello}}
20785 Bug 5678: Double-parsed template invocation
20787 {{lc:{{paramtest {{!}} param = hello }} }}
20789 <p>{{paramtest | param = hello }}
20794 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20797 title=[[Main Page]]
20799 {{PRVNÍVELKÉ:ěščř}}
20800 {{prvnívelké:ěščř}}
20820 Morwen/13: Unclosed link followed by heading
20827 <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>
20832 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20839 <h1><span class="mw-headline" id="heading">heading</span></h1>
20844 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20851 <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>
20866 Paragraphs inside divs (no extra line breaks)
20878 Paragraphs inside divs (extra line break on open)
20893 Paragraphs inside divs (extra line break on close)
20908 Paragraphs inside divs (extra line break on open and close)
20925 Nesting tags, paragraphs on lines which begin with <div>
20927 <div></div><strong>A
20930 <p><strong>A</strong></p>
20931 <p><strong>B</strong></p>
20939 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20941 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20943 <blockquote>Line one
20945 Line two</blockquote>
20947 <blockquote>Line one
20948 Line two</blockquote>
20952 <p>Line one Line two</p>
20957 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20962 Line two</blockquote>
20967 Line two</blockquote>
20972 Line two</blockquote>
20976 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20978 <blockquote>Line one
20983 <blockquote>Line one
20996 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
21018 Paragraphs inside blockquotes/divs (no extra line breaks)
21020 <blockquote><div>Line one
21022 Line two</div></blockquote>
21024 <blockquote><div>Line one
21025 Line two</div></blockquote>
21030 Paragraphs inside blockquotes/divs (extra line break on open)
21035 Line two</div></blockquote>
21040 Line two</div></blockquote>
21045 Paragraphs inside blockquotes/divs (extra line break on close)
21047 <blockquote><div>Line one
21050 </div></blockquote>
21052 <blockquote><div>Line one
21055 </div></blockquote>
21060 Paragraphs inside blockquotes/divs (extra line break on open and close)
21066 </div></blockquote>
21072 </div></blockquote>
21077 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21079 wgLinkHolderBatchSize=0
21085 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21086 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21087 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21092 Free external link invading image caption
21094 [[Image:Foobar.jpg|thumb|http://x|hello]]
21096 <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>
21101 Bug 15196: localised external link numbers
21105 [http://en.wikipedia.org/]
21107 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21110 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21114 Multibyte character in padleft
21116 {{padleft:-Hello|7|Æ}}
21123 Multibyte character in padright
21125 {{padright:Hello-|7|Æ}}
21132 formatdate parser function
21134 {{#formatdate:2009-03-24}}
21136 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21141 formatdate parser function, with default format
21143 {{#formatdate:2009-03-24|mdy}}
21145 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21150 Spacing of numbers in formatted dates
21152 {{#formatdate:January 15}}
21154 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21159 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
21161 language=nl title=[[MediaWiki:Common.css]]
21163 {{#formatdate:2009-03-24|dmy}}
21165 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21178 Edit comment with link
21182 I like the [[Main Page]] a lot
21184 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21188 Edit comment with link and link text
21192 I like the [[Main Page|best pages]] a lot
21194 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21198 Edit comment with link and link text with suffix
21202 I like the [[Main Page|best page]]s a lot
21204 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21208 Edit comment with section link (non-local, eg in history list)
21210 comment title=[[Main Page]]
21212 /* External links */ removed bogus entries
21214 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21218 Edit comment with section link and text before it (non-local, eg in history list)
21220 comment title=[[Main Page]]
21222 pre-comment text /* External links */ removed bogus entries
21224 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>
21228 Edit comment with section link (local, eg in diff view)
21230 comment local title=[[Main Page]]
21232 /* External links */ removed bogus entries
21234 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21238 Edit comment with subpage link (bug 14080)
21242 title=[[Subpage test]]
21244 Poked at a [[/subpage]] here...
21246 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21250 Edit comment with subpage link and link text (bug 14080)
21254 title=[[Subpage test]]
21256 Poked at a [[/subpage|neat little page]] here...
21258 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21262 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
21265 title=[[Subpage test]]
21267 Poked at a [[/subpage]] here...
21269 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21273 Edit comment with bare anchor link (local, as on diff)
21277 title=[[Main Page]]
21281 <a href="#section">#section</a>
21285 Edit comment with bare anchor link (non-local, as on history)
21288 title=[[Main Page]]
21292 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21296 Anchor starting with underscore
21302 <p><a href="#_ref">One</a>
21305 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21309 Id starting with underscore
21311 <div id="_ref"></div>
21313 <div id="_ref"></div>
21318 Edit comment with link with more than one pipe (T99346)
21322 [[Main Page|Many|pipes]]
21324 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21328 Complex edit comment with link with more than one pipe (T99346)
21332 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21334 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..."
21338 Space normalisation on autocomment (bug 22784)
21341 title=[[Main Page]]
21343 /* __hello__world__ */
21345 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21349 percent-encoding and + signs in comments (Bug 26410)
21353 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21355 <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>
21358 # Parsoid doesn't support this yet: see bug 73581
21359 # but it *should* omit the 'src' attribute if the image is bad.
21360 # PHP side of tests was disabled in
21361 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21362 # because of issues in the PHP parserTests infrastructure
21363 # (but the output below is indeed what the PHP side emits)
21365 Bad images - basic functionality
21368 !! DISABLED/html/php
21370 <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>
21374 Bad images - bug 16039: text after bad image disappears
21379 !! DISABLED/html/php
21385 <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>
21390 Verify that displaytitle works (bug #22501) no displaytitle
21394 wgAllowDisplayTitle=true
21395 wgRestrictDisplayTitle=false
21397 this is not the the title
21400 <p>this is not the the title
21405 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21410 wgAllowDisplayTitle=true
21411 wgRestrictDisplayTitle=false
21413 this is not the the title
21414 {{DISPLAYTITLE:whatever}}
21417 <p>this is not the the title
21422 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21427 wgAllowDisplayTitle=true
21428 wgRestrictDisplayTitle=true
21430 this is not the the title
21431 {{DISPLAYTITLE:whatever}}
21434 <p>this is not the the title
21439 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21444 wgAllowDisplayTitle=true
21445 wgRestrictDisplayTitle=true
21447 this is not the the title
21448 {{DISPLAYTITLE:screen}}
21451 <p>this is not the the title
21456 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21461 wgAllowDisplayTitle=false
21463 this is not the the title
21464 {{DISPLAYTITLE:screen}}
21467 <p>this is not the the title
21468 <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>
21473 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21478 wgAllowDisplayTitle=false
21480 this is not the the title
21483 <p>this is not the the title
21488 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21493 wgAllowDisplayTitle=true
21494 wgRestrictDisplayTitle=true
21496 this is not the the title
21497 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21499 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21500 <p>this is not the the title
21505 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21510 wgAllowDisplayTitle=true
21511 wgRestrictDisplayTitle=true
21513 this is not the the title
21514 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21516 <span style="color: red;">s</span>creen
21517 <p>this is not the the title
21522 Page status indicators: Empty name is invalid
21526 <indicator name=" "></indicator>
21527 <indicator></indicator>
21529 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21530 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21535 Page status indicators: Weird syntaxes that are okay
21539 <indicator name="empty" />
21540 <indicator name="name"></indicator>
21549 Page status indicators: Torture test
21553 <indicator name="01">hello world</indicator>
21554 <indicator name="02">[[Main Page]]</indicator>
21555 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21556 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21557 <indicator name="05">* foo
21559 <indicator name="06"><nowiki>foo</nowiki></indicator>
21560 <indicator name="07"> Preformatted</indicator>
21561 <indicator name="08"><div>Broken tag</indicator>
21562 <indicator name="09">{| class=wikitable
21565 <indicator name="10">Two
21567 paragraphs</indicator>
21570 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21571 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" />
21572 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>
21573 05=<ul><li> foo</li>
21577 07=<pre>Preformatted
21579 08=<div>Broken tag</div>
21581 09=<table class="wikitable">
21598 preload: check <noinclude> and <includeonly>
21602 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21608 preload: check <onlyinclude>
21612 Goodbye <onlyinclude>Hello world</onlyinclude>
21618 preload: can pass tags through if we want to
21622 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21624 <includeonly>Hello world</includeonly>
21628 preload: check that it doesn't try to do tricks
21632 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21634 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21638 Play a bit with r67090 and bug 3158
21640 <div style="width:50% !important"> </div>
21641 <div style="width:50% !important"> </div>
21642 <div style="width:50% !important"> </div>
21643 <div style="border : solid;"> </div>
21645 <div style="width:50% !important"> </div>
21646 <div style="width:50% !important"> </div>
21647 <div style="width:50% !important"> </div>
21648 <div style="border : solid;"> </div>
21651 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21652 <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>
21653 <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>
21654 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21659 HTML5 data attributes
21661 <span data-foo="bar">Baz</span>
21662 <p data-abc-def_hij="">Quuz</p>
21664 <p><span data-foo="bar">Baz</span>
21666 <p data-abc-def_hij="">Quuz</p>
21669 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21670 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21674 Strip reserved data attributes
21676 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21678 <div data-ok="fred">d</div>
21681 <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>
21685 percent-encoding and + signs in internal links (Bug 26410)
21687 [[User:+%]] [[Page+title%]]
21688 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21689 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21690 [[%33%45]] [[%33%45+]]
21692 <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>
21693 <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>
21694 <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>
21695 <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>
21698 <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>
21699 <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>
21700 <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>
21701 <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>
21705 Special characters in embedded file links (bug 27679)
21707 [[File:Contains & ampersand.jpg]]
21708 [[File:Does not exist.jpg|Title with & ampersand]]
21710 <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>
21711 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21714 <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>
21715 <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>
21719 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21721 Text's been normalized?
21723 <p>Text's been normalized?
21728 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21730 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21732 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21737 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21739 [http://www.example.org/ ideograms]
21741 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21746 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21748 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21750 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21774 Bug 31098 Template which includes system messages which includes the template
21778 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21779 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21784 Bug31490 Turkish: ucfirst 'blah'
21795 Bug31490 Turkish: ucfirst 'ix'
21806 Bug31490 Turkish: lcfirst 'BLAH'
21817 Bug31490 Turkish: ucfırst (with a dotless i)
21823 <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>
21828 Bug31490 ucfırst (with a dotless i) with English language
21834 <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>
21839 Bug 26375: TOC with italics
21841 title=[[Main Page]]
21844 == ''Lost'' episodes ==
21846 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21848 <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>
21852 <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>
21857 Bug 26375: TOC with bold
21859 title=[[Main Page]]
21862 == '''should be bold''' then normal text ==
21864 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21866 <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>
21870 <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>
21875 Bug 33845: Headings become cursive in TOC when they contain an image
21877 title=[[Main Page]]
21880 == Image [[Image:foobar.jpg]] ==
21882 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21884 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21888 <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>
21893 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21895 title=[[Main Page]]
21898 == <blockquote>Quote</blockquote> ==
21900 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21902 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21906 <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>
21910 <div id="toc" class="toc">
21911 <div id="toctitle">
21915 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21919 <h2><span class="mw-headline" id="Quote"></span></h2>
21921 <p><span class="mw-headline" id="Quote">Quote</span></p>
21923 <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>
21927 Unclosed tags in TOC
21929 title=[[Main Page]]
21933 <small>Hanc marginis exiguitas non caperet.</small>
21936 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21938 <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>
21942 <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>
21943 <p><small>Hanc marginis exiguitas non caperet.</small>
21949 Multiple tags in TOC
21952 == <i>Foo</i> <b>Bar</b> ==
21954 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21956 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21958 <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>
21959 <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>
21963 <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>
21964 <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>
21968 <div id="toc" class="toc">
21969 <div id="toctitle">
21973 <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>
21974 <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>
21978 <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>
21979 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21981 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21983 <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>
21986 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21987 # html5 tag parsing.
21989 Tags with parameters in TOC
21994 == <sup class="in-h2">Hello</sup> ==
21996 == <sup class="a > b">Evilbye</sup> ==
21998 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22000 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22001 <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>
22005 <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>
22006 <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>
22009 <meta property="mw:PageProp/toc" />
22010 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22012 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22016 span tags with directionality in TOC
22019 == <span dir="ltr">C++</span> ==
22021 == <span dir="rtl">זבנג!</span> ==
22023 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22025 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22027 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22029 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22031 <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>
22032 <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>
22033 <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>
22034 <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>
22035 <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>
22039 <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>
22040 <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>
22041 <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>
22042 <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>
22043 <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>
22048 Bug 72884: bdi element in ToC
22051 == <bdi>test</bdi> ==
22053 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22055 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22059 <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>
22064 T35715: s/strike element in ToC
22067 == <s>test</s> test <strike>test</strike> ==
22069 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22071 <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>
22075 <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>
22079 # Note that the html output does not have the <p></p>, but the
22080 # html+tidy output *does*. This is because the empty <p></p> is
22081 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22083 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22088 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22090 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22094 <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>
22098 <div id="toc" class="toc">
22099 <div id="toctitle">
22103 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22107 <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>
22113 == {{int:headline_sample}} ==
22117 Bug 32057: Title needed when expanding <h> nodes.
22119 title=[[Main Page]]
22123 <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>
22128 Strip marker in urlencode
22130 {{urlencode:x<nowiki/>y}}
22131 {{urlencode:x<nowiki/>y|wiki}}
22132 {{urlencode:x<nowiki/>y|path}}
22133 {{urlencode:x<pre id="one">two</pre>y}}
22161 Strip marker in formatNum
22163 {{formatnum:1<nowiki/>2}}
22164 {{formatnum:1<nowiki/>2|R}}
22172 Check noCommafy in formatNum
22176 {{formatnum:123456.78}}
22177 {{formatnum:123456.78|NOSEP}}
22185 Wrong option for formatNum (bug 56199)
22187 {{formatnum:1,234.56|Random}}
22188 {{formatnum:1,234.56|EVERYTHING}}
22189 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22198 Strip marker in grammar
22202 {{grammar:elative|foo<nowiki/>bar}}
22209 Strip marker in padleft
22211 {{padleft:|2|x<nowiki/>y}}
22218 Strip marker in padright
22220 {{padright:|2|x<nowiki/>y}}
22227 Strip marker in anchorencode
22229 {{anchorencode:x<nowiki/>y}}
22236 nowiki inside link inside heading (bug 18295)
22238 ==[[foo|x<nowiki>y</nowiki>z]]==
22240 <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>
22245 new support for bdi element (bug 31817)
22247 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22249 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22254 Ignore pipe between table row attributes
22258 |- id=foo | style='color: red'
22266 <tr id="foo" style="color: red">
22273 Gallery override link with WikiLink (bug 34852)
22276 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
22279 <ul class="gallery mw-gallery-traditional">
22280 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22281 <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>
22282 <div class="gallerytext">
22292 Gallery override link with absolute external link (bug 34852)
22295 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
22298 <ul class="gallery mw-gallery-traditional">
22299 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22300 <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>
22301 <div class="gallerytext">
22311 Gallery override link with absolute external link with LanguageConverter
22316 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
22319 <ul class="gallery mw-gallery-traditional">
22320 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22321 <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>
22322 <div class="gallerytext">
22332 Gallery override link with malicious javascript (bug 34852)
22335 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
22338 <ul class="gallery mw-gallery-traditional">
22339 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22340 <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>
22341 <div class="gallerytext">
22351 Gallery with invalid title as link (bug 43964)
22354 File:foobar.jpg|link=<
22357 <ul class="gallery mw-gallery-traditional">
22358 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22359 <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>
22360 <div class="gallerytext">
22368 Language parser function
22377 Padleft and padright as substr
22379 {{padleft:|3|abcde}}
22380 {{padright:|3|abcde}}
22388 Special parser function
22390 {{#special:RandomPage}}
22391 {{#special:BaDtItLe}}
22392 {{#special:Foobar}}
22401 Bug 34939 - Case insensitive link parsing ([HttP://])
22403 [HttP://MediaWiki.Org/]
22405 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22408 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22412 Bug 34939 - Case insensitive link parsing ([HttP:// title])
22414 [HttP://MediaWiki.Org/ MediaWiki]
22416 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22421 Bug 34939 - Case insensitive link parsing (HttP://)
22423 HttP://MediaWiki.Org/
22425 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22428 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22446 <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>
22447 <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>
22448 <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>
22449 <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>
22450 <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>
22456 ### Parsoid-specific tests
22457 ### Parsoid-PHP parser incompatibilities
22460 1. SOL-sensitive wikitext tokens as template-args
22462 parsoid=wt2html,wt2wt
22468 <span about="#mwt1" typeof="mw:Transclusion">
22469 </span><ul about="#mwt1"><li>a</li>
22471 <span about="#mwt2" typeof="mw:Transclusion">
22472 </span><ol about="#mwt2"><li>a</li>
22474 <span about="#mwt3" typeof="mw:Transclusion">
22475 </span><dl about="#mwt3"><dd>a</dd>
22479 #### -----------------------------------------------------------------
22480 #### Parsoid-specific functionality tests
22481 #### -----------------------------------------------------------------
22483 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22484 # We know wt2wt will fail, but we expect selser to pass.
22485 # Due to the nature of our testing, wt2wt and selser tests will enter the
22486 # blacklist and we'll catch selser regressions based on changes to the
22487 # blacklist entries for selser tests.
22489 1. Bad treebuilder fixup of formatting elt is cleaned up
22491 parsoid=wt2html,wt2wt
22496 [[Image:Foobar.jpg|right|Test]]
22503 <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>
22510 2. Bad treebuilder fixup of formatting elt is cleaned up
22512 parsoid=wt2html,wt2wt
22514 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22516 <small>[[Image:Foobar.jpg|right|300px]]</small>
22520 <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>
22522 <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>
22526 3. Bad treebuilder fixup of formatting elt is cleaned up
22528 parsoid=wt2html,wt2wt
22530 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22532 <p><small><b>foo</b></small></p>
22533 <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>
22534 <p><small><b>bar</b></small></p>
22538 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22540 parsoid=wt2html,wt2wt
22542 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22544 <p><b><small></small></b></p>
22545 <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>
22549 #### ----------------------------------------------------------------
22550 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22551 #### tags. Parsoid's output for these tags differs from that of the
22553 #### ----------------------------------------------------------------
22556 Ref: 1. ref-location should be replaced with an index span
22559 B <ref name="x">foo</ref>
22563 <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>
22564 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>
22565 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>
22566 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22567 <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>
22568 <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>
22569 <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>
22574 Ref: 2. ref-tags with identical names should all get the same index
22576 A <ref name="x">foo</ref>
22580 <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>
22581 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>
22582 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22583 <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>
22588 Ref: 3. spaces in ref-names should be ignored
22590 A <ref name="x">foo</ref>
22591 B <ref name=" x " />
22595 <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>
22596 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>
22597 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>
22598 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22599 <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>
22603 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22605 Ref: 4. 'constructor' should be accepted as a valid ref-name
22607 A <ref name="constructor">foo</ref>
22610 <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>
22611 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22612 <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>
22617 Ref: 5. body should accept generic wikitext
22620 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22625 <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>
22627 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22628 <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>
22634 Ref: 6. indent-pres should not be output in ref-body
22644 <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>
22646 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22647 <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
22655 Ref: 7. No p-wrapping in ref-body
22672 <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>
22674 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22675 <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
22690 Ref: 8. transclusion wikitext has lower precedence
22692 A <ref> foo {{echo|</ref> B C}}
22696 <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>
22697 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22698 <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>
22703 Ref: 9. unclosed comments should not leak out of ref-body
22705 A <ref> foo <!--</ref> B C
22708 <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>
22709 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22710 <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>
22715 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22717 A <ref> <b> foo </ref> B C
22721 <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>
22724 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22725 <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>
22730 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22736 <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
22737 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>
22738 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22739 <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>
22740 <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>
22745 Ref: 12. ref-tags act as trailing newline migration barrier
22747 <!--the newline at the end of this line moves out of the p tag-->a
22749 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22755 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22758 <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>
22759 <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>
22762 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22763 <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>
22764 <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>
22768 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22775 <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
22776 <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>
22777 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22778 <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>
22779 <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
22784 ## Roundtripping fails because of nowiki'ing
22786 Ref: 14. A nested ref-tag should be emitted as plain text
22790 <ref>foo <ref>bar</ref> baz</ref>
22794 <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>
22796 <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>
22800 Ref: 15. ref-tags with identical names should get identical indexes
22802 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22803 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22807 <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>
22808 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>
22810 <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>
22814 ## We don't bother wt2wt-ing non-standard whitespace
22816 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22824 <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>
22825 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22826 <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>
22830 Ref: 17. Generate valid HTML5 id/about attributes
22832 <ref name="a b">foo</ref>
22836 <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>
22839 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22840 <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>
22845 Ref: 18. T58916: Extension attributes should be parsed as plain text
22847 <ref name="{{echo|a}}">foo</ref>
22851 <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>
22854 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22855 <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>
22860 Ref: 19. ref-tags with identical name encodings should get identical indexes
22862 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22866 <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>
22868 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22869 <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>
22874 Ref: 20. ref-tags with identical names but different content should keep it
22876 A <ref name="foo">Foo one</ref>
22877 B <ref name="foo">Foo two</ref>
22878 C <ref name="foo" />
22882 <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>
22883 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>
22884 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>
22886 <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>
22891 References: 1. references tag without any refs should be handled properly
22895 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22899 References: 2. references tag with group only outputs references from that group
22901 A <ref group="a">foo</ref>
22902 B <ref group="b">bar</ref>
22905 <references group="a" />
22907 <references group="b" />
22909 <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>
22910 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>
22911 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>
22913 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22914 <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>
22916 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22917 <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>
22919 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22920 <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>
22925 References: 3. ref list should be cleared after processing references
22935 <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>
22937 <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>
22940 <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>
22942 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22943 <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>
22948 References: 4. only referenced group should be cleared after processing references
22950 A <ref group="a">afoo</ref>
22953 <references group="a" />
22959 <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>
22960 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>
22962 <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>
22965 <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>
22967 <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>
22971 ## Don't expect this to rt since we're dropping content
22973 References: 5. ref tags in references should be processed while ignoring all other content
22975 parsoid=wt2html,html2html
22978 B <ref name="b">bar</ref>
22981 <ref name="a">foo</ref>
22982 This should just get lost.
22985 <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>
22986 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>
22989 <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>
22994 References: 6. <references /> from a transclusion
22996 <ref>Foo</ref> {{echo|<references />}}
22998 <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>
23003 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
23005 A <ref>foo bar for a</ref>
23006 B <ref group="X" name="b" />
23010 <references group="X">
23011 <ref name="b">foo</ref>
23014 <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>
23015 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>
23018 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
23019 <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>
23022 <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"}}'>
23023 <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>
23028 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
23030 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
23033 <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>
23034 <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>
23038 # This test only works in wt2html now as the <references /> are always generated
23039 # unless selser is active. Once T72722 is fixed, we should add a changes test
23040 # here to ensure that unrelated changes don't add the new <references />
23041 # when selser is active.
23043 References: 9. Generate missing references list at the end
23046 B <ref group="inexistent">bar</ref>
23048 <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>
23049 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
23050 <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>
23052 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
23053 <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>
23058 References: 10. New <references/> shouldn't be added for unrelated edits.
23061 "modes": ["selser"],
23062 "changes": [["#x", "remove"]],
23066 Unrelated text<span id="x"> that's going to disappear</span>.
23074 Entities in ref name
23076 <ref name="test & me">hi</ref>
23079 <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>
23080 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23081 <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>
23085 ## The output here may look funny, but it's what the php parser will do. The
23086 ## unclosed references tag becomes escaped text, and then a new references
23087 ## tag is auto-generated. The test is wt2html only because it roundtrips with
23088 ## nowiki tags, and the auto-generated references tag is only dropped in
23091 Generate references for unclosed references tag
23099 <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>
23101 <p><references></p>
23102 <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>
23106 New reference serializes on its own line
23108 parsoid=wt2wt,html2wt
23113 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
23116 #--------- Test stripping of empty nodes in template content ----------
23118 Empty LI and TR nodes should be stripped from template content
23123 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23127 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23140 Empty LI and TR nodes should not be stripped from top-level content
23167 Empty TR nodes should not be stripped if they have any attributes set
23169 {{EmptyTRWithHTMLAttrTest}}
23171 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23172 <tr align="center"></tr>
23173 <tr><td>foo</td></tr>
23174 <tr align="center"></tr>
23175 <tr><td>bar</td></tr>
23179 #### ----------------------------------------------------------------
23180 #### The following section of tests are primarily to test
23181 #### wikitext escaping capabilities of Parsoid. Given that
23182 #### escaping can be done any number of ways, the wikitext (input)
23183 #### is always adjusted to reflect how Parsoid adds nowiki
23186 #### We are marking several tests as parsoid-only since the
23187 #### HTML in the result section is different from what the
23188 #### PHP parser generates for it.
23189 #### ----------------------------------------------------------------
23192 #### --------------- Headings ---------------
23194 #### 1. Nested inside html <h1>=foo=</h1>
23195 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23196 #### 3. Nested inside html with wikitext split by html tags
23197 #### 4. No escape needed
23198 #### 5. Empty headings <h1></h1>
23199 #### 6. Heading chars in SOL context
23200 #### ----------------------------------------
23202 Headings: 0. Unnested
23212 <p>=foo<i>a</i>=</p>
23214 <nowiki>=foo=</nowiki>
23216 <nowiki> </nowiki>=foo=
23218 <nowiki>=foo=</nowiki>
23220 =foo''a''<nowiki>=</nowiki>
23223 # New headings and existing headings are handled differently
23225 Headings: 1. Nested inside html
23233 <h1 data-parsoid=''>=foo=</h1>
23234 <h2 data-parsoid=''>=foo=</h2>
23235 <h3 data-parsoid=''>=foo=</h3>
23236 <h4 data-parsoid=''>=foo=</h4>
23237 <h5 data-parsoid=''>=foo=</h5>
23238 <h6 data-parsoid=''>=foo=</h6>
23246 =<nowiki>=foo=</nowiki>=
23247 ==<nowiki>=foo=</nowiki>==
23248 ===<nowiki>=foo=</nowiki>===
23249 ====<nowiki>=foo=</nowiki>====
23250 =====<nowiki>=foo=</nowiki>=====
23251 ======<nowiki>=foo=</nowiki>======
23256 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23265 <nowiki>*</nowiki>bar
23271 <nowiki>=bar=</nowiki>
23275 Headings: 3. Nested inside html with wikitext split by html tags
23279 <h1>=<b>bold</b>foo=</h1>
23281 = ='''bold'''foo= =
23285 Headings: 4a. No escaping needed (testing just h1 and h2)
23296 <h1><i>=</i>foo=</h1>
23316 Headings: 4b. No escaping needed (inside p-tags)
23331 Headings: 5. Empty headings
23335 <h1 data-parsoid='{}'></h1>
23337 <h2 data-parsoid='{}'></h2>
23339 <h3 data-parsoid='{}'></h3>
23341 <h4 data-parsoid='{}'></h4>
23343 <h5 data-parsoid='{}'></h5>
23345 <h6 data-parsoid='{}'></h6>
23355 =====<nowiki/>=====
23357 ======<nowiki/>======
23361 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23371 <nowiki>=a=</nowiki>
23373 <nowiki>=a=</nowiki>
23375 <nowiki>=a=</nowiki>
23379 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23392 <nowiki>=a=</nowiki>
23395 <nowiki>=a=</nowiki>
23398 <nowiki>=a=</nowiki>
23403 Headings: 6c. Heading chars in SOL context (leading newline break)
23411 <nowiki>=b=</nowiki>
23415 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23419 <!--c0--><p>=a=</p>
23421 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23423 <!--c0--><nowiki>=a=</nowiki>
23425 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23429 Headings: 6d. Heading chars in SOL context (No escaping needed)
23439 Headings: 7. Insert a newline between new content and headings
23445 <h2 data-parsoid='{}'>A</h2>
23446 <p data-parsoid='{}'>a</p>
23456 #### --------------- Lists ---------------
23457 #### 0. Outside nests (*foo, etc.)
23458 #### 1. Nested inside html <ul><li>*foo</li></ul>
23459 #### 2. Inside definition lists
23460 #### 3. Only bullets at start should be escaped
23461 #### 4. No escapes needed
23462 #### 5. No unnecessary escapes
23463 #### 6. Escape bullets in SOL position
23464 #### 7. Escape bullets in a multi-line context
23465 #### ----------------------------------------
23468 Lists: 0. Outside nests
23478 <nowiki>*</nowiki>foo
23480 <nowiki>#</nowiki>foo
23482 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23485 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23486 ## to test wikitext escaping, and insignificant whitespace diffs
23487 ## cause PHP parser tests to barf
23489 Lists: 1. Nested inside html (No unnecessary escapes)
23498 <li data-parsoid='{}'>*foo</li>
23499 <li data-parsoid='{}'>#foo</li>
23500 <li data-parsoid='{}'>:foo</li>
23501 <li data-parsoid='{}'>;foo</li>
23509 <li data-parsoid='{}'>*foo</li>
23510 <li data-parsoid='{}'>#foo</li>
23511 <li data-parsoid='{}'>:foo</li>
23512 <li data-parsoid='{}'>;foo</li>
23519 *<nowiki>*foo</nowiki>
23520 *<nowiki>#foo</nowiki>
23521 *<nowiki>:foo</nowiki>
23522 *<nowiki>;foo</nowiki>
23528 #<nowiki>*foo</nowiki>
23529 #<nowiki>#foo</nowiki>
23530 #<nowiki>:foo</nowiki>
23531 #<nowiki>;foo</nowiki>
23535 Lists: 2. Inside definition lists
23539 <dl><dt>;foo</dt></dl>
23540 <dl><dt>:foo</dt></dl>
23543 <dl><dd>:foo</dd></dl>
23547 ; <nowiki>:foo</nowiki>
23549 ; <nowiki>:foo</nowiki>
23556 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23562 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23566 *<nowiki>*foo</nowiki>''it''*bar
23570 Lists: 4. No escapes needed
23583 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23587 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23601 Lists: 5. No unnecessary escapes
23605 <ul><li> bar <span>[[foo]]</span></li></ul>
23606 <ul><li> =bar <span>[[foo]]</span></li></ul>
23607 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23608 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23609 <ul><li> =bar <span>foo]]</span>=</li></ul>
23610 <ul><li> <s></s>: a</li></ul>
23611 <ul><li> <i>* foo</i></li></ul>
23614 * bar <span><nowiki>[[foo]]</nowiki></span>
23616 * =bar <span><nowiki>[[foo]]</nowiki></span>
23618 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23620 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23622 * =bar <span>foo]]</span>=
23630 Lists: 6. Escape bullets in SOL position
23634 <p><!--cmt-->*foo</p>
23636 <!--cmt--><nowiki>*</nowiki>foo
23640 Lists: 7. Escape bullets in a multi-line context
23649 <nowiki>*</nowiki>b
23653 Lists: 8. Escape colons only if not present in tags
23657 <dl><dt>a:b<i>c:d</i></dt></dl>
23659 ; <nowiki>a:b</nowiki>''c:d''
23662 #### --------------- HRs ---------------
23663 #### 1. Single line
23664 #### -----------------------------------
23667 HRs: 1. Single line
23675 ----<nowiki>----</nowiki>
23680 #### --------------- Tables ---------------
23681 #### 1a. Simple example
23682 #### 1b. No escaping needed (!foo)
23683 #### 1c. No escaping needed (|foo)
23684 #### 1d. No escaping needed (|}foo)
23686 #### 2a. Nested in td (<td>foo|bar</td>)
23687 #### 2b. Nested in td (<td>foo||bar</td>)
23688 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23690 #### 3a. Nested in th (<th>foo!bar</th>)
23691 #### 3b. Nested in th (<th>foo!!bar</th>)
23692 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23696 #### 4c. No escaping needed
23697 #### --------------------------------------
23700 Tables: 1a. Simple example
23708 <nowiki>{|</nowiki>
23713 Tables: 1b. No escaping needed
23724 Tables: 1c. No escaping needed
23735 Tables: 1d. No escaping needed
23746 Tables: 2a. Nested in td
23751 <td>foo|bar</td></tr>
23752 <tr><td>x<div>a|b</div></td>
23756 |<nowiki>foo|bar</nowiki>
23758 |x<div><nowiki>a|b</nowiki></div>
23774 Tables: 2b. Nested in td
23780 <td>a<i>b||c</i></td>
23781 <td>a<i><div>b||c</div></i></td>
23782 </tr></tbody></table>
23785 |<nowiki>foo||bar</nowiki>
23786 |a''<nowiki>b||c</nowiki>''
23787 |a''<div><nowiki>b||c</nowiki></div>''
23796 <td>a<i><div>b||c</div></i>
23802 Tables: 2c. Nested in td -- no escaping needed
23818 Tables: 3a. Nested in th
23834 Tables: 3b. Nested in th
23839 <tr><th>foo!!bar</th>
23840 <th><i>foo|bar</i></th>
23841 <th><i>foo!!bar</i></th>
23842 <th><i><span>foo!!bar</span></i></th>
23843 </tr></tbody></table>
23846 !<nowiki>foo!!bar</nowiki>
23847 !''<nowiki>foo|bar</nowiki>''
23848 !''<nowiki>foo!!bar</nowiki>''
23849 !''<span><nowiki>foo!!bar</nowiki></span>''
23858 <th><i>foo!!bar</i>
23860 <th><i><span>foo!!bar</span></i>
23866 Tables: 3c. Nested in th
23871 <tr><th>foo||bar</th>
23872 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23873 </tr></tbody></table>
23876 !<nowiki>foo||bar</nowiki>
23877 !<nowiki>foo||bar</nowiki>
23890 Tables: 4a. Escape -
23906 |<nowiki>-bar</nowiki>
23911 Tables: 4b. Escape +
23927 |<nowiki>+bar</nowiki>
23932 Tables: 4c. No escaping needed
23937 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23938 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23944 <div>a|b</div></td>
23989 Tables: 4d. No escaping needed
23994 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23995 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23996 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
24007 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
24017 T97430: Don't emit empty nowiki pairs around marker meta tags
24021 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24022 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
24024 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24025 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
24029 Unclosed xmlish element in table line shouldn't eat end delimiters
24034 <tbody><tr><td> <foo</td>
24035 <td> bar></td></tr>
24052 #### --------------- Links ----------------
24053 #### 1. Quote marks in link text
24054 #### 2. Wikilinks: Escapes needed
24055 #### 3. Wikilinks: No escapes needed
24056 #### 4. Extlinks: Escapes needed
24057 #### 5. Extlinks: No escapes needed
24058 #### --------------------------------------
24060 Links 1. WikiLinks: No escapes needed
24064 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
24065 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
24066 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
24070 [[Foo|x [Foobar] x]]
24072 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
24073 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
24074 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
24079 Links 2. WikiLinks: Escapes needed
24083 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
24084 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
24085 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
24086 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
24087 <a href="Foo" rel="mw:WikiLink">|Bar</a>
24088 <a href="Foo" rel="mw:WikiLink">]]bar</a>
24089 <a href="Foo" rel="mw:WikiLink">[[bar</a>
24090 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
24091 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
24092 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
24094 [[Foo|<nowiki>Foobar]</nowiki>]]
24095 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
24096 [[Foo|<nowiki>[[Bar]]</nowiki>]]
24097 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
24098 [[Foo|<nowiki>|Bar</nowiki>]]
24099 [[Foo|<nowiki>]]bar</nowiki>]]
24100 [[Foo|<nowiki>[[bar</nowiki>]]
24101 [[Foo|<nowiki>x [[ y</nowiki>]]
24102 [[Foo|<nowiki>x ]] y</nowiki>]]
24103 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
24105 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
24106 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
24107 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
24108 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24109 <a href="/wiki/Foo" title="Foo">|Bar</a>
24110 <a href="/wiki/Foo" title="Foo">]]bar</a>
24111 <a href="/wiki/Foo" title="Foo">[[bar</a>
24112 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24113 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24114 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24119 Links 3. WikiLinks: No escapes needed
24123 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24124 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24129 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24130 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24135 Links 4. ExtLinks: Escapes needed
24139 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24140 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
24141 <p>[http://google.com]</p>
24142 <p>[http://google.com google]</p>
24143 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24144 <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>
24146 [http://google.com <nowiki>[google]</nowiki>]
24147 [http://google.com <nowiki>google]</nowiki>]
24149 <nowiki>[http://google.com]</nowiki>
24151 <nowiki>[http://google.com google]</nowiki>
24153 [http://google.com<nowiki>]</nowiki>
24155 [{{echo|http://google.com}}<nowiki>]</nowiki>
24157 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24158 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24159 </p><p>[http://google.com]
24160 </p><p>[http://google.com google]
24161 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24162 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24167 Links 5. ExtLinks: No escapes needed
24171 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24172 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24174 [http://google.com [google]
24176 [[http://google.com]]
24178 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24179 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24184 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
24188 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24189 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24190 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24191 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24192 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24193 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24194 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24195 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24196 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24197 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24198 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24199 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24200 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24203 x<nowiki/>http://example.com<nowiki/>y
24204 http://example.com<nowiki/>?x
24205 http://example.com<nowiki/>&x
24206 http://example.com<nowiki/>'x
24207 http://example.com<nowiki/>,x
24208 http://example.com<nowiki/>.x
24209 http://example.com<nowiki/>;x
24210 http://example.com<nowiki/>:x
24211 http://example.com<nowiki/>;x
24212 http://example.com<nowiki/>!x
24213 http://example.com<nowiki/>=x
24214 http://example.com<nowiki/>(x)
24215 http://example.com(x<nowiki/>)
24219 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24224 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24226 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24227 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24228 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24229 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24230 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24236 "http://example.com"
24237 (http://example.com)
24238 (http://example.com) foo
24239 http://example.com,
24240 http://example.com, foo
24243 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24245 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24246 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24247 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24248 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24249 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24254 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24258 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24259 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24261 http://example.com.,;:!?\
24262 -http://example.com:
24264 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24265 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24270 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
24274 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24275 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24276 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24280 X<nowiki/>RFC 123<nowiki/>y
24284 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
24288 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24289 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24290 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24297 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24298 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24299 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24304 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
24308 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24309 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24310 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24314 X<nowiki/>PMID 123<nowiki/>y
24318 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
24322 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24323 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24324 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24331 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24332 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24333 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24338 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
24342 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24343 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24344 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24347 ISBN 1234567890<nowiki/>1
24348 ISBN 1234567890<nowiki/>x
24349 a<nowiki/>ISBN 1234567890<nowiki/>b
24353 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
24357 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24361 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24366 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24370 <p>this is not a link: http://example.com
24373 this is not a link: <nowiki>http://example.com</nowiki>
24377 Links 15. Link trails can't become link prefixes.
24382 <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>
24384 [[Söfnuður]]-[[00]]
24386 <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>
24390 #### --------------- Quotes ---------------
24391 #### 1. Quotes inside <b> and <i>
24392 #### 2. Link fragments separated by <i> and <b> tags
24393 #### 3. Link fragments inside <i> and <b>
24394 #### 4. No escaping needed
24395 #### --------------------------------------
24397 1a. Quotes inside <b> and <i>
24408 <b>foo'<i>bar'</i>baz</b>
24417 <i>fools'<span> errand</span></i>
24418 <i><span>fool</span>'s errand</i>
24419 '<i>foo</i> bar '<i>baz</i>
24420 a|!*#-:;+-~[]{}b'<i>x</i>
24424 ''<nowiki>''foo''</nowiki>''
24425 ''<nowiki>'''foo'''</nowiki>''
24427 '''<nowiki/>'foo''''
24428 '''<nowiki>''foo''</nowiki>'''
24429 '''<nowiki>'''foo'''</nowiki>'''
24430 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24431 '''foo'''<nowiki/>'s
24437 '''foo'''<nowiki/>'
24438 ''''foo'''<nowiki/>'
24439 ''fools'<span> errand</span>''
24440 ''<span>fool</span>'s errand''
24441 '<nowiki/>''foo'' bar '''baz''
24442 a|!*#-:;+-~[]{}b'''x''
24446 1b. Quotes inside <b> and <i> with other tags on same line
24450 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24451 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24452 <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>
24453 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24454 '<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>
24455 '<i>foo</i> <div title="name">test</div>
24456 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24457 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24458 <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>
24461 '''a'' foo ''[[bar]]''
24462 ''a''' foo ''[[bar]]''
24463 ''a''' foo '''{{echo|[[bar]]}}'''
24464 [[foo]] x'''[[bar]]''
24465 '''foo'' <ref>test</ref>
24466 '''foo'' <div title="name">test</div>
24467 '''foo'' and <br> bar
24472 2. Link fragments separated by <i> and <b> tags
24476 <p>[[<i>foo</i>hello]]</p>
24477 <p>[[<b>foo</b>hello]]</p>
24479 [[''foo''<nowiki>hello]]</nowiki>
24481 [['''foo'''<nowiki>hello]]</nowiki>
24484 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24485 # this is one of the shortcomings of this format
24487 3. Link fragments inside <i> and <b>
24491 <p><i>[[foo</i>]]</p>
24492 <p><b>[[foo</b>]]</p>
24494 ''[[foo''<nowiki>]]</nowiki>
24496 '''[[foo'''<nowiki>]]</nowiki>
24500 4. No escaping needed
24504 <p>'<span><i>bar</i></span>'
24505 '<span><b>bar</b></span>'
24509 '<span>''bar''</span>'
24510 '<span>'''bar'''</span>'
24514 #### ----------- Paragraphs ---------------
24515 #### 1. No unnecessary escapes
24516 #### --------------------------------------
24519 1. No unnecessary escapes
24523 <p>bar <span>[[foo]]</span>
24524 </p><p>=bar <span>[[foo]]</span>
24525 </p><p>[[bar <span>[[foo]]</span>
24526 </p><p>]]bar <span>[[foo]]</span>
24527 </p><p>=bar <span>foo]]</span>=
24530 bar <span><nowiki>[[foo]]</nowiki></span>
24532 =bar <span><nowiki>[[foo]]</nowiki></span>
24534 [[bar <span><nowiki>[[foo]]</nowiki></span>
24536 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24538 =bar <span>foo]]</span><nowiki>=</nowiki>
24541 #### ----------------------- PRE --------------------------
24542 #### 1. Leading whitespace in SOL context should be escaped
24543 #### ------------------------------------------------------
24545 1. Leading whitespace in SOL context should be escaped
24568 <nowiki> </nowiki>a
24570 <nowiki> </nowiki> a
24574 <nowiki> </nowiki> a
24576 <nowiki> </nowiki>a
24579 <nowiki> </nowiki>b
24602 2. Leading whitespace in non-indent-pre contexts should not be escaped
24606 <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>
24607 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24608 <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>
24618 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24637 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24641 <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>
24643 [[File:Foobar.jpg|thumb|caption]]
24647 5. Nowiki escaping should account for indent-pres
24657 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24670 #### --------------- Behavior Switches --------------------
24673 1. Valid behavior switches should be escaped
24680 <nowiki>__TOC__</nowiki>
24681 ''<nowiki>__TOC__</nowiki>''
24685 2. Invalid behavior switches should not be escaped
24696 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24698 Behavior switches should be SOL-transparent
24702 <meta property="mw:PageProp/toc" />
24704 <!-- this one's bogus -->
24707 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24709 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24713 <!-- this one's bogus -->
24722 #### --------------- HTML tags ---------------
24725 #### 3. multi-line html tag
24726 #### 4. extension tags
24727 #### -----------------------------------------
24733 <a href="http://google.com">google</a>
24735 <a href="http://google.com">google</a>
24743 <ul><li> <div>foo</div></li>
24744 <li> <div style="color:red">foo</div></li>
24745 <li> <td></li></ul>
24748 * <nowiki><div>foo</div></nowiki>
24749 * <nowiki><div style="color:red">foo</div></nowiki>
24750 * <nowiki><td></nowiki>
24754 3. multi-line html tag
24773 <p><ref>foo</ref>
24774 </p><p><ref>bar
24775 </p><p>baz</ref>
24778 <nowiki><ref>foo</ref></nowiki>
24780 <nowiki><ref>bar</nowiki>
24782 baz<nowiki></ref></nowiki>
24785 #### --------------- Others ---------------
24791 <p><nowiki>foo</nowiki>
24794 <nowiki>foo</nowiki>
24797 ## The quote-char in the input is necessary for triggering the bug
24799 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24808 #----------- End of wikitext escaping tests --------------
24812 Tag-like HTML structures are passed through as text
24834 </p><p>1<d e>f
24839 HTML tag with necessary entities in attributes
24841 <span title="&amp;">foo</span>
24843 <p><span title="&amp;">foo</span>
24848 HTML tag with 'unnecessary' entity encoding in attributes
24850 <span title="&">foo</span>
24852 <p><span title="&">foo</span>
24857 HTML tag with broken attribute value quoting
24859 parsoid=wt2html,html2html
24861 <span title="Hello world>Foo</span>
24863 <p><span title="Hello world">Foo</span>
24866 <p><span title="Hello world">Foo</span></p>
24870 Self-closed tag with broken attribute value quoting
24872 parsoid=wt2html,html2html
24874 <div title="Hello world />Foo
24876 <div title="Hello world"></div>
24879 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24883 Table with broken attribute value quoting
24885 parsoid=wt2html,html2html
24888 | title="Hello world|Foo
24893 <td title="Hello world">Foo
24899 <td title="Hello world">Foo
24905 Table with broken attribute value quoting on consecutive lines
24907 parsoid=wt2html,html2html
24910 | title="Hello world|Foo
24911 | style="color:red|Bar
24916 <td title="Hello world">Foo
24918 <td style="color:red">Bar
24924 <td title="Hello world">Foo
24925 </td><td style="color: red">Bar
24926 </td></tr></tbody></table>
24931 Accept empty td cell attribute
24934 | align="center" | foo || |
24939 <td align="center"> foo </td>
24946 Non-empty attributes in th-cells
24949 ! Foo !! style="color: red" | Bar
24955 <th style="color: red"> Bar
24961 Accept empty attributes in th-cells
24976 Empty table rows go away
24997 ### Parsoid-centric tests for testing RTing of inter-element separators
24998 ### Edge cases not tested by existing parser tests and specific to
24999 ### Parsoid-specific serialization strategies.
25003 RT-ed inter-element separators should be valid separators
25015 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
25019 # Parsoid-only since PHP parser relies on Tidy for correct output
25021 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
25035 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
25036 <p>bar</p></small></td></tr>
25040 <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>
25044 # Note that the "style" attribute is really a template parameter here.
25045 # The = would have to be {{=}} if you wanted the literal.
25047 Empty TD followed by TD with tpl-generated attribute
25052 |{{echo|style='color:red'}}|foo
25066 Indented table with an empty td
25084 ## We have some newline diffs RT-ing this edge case
25085 ## and it is not important enough -- we seem to be emitting
25086 ## at most 2 newlines after a </tr> and this is unrelated to
25087 ## the issue from T85627 that this is testing.
25089 Indented table with blank lines in between (T85627)
25108 Indented block & table
25122 <div data-parsoid='{"stx":"html"}'>foo</div>
25124 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25129 Indent and comment before table row
25144 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25145 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25149 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25151 Empty TR followed by a template-generated TR
25157 {{echo|<tr><td>foo</td></tr>}}
25163 <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}}]}'>
25168 ## PHP and parsoid output differ for this, and since this is primarily
25169 ## for testing Parsoid's serializer, marking this Parsoid only
25171 Empty TR followed by mixed-ws-comment line should RT correctly
25187 <!--c--> </tr><!--d-->
25193 Multi-line image caption generated by templates with/without trailing newlines
25195 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25196 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25198 <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>
25199 <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>
25203 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25207 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25209 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25211 <includeonly>foo</includeonly>
25219 ## PHP emits broken html for this, and since this is primarily
25220 ## a Parsoid serializer test, marking this Parsoid only
25222 Improperly nested inline or quotes tags with whitespace in between
25224 <span> <s>x</span> </s>
25227 <p><span> <s>x</s></span><s> </s>
25228 <b> <i>x</i></b><i> </i>
25233 Encapsulate protected attributes from wt
25235 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25237 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25241 <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>
25243 <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">
25244 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25248 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25249 ## Having nested or stray pre tags results in the attempt to add duplicates,
25250 ## causing an assertion fail. This test tries to prevent that situation.
25252 Ensure ParagraphWrapper can deal with stray closing pre tags
25262 1. Ensure fostered text content is wrapped in element nodes
25266 <table>hi</table><table>ho</table>
25275 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25277 parsoid=wt2html,wt2wt
25286 <tbody><tr><td> a</td></tr>
25291 Encapsulation properly handles null DSR information from foster box
25293 parsoid=wt2html,wt2wt
25295 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25297 <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>
25301 1. Encapsulate foster-parented transclusion content
25303 parsoid=wt2wt,wt2html
25305 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25307 <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>
25317 2. Encapsulate foster-parented transclusion content
25319 parsoid=wt2wt,wt2html
25321 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25323 <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>
25334 3. Encapsulate foster-parented transclusion content
25336 parsoid=wt2wt,wt2html
25338 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25340 <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>"]}">
25353 4. Encapsulate foster-parented transclusion content
25355 parsoid=wt2wt,wt2html
25357 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25359 <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>"]}">
25372 5. Encapsulate foster-parented transclusion content
25374 parsoid=wt2wt,wt2html
25376 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25378 <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>
25393 6. Encapsulate foster-parented transclusion content
25395 parsoid=wt2wt,wt2html
25397 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25399 <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>
25415 7. Encapsulate foster-parented transclusion content
25417 parsoid=wt2wt,wt2html
25419 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25421 <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>
25431 # Note that the wt is broken on purpose: the = should be {{=}} if you
25432 # don't want it to be a template parameter key.
25434 8. Encapsulate foster-parented transclusion content
25436 parsoid=wt2wt,wt2html
25439 }}{|{{echo|style='color:red'}}
25444 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25446 <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>
25457 9. Encapsulate foster-parented transclusion content
25459 parsoid=wt2wt,wt2html
25461 <table>{{echo|hi</table>hello}}
25463 <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>
25467 Table in fosterable position
25478 <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">
25480 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25486 # Parsoid only for bug 64747
25488 Properly encapsulate empty-content transclusions in fosterable positions
25496 <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"}]]}'>
25502 Always encapsulate foster box when template range is expanded to table
25515 T115289: Unclosed table
25517 {{echo|<table>}}<!--c-->[[Category:Two]]
25519 <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>
25523 T115289: Don't migrate newlines out of tables with fostered content
25525 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25527 <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>
25531 T73074: More fostering fun
25533 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25535 <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>
25539 Support <object> element with .data attribute
25543 <object data="test.swf"></object>
25545 <object data="test.swf"></object>
25549 Don't block XML namespace declaration
25551 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25553 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25556 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25559 # -----------------------------------------------------------------
25560 # The following section of tests are primarily to spec requirements
25561 # around Parsoid's serialization (old, new, edited content)
25563 # All these tests are marked Parsoid html2wt and html2html only
25564 # ----------------------------------------------------------------
25567 Ignore rel attribute in a-tags during serialization to url-links
25571 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25572 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25573 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25575 http://en.wikipedia.org/wiki/Foobar
25576 http://en.wikipedia.org/wiki/Foobar
25577 http://en.wikipedia.org/wiki/Foobar
25580 # 'mi' is a localinterwiki prefix as well as a language
25582 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25586 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25593 New wikilinks should be serialized properly
25597 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25598 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25599 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25600 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25601 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25605 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25606 http://en.wikipedia.org/wiki/Foo
25607 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25611 New wiki links (href variations)
25615 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25616 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25617 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25618 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25623 [[Toxine bactérienne]]
25627 New wiki links (content string variations)
25631 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25632 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25633 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25637 [[Foo_bar|./Foo_bar]]
25641 New category links (href variations)
25645 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25646 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25647 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25649 [[Category:Toxine bactérienne]]
25650 [[Category:Toxine bactérienne]]
25651 [[Category:Toxine bactérienne]]
25655 New sol transparent links don't need indent-pre nowiki protection
25660 <link rel="mw:PageProp/redirect" href="./Main_Page">
25661 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25662 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25664 #WEITERLEITUNG [[Main Page]]
25665 <!-- this is good --> [[Category:Good]]
25666 <!-- this is great --> [[Kategorie:Great]]
25670 New interlanguage links (href variations)
25674 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25675 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25676 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25678 [[es:Toxine bactérienne]]
25679 [[es:Toxine_bactérienne]]
25680 [[es:Toxine_bactérienne]]
25684 Image: Modifying size of an image (1)
25687 "modes": ["wt2wt"],
25689 ["img[height]", "attr", "height", "22"],
25690 ["img[width]", "attr", "width", "200"]
25694 [[Image:Foobar.jpg|230x230px]]
25696 [[Image:Foobar.jpg|200x200px]]
25700 Image: Modifying size of an image (2)
25703 "modes": ["wt2wt"],
25705 ["img[height]", "attr", "height", "100"],
25706 ["img[width]", "attr", "width", "500"]
25710 [[Image:Foobar.jpg|230x230px]]
25712 [[Image:Foobar.jpg|500x500px]]
25715 # Change in size is ignored so long as class='mw-default-size'
25717 Image: Modifying size of an image (3)
25720 "modes": ["wt2wt"],
25722 ["figure[class]", "removeClass", "mw-default-size"],
25723 ["figure img", "attr", "height", "19"],
25724 ["figure img", "attr", "width", "170"]
25728 [[Image:Foobar.jpg|thumb]]
25730 [[Image:Foobar.jpg|thumb|170x170px]]
25734 Image: Modifying alignment of an image (bug 48665)
25737 "modes": ["wt2wt"],
25739 ["figure[class]", "removeClass", "mw-halign-right"],
25740 ["figure[class]", "addClass", "mw-halign-left"]
25744 [[Image:Foobar.jpg|thumb|caption|right]]
25746 [[Image:Foobar.jpg|thumb|caption|left]]
25750 Image: Modifying mw-default-size of an frameless image (bug 62805)
25753 "modes": ["wt2wt"],
25755 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25759 [[Image:Foobar.jpg|frameless|right]]
25761 [[Image:Foobar.jpg|frameless|right|220x220px]]
25765 Image: Modifying valign of an image (bug 49221)
25768 "modes": ["wt2wt"],
25770 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25771 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25775 [[File:Foobar.jpg|20px|middle]]
25777 [[File:Foobar.jpg|20px|text-top]]
25781 Image: Modifying alt attribute of an image (bug 56400)
25784 "modes": ["wt2wt"],
25786 ["img[alt]", "attr", "alt", "some alternate edited text"]
25790 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25792 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25796 Image: Modifying caption of an image
25799 "modes": ["wt2wt"],
25801 ["figcaption", "text", "new caption"]
25805 [[Image:Foobar.jpg|thumb|original caption]]
25807 [[Image:Foobar.jpg|thumb|new caption]]
25811 Image: empty alt attribute (bug 48924)
25815 [[File:Foobar.jpg|thumb|alt=|bar]]
25817 <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>
25821 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25827 <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>
25829 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25833 Image: Block level image should have \n before and after
25836 [[File:Foobar.jpg|right|thumb|150x150px]]
25840 <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>
25845 Image: New block level image should have \n before and after (existing content)
25848 [[File:Foobar.jpg|right|thumb|150x150px]]
25852 <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>
25857 Image: upright option (parsoid)
25859 [[File:Foobar.jpg|thumb|upright|caption]]
25860 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25861 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25863 <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>
25864 <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>
25865 <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>
25869 Image: upright option is ignored on inline and frame images (parsoid)
25871 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25873 <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>
25877 Image: from basic HTML (1)
25881 <span typeof="mw:Image">
25882 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25885 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25889 Image: from basic HTML (2)
25893 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25895 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25899 Image: from basic HTML (3)
25903 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25905 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25909 Image: from basic HTML (4)
25913 <img src="./File:Foobar.jpg">
25915 [[File:Foobar.jpg|link=]]
25919 Image: Invalid title as link
25921 [[File:Foobar.jpg|link=<]]
25923 <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>
25926 <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>
25930 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25935 <li><p>foo</p></li>
25942 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25946 <ul> <li>foo</li></ul>
25952 Don't strip leading whitespace when handling indent-pre suppressing tags
25957 <tr><td> indented row</td></tr>
25960 <b>This is very bold of you!</b>
25963 indented cell (no pre-wrapping!)
25973 '''This is very bold of you!'''
25977 indented cell (no pre-wrapping!)
25985 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
26007 <nowiki> </nowiki></span>bar2
26010 <nowiki> </nowiki><span>bar</span>
26013 <nowiki> </nowiki><span>foo</span>
26018 Lists: Dont insert newlines in a serialized list item.
26022 <ul><li>a<br>b</li><li>c</li></ul>
26029 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
26032 "modes": ["html2wt"],
26033 "scrubWikitext": false
26036 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26037 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26039 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26040 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26042 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
26044 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26046 == hello there [[Category:A1]] ==
26048 == [[Category:A2]] hi pal ==
26050 == <!--foo--> [[Category:A3]] how goes it ==
26052 == it goes well [[Category:A4]] <!--bar--> ==
26054 ==howdy [[Category:A5]]==
26060 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
26063 "modes": ["html2wt"],
26064 "scrubWikitext": true
26067 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26068 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26070 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26071 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26073 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26081 <!--foo--> [[Category:A3]]
26086 [[Category:A4]] <!--bar-->
26094 Headings: Don't hoist metas that come from templates
26097 "modes": ["html2wt"],
26098 "scrubWikitext": true
26101 <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>
26103 == {{echo|foo [[Category:Foo]]}} ==
26107 Headings: Category in ref isn't hoisted
26110 "modes": ["html2wt"],
26111 "scrubWikitext": true
26114 <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>
26116 <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>
26119 [[Category:Baz]] </ref> ==
26125 Parsoid: Serialize positional parameters with = in them as named parameter
26129 <p about="#mwt1" typeof="mw:Transclusion"
26130 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26132 <p about="#mwt1" typeof="mw:Transclusion"
26133 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26135 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26136 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26137 <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>
26141 {{echo|1=f=oo|2=bar}}
26143 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26144 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26145 {{echo|<nowiki>f=oo</nowiki>|bar}}
26149 Parsoid: Serialize positional parameters with = in extlink as named parameter
26153 <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>
26155 {{echo|1=http://stuff?is=ok}}
26159 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26163 <div>a<p>b</p></div>
26184 Substrings resembling wikitext in hrefs should not get nowiki escapes
26188 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26194 Enforce single-line context in the serializer
26201 <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">
26202 </span><span about="#mwt1">you</span> </h2>
26204 <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>
26206 <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
26207 there</span></li></ol>
26219 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26226 </tbody></table></dd></dl>
26230 == hi {{bogus|there
26241 * foo '''bar''' baz
26253 Serialize new placeholder space without spans
26257 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26259 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26261 <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>
26267 <ref>foo : bar</ref>ok
26271 #-----------------------
26272 # Tag minimization tests
26273 #-----------------------
26276 1. I/B quote minimization: wikitext-only tags should be combined
26280 <p><i>A</i><i>B</i></p>
26281 <p><b>A</b><b>B</b></p>
26282 <p><i>A</i><b><i>B</i></b></p>
26283 <p><b>A</b><i><b>B</b></i></p>
26284 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26285 <p><i><b>A</b></i><i><b>B</b></i></p>
26286 <p><i><b>A</b></i><b><i>B</i></b></p>
26287 <p><b><i>A</i></b><i><b>B</b></i></p>
26307 2. I/B quote minimization: wikitext and html tags should not be combined
26311 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26312 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26316 ''A''<nowiki/>'''<i>B</i>'''
26320 3. I/B quote minimization: templated content stops minimization
26324 <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>
26325 <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>
26327 ''A''{{echo|''B''}}
26329 ''A''{{echo|'''''B'''''}}
26333 4. I/B quote minimization: new content should be mimimized with adjacent old content
26337 <p><i>A</i><i>B</i></p>
26338 <p><b>A</b><b>B</b></p>
26339 <p><i>A</i><b><i>B</i></b></p>
26349 5a. Merge adjacent quote nodes if they've been edited
26352 "modes": ["wt2wt", "selser"],
26354 ["p", "contents", "remove", ":contains('b')"]
26364 5b. Merge adjacent quote nodes if they've been edited
26367 "modes": ["wt2wt", "selser"],
26373 ''a''<span id="x">b</span>''c''
26379 1. Merge adjacent link nodes as long as at least one element is new
26382 "modes": ["html2wt"],
26383 "scrubWikitext": true
26386 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26387 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26388 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26392 [[Football|Foot]][[Football|ball]]
26396 2. Merge adjacent link nodes and enable additional normalizations
26399 "modes": ["html2wt"],
26400 "scrubWikitext": true
26403 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26405 [[Football|''Football'']]
26409 3. Don't merge adjacent link nodes if scrubWikitext is false
26412 "modes": ["html2wt"],
26413 "scrubWikitext": false
26416 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26418 [[Football|Foot]][[Football|ball]]
26421 #------------------------------
26422 # End of tag minimization tests
26423 #------------------------------
26426 Bug 54262: New entities
26430 <span typeof="mw:Entity"> </span>
26435 ## Note that there is no wikitext output for 'unknownproperty' ##
26436 ## Unknown magic words are silently dropped ##
26443 <meta property='mw:PageProp/toc' />
26444 <meta property='mw:PageProp/notoc' />
26445 <meta property='mw:PageProp/forcetoc' />
26446 <meta property='mw:PageProp/index' />
26447 <meta property='mw:PageProp/noindex' />
26448 <meta property='mw:PageProp/nogallery' />
26449 <meta property='mw:PageProp/noeditsection' />
26450 <meta property='mw:PageProp/notitleconvert' />
26451 <meta property='mw:PageProp/nocontentconvert' />
26452 <meta property='mw:PageProp/unknownproperty' />
26462 __NOCONTENTCONVERT__
26466 Consecutive <pre>s should not get merged
26468 parsoid=html2wt,html2html
26470 <pre>a</pre><pre>b</pre>
26498 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26502 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26504 [[Special:BookSources/1234567890|ISBN 1234567895]]
26508 Edited RFC links not serializable as RFC links should serialize as extlinks
26512 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26514 [//tools.ietf.org/html/rfc123 New RFC]
26518 Edited PMID links not serializable as PMID links should serialize as extlinks
26522 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26524 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26528 WTS of autolinks with trailing/surrounding context
26532 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26533 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26534 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26535 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26536 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26537 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26539 http://cscott.net'''foo'''
26541 http://cscott.net<b>foo</b>
26543 '''http://cscott.net'''
26545 '''http://cscott.net '''
26547 '''http://cscott.net<nowiki/>x'''
26549 http://cscott.net<nowiki/>x
26553 WTS of autolinks with nowikis (round-trip)
26555 x<nowiki/>http://cscott.net<nowiki/>x
26557 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26560 # this is the "easy" test because it leaves in place all the
26561 # data-parsoid information indicating this is an autolink
26563 WTS of autolinks with escapes (editing)
26566 "modes": ["wt2wt"],
26568 [ "meta", "remove" ]
26572 x<nowiki/>http://cscott.net<nowiki/>x
26574 x<nowiki/>http://cscott.net<nowiki/>x
26578 WTS of edited autolink-like text (T103364)
26581 "modes": ["wt2wt"],
26583 [ "span[typeof]", "removeAttr", "typeof" ]
26587 Not a link: <nowiki>http://example.com</nowiki>.
26589 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26593 WTS of newly-authored autolink-like text (T103364)
26597 <p>http://example.com is not a link.</p>
26599 <nowiki>http://example.com</nowiki> is not a link.
26603 WTS of autolink-like text after an autolink (T108563)
26607 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26609 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26613 Magic links inside links (not autolinked)
26615 [[Foo|http://example.com]]
26618 [[Foo|ISBN 123456789x]]
26620 [http://foo.com http://example.com]
26621 [http://foo.com RFC 1234]
26622 [http://foo.com PMID 1234]
26623 [http://foo.com ISBN 123456789x]
26625 <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>
26626 <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>
26628 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26629 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26630 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26631 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26633 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26634 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26635 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26636 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26640 Magic links inside image captions (autolinked)
26642 [[File:Foobar.jpg|thumb|http://example.com]]
26643 [[File:Foobar.jpg|thumb|RFC 1234]]
26644 [[File:Foobar.jpg|thumb|PMID 1234]]
26645 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26647 <div class="thumb tright">
26648 <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>
26649 <div class="thumbcaption">
26650 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26651 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26654 <div class="thumb tright">
26655 <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>
26656 <div class="thumbcaption">
26657 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26658 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26661 <div class="thumb tright">
26662 <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>
26663 <div class="thumbcaption">
26664 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26665 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26668 <div class="thumb tright">
26669 <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>
26670 <div class="thumbcaption">
26671 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26672 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26676 <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>
26677 <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>
26678 <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>
26679 <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>
26683 WTS of magic word text (T109371)
26688 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26689 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26691 <nowiki>RFC 1234</nowiki>
26693 [http://foo.com RFC 1234]
26699 Edited Redirect link should emit a non-piped wikitext link
26703 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26709 T75121: Infer extension name from typeOf if data-mw is not present
26711 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26713 <div typeOf="mw:Extension/foo"></div>
26718 # Note that the <p> wrapping isn't present in PHP parser output
26719 # The important thing for this test is that P-wrapping doesn't
26720 # interfere with the <nowiki> protection for leading - in <td>
26721 # (which isn't necessary for <th>).
26723 T88318: p-wrapped dash in table.
26725 parsoid=html2wt,wt2wt
26728 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26729 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26730 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26737 |<nowiki>-</nowiki>
26738 |<nowiki>- </nowiki>
26757 <td><small>-</small></td>
26769 T149209: WTS: Handle newlines in table cells properly
26777 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26779 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26785 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26787 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26809 T149209: Selser: Handle newlines in table cells properly
26812 "modes": ["selser"],
26814 [ "#h1", "html", "a\nb\n" ],
26815 [ "#h2", "html", "a\nb\n" ],
26816 [ "#c1", "html", "a\nb\n" ],
26817 [ "#c2", "html", "<p>a</p>" ],
26818 [ "#c3", "html", "<p>a</p>" ]
26823 ! id="h1" |edit-me!!1
26825 ! id="h2" |edit-me||2
26827 | id="c1" |edit-me||3
26829 | id="c2" |edit-me||4
26831 | id="c3" |edit-me||p||q||r
26856 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26861 <td id='mwAc'>foo</td>
26862 <td id='serialize-this'>bar</td>
26867 | id="serialize-this" |bar
26872 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26876 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26878 <div id="hello">ok</div>
26885 "modes": ["wt2wt"],
26887 [ "#xyz", "before", "<b>before</b> stuff " ],
26888 [ "#xyz", "after", " stuff <i>after</i>" ],
26889 [ "#xyz", "html", "x <b>y</b> z" ]
26893 <span id="xyz">hello</span>
26895 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26899 Never serialize a-tag as html, regardless of what data-parsoid has to say
26901 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26903 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26908 ## SSS FIXME: This is broken output nevertheless.
26909 ## What might be a reasonable non-broken output for this?
26910 ## This is an edge case unlikely to be seen in production
26911 ## that I am not wasting more time on this right now.
26913 Never serialize a-tag as html, no matter what attributes it has
26915 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26917 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26919 [http://boo.org http://boohoo.org]
26922 # Misnested is an indication that selser can reuse the source but these have
26923 # shown to sneak through on occasion. See T101768.
26924 # The original wikitext here is: [http://test.com [[one]] two three]
26926 Strip span tags added to mark misnested links
26930 <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>
26932 [http://test.com][[one]] two three
26936 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26940 <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|}"]}'>
26952 ## This test verifies the presence and computation of this attribute indirectly
26953 ## by making an edit and ensuring that the serialization is correct (which it would be
26954 ## only if firstWikitextNode is properly set).
26956 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26959 "modes": ["wt2wt"],
26961 [ "div#x", "remove" ],
26962 [ "div", "before", "<div>new</div>" ]
26966 <div id="x">foo</div>
26968 {{echo|<div>boo</div>
26976 {{echo|<div>boo</div>
26982 # --------------------------------------------
26983 # Tests spec'ing wikitext serialization norms |
26984 # --------------------------------------------
26987 1. Categories should always be serialized on their own line
26991 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26999 2. Categories that are part of templates should not introduce a line break
27001 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
27003 <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>
27006 # Careful while editing these next 2 tests. There are \u200f characters
27007 # before and after the <link> tags in the HTML and following some
27008 # of the categories in wikitext
27009 # Do not remove these characters in edits.
27011 # As part of the serialization, these bidi characters will get stripped.
27013 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
27016 "modes": ["html2wt"],
27017 "scrubWikitext": true
27020 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
27021 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
27024 [[קטגוריה: שיטות משפט]]
27028 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
27031 "modes": ["html2wt"],
27032 "scrubWikitext": true
27035 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
27042 Lists: Add space after bullets
27049 <li><span> baz</span></li>
27054 * <span> baz</span>
27058 1. Headings: Add space before/after == (T53744)
27065 <h2><span> baz</span></h2>
27073 == <span> baz</span> ==
27077 2. Headings: Add space before/after == even after hoisted content
27080 "modes": ["html2wt"],
27081 "scrubWikitext": true
27084 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
27092 1. Headings: suppress newly created empty headings
27095 "modes": ["html2wt"],
27096 "scrubWikitext": true
27104 2. Headings: don't suppress empty headings if scrubWikitext is false
27114 3. Headings: suppress empty headings on edits
27117 "modes": ["selser"],
27118 "scrubWikitext": true,
27124 ==<span id="x">foo</span>==
27129 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27132 "modes": ["html2wt"],
27133 "scrubWikitext": true
27136 <h2>foo<br/>bar</h2>
27137 <h2>foo <span><br/>bar</span> baz</h2>
27141 == foo <span> bar</span> baz ==
27145 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27148 "modes": ["html2wt"],
27149 "scrubWikitext": false
27152 <h2>foo<br/>bar</h2>
27158 1. WT Quote Tags: suppress newly created empty style tags
27161 "modes": ["html2wt"],
27162 "scrubWikitext": true
27170 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27176 ''<nowiki/>'''''<nowiki/>'''
27180 3. WT Quote Tags: suppress empty style tags on edits
27183 "modes": ["selser"],
27184 "scrubWikitext": true,
27190 '''<span id="x">foo</span>'''
27195 1. Anchors: suppress newly created empty anchors
27198 "modes": ["html2wt"],
27199 "scrubWikitext": true
27202 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27207 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27210 "modes": ["html2wt"],
27211 "scrubWikitext": false
27214 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27220 3. Anchors: suppress empty anchors on edits
27223 "modes": ["selser"],
27224 "scrubWikitext": true,
27230 [[Test|<span id="x">foo</span>]]
27235 3a. Anchors: do not suppress numbered extlinks
27238 "modes": ["wt2wt"],
27239 "scrubWikitext": true
27244 <a rel="mw:ExtLink" href="http://foo.com"></a>
27248 3b. Anchors: do not suppress numbered extlinks
27251 "modes": ["wt2wt"],
27252 "scrubWikitext": true,
27258 [http://foo.com <span id="x">foo</span>]
27264 Normalizations should be restricted to edited content
27267 "modes": ["selser"],
27268 "scrubWikitext": true,
27270 [ "h1", "before", "<i></i>"]
27284 1. Multiple normalizations (html2wt)
27287 "modes": ["html2wt"],
27288 "scrubWikitext": true
27292 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27293 </a><b><i></i></b>x</p>
27302 2. Multiple normalizations (selser)
27305 "modes": ["selser"],
27306 "scrubWikitext": true,
27308 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27312 <span id="x">foo</span>
27314 <span id="x">foo</span>
27320 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27323 "modes": ["html2wt"],
27324 "scrubWikitext": true
27336 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27343 <nowiki> </nowiki>hi
27345 <nowiki> </nowiki> hello
27349 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27352 "modes": ["html2wt"],
27353 "scrubWikitext": true
27362 baz bang</td></tr></table>
27368 bar<span>boo</span></p>
27384 bar<span>boo</span>
27388 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27391 "modes": ["selser"],
27392 "scrubWikitext": true,
27394 [ "p", "html", " a\n b" ]
27405 1. New links that end in spaces
27408 "modes": ["html2wt"],
27409 "scrubWikitext": false
27412 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27413 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27414 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27416 [[Berlin ]]<nowiki/>is the capital of Germany.
27420 [[Boston ]] is a city.
27424 2. New links that end in spaces
27427 "modes": ["html2wt"],
27428 "scrubWikitext": true
27431 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27432 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27433 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27435 [[Berlin]] is the capital of Germany.
27439 [[Boston]] is a city.
27443 1. Table cells with escapable prefixes
27446 "modes": ["html2wt"],
27447 "scrubWikitext": false
27451 <tr><td>a</td></tr>
27452 <tr><td>-</td></tr>
27453 <tr><td>+</td></tr>
27459 |<nowiki>-</nowiki>
27461 |<nowiki>+</nowiki>
27466 2. Table cells with escapable prefixes
27469 "modes": ["html2wt"],
27470 "scrubWikitext": true
27474 <tr><td>a</td></tr>
27475 <tr><td>-</td></tr>
27476 <tr><td>+</td></tr>
27489 3a. Table cells with escapable prefixes after edits
27492 "modes": ["selser"],
27493 "scrubWikitext": true,
27495 [ "table tbody tr:first-child td:first-child", "remove"]
27509 3b. Table cells with escapable prefixes after edits
27512 "modes": ["selser"],
27513 "scrubWikitext": true,
27515 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27522 |<span id="x">foo</span>+
27531 # FIXME: This test will fail because
27532 # normalization doesn't realize that the id attribute
27533 # will eliminate the escapable scenario
27535 4a. Table cells without escapable prefixes after edits
27538 "modes": ["selser"],
27539 "scrubWikitext": true,
27541 [ "#x", "html", "-" ]
27554 ## This tests normalizer's ability to discriminate between
27555 ## cells having identical content.
27557 4b. Table cells without escapable prefixes after edits
27560 "modes": ["selser"],
27561 "scrubWikitext": true,
27563 [ "td", "html", "-" ]
27576 ## This tests normalizer's ability to not be tripped by
27577 ## comments (and whitespace)
27579 4c. Table cells without escapable prefixes after edits
27582 "modes": ["selser"],
27583 "scrubWikitext": true,
27585 [ "table tbody tr td:first-child", "remove" ]
27600 ## This tests normalizer's ability to handle HTML cells
27602 4d. Table cells without escapable prefixes after edits
27605 "modes": ["selser"],
27606 "scrubWikitext": true,
27608 [ "td", "html", "-" ]
27613 <tr><td>a</td></tr>
27617 <tr><td>-</td></tr>
27621 ## T111151 Remove font elements without attributes
27623 5a. font tags without attributes should be dropped in scrubWikitext mode
27626 "modes": ["html2wt"],
27627 "scrubWikitext": true
27631 <font><font>bar</font></font>
27632 <font class="x">boo</font>
27636 <font class="x">boo</font>
27640 5b. font tags should not be dropped without scrubWikitext being enabled
27643 "modes": ["html2wt"],
27644 "scrubWikitext": false
27653 Escape nowiki DOM elements
27657 <nowiki><i>foo</i></nowiki>
27659 <nowiki>''foo''</nowiki>
27662 # This is meant to be an interim fix while we go about figuring out
27663 # how to not introduce these trailing <nowiki/>s in the first place.
27665 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27669 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27671 <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>
27672 <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>
27685 # ---------------------------------------------------
27686 # End of tests spec'ing wikitext serialization norms |
27687 # ---------------------------------------------------
27691 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27699 <td><b>c</b><p>d</p></td>
27717 # -----------------------------------------------------------------
27718 # End of section for Parsoid-only html2wt tests for serialization
27720 # -----------------------------------------------------------------
27722 # -----------------------------------------------------------------
27723 # The following section of tests are primarily to spec behavior of
27724 # the selective serializer. All these tests have manual selser
27725 # changes. The automated selser changes for all tests handle the
27726 # wide variation of changes, but these tests here capture specs
27727 # deterministically.
27728 # ----------------------------------------------------------------
27732 Selser: New comments should not be lost
27735 "modes": ["selser"],
27737 [ "#a", "after", "<!--c1-->" ],
27738 [ "#b", "before", "<!--c2-->" ]
27742 <span id="a">a</span>
27744 <span id="b">b</span>
27746 <span id="a">a</span><!--c1-->
27748 <!--c2--><span id="b">b</span>
27753 Selser: Check for validity of DSR before using it
27756 "modes": ["selser"],
27758 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27762 <span id="a">a</span>
27764 {{DISPLAYTITLE:foo}}
27765 <span id="a">a</span>
27769 1. DOMDiff: Changes to <ref> content should be looked up using id
27772 "modes": ["selser"],
27774 ["#X", "after", "bar"],
27775 ["#Y", "after", "baz"]
27779 X <ref><span id="X">foo</span></ref>
27782 <ref name="a"><span id="Y">foo</span></ref>
27785 X <ref><span id="X">foo</span>bar</ref>
27788 <ref name="a"><span id="Y">foo</span>baz</ref>
27793 2. DOMDiff: Changes to <ref> content should be looked up using id
27796 "modes": ["selser"],
27798 ["#Z", "after", "bar"]
27802 A <ref>foo bar for a</ref>
27803 B <ref group="X" name="b" />
27807 <references group="X">
27808 <ref name="b"><span id="Z">foo</span></ref>
27811 A <ref>foo bar for a</ref>
27812 B <ref group="X" name="b" />
27816 <references group="X">
27817 <ref name="b"><span id="Z">foo</span>bar</ref>
27822 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27825 "modes": ["selser"],
27827 [ "div:first-child", "text", "bar" ]
27831 <div style="{{1x|color:red;}}%">foo</div>
27833 <div style="{{1x|color:red;}}%">bar</div>
27846 <li class="mw-empty-elt"></li>
27847 <li class="mw-empty-elt"></li>
27855 [[File:Thumb.png|thumb]]
27857 <div class="thumb tright">
27858 <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>
27859 <div class="thumbcaption">
27860 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27867 unclosed internal link XSS (T137264)
27869 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27871 <p>[[#<script>alert(1)</script>|
27874 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>