1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
41 # For testing purposes, temporary articles can created:
42 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
43 # where '/' denotes a newline.
45 # This is the standard article assumed to exist.
82 MediaWiki:bad image list
84 * [[File:Bad.jpg]] except [[Nasty page]]
112 Template:echo_with_span
118 Template:echo_with_div
131 Template:table_attribs
134 |</noinclude>style="color:red;"|Foo
138 Template:table_attribs_2
141 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_3
149 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
153 Template:table_attribs_4
155 | style="background-color:#DC241f;" width="10px" |
159 Template:table_attribs_5
162 |</noinclude>style="color:red;"||Bar
166 Template:table_attribs_6
168 style="background: <nowiki>
175 Template:table_attribs_7
178 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
182 Template:table_header_cells
184 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
190 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
194 Template:PartialTable
201 Template:image_attribs
204 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
207 ## See T48811 for details
209 Template:mixed_attr_content_template
211 style="color:red;" title="T48811"
217 Template:definition_list
264 Template:EmptyTRWithHTMLAttrTest
267 <tr align="center"></tr>
268 <tr><td>foo</td></tr>
269 <tr align="center"></tr>
270 <tr><td>bar</td></tr>
277 <ref>{{CircularRef}}</ref>
295 <p><span about="#mwt1" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"CircularRef","href":"./Template:CircularRef"},"params":{},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
296 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">Error: Expansion loop detected at <a data-parsoid='{"a":{"href":null},"sa":{"href":"Template:CircularRef"}}'>Template:CircularRef</a></span></li></ol>
302 This is a simple paragraph.
304 <p>This is a simple paragraph.
309 Paragraphs with extra newline spacing
332 Paragraphs with newline spacing with comment lines in between
340 <!--foo--><!--More than 1 comment, still stripped-->
344 <!--foo--> <!----> <!-- bar -->
405 Paragraphs with newline spacing with non-empty white-space lines in between
432 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
440 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
479 Extra newlines: More paragraphs with indented comment
494 Extra newlines followed by heading
509 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
510 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
513 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
518 Extra newlines between heading and content are swallowed
526 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
527 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
532 Heading with line break in nowiki
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">
1457 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1463 :There is not nowiki.
1464 :There is <nowiki>nowiki</nowiki>.
1466 #There is not nowiki.
1467 #There is <nowiki>nowiki</nowiki>.
1469 *There is not nowiki.
1470 *There is <nowiki>nowiki</nowiki>.
1472 <dl><dd>There is not nowiki.</dd>
1473 <dd>There is nowiki.</dd></dl>
1474 <ol><li>There is not nowiki.</li>
1475 <li>There is nowiki.</li></ol>
1476 <ul><li>There is not nowiki.</li>
1477 <li>There is nowiki.</li></ul>
1480 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1481 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1483 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1484 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1486 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1487 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1491 Entities inside <nowiki>
1493 <nowiki><</nowiki>
1500 Entities inside template parameters
1506 <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>
1510 Properly escape nowiki when combined with other wiki markup
1514 <p>* </nowiki> tag</p>
1516 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1520 T93824: Put escaped HTML tags inside nowiki
1524 <p><h2>foo</h2></p>
1526 <nowiki><h2>foo</h2></nowiki>
1530 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1534 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1535 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1536 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1538 This text: L'[[Foo]]
1539 This text: L<nowiki>''</nowiki>[[Foo]]
1540 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1543 # This test fails because wikitext whitespace is not normalized before comparing.
1545 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1549 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1552 This text : L<nowiki>''</nowiki>[[Foo]]
1555 # This test and the next one are html2wt only as they test that incorrect wikitext
1556 # passed in template arguments gets escaped or wrapped in nowikis where required.
1558 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1562 <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>
1563 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1565 {{echo|foo{{!}}bar}}
1566 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1570 T53961: Output correct nowikis in template arguments
1574 <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>
1575 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1576 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1577 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1578 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1581 {{echo|<nowiki>a }} b</nowiki>}}
1582 {{echo|<nowiki>a [[ b</nowiki>}}
1583 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1584 {{echo|a <nowiki>}</nowiki>}}
1588 Cases where "!!" needs nowiki protection
1593 <tr><th>this needs protection !! here</th></tr>
1597 <tr><th>this does not need
1598 protection !! here</th></tr>
1602 !<nowiki>this needs protection !! here</nowiki>
1615 Comments and Indent-Pre
1617 <!-- comment 1 --> asdf
1619 <!-- comment 1 --> asdf
1622 <!-- comment 1 --> asdf
1623 <!-- comment 2 -->xyz
1625 <!-- comment 1 --> asdf
1626 <!-- comment 2 --> xyz
1682 asdf<!-- comment 1 -->jkl
1692 <!-- foo --> b <!-- bar -->
1706 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1712 Comment semantics and delimiters
1714 <!-- --><!----><!-----><!------>
1718 <!-- --><!----><!-----><!------>
1722 Comment semantics and delimiters, redux
1724 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1725 -- foo -- funky huh? ... -->
1729 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1730 -- foo -- funky huh? ... -->
1734 Comment semantics and delimiters: directors cut
1736 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1737 everything starting with < followed by !-- until the first -- and > we see,
1738 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1744 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1745 everything starting with < followed by !-- until the first -- and > we see,
1746 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1751 Comment semantics: nesting
1753 <!--<!-- no, we're not going to do anything fancy here -->-->
1758 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1761 # Parsoid closes the unclosed comment, even if it means a slight
1764 Comment semantics: unclosed comment at end
1766 parsoid=wt2html,html2html
1768 <!--This comment will run out to the end of the document
1772 <!--This comment will run out to the end of the document-->
1776 Comment semantics: normalize comments to play nice with XML and browsers
1778 <!-- Browsers --!> think this is closed -->
1779 <!--> This would normally be text -->
1780 <!---> As would this -->
1781 <!-- XML doesn't like trailing dashes -------->
1782 <!-- Nor doubled hyphens -- anywhere in the data -->
1783 But this is not a comment.
1785 <p>But this is not a comment.
1788 <!-- Browsers --!> think this is closed -->
1789 <!--> This would normally be text -->
1790 <!---> As would this -->
1791 <!-- XML doesn't like trailing dashes -------->
1792 <!-- Nor doubled hyphens -- anywhere in the data -->
1793 <p>But this is not a comment.</p>
1797 Comment semantics: round-trip even text which contains encoded -->
1799 <!-- hello & goodbye - > --> --&gt; --&xx -->
1801 <!-- hello & goodbye - > --> --&gt; --&xx -->
1805 Comment in template title
1814 Comment on its own line post-expand
1826 Comment on its own line post-expand with non-significant whitespace
1838 Multiple comments should still parse as SOL-transparent
1840 parsoid=wt2html,wt2wt
1843 <!--c2--><!--c3--><!--c4-->*b
1852 <!--c2--><!--c3--><!--c4-->
1859 ### paragraph wrapping tests
1874 Block tag on one line (<div>)
1890 Block tag on one line (<blockquote>)
1892 a <blockquote>foo</blockquote>
1896 a <blockquote>foo</blockquote>
1908 Block tag on both lines (<div>)
1925 Block tag on both lines (<blockquote>)
1927 a <blockquote>foo</blockquote>
1929 b <blockquote>foo</blockquote>
1931 a <blockquote>foo</blockquote>
1932 b <blockquote>foo</blockquote>
1946 Multiple lines without block tags
1970 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1971 # So, we have a separate section for Parsoid. We don't want
1972 # to mimic this stripping behavior in Parsoid. It affects
1973 # editing experience and also requires us to maintain additional
1976 Empty lines between lines with block tags
2014 <div data-parsoid='{"stx":"html"}'></div>
2017 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2020 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2022 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2025 <div data-parsoid='{"stx":"html"}'>e</div>
2028 ## PHP parser emits output which is broken
2030 Unclosed HTML p-tags should be handled properly
2043 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2048 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2049 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2052 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2056 a [[Category:A1]] [[Category:A2]]
2061 <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"/>
2065 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2071 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2075 ### Preformatted text
2084 And a [[Main Page|link]]
2090 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2095 Tabs don't trigger preformatted text
2099 This is preformatted text.
2105 <pre>This is preformatted text.
2110 preformatted text.</p>
2111 <pre>This is preformatted text.
2116 Space before tab needs nowiki pre protection
2122 <nowiki> </nowiki> a
2126 Ident preformatting with inline content
2137 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2154 Regression with preformatted in <center>
2168 Bug 52763: Preformatted in <blockquote>
2174 indented cell (no pre-wrapping!)
2184 <p> indented cell (no pre-wrapping!)
2192 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2209 Bug 15491: <ins>/<del> in blockquote
2212 Foo <del>bar</del> <ins>baz</ins> quux
2216 <p>Foo <del>bar</del> <ins>baz</ins> quux
2222 # Note that the p-wrapping is newline sensitive, which could be
2223 # considered a bug: tidy will wrap only the 'Foo' in the example
2224 # below in a <p> tag. (see comment 23-25 of bug #6200)
2226 Bug 15491: <ins>/<del> in blockquote (2)
2228 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2231 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2237 <del>bar</del> <ins>baz</ins> quux</blockquote>
2241 <pre> with attributes (bug 3202)
2243 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2245 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2250 <pre> with width attribute (bug 3202)
2252 <pre width="8">Narrow screen goodies</pre>
2254 <pre width="8">Narrow screen goodies</pre>
2259 <pre> with forbidden attribute (bug 3202)
2261 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2263 <pre width="8">Narrow screen goodies</pre>
2268 Entities inside <pre>
2277 <pre> with forbidden attribute values (bug 3202)
2279 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2281 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2286 <nowiki> inside <pre> (bug 13238)
2294 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2302 <pre><nowiki>Foo</nowiki></pre>
2307 <nowiki> inside of #tag:pre
2309 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2311 <pre>Foo →bar</pre>
2314 <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>
2318 <nowiki> and <pre> preference (first one wins)
2347 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2349 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2352 <p><span typeof="mw:Nowiki">
2361 </pre> inside nowiki
2363 <nowiki></pre></nowiki>
2369 # Parsoid doesn't strip empty tags, like Tidy does.
2371 Empty pre; pre inside other HTML tags (bug 54946)
2373 parsoid=wt2html,wt2wt
2404 HTML pre followed by indent-pre
2414 # Note that tidy removes the empty <p> tags from the start and end.
2415 # Parsoid does not, by design.
2419 <p><pre>foo</pre></p>
2425 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2429 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2437 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2447 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2459 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2480 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2484 {{echo| foo}}{{echo| bar}}
2489 {{echo|<!--cmt--> foo}}
2491 <!--cmt-->{{echo| foo}}
2493 {{echo|{{echo| }}bar}}
2511 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2548 Pres with newline attributes
2553 <pre class="one two">hi</pre>
2557 two" data-parsoid='{"stx":"html"}'>hi</pre>
2561 Things that look like <pre> tags aren't treated as such
2563 Barack Obama <President> of the United States
2564 <President></President>
2566 <p>Barack Obama <President> of the United States
2567 <President></President>
2572 Handle broken pre-like tags (bug 64025)
2576 {{echo|<pre <pre>x</pre>}}
2578 <table><pre </table>
2581 <table><pre </table>
2589 <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>
2598 Parsoid: handle pre with space after attribute
2602 <pre style="width:50%;" >{{echo|foo}}</pre>
2604 <pre style="width:50%;">{{echo|foo}}</pre>
2607 <pre style="width:50%;">{{echo|foo}}</pre>
2610 # TODO / maybe: fix wt2wt for this
2612 Parsoid: Don't paragraph-wrap fosterable content
2638 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2666 #--------------------------------------------------------------------
2667 # Transclusion parameter whitespace stripping tests
2668 # Behavior is different for positional and named parameters
2669 #--------------------------------------------------------------------
2671 Templates: Strip leading and trailing whitespace from named-param values
2675 {{echo|1= {{echo|b}} }}
2688 <ul><li> d</li></ul>
2693 Templates: Don't strip whitespace from positional-param values
2697 {{echo|{{echo|b}} }}
2729 <ul><li> f</li></ul>
2737 Templates: Handle empty comment-and-ws-only lines correctly
2740 <!--should be ignored-->
2741 <!--should be ignored as well-->
2748 <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>
2752 Templates: Handle comments in the target
2755 <!-- should be ignored -->
2759 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2762 {{echo<!-- should be ignored -->
2765 {{echo<!-- should be ignored -->|foo}}
2767 {{<!-- should be ignored -->echo|foo}}
2776 <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>
2778 <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>
2780 <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>
2782 <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>
2784 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2788 Templates: Handle comments in parameter names (bug 67657)
2791 <!-- should be ignored -->
2795 <!-- should be ignored -->
2798 {{echo|1<!-- should be ignored -->=foo}}
2800 {{echo|<!-- should be ignored -->1=foo}}
2808 <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>
2810 <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>
2812 <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>
2814 <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>
2818 Templates: Other wikitext in parameter names (bug 67657)
2825 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2828 #--------------------------------------------------------------------
2829 # Transclusion parameter escaping tests
2830 #--------------------------------------------------------------------
2832 Templates: Parsoid parameter escaping test 1
2834 {{echo|[foo]|{{echo|[bar]}}}}
2838 <p about="#mwt1" typeof="mw:Transclusion"
2839 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2843 Parsoid: Pipes in external links in template parameter
2845 {{echo|[{{echo|http://example.com}} link]}}
2847 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2849 <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>
2853 Parsoid: pipe in transclusion parameter
2855 {{echo|http://foo.com/a|b}}
2857 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2859 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2860 typeof="mw:Transclusion"
2861 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>
2865 Parsoid: Pipe in external link target and content in template parameter
2867 parsoid=html2wt,wt2wt
2869 {{echo|[http://foo.com/a|b a|b]}}
2871 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2873 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2874 typeof="mw:Transclusion"
2875 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2876 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2880 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2884 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2886 <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>
2890 Templates: Don't escape already nowiki-escaped text in template parameters
2892 parsoid=html2wt,wt2wt
2894 {{echo|foo<nowiki>|</nowiki>bar}}
2895 {{echo|<nowiki><div></nowiki>}}
2896 {{echo|<nowiki></nowiki>}}
2898 <p>foo|bar <div></p>
2900 <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>
2901 <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>
2902 <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>
2908 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2910 parsoid=html2wt,wt2wt
2912 {{echo|{{echo|1=bar}}}}
2916 <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>
2921 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2927 <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>
2932 Templates: Preserve blank parameter names
2938 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2942 Templates: Preserve blank parameter names in other positions
2944 {{blank_param|bar|=foo}}
2948 <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
2953 ### Parsoid-centric tests for testing RT edge cases for pre
2957 1a. Indent-Pre and Comments
2970 1b. Indent-Pre and Comments
2983 1c. Indent-Pre and Comments
2996 1d. Indent-Pre and Comments
2997 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3010 2a. Indent-Pre and tables
3031 2b. Indent-Pre and tables
3047 2c. Indent-Pre and tables (bug 42252)
3064 2d. Indent-Pre and tables
3081 <tbody><tr><td> b</td></tr>
3086 2e. Indent-Pre and table-line syntax
3099 2f. Indent-pre started by table-line syntax
3118 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3123 Text that should be rendered preformatted
3131 <pre>Text that should be rendered preformatted
3140 3a. Indent-Pre and block tags (single-line html)
3144 c <blockquote> foo </blockquote>
3149 c <blockquote> foo </blockquote>
3150 <pre><span> foo </span>
3153 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3154 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3155 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3156 <pre><span> foo </span>
3173 3b. Indent-Pre and block tags (multi-line html)
3178 <pre>a <span>foo</span>
3183 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3184 b <div data-parsoid='{"stx":"html"}'> foo </div>
3194 3c. Indent-Pre and block tags (pre-content on separate line)
3258 4. Indent-Pre and extension tags
3269 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3273 Render paragraphs when indent-pre is suppressed in blocklevels
3290 4. Multiple spaces at start-of-line
3308 ## NOTE: the leading white-space chars on empty line are significant
3310 5a. White-space in indent-pre
3322 ## NOTE: the leading white-space chars on empty line are significant
3324 5b. White-space in indent-pre
3343 5c. White-space in indent-pre
3356 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3379 7a. Indent-pre and category links
3381 parsoid=wt2html,wt2wt
3383 [[Category:foo]] <!-- No pre-wrapping -->
3384 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3387 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3388 <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 -->
3391 ## We used to, but no longer wt2wt this test since the default serializer
3392 ## will normalize all categories to serialize on their own line.
3393 ## This wikitext usage is going to be fairly uncommon in production and
3394 ## selser will take care of preserving formatting in those scenarios.
3396 7b. Indent-pre and category links
3401 [[Category:foo]] {{echo|b}}
3403 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3404 <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>
3408 Indent-Pre: Newlines in comments shouldn't affect sol state
3422 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3426 HTML-pre: 1. embedded newlines
3461 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3463 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3467 <pre data-parsoid='{"stx":"html"}'>
3472 <pre data-parsoid='{"stx":"html"}'>
3480 HTML-pre: big spaces
3516 <pre data-parsoid='{"stx":"html"}'>
3535 HTML-pre: 2: indented text
3548 HTML-pre: 3: other wikitext
3567 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3576 ### Definition lists
3583 <dl><dt> name </dt>
3584 <dd> Definition</dd></dl>
3589 Definition list for indentation only
3593 <dl><dd> Indented text</dd></dl>
3598 Definition list with no space
3603 <dd>Definition</dd></dl>
3608 Definition list with URL link
3610 ; http://example.com/ : definition
3612 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3613 <dd> definition</dd></dl>
3618 Definition list with bracketed URL link
3620 ;[http://www.example.com/ Example]:Something about it
3622 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3623 <dd>Something about it</dd></dl>
3628 Definition list with wikilink containing colon
3630 ; [[Help:FAQ]]: The least-read page on Wikipedia
3632 <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>
3633 <dd> The least-read page on Wikipedia</dd></dl>
3637 # At Brion's and JeLuF's insistence... :)
3639 Definition list with news link containing colon
3641 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3643 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3644 <dd> This isn't even a real newsgroup!</dd></dl>
3647 <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>
3651 Malformed definition list with colon
3653 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3655 <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>
3660 Definition lists: colon in external link text
3662 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3664 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3665 <dd> OK, I made that up</dd></dl>
3670 Definition lists: colon in HTML attribute
3672 ;<b style="display: inline">bold</b>
3674 <dl><dt><b style="display: inline">bold</b></dt></dl>
3679 Definition lists: self-closed tag
3681 ;one<br/>two : two-line fun
3683 <dl><dt>one<br />two </dt>
3684 <dd> two-line fun</dd></dl>
3689 Bug 11748: Literal closing tags
3693 <dd>test test test test test</dd>
3695 <dd>test test test test test</dd>
3700 <dd>test test test test test</dd>
3702 <dd>test test test test test</dd>
3708 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3711 ; term : description
3716 <dl><dt> term </dt>
3717 <dd> description</dd></dl>
3718 <ul><li> unordered</li></ul>
3724 Definition list with empty definition and following paragraph
3736 Nested definition lists using html syntax
3749 Definition Lists: No nesting: Multiple dd's
3762 Definition Lists: Indentation: Regular
3770 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3775 Definition Lists: Indentation: Missing 1st level
3781 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3786 Definition Lists: Indentation: Multi-level indent
3790 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3795 Definition Lists: Hacky use to indent tables
3802 should be left alone
3804 <dl><dd><dl><dd><table>
3809 </td></tr></table></dd></dl></dd></dl>
3811 should be left alone
3816 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3824 should be left alone
3827 <dl><dd><dl><dd><table><tr>
3830 </tr></table><!-- bar --></dd></dl></dd></dl>
3832 should be left alone</p>
3836 Definition Lists: Hacky use to indent tables, with comment before table
3842 <dl><dd><dl><dd><!-- foo --><table><tr>
3844 </tr></table></dd></dl></dd></dl>
3847 # The trailing whitespace in this test is to catch a regression in
3848 # Parsoid after T54473.
3850 Definition Lists: Hacky use to indent tables (WS-insensitive)
3859 </td></tr></table></dd></dl>
3863 <tbody><tr><td>a</td></tr>
3864 </tbody></table> </dd></dl>
3867 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3868 ## as an empty dt item. It also ignores all but the last ";" when followed
3869 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3870 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3873 ## Ex: ";;t2 ::d2" is transformed into:
3885 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3886 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3897 ## All Parsoid only definition list tests have this difference.
3899 ## See also: https://phabricator.wikimedia.org/T8569
3900 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3903 Table / list interaction: indented table with lists in table contents
3918 <ul><li> b</li></ul>
3922 <ul><li> d</li></ul>
3923 </td></tr></table></dd></dl>
3928 Table / list interaction: lists nested in tables nested in indented lists
3951 </td></tr></table></dd></dl>
3958 Definition Lists: Nesting: Multi-level (Parsoid only)
3988 Definition Lists: Nesting: Test 2 (Parsoid only)
4015 Definition Lists: Nesting: Test 3 (Parsoid only)
4058 Definition Lists: Nesting: Test 4
4063 <dl><dd><dl><dd><dl><dt>t3</dt>
4064 <dd>d3</dd></dl></dd></dl></dd></dl>
4069 ## The Parsoid team believes the following three test exposes a
4070 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4071 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4072 ## It also exposes a "misfeature" in tidy, which doesn't like
4073 ## <dl> tags with a single <dt> child; it converts the <dt> into
4074 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4076 Definition Lists: Mixed Lists: Test 1
4082 <dl><dd><dl><dt><ul><li> foo</li>
4083 <li> bar</li></ul></dt></dl>
4084 <dl><dt> baz</dt></dl></dd></dl>
4119 Definition Lists: Mixed Lists: Test 2
4124 <ul><li><dl><dd> d1</dd>
4125 <dd> d2</dd></dl></li></ul>
4131 Definition Lists: Mixed Lists: Test 3
4136 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4137 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4143 Definition Lists: Mixed Lists: Test 4
4148 <ul><li><dl><dt>d1 </dt>
4151 <dd>d4</dd></dl></li></ul>
4157 Definition Lists: Mixed Lists: Test 5
4163 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4169 Definition Lists: Mixed Lists: Test 6
4174 <ol><li><ul><li><dl><dd>d1
4175 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4181 Definition Lists: Mixed Lists: Test 7
4186 <dl><dd><ul><li> d1</li>
4187 <li> d2</li></ul></dd></dl>
4193 Definition Lists: Mixed Lists: Test 8
4198 <dl><dd><ul><li> d1</li></ul>
4199 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4205 Definition Lists: Mixed Lists: Test 9
4209 <ul><li><dl><dt>foo </dt>
4210 <dd>bar</dd></dl></li></ul>
4216 Definition Lists: Mixed Lists: Test 10
4220 <ul><li><ol><li><dl><dt>foo </dt>
4221 <dd>bar</dd></dl></li></ol></li></ul>
4225 # The Parsoid team disagrees with the PHP parser's seemingly-random
4226 # rules regarding dd/dt on the next two tests. Parsoid is more
4227 # consistent, and recognizes the shared nesting and keeps the
4228 # still-open tags around until the nesting is complete.
4229 # (And tidy again converts <dt> to <dd> before 'bar'.)
4232 Definition Lists: Mixed Lists: Test 11
4237 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4238 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4239 <dl><dt>boo </dt>
4240 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4295 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4296 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4300 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4301 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4310 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4312 # * The test is wrong, there are two colons where there should be :;
4313 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4315 Definition Lists: Weird Ones: Test 1
4317 *#;*::;; foo : bar (who uses this?)
4319 <ul><li><ol><li><dl><dt> foo </dt>
4320 <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>
4339 <dt>bar (who uses this?)</dt>
4371 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4372 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4384 Definition Lists: colons occurring in tags
4402 <dt><span>a:b</span></dt>
4429 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4431 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4432 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4433 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4434 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4436 <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>
4437 <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>
4438 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4442 Definition Lists: colons and tables 1
4454 </td></tr></table></dd></dl>
4458 </td></tr></table></dd></dl>
4462 # Parsoid's output (as documented below) differs from php's in this case.
4463 # This is probably a bug. If we fixup parsoid to match php's output, the
4464 # above test should pass and the below test case can be removed. It is
4465 # unclear which output is more desirable.
4468 Definition Lists: colons and tables 2
4480 </td></tr></table></dd>
4484 </td></tr></table></dd></dl>
4488 Definition Lists: template interaction
4490 ::{{definition_list}}
4493 ::{{definition_list}}
4498 <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">
4499 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4501 <dl><dd data-parsoid='{}'>one
4502 <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">
4503 </span><dd about="#mwt2">two
4505 <dd>three</dd></dl></dd>
4506 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4514 External links: non-bracketed
4516 Non-bracketed: http://example.com
4518 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4522 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4524 External links: numbered
4526 Numbered: [http://example.com]
4527 Numbered: [http://example.net]
4528 Numbered: [http://example.com]
4530 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4531 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4532 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4535 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4536 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4537 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4541 External links: specified text
4543 Specified text: [http://example.com link]
4545 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4550 External links: trail
4552 Linktrails should not work for external links: [http://example.com link]s
4554 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4559 External links: dollar sign in URL
4561 http://example.com/1$2345
4563 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4567 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4569 External links: dollar sign in URL (autonumber)
4571 [http://example.com/1$2345]
4573 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4576 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4580 External links: open square bracket forbidden in URL (bug 4377)
4582 parsoid=wt2html,wt2wt,html2html
4584 http://example.com/1[2345
4586 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4589 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4593 External links: open square bracket forbidden in URL (named) (bug 4377)
4595 parsoid=wt2html,html2html
4597 [http://example.com/1[2345]
4599 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4602 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4605 # parsoid adds a space before the link name
4607 External links: open square bracket forbidden in URL (named) (bug 4377)
4610 [http://example.com/1 [2345]
4612 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4617 External links: nowiki in URL link text (bug 6230)
4619 [http://example.com/ <nowiki>''example site''</nowiki>]
4621 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4626 External links: newline forbidden in text (bug 6230 regression check)
4628 [http://example.com/ first
4631 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4637 External links: Pipe char between url and text
4639 [http://example.com | link]
4641 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4646 External links: protocol-relative URL in brackets
4648 [//example.com/ Test]
4650 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4654 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4656 External links: protocol-relative URL in brackets without text
4660 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4663 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4667 External links: protocol-relative URL in free text is left alone
4671 <p>//example.com/Foo
4676 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4678 foo//example.com/Foo
4680 <p>foo//example.com/Foo
4685 External links: with no contents
4687 [http://en.wikipedia.org/wiki/Foo]
4689 [[wikipedia:Foo|Bar]]
4691 [[wikipedia:Foo|<span>Bar</span>]]
4693 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4694 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4695 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4698 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4699 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4700 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4704 External links: Free with trailing punctuation
4714 http://example.com/url_with_(brackets)
4715 (http://example.com/url_without_brackets)
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<
4723 http://example.com/url_with_entity<
4724 http://example.com/url_with_entity<
4726 <p><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">http://example.com</a>?
4733 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4734 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4735 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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><
4743 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4744 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4747 <p><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">http://example.com</a>?
4754 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4755 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4756 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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>
4759 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
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":"&nbsp;","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":"&#xA0;","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":"&#160;","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":"&lt;","srcContent":"<"}'><</span>
4764 <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>
4765 <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>
4769 External links: tricky Parsoid html2html case
4771 parsoid=wt2html,wt2wt,html2html
4773 http://example.com/url_with_entity&amp;
4775 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4778 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4782 External links: Free with trailing quotes (T113666)
4784 '''News:''' Stuff here
4788 <p><b>News:</b> Stuff here
4789 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4792 <p><b>News:</b> Stuff here</p>
4793 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4797 External links: Lone protocols are never linked (T105697)
4816 External links: No preceding word characters allowed (bug 65278)
4818 NOPEhttp://example.com
4819 N0http://example.com
4820 ok:http://example.com
4821 ok-http://example.com
4823 <p>NOPEhttp://example.com
4824 N0http://example.com
4825 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4826 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4831 External links: nofollow domain exception
4833 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4835 <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>.
4842 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4844 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4849 External image from https
4851 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4853 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4858 External image (when not allowed)
4860 wgAllowExternalImages=0
4862 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4864 <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>
4869 Link to non-http image, no img tag
4871 Link to non-http image, no img tag: ftp://example.com/test.jpg
4873 <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>
4878 External links: terminating separator
4880 Terminating separator: http://example.com/thing,
4882 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4887 External links: intervening separator
4889 Intervening separator: http://example.com/1,2,3
4891 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4896 External links: old bug with URL in query
4898 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4900 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4905 External links: old URL-in-URL bug, mixed protocols
4907 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4909 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4913 # Since Parsoid is starting to emit canonical wikitext for links,
4914 # [http://example.com http://example.com] will not RT back to that
4917 External links: URL in text
4921 URL in text: [http://example.com http://example.com]
4923 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4926 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4930 External links: Clickable images
4932 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4934 <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>
4937 <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>
4941 External links: raw ampersand
4943 Old & use: http://x&y
4945 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4950 External links: encoded ampersand
4952 Old & use: http://x&y
4954 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4957 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4961 External links: encoded equals (bug 6102)
4963 http://example.com/?foo=bar
4965 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4968 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4972 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4973 ## does it number them. As discussed in bug 53505, we can identify
4974 ## autonumbered links via CSS.
4978 External links: [raw ampersand]
4980 Old & use: [http://x&y]
4982 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4985 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4988 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4989 # mode will return the [raw ampersand] wikitext
4991 External links: [encoded ampersand]
4993 parsoid=wt2html,wt2wt,html2html
4995 Old & use: [http://x&y]
4997 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5000 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5004 External links: [raw equals]
5006 [http://example.com/?foo=bar]
5008 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5011 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5014 # note that parsoid html is identical to [raw equals] case; so html2wt
5015 # mode will return the [raw equals] wikitext
5017 External links: [encoded equals] (bug 6102)
5019 parsoid=wt2html,wt2wt,html2html
5021 [http://example.com/?foo=bar]
5023 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5026 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5029 # xxx parsoid strips the IDN character, so the round-trip tests will
5030 # obviously fail and are disabled. --cscott
5032 External links: [IDN ignored character reference in hostname; strip it right off]
5034 parsoid=wt2html,wt2wt,html2html
5036 [http://e‌xample.com/]
5038 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5041 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5044 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5045 # Where an external link could easily circumvent the sanitization of the text of
5046 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5047 # test demands a higher standard. That's a bit strange.
5051 # http://example.com -> [http://example.com|http://example.com]
5052 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5054 # The first example is sanitized, but the second is not. Any security benefits
5055 # from this production are trivial to circumvent. Either remove this test and
5056 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5057 # the test accordingly.
5061 # xxx parsoid strips the IDN character, so the round-trip tests will
5062 # obviously fail and are disabled. --cscott
5064 External links: IDN ignored character reference in hostname; strip it right off
5066 parsoid=wt2html,html2html
5068 http://e‌xample.com/
5070 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5073 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5077 External links: www.jpeg.org (bug 554)
5081 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5085 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5087 External links: URL within URL (original bug 2)
5089 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5091 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5094 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5098 BUG 361: URL inside bracketed URL
5100 [http://www.example.com/foo http://www.example.com/bar]
5102 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5107 BUG 361: URL within URL, not bracketed
5109 http://www.example.com/foo?=http://www.example.com/bar
5111 <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>
5116 BUG 289: ">"-token in URL-tail
5118 http://www.example.com/<hello>
5120 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5125 BUG 289: literal ">"-token in URL-tail
5127 http://www.example.com/<b>html</b>
5129 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5132 <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>
5136 BUG 289: ">"-token in bracketed URL
5138 [http://www.example.com/<hello> stuff]
5140 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5145 BUG 289: literal ">"-token in bracketed URL
5147 [http://www.example.com/<b>html</b> stuff]
5149 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5154 BUG 289: literal double quote at end of URL
5156 http://www.example.com/"hello"
5158 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5163 BUG 289: literal double quote in bracketed URL
5165 [http://www.example.com/"hello" stuff]
5167 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5172 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5174 [http://www.example.com test]
5176 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5181 External links: link text with spaces
5183 [http://www.example.com a b c]
5184 [http://www.example.com ''a'' ''b'']
5186 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5187 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5192 External links: wiki links within external link (Bug 3695)
5194 parsoid=wt2html,html2html
5196 [http://example.com [[wikilink]] embedded in ext link]
5198 <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>
5201 <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>
5205 BUG 787: Links with one slash after the url protocol are invalid
5209 [http:/example.com title]
5211 <p>http:/example.com
5212 </p><p>[http:/example.com title]
5217 Bracketed external links with template-generated invalid target
5219 [{{echo|http:/example.com}} title]
5221 <p>[http:/example.com title]
5226 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5228 ''[http://example.com text'']
5229 [http://example.com '''text]'''
5230 ''Something [http://example.com in italic'']
5231 ''Something [http://example.com mixed''''', even bold]'''
5232 '''''Now [http://example.com both''''']
5234 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5235 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5236 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5237 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5238 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5244 Bug 4781: %26 in URL
5246 http://www.example.com/?title=AT%26T
5248 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5251 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5254 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5255 # % is actually legal in HTML5. Any change in output would need testing though.
5257 Bug 4781, 5267: %25 in URL
5259 http://www.example.com/?title=100%25_Bran
5261 <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>
5264 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5268 Bug 4781, 5267: %28, %29 in URL
5270 http://www.example.com/?title=Ben-Hur_%281959_film%29
5272 <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>
5275 <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>
5280 Bug 4781: %26 in autonumber URL
5282 [http://www.example.com/?title=AT%26T]
5284 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5287 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5291 Bug 4781, 5267: %26 in autonumber URL
5293 [http://www.example.com/?title=100%25_Bran]
5295 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5298 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5302 Bug 4781, 5267: %28, %29 in autonumber URL
5304 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5306 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5309 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5314 Bug 4781: %26 in bracketed URL
5316 [http://www.example.com/?title=AT%26T link]
5318 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5321 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5325 Bug 4781, 5267: %25 in bracketed URL
5327 [http://www.example.com/?title=100%25_Bran link]
5329 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5334 Bug 4781, 5267: %28, %29 in bracketed URL
5336 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5338 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5341 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5345 External link containing a period in the anchor. (bug 63947)
5347 [//foo.org/bar#baz. bang]
5349 [//foo.org/bar. bang]
5351 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5352 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5355 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5356 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5360 External link containing a single quote. (bug 63947)
5364 [//foo.org/bar'baz bang]
5366 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5367 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5370 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5371 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5375 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5377 Some [http://example.com/ pretty ''italics'' and stuff]!
5379 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5384 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5386 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5388 <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>
5393 External link containing double-single-quotes with no space separating the url from text in italics
5395 [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]].]
5397 <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>
5400 <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>
5402 <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>
5406 External link with comments in link text
5408 [http://www.google.com Google <!-- comment -->]
5410 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5413 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5417 External link to bare IPv4 address
5419 [http://192.168.0.1 Link]
5421 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5424 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5428 URL-encoding in URL functions (single parameter)
5430 {{localurl:Some page|amp=&}}
5432 <p>/index.php?title=Some_page&amp=&
5437 URL-encoding in URL functions (multiple parameters)
5439 {{localurl:Some page|q=?&=&}}
5441 <p>/index.php?title=Some_page&q=?&amp=&
5448 http://example.com/index.php?foozoid%5B%5D=bar
5450 http://example.com/index.php?foozoid[]=bar
5452 <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>
5453 </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>
5456 <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>
5458 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5462 IPv6 urls, autolink format (T23261)
5464 http://[2404:130:0:1000::187:2]/index.php
5466 Examples from RFC 2373, section 2.2:
5467 * http://[1080::8:800:200C:417A]/unicast
5468 * http://[FF01::101]/multicast
5469 * http://[::1]/loopback
5470 * http://[::]/unspecified
5471 * http://[::13.1.68.3]/ipv4compat
5472 * http://[::FFFF:129.144.52.38]/ipv4compat
5474 Examples from RFC 2732, section 2:
5475 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5476 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5477 * http://[3ffe:2a00:100:7031::1]
5478 * http://[1080::8:800:200C:417A]/foo
5479 * http://[::192.9.5.5]/ipng
5480 * http://[::FFFF:129.144.52.38]:80/index.html
5481 * http://[2010:836B:4179::836B:4179]
5484 <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>
5485 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5487 <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>
5488 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5489 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5490 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5491 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5492 <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>
5493 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5495 <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>
5496 <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>
5497 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5498 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5499 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5500 <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>
5501 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5504 <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>
5506 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5507 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5511 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5512 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5514 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5515 <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>
5516 <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>
5517 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5518 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5519 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5520 <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>
5521 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5525 IPv6 urls, bracketed format (T23261)
5527 [http://[2404:130:0:1000::187:2]/index.php test]
5529 Examples from RFC 2373, section 2.2:
5530 * [http://[1080::8:800:200C:417A] unicast]
5531 * [http://[FF01::101] multicast]
5532 * [http://[::1]/ loopback]
5533 * [http://[::] unspecified]
5534 * [http://[::13.1.68.3] ipv4compat]
5535 * [http://[::FFFF:129.144.52.38] ipv4compat]
5537 Examples from RFC 2732, section 2:
5538 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5539 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5540 * [http://[3ffe:2a00:100:7031::1] 3]
5541 * [http://[1080::8:800:200C:417A]/foo 4]
5542 * [http://[::192.9.5.5]/ipng 5]
5543 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5544 * [http://[2010:836B:4179::836B:4179] 7]
5547 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5548 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5550 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5551 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5552 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5553 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5554 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5555 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5556 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5558 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5559 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5560 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5561 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5562 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5563 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5564 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5567 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5569 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5570 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5571 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5572 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5573 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5574 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5575 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5577 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5578 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5579 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5580 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5581 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5582 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5583 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5584 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5588 Non-extlinks in brackets
5597 [{{echo|foo}} ''bar'']
5598 [{{echo|foo}}l's] errand
5599 [{{echo|foo}}l's errand]
5601 [url=http://example.com]
5602 [http:// bare protocols don't count]
5615 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5616 [http:// bare protocols don't count]
5624 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5625 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5626 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5627 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5628 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5629 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5630 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5631 [http:// bare protocols don't count]</p>
5635 Percent encoding in external links
5637 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5639 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5642 <p><a rel="mw:ExtLink"
5643 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5647 Use url link syntax for links where the content is equal the link target
5651 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5654 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5658 Parenthesis in external links, especially URL links
5662 http://example.com/test)
5664 http://example.com/(test)
5666 http://example.com/((test)
5668 (http://example.com/(test))
5670 (http://example.com/(test)))))
5672 http://example.com/a)b
5674 [http://example.com) foo]
5676 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</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/(test))">http://example.com/(test))</a>
5681 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5682 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5683 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5686 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</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/(test))">http://example.com/(test))</a></p>
5691 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5692 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5693 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5697 Parenthesis in external links, w/ transclusion or comment
5699 (http://example.com/{{echo|hi}})
5701 (http://example.com<!-- hi -->)
5703 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5704 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5707 <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>
5709 <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>
5713 Serialize <a> tags with invalid link targets as plain text
5715 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5717 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5718 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5719 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5720 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5723 <nowiki>*</nowiki>text
5724 <nowiki>[[foo]]</nowiki>
5725 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5729 mw:ExtLink -vs- mw:WikiLink (T94723)
5733 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5734 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5735 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5736 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5738 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5739 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5744 [[wikipedia:Foo|Bar]]
5745 [[wikipedia:Foo|Bar]]
5747 [[wikipedia:European_Robin|European Robin]]
5748 [[wikipedia:European_Robin|European Robin]]
5752 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5756 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5758 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5769 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5771 Normal text. '''''Bold italic text.''''' Normal text.
5773 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5774 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5779 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5780 # parser strips. The wikitext contains just the first half of the bold
5783 Unclosed and unmatched quotes
5785 '''''Bold italic text '''with bold deactivated''' in between.'''''
5787 '''''Bold italic text ''with italic deactivated'' in between.'''''
5791 ..spanning two paragraphs (should not work).'''
5793 '''Bold tag left open
5795 ''Italic tag left open
5799 <!-- Unmatching number of opening, closing tags: -->
5800 '''This year''''s election ''should'' beat '''last year''''s.
5802 ''Tom'''s car is bigger than ''Susan'''s.
5804 Plain ''italic'''s plain
5806 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5807 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5808 </p><p><b>Bold text..</b>
5809 </p><p>..spanning two paragraphs (should not work).
5810 </p><p><b>Bold tag left open</b>
5811 </p><p><i>Italic tag left open</i>
5813 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5814 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5815 </p><p>Plain <i>italic'</i>s plain
5818 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5819 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5820 </p><p><b>Bold text..</b>
5821 </p><p>..spanning two paragraphs (should not work).<b></b>
5822 </p><p><b>Bold tag left open</b>
5823 </p><p><i>Italic tag left open</i>
5826 <!-- Unmatching number of opening, closing tags: -->
5827 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5828 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5829 </p><p>Plain <i>italic'</i>s plain
5836 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5839 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5840 # is the bare minimum required by the spec, see:
5841 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5842 # Parsoid team replies: empty table tags are legal in HTML5
5844 A table with no data.
5857 A table with stray table end tags on start tag line (wt2html)
5861 {|style="color: red;"|}
5863 {|style="color: red;" |}
5867 {|style="color: red;"|} id="foo"
5871 {|style="color: red;" |} id="foo"
5875 <table style="color: red;"></table>
5877 <table style="color: red;">
5883 <table style="color: red;" id="foo">
5889 <table style="color: red;" id="foo">
5898 A table with no data (take 2)
5906 # A table with nothing but a caption is invalid XHTML, we might want to render
5907 # this as <p>caption</p>
5908 # Parsoid team replies: table with only a caption is legal in HTML5
5910 A table with nothing but a caption
5918 </caption><tr><td></td></tr></table>
5921 <table><caption> caption</caption></table>
5925 A table with caption with default-spaced attributes and a table row
5928 |+ style="color: red;" | caption1
5934 <caption style="color: red;"> caption1
5943 A table with captions with non-default spaced attributes and a table row
5946 |+style="color: red;"|caption2
5947 |+ style="color: red;"| caption3
5953 <caption style="color: red;">caption2
5955 <caption style="color: red;"> caption3
5964 Table td-cell syntax variations
5968 | foo bar foo || baz
5969 | style='color:red;' | baz
5970 | style='color:red;' || baz
5977 <td> foo bar foo </td>
5980 <td style="color:red;"> baz
5982 <td> style='color:red;' </td>
6010 Simple table but with multiple dashes for row wikitext
6029 Multiplication table
6031 {| border="1" cellpadding="2"
6032 |+Multiplication table
6034 ! × !! 1 !! 2 !! 3
6052 <table border="1" cellpadding="2">
6053 <caption>Multiplication table
6100 Accept "||" in table headings
6115 Accept "!!" in table data
6129 <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>
6134 Accept "||" in indented table headings
6144 </th></tr></table></dd></dl>
6149 Accept "!!" in templates
6163 <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>
6167 Accept "!!" in table headings after newline
6184 <p>b!!c</p></th></tr>
6189 Accept "!!" in table data of mixed wikitext / html syntax
6193 <tr><td>b!!c</td></tr>
6206 <tbody><tr><th>a</th></tr>
6207 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6212 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6229 Accept "| !" at start of line in tables (ignore !-attribute)
6233 | !style="color:red" | bar
6245 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 +/-
6249 |style='color:red;'|+1
6250 |style='color:blue;'|-1
6262 <td style="color:red;">+1
6264 <td style="color:blue;">-1
6288 |rowspan=2| Cell 2, row 1 (and 2)
6299 <td rowspan="2"> Cell 2, row 1 (and 2)
6317 {| bgcolor=#ABCDEF border=2
6322 |the original table again
6330 <table bgcolor="#ABCDEF" border="2">
6338 <td>the original table again
6344 Invalid attributes in table cell (bug 1830)
6358 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6362 | title="foo<nowiki>|</nowiki>" |bar
6363 | title="foo<nowiki>|</nowiki>" bar
6370 <td title="foo|">bar
6372 <td> title="foo|" bar
6377 <tbody><tr><td title="foo">bar</td>
6378 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6379 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6383 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6384 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6385 # *2wt modes will fail.
6387 Table security: embedded pipes
6389 parsoid=wt2html,html2html
6392 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6396 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6397 <td>]" onmouseover="alert(document.cookie)">test
6405 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6409 Element attributes with double ! should not be broken up by <th>
6412 ! hi <div class="!!">ha</div> ho
6417 <th> hi <div class="!!">ha</div> ho
6422 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6427 ! and || in element attributes should not be parsed as <th>/<td>
6430 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6435 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6440 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6444 # FIXME: The output seems broken. Filed as T110268.
6446 ! and || in td attributes should not be parsed as <th>/<td>
6451 | style="color: red !important;" data-contrived="put this here ||" | foo
6456 <td> style="color: red !important;" data-contrived="put this here </td>
6462 <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>
6467 Break on | in element attribute in template
6469 parsoid=wt2html,html2html
6471 {{echo|1=<div class="hi|ho">ha</div>}}
6473 <p>ho">ha</div>
6476 <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>
6480 Don't break on | in extension attribute in template
6482 {{echo|<ref name="hi|ho">ha</ref>}}
6486 <p><span about="#mwt2" class="mw-ref" id="cite_ref-hi.7Cho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi.7Cho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
6488 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi.7Cho-1" id="cite_note-hi.7Cho-1"><a href="./Main_Page#cite_ref-hi.7Cho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi.7Cho-1" class="mw-reference-text">ha</span></li></ol>
6491 ## We don't support roundtripping of these attributes in Parsoid.
6492 ## Selective serialization takes care of preventing dirty diffs.
6493 ## But, on edits, we dirty-diff the invalid attribute text.
6495 Invalid text in table attributes should be discarded
6499 {| <span>boo</span> style='border:1px solid black'
6500 | <span>boo</span> style='color:blue' | 1
6501 |<span>boo</span> style='color:blue'| 2
6504 <table style="border:1px solid black">
6506 <td style="color:blue"> 1
6508 <td style="color:blue"> 2
6512 <table style="border:1px solid black">
6514 <td style="color:blue"> 1</td>
6515 <td style="color:blue"> 2</td>
6521 Invalid text in table attributes should be preserved by selective serializer
6524 "modes": ["selser"],
6526 ["td:first-child", "text", "abc"],
6527 ["td + td", "text", "xyz"]
6531 {| <span>boo</span> style='border:1px solid black'
6532 | <span>boo</span> style='color:blue' | 1
6533 |<span>boo</span> style='color:blue'| 2
6536 {| <span>boo</span> style='border:1px solid black'
6537 | <span>boo</span> style='color:blue' |abc
6538 |<span>boo</span> style='color:blue'|xyz
6543 1. Template-generated table cell attributes and cell content
6548 || {{table_attribs_5}}
6549 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6550 |align=center {{table_attribs}}
6551 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6556 <td style="color:red;">Foo
6558 <td style="color:red;">Foo
6560 <td> style="color:red;"</td>
6563 <td style="color:red;">Foo
6565 <td align="center" style="color:red;">Foo
6567 <td align="center" style="color:red;">Foo
6573 2. Template-generated table cell attributes and cell content
6576 |{{table_attribs_2}}
6581 <td style="color:red;">Foo
6589 <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>
6590 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6595 3. Template-generated table cell attributes and cell content
6598 !align=center {{table_header_cells}}
6600 |align=center {{table_cells}}
6605 <th align="center" style="color:red;">Foo</th>
6606 <th style="color:red;"><i>Bar</i></th>
6607 <th style="color:brown;"><i>Foo</i> and Baz
6610 <td align="center" style="color:red;">Foo</td>
6611 <td style="color:red;"><i>Bar</i></td>
6612 <td style="color:brown;"><i>Foo</i> and Baz
6617 <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>
6618 <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>
6623 4. Template-generated table cell attributes and cell content inside a templated table
6626 !align=center {{table_header_cells}}
6628 |align=center {{table_cells}}
6633 <th align="center" style="color:red;">Foo</th>
6634 <th style="color:red;"><i>Bar</i></th>
6635 <th style="color:brown;"><i>Foo</i> and Baz
6638 <td align="center" style="color:red;">Foo</td>
6639 <td style="color:red;"><i>Bar</i></td>
6640 <td style="color:brown;"><i>Foo</i> and Baz
6644 <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}}]}'>
6645 <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>
6647 <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>
6651 ## Edge case fix to prevent future regressions
6653 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6656 |{{table_attribs_7}}
6661 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<span class="mw-ref" id="cite_ref-1" rel="dc:references" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
6663 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
6667 Table with row followed by newlines and table heading
6669 parsoid=wt2html,html2html
6687 Table with empty line following the start tag
6689 parsoid=wt2html,html2html
6707 Table attributes with empty value
6709 parsoid=wt2html,html2html
6722 <tbody><tr><td style=""> hello</td></tr>
6727 Wikitext table with a lot of comments
6750 Wikitext table comments represented in parsoid dom
6752 {|<!--c1--><!--c2-->
6763 <table><!--c1--><!--c2-->
6764 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6765 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6770 Wikitext table with double-line table cell
6787 Table cell with a single comment
6804 Table-cell after a comment-only-empty-line
6821 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6823 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6829 Build table with {{!}}
6831 {{{!}} class="wikitable"
6834 {{!}}- style="color:red;"
6835 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6838 <table class="wikitable">
6844 <tr style="color:red;">
6846 <td style="color:red;"> second data
6852 Build table with pipe as data
6854 {| class="wikitable"
6857 |- style="color:red;"
6858 | data || style="color:red;" | second data
6860 | style="color:red;" | data with | || style="color:red;" | second data with |
6862 || data with | ||| second data with |
6865 <table class="wikitable">
6871 <tr style="color:red;">
6873 <td style="color:red;"> second data
6876 <td style="color:red;"> data with | </td>
6877 <td style="color:red;"> second data with |
6880 <td> data with | </td>
6881 <td> second data with |
6887 Build table with wikilink
6889 {| class="wikitable"
6890 ! header || second header
6891 |- style="color:red;"
6892 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6894 | data || second data [[Main Page|link|text with pipe]]
6897 <table class="wikitable">
6902 <tr style="color:red;">
6903 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6904 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6908 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6913 # The expected HTML structure in this test is debatable. The PHP parser does
6914 # not parse this kind of table at all. The main focus for Parsoid is on
6915 # round-tripping, so this output is ok for now. TODO: revisit!
6917 Wikitext table with html-syntax row
6927 <td>foo</td></tr></tbody></table>
6930 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6931 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6932 ## PHP parser, which tidy then compounds by fostering the content
6933 ## entirely out of the table. Parsoid recognizes the table context
6934 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6935 ## depends on PHP's treatment of broken table markup!
6937 Implicit <td> after a |-
6939 parsoid=wt2html,html2html
6959 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6961 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6963 parsoid=wt2html,html2html
6996 <tr><td><pre>a</pre></td></tr>
6997 <tr><td> b</td></tr>
7002 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
7003 # Parsoid generates the missing <td>, so wt2wt won't succeed.
7005 Lists should be recognized in an implicit <td> context
7007 parsoid=wt2html,html2html
7034 Table cells not properly parsed in an implicit-td context
7038 {{table_attribs_4}} || a || b
7043 <td style="background-color:#DC241f;" width="10px"></td>
7050 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7051 <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>
7056 Parsoid: Round-trip tables directly followed by content (bug 51219)
7058 parsoid=wt2html,wt2wt
7083 Parsoid: Default to a newline after tables in new content (bug 51219)
7088 <tr><td>foo</td></tr></tbody></table> bar
7090 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7095 <nowiki> </nowiki>bar
7103 Parsoid: newline inducing block nodes don't suppress <nowiki>
7115 Parsoid: Row-syntax table headings followed by comment & table cells
7117 parsoid=wt2html,wt2wt
7121 <!-- foo --> || baz || quux
7135 <tbody><tr><th> foo </th><th> bar
7136 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7141 Parsoid: Recover better from broken table attributes
7161 <p>foo</p></td></tr>
7166 Tables: Digest broken attributes on table and tr tag
7182 # T137406: Whitespace in the HTML
7184 1. Generate correct wikitext for tables with thead/tbody/tfoot
7189 <caption>Test</caption>
7230 <caption>Test</caption>
7250 # T137406: No whitespace in the HTML
7252 2. Generate correct wikitext for tables with thead/tbody/tfoot
7256 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7266 Testing serialization after deletion in references
7275 hi <ref><div id="x">ho</div></ref>
7285 Testing serialization after deletion of table cells
7288 "modes": ["wt2wt", "selser"],
7296 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7306 Testing selser after addition of new row before first row (T125419)
7309 "modes": ["wt2wt", "selser"],
7311 [ "tr", "before", "<tr><td>X</td></tr>" ]
7327 Serialize new table rows in a HTML table using HTML tags
7330 "modes": ["wt2wt", "selser"],
7332 [ "tr", "before", "<tr><td>X</td></tr>" ]
7336 <table><tr><td>a</td></tr></table>
7338 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7342 Serialize new table cells in a HTML row using HTML tags
7345 "modes": ["wt2wt", "selser"],
7347 [ "td", "before", "<td>X</td>" ]
7351 <table><tr><td>a</td></tr></table>
7353 <table><tr><td>X</td><td>a</td></tr></table>
7357 Wikitext tables can be nested inside HTML tables
7361 <table data-parsoid='{"stx":"html"}'>
7364 <tr><td>foo</td></tr>
7379 Serialize wikitext list items as HTML list items when embedded in a HTML list
7383 <ul data-parsoid='{"stx": "html"}'>
7384 <li data-parsoid='{}'>a</li>
7394 # SSS FIXME: Is this actually a good thing given the
7395 # odd nested list output that is generated by MW?
7396 # <ul><li>foo<ul>..</ul></li></ul> instead of
7397 # <ul><li>foo</li><ul>..</ul></ul>
7399 Wikitext lists can be nested inside HTML lists
7403 <ul data-parsoid='{"stx": "html"}'>
7404 <li data-parsoid='{"stx": "html"}'>a
7409 <ul data-parsoid='{"stx": "html"}'>
7432 Plain link, capitalized
7436 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7441 Plain link, uncapitalized
7445 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7452 [[Main Page|The Main Page]]
7454 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7459 Piped link with comment in link text
7461 [[Main Page|The Main<!--front--> Page]]
7463 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7468 Piped link with multiple pipe characters in link text
7470 [[Main Page||The|Main|Page|]]
7472 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7475 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7479 Piped link with no link text
7481 [[Thomas Bek (bishop of St David's)|]]
7483 <p>[[Thomas Bek (bishop of St David's)|]]
7486 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7490 Piped link with empty link text
7492 [[Main Page|<nowiki />]] - empty nowiki
7493 [[Main Page| ]] - empty space
7494 [[Main Page| ]] - empty non breaking space
7496 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7497 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7498 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7501 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki />"}'/></a> - empty nowiki
7502 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7503 <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>
7511 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7516 Broken link with fragment
7518 [[Zigzagzogzagzig#zug]]
7520 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7525 Special page link with fragment
7527 [[Special:Version#anchor]]
7529 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7534 Nonexistent special page link with fragment
7536 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7538 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7545 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7547 <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>
7554 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7556 <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>!!!
7567 Bug 43661: Piped links with identical prefixes
7569 [[prefixed article|prefixed articles with spaces]]
7571 [[prefixed article|prefixed articlesaoeu]]
7573 [[Main Page|Main Page test]]
7575 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7576 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7577 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7583 Link with HTML entity in suffix / tail
7585 [[Main Page]]", [[Main Page]]a
7587 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7590 <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>
7594 Link with 3 brackets
7605 Link with 4 brackets
7609 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7614 Piped link with 3 brackets
7616 [[[main page|the main page]]]
7618 <p>[[[main page|the main page]]]
7623 Piped link with extlink-like text
7626 [[Main Page|This is a [bar]]]
7628 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7629 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7632 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7633 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7637 Link with multiple pipes
7639 [[Main Page|The|Main|Page]]
7641 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7646 Anchor containing a #. (bug 63430)
7648 [[Main Page#And#Link]]
7650 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7653 <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>
7659 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7661 <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>
7666 Link with space in namespace
7668 [[User talk:Foo bar]]
7670 <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>
7675 MemoryAlpha:AlphaTest
7677 This is an article in the MemoryAlpha namespace
7678 (which shadows the memoryalpha interwiki link).
7682 Namespace takes precedence over interwiki link (bug 51680)
7684 [[MemoryAlpha:AlphaTest]]
7686 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7690 # The previous test doesn't work correctly in html2*, due to not recognizing the
7691 # link as an internal one. This one checks for the correct behavior.
7693 Link to namespace preferred over interwiki with correct rel attribute
7695 parsoid=html2wt,html2html
7697 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7699 [[MemoryAlpha:AlphaTest]]
7703 Piped link to namespace
7705 [[Meta:Disclaimers|The disclaimers]]
7707 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7714 [[Usually caused by a typo (oops}]]
7716 <p>[[Usually caused by a typo (oops}]]
7723 Just a test of an article title containing a percent.
7727 Link containing % (not as a hex sequence)
7730 [[7% Solution|7%25 Solution]]
7732 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7733 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7736 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7737 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7740 # note that the parsoid HTML is identical to the previous test output,
7741 # so the previous test ensures that the html2wt mode will generate the
7742 # "not as a hex sequence" wikitext.
7744 Link containing % as a single hex sequence interpreted to char
7746 parsoid=wt2wt,wt2html,html2html
7749 [[7%25 Solution|7%25 Solution]]
7751 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7752 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7755 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7756 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7760 Link containing % as a double hex sequence interpreted to hex sequence
7764 <p>[[7%2525 Solution]]
7768 ## Example for such a section: == < ==
7770 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7772 [[%23%3c]][[%23%3e]]
7774 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7777 <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>
7781 Link containing "<#" and ">#" as a hex sequences
7783 [[%3c%23]][[%3e%23]]
7785 <p>[[%3c%23]][[%3e%23]]
7790 Link containing an equals sign
7792 [[Special:BookSources/isbn=4-00-026157-6]]
7794 <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>
7797 <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>
7803 Just a test of an article title containing a tilde.
7806 # note that links containing signatures, like [[Foo~~~~]], are
7807 # massaged by the pre-save transform (PST) and so the tildes are never
7808 # seen by the parser.
7810 Link containing a tilde
7814 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7817 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7821 Link containing double-single-quotes '' (bug 4598)
7823 [[Lista d''e paise d''o munno]]
7825 <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>
7828 <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>
7832 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7834 Some [[Link|pretty ''italics'' and stuff]]!
7836 <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>!
7839 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7843 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7845 ''Some [[Link|pretty ''italics'' and stuff]]!''
7847 <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>
7852 Link with double quotes in title part (literal) and alternate part (interpreted)
7854 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7858 [[''Pentecoste''|Pentecoste]]
7860 [[''Pentecoste''|''Pentecoste'']]
7862 <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>
7863 </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>
7864 </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>
7865 </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>
7868 <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>
7869 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7870 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7871 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7875 Broken image links with HTML captions (bug 39700)
7877 [[File:Nonexistent|<script></script>]]
7878 [[File:Nonexistent|100x100px|<script></script>]]
7879 [[File:Nonexistent|<]]
7880 [[File:Nonexistent|a<i>b</i>c]]
7882 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7883 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7884 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7885 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7888 <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>
7889 <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>
7890 <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>
7891 <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>
7897 [[http://www.example.com]]
7899 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7902 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7906 Plain link to URL with link text
7908 [[http://www.example.com Link text]]
7910 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7915 Plain link to protocol-relative URL
7917 [[//www.example.com]]
7919 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7922 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7926 Plain link to protocol-relative URL with link text
7928 [[//www.example.com Link text]]
7930 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7935 Plain link to page with question mark in title
7941 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7942 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7947 # I'm fairly sure the expected result here is wrong.
7948 # We want these to be URL links, not pseudo-pages with URLs for titles....
7949 # However the current output is also pretty screwy.
7952 # I'm changing it to match the current output--it arguably makes more
7953 # sense in the light of the test above. Old expected result was:
7954 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7956 # But I think this test is bordering on "garbage in, garbage out" anyway.
7961 Piped link to URL: [[http://www.example.com|an example URL]]
7963 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7966 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7970 BUG 2: [[page|http://url/]] should link to page, not http://url/
7972 [[Main Page|http://url/]]
7974 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7977 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7980 # Parsoid does not mark self-links, by design.
7982 BUG 337: Escaped self-links should be bold
7986 [[Bug462]] [[Bug462]]
7988 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7991 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7993 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7997 Self-link to section should not be bold
8001 [[Main Page#section]]
8003 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8014 Self-link to numeric title
8020 <p><strong class="selflink">0</strong>
8025 Link to numeric-equivalent title
8031 <p><a href="/wiki/00" title="00">00</a>
8036 <nowiki> inside a link
8038 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8040 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8045 Non-breaking spaces in title
8047 [[ Main Page ]]
8049 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8054 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
8060 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8065 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
8071 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8076 Internal link with en linktrail: no apostrophes (bug 27473)
8082 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8087 Internal link with ca linktrail with apostrophes (bug 27473)
8093 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8098 Internal link with kaa linktrail with apostrophes (bug 27473)
8104 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8109 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8111 [[User:Foo/Test/63636:Bar|Test]]
8113 <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>
8116 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8119 ## Mainly a sanity check for Parsoid
8121 Handle title parsing for subpages
8130 ## FIXME: Add a working php section here
8132 Link to a subpage from a namespace other than main
8138 <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>
8142 Ensure that transclusion titles are not url-decoded
8144 subpage title=[[Test]]
8147 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8149 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8152 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8156 Purely hash wikilink
8158 title=[[User:test/123]]
8162 <p><a href="#a">b</a>
8165 <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>
8169 1. Interaction of linktrail and template encapsulation
8175 <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>
8179 2. Interaction of linktrail and template encapsulation
8183 {{echo|Some [[Fool]]}}s
8185 <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>
8189 3. Interaction of linktrail and template encapsulation
8193 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8195 <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>
8205 Internal link with is link prefix
8209 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8211 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8222 Internal link with is link trail and link prefix
8226 [[mótmælendatrú|xxx]]ar
8228 mótmælenda[[söfnuður]]
8229 mótmælenda[[söfnuður|söfnuðir]]
8230 mótmælenda[[söfnuður|söfnuðir]]xxx
8232 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8233 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8234 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8235 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8236 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8241 Parsoid link trail escaping
8243 parsoid=html2wt,html2html
8245 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8251 Parsoid link prefix escaping
8254 parsoid=html2wt,html2html
8256 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8258 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8262 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8270 [http://wp.org ''foo'']
8272 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8273 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8274 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8275 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8280 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8284 [[Foo|{{echo|a}} b {{echo|c}}]]
8286 <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>
8290 Link with angle bracket after anchor
8294 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8297 <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>
8301 ### Interwiki links (see maintenance/interwiki.sql)
8305 Inline interwiki link
8307 parsoid=wt2html,wt2wt,html2html
8309 [[MeatBall:SoftSecurity]]
8311 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8314 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8318 Inline interwiki link with empty title (bug 2372)
8320 parsoid=wt2html,wt2wt,html2html
8324 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8327 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8331 Interwiki link encoding conversion (bug 1636)
8333 *[[Wikipedia:ro:Olteniţa]]
8334 *[[Wikipedia:ro:Olteniţa]]
8336 <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>
8337 <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>
8341 <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>
8342 <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>
8347 Interwiki link with fragment (bug 2130)
8349 [[MeatBall:SoftSecurity#foo]]
8351 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8356 Link scenarios with escaped fragments
8359 [[Foo#Is this great?]]
8360 [[meatball:Foo#Is this great?]]
8362 <p><a href="#Is_this_great.3F">#Is this great?</a>
8363 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8364 <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>
8367 <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>
8368 <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>
8369 <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>
8372 # Ideally the wikipedia: prefix here should be proto-relative too
8373 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8374 # define the 'en' prefix, and originally the test used 'wikipedia',
8375 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8378 Different interwiki prefixes mapping to the same URL
8386 [[:wikipedia:Foo|Foo]]
8388 [[wikipedia:en:Foo]]
8390 [[:wikipedia:en:Foo]]
8394 <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>
8396 <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>
8398 <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>
8400 <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>
8402 <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>
8404 <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>
8406 <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>
8410 Interwiki links that cannot be represented in wiki syntax
8413 [[meatball:ok#foo|ok with fragment]]
8414 [[meatball:ok_as_well?|ok ending with ? mark]]
8415 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8416 [http://de.wikipedia.org/wiki/#foo is just fragment]
8419 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8420 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8421 <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>
8422 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8423 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8426 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8427 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8428 <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>
8429 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8430 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8434 Interwiki links: trail
8436 [[wikipedia:Foo|Ba]]r
8438 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8441 <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>
8445 Local interwiki link
8447 parsoid=wt2html,wt2wt,html2html
8449 [[local:Template:Foo]]
8451 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8454 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8457 # Parsoid does not mark self-links, by design.
8459 Local interwiki link: self-link to current page
8462 parsoid=wt2html,wt2wt,html2html
8466 <p><strong class="selflink">local:Main Page</strong>
8469 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8473 Local interwiki link: prefix only (bug 64167)
8475 parsoid=wt2html,wt2wt,html2html
8479 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8482 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8486 Local interwiki link: with additional interwiki prefix (bug 61357)
8488 parsoid=wt2html,wt2wt,html2html
8490 [[local:meatball:Hello]]
8492 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8495 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8499 Multiple local interwiki link prefixes
8501 [[local:local:local:local:mi:local:Foo]]
8503 parsoid=wt2html,wt2wt,html2html
8505 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8508 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8512 ### Interlanguage links
8513 ### Language links (so that searching for '### language' matches..)
8525 <p>Blah blah blah</p>
8526 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8529 ## parsoid html2wt will lose the space variations
8531 Interlanguage link with spacing
8533 parsoid=wt2html,wt2wt,html2html
8541 <p>Blah blah blah</p>
8542 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8546 Double interlanguage link
8555 <p>Blah blah blah</p>
8556 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8557 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8560 ## parsoid html2wt will lose the space variations
8562 Interlanguage link variations
8564 parsoid=wt2html,wt2wt,html2html
8574 <p>Blah blah blah</p>
8575 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8576 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8577 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8580 ## parsoid html2wt will normalize the space to _
8582 Space and question mark encoding in interlanguage links (T95473)
8584 parsoid=wt2html,wt2wt,html2html
8592 <p>Blah blah blah</p>
8593 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8597 Interlanguage link, with prefix links
8607 <p>Blah blah blah</p>
8608 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8612 Double interlanguage link, with prefix links (bug 8897)
8623 <p>Blah blah blah</p>
8624 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8625 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8629 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8637 <p>Blah blah blah</p>
8638 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8641 ## PHP parser tests script needs an update
8642 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8644 Language links render as inline links if $wgInterwikiMagic=false
8646 wgInterwikiMagic=false
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>
8655 ## PHP parser tests script needs an update
8656 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8658 Language links render as inline links in the Talk namespace
8661 parsoid=wt2html,wt2wt,html2html
8666 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8670 Parsoid-specific test: Wikilinks with should RT properly
8676 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8681 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8683 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8685 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8686 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8688 He&nbsp;llo [[Foo|He&nbsp;llo]]
8690 He&nbsp;llo He&nbsp;llo
8692 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8693 </p><p>He&nbsp;llo He&nbsp;llo
8697 # html2wt will fail because of title normalization without data-parsoid
8699 Parsoid: handle constructor well
8701 parsoid=wt2html,wt2wt
8707 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8708 </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>
8711 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8713 <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>
8722 # Note that `ko` isn't a known interlanguage prefix
8724 Parsoid: recognize interlanguage links without a target page
8734 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8736 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8739 # Note that `ko` isn't a known interwiki prefix
8741 Parsoid: recognize interwiki links without a target page
8743 parsoid=wt2html,wt2wt,html2html
8749 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8750 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8753 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8754 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8758 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8762 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8765 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8769 Interlanguage link with preceding local interwiki link (bug 68085)
8771 parsoid=wt2html,wt2wt,html2html
8774 [[local:es:Spanish]]
8777 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8781 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8785 Looks like an interlanguage link, but is actually a local interwiki
8787 parsoid=wt2html,wt2wt,html2html
8793 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8797 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8801 ### Redirects, Parsoid-only
8805 1. Simple redirect to page
8807 #REDIRECT [[Main Page]]
8809 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8813 2. Other redirect variants
8815 #REDIRECT [[Main_Page]]
8817 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8820 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8821 # This tests the Parsoid bail-out code.
8823 3. Other redirect variants
8825 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8827 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8831 4. Redirect to a templated destination
8833 #REDIRECT [[{{echo|Foo}}bar]]
8835 <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"}]]}'/>
8841 parsoid=wt2html,wt2wt
8846 <li>REDIRECT [[]]</li></ol>
8850 Optional colon in #REDIRECT
8852 # the colon is archaic syntax. we support it for wt2html, but we
8853 # don't care that it roundtrips back to the modern syntax.
8854 parsoid=wt2html,html2html
8856 #REDIRECT:[[Main Page]]
8858 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8862 Whitespace in #REDIRECT with optional colon
8864 # the colon and gratuitous whitespace is archaic syntax. we support
8865 # it for wt2html, but we don't care that it roundtrips back to the
8866 # modern syntax (without extra whitespace)
8867 parsoid=wt2html,html2html
8874 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8878 Piped link in #REDIRECT
8880 # content after piped link is ignored. we support this syntax,
8881 # but don't care that the piped link is lost when we roundtrip this.
8884 #REDIRECT [[Main Page|bar]]
8886 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8890 Redirect to category (T104502)
8892 parsoid=wt2html,wt2wt
8894 #REDIRECT [[Category:Foo]]
8896 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8900 Redirect to category with URL encoding (T104502)
8904 #REDIRECT [[Category%3AFoo]]
8906 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8910 Redirect to category page
8912 #REDIRECT [[:Category:Foo]]
8914 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8918 Redirect to image page (1)
8920 #REDIRECT [[File:Wiki.png]]
8922 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8926 Redirect to image page (2)
8928 #REDIRECT [[Image:Wiki.png]]
8930 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8933 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8934 # Next test confirms this.
8936 Redirect to language (1) (T104918)
8938 parsoid=wt2html,wt2wt,html2html
8940 #REDIRECT [[en:File:Wiki.png]]
8942 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8946 Redirect to language (2) (T104918)
8948 #REDIRECT [[:en:File:Wiki.png]]
8950 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8954 Redirect to interwiki (T104918)
8956 #REDIRECT [[meatball:File:Wiki.png]]
8958 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8962 Non-English #REDIRECT
8966 #TILVÍSUN [[Main Page]]
8968 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8972 Redirect syntax under text isn't considered a redirect
8975 #redirect [[Main Page]]
8978 <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>
8981 # FIXME: Should hoist the redirect to the top of the page and ensure there
8988 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9008 Broken br tag sanitization
9016 # TODO: Fix html2html mode (bug 51055)!
9018 Parsoid: Broken br tag recognition
9031 Incorrecly removing closing slashes from correctly formed XHTML
9033 <br style="clear:both;" />
9035 <p><br style="clear:both;" />
9040 Failing to transform badly formed HTML into correct XHTML
9042 <br style="clear: left;">
9043 <br style="clear: right;">
9044 <br style="clear: both;">
9046 <p><br style="clear: left;" />
9047 <br style="clear: right;" />
9048 <br style="clear: both;" />
9052 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9053 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9055 Handling html with a div self-closing tag
9064 <p><div title />
9068 <p><div title=bar />
9069 <div title=bar/>
9071 <div title="bar/"></div>
9075 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9076 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9077 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9078 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9079 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9080 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9084 Handling html with a br self-closing tag
9111 Horizontal ruler (should it add that extra space?)
9126 Horizontal ruler -- 4+ dashes render hr
9135 Horizontal ruler -- eats additional dashes on the same line
9144 Horizontal ruler -- does not collapse dashes on consecutive lines
9155 Horizontal ruler -- <4 dashes render as plain text
9164 Horizontal ruler -- Supports content following dashes on same line
9176 ### Block-level elements
9185 <ul><li>Common list</li>
9187 <li>item 3</li></ul>
9198 <ol><li>Numbered list</li>
9200 <li> item 3</li></ol>
9214 ***#Number on level 4
9216 **#Number on level 3
9217 **#Number on level 3
9221 #** Level 3, but ordered
9224 <ol><li> with numbers</li></ol>
9225 <ul><li> and bullets</li></ul>
9226 <ol><li> and numbers</li></ol></li>
9228 <ul><li>bullet level 2
9229 <ul><li>bullet level 3
9230 <ol><li>Number on level 4</li></ol></li></ul></li>
9232 <ol><li>Number on level 3</li>
9233 <li>Number on level 3</li></ol></li></ul>
9234 <ol><li>number level 2</li></ol></li>
9236 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9237 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9242 1. Nested mixed wikitext and html list
9245 * <ul><li>ho</li></ul>
9250 <li> <ul><li>ho</li></ul></li>
9252 <ul><li> ho</li></ul></li></ul>
9256 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9258 <ul><li> ho</li></ul></li></ul>
9262 2. Nested mixed wikitext and html list (incompatible)
9265 : {{echo|<li>ho</li>}}
9268 <dd> <li>ho</li></dd></dl>
9272 <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>
9282 <ul><li>bar</li></ul></li></ul>
9292 <ul><li><ul><li>foo</li></ul></li>
9298 Nested lists 3 (first element empty)
9304 <ul><li>bar</li></ul></li></ul>
9309 Nested lists 4 (first element empty)
9314 <ul><li><ul><li></li></ul></li>
9320 Nested lists 5 (both elements empty)
9325 <ul><li><ul><li></li></ul></li>
9331 Nested lists 6 (both elements empty)
9337 <ul><li></li></ul></li></ul>
9342 Nested lists 7 (skip initial nesting levels)
9346 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9351 Nested lists 8 (multiple nesting transitions)
9359 <ul><li><ul><li> bar</li></ul></li>
9360 <li> baz</li></ul></li>
9366 Nested lists 9 (extension interaction)
9372 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9376 1. Lists with start-of-line-transparent tokens before bullets: Comments
9389 2. Lists with start-of-line-transparent tokens before bullets: Template close
9394 <ul><li>foo bar</li>
9400 List items are not parsed correctly following a <pre> block (bug 785)
9406 <ul><li> <pre>foo</pre></li>
9407 <li> <pre>bar</pre></li>
9411 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9412 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9417 List items from template
9428 * notSOL{{inner list}}
9431 <ul><li> item 1</li>
9432 <li> item 2</li></ul>
9433 <ul><li> item 0</li>
9435 <li> item 2</li></ul>
9436 <ul><li> item 0</li>
9439 <li> item 2</li></ul>
9444 List interrupted by empty line or heading
9452 <ul><li> foo</li></ul>
9453 <ul><li><ul><li> bar</li></ul></li></ul>
9454 <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>
9455 <ul><li> Another list item</li></ul>
9460 Multiple list tags generated by templates
9481 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9484 <!--This line will NOT split the list-->
9486 <!--This line will NOT split the list either-->
9488 <!--foo--> <!----> <!--This line NOT split the list either-->
9499 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9502 <!--This line will NOT split the list-->
9504 <!--This line will NOT split the list either-->
9506 <!--foo--> <!----> <!--This line NOT split the list
9519 (The PHP parser relies on Tidy for the hack)
9521 parsoid=wt2html,wt2wt
9525 * {{echo|<li>templated li-hack}}
9526 * <!--foo--> <li> unsupported li-hack with preceding comments
9529 <li><li>not a li-hack
9536 <li>templated li-hack</li>
9537 <li>unsupported li-hack with preceding comments</li>
9540 <li>not a li-hack</li>
9545 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9572 Parsoid: Test of whitespace serialization with Templated bullets
9579 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9583 # ------------------------------------------------------------------------
9584 # The next set of tests are about Parsoid's ability to handle badly nested
9585 # tags (parse, minimize scope of fixup, and roundtrip back)
9586 # ------------------------------------------------------------------------
9589 Unbalanced closing block tags break a list
9590 (php parser relies on Tidy to fix up)
9608 # Parsoid fails this test, but it might be tricky to support properly.
9611 Unbalanced closing non-block tags don't break a list
9612 (php parser relies on Tidy to fix up)
9619 <li><span>a</span></li>
9620 <li><span>b</span></li>
9634 Unclosed formatting tags that straddle lists are closed and reopened
9635 (php parser relies on Tidy to fix up)
9637 parsoid=wt2html,wt2wt,html2html
9647 <ol><li> <s> a</s></li>
9648 <li><s> b </s></li></ol>
9653 1. List embedded in a formatting tag
9660 <li><small>foo</small></li>
9670 ## Ugly Parsoid output here
9671 ## Not sure what the right output is.
9673 2. List embedded in a formatting tag
9680 <li><small>a</small></li>
9681 <li><small>b</small></li>
9688 <li><small>b</small></li>
9692 # Ugly Parsoid and PHP parser output here
9693 # Not sure if we want to make this a test!
9696 ## 3. Unclosed formatting tags in list elements
9702 ## <li><small>a</small></li>
9703 ## <li><small><small>b</small></small></li>
9707 ## <li><small>a</small></li>
9709 ## <li><small>b</small></li>
9713 # This is a bug in the PHP parser + tidy combination.
9714 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9715 # and then fostered out of the table by tidy.)
9716 # We believe the Parsoid output to be correct.
9718 Table with missing opening <tr> tag
9720 parsoid=wt2html,wt2wt
9738 # Note that the current date is hard-coded as
9739 # 1970-01-01T00:02:03Z (a Thursday)
9740 # when running parser tests. The timezone is also fixed to GMT, so
9741 # local date will be identical to current date.
9744 Magic Word: {{CURRENTDAY}}
9753 Magic Word: {{CURRENTDAY2}}
9762 Magic Word: {{CURRENTDAYNAME}}
9771 Magic Word: {{CURRENTDOW}}
9780 Magic Word: {{CURRENTMONTH}}
9789 Magic Word: {{CURRENTMONTH1}}
9798 Magic Word: {{CURRENTMONTHABBREV}}
9800 {{CURRENTMONTHABBREV}}
9807 Magic Word: {{CURRENTMONTHNAME}}
9809 {{CURRENTMONTHNAME}}
9816 Magic Word: {{CURRENTMONTHNAMEGEN}}
9818 {{CURRENTMONTHNAMEGEN}}
9825 Magic Word: {{CURRENTTIME}}
9834 Magic Word: {{CURRENTHOUR}}
9843 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9852 Magic Word: {{CURRENTYEAR}}
9861 Magic Word: {{CURRENTTIMESTAMP}}
9863 {{CURRENTTIMESTAMP}}
9870 Magic Words LOCAL (UTC)
9874 * {{LOCALMONTHNAME}}
9875 * {{LOCALMONTHNAMEGEN}}
9876 * {{LOCALMONTHABBREV}}
9885 * {{LOCALTIMESTAMP}}
9900 <li> 19700101000203</li></ul>
9905 Magic Word: {{FULLPAGENAME}}
9907 title=[[User:Ævar Arnfjörð Bjarmason]]
9911 <p>User:Ævar Arnfjörð Bjarmason
9916 Magic Word: {{FULLPAGENAMEE}}
9918 title=[[User:Ævar Arnfjörð Bjarmason]]
9922 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9927 Magic Word: {{TALKSPACE}}
9929 title=[[User:Ævar Arnfjörð Bjarmason]]
9938 Magic Word: {{TALKSPACE}}, same namespace
9940 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9949 Magic Word: {{TALKSPACE}}, main namespace
9951 title=[[Parser Test]]
9960 Magic Word: {{TALKSPACEE}}
9962 title=[[User:Ævar Arnfjörð Bjarmason]]
9971 Magic Word: {{SUBJECTSPACE}}
9973 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9982 Magic Word: {{SUBJECTSPACE}}, same namespace
9984 title=[[User:Ævar Arnfjörð Bjarmason]]
9993 Magic Word: {{SUBJECTSPACE}}, main namespace
9995 title=[[Parser Test]]
10003 Magic Word: {{SUBJECTSPACEE}}
10005 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10014 Magic Word: {{NAMESPACE}}
10016 title=[[User:Ævar Arnfjörð Bjarmason]]
10025 Magic Word: {{NAMESPACEE}}
10027 title=[[User:Ævar Arnfjörð Bjarmason]]
10036 Magic Word: {{NAMESPACENUMBER}}
10038 title=[[User:Ævar Arnfjörð Bjarmason]]
10040 {{NAMESPACENUMBER}}
10047 Magic Word: {{SUBPAGENAME}}
10049 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10058 Magic Word: {{SUBPAGENAMEE}}
10060 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10069 Magic Word: {{ROOTPAGENAME}}
10071 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10075 <p>Ævar Arnfjörð Bjarmason
10080 Magic Word: {{ROOTPAGENAMEE}}
10082 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10086 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10091 Magic Word: {{BASEPAGENAME}}
10093 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10097 <p>Ævar Arnfjörð Bjarmason
10102 Magic Word: {{BASEPAGENAMEE}}
10104 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10108 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10113 Magic Word: {{TALKPAGENAME}}
10115 title=[[User:Ævar Arnfjörð Bjarmason]]
10119 <p>User talk:Ævar Arnfjörð Bjarmason
10124 Magic Word: {{TALKPAGENAMEE}}
10126 title=[[User:Ævar Arnfjörð Bjarmason]]
10130 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10135 Magic Word: {{SUBJECTPAGENAME}}
10137 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10139 {{SUBJECTPAGENAME}}
10141 <p>User:Ævar Arnfjörð Bjarmason
10146 Magic Word: {{SUBJECTPAGENAMEE}}
10148 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10150 {{SUBJECTPAGENAMEE}}
10152 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10157 Magic Word: {{NUMBEROFFILES}}
10166 Magic Word: {{PAGENAME}}
10168 title=[[User:Ævar Arnfjörð Bjarmason]]
10172 <p>Ævar Arnfjörð Bjarmason
10177 Magic Word: {{PAGENAME}} with metacharacters
10179 title=[['foo & bar = baz']]
10183 <p><i>'foo & bar = baz'</i>
10186 <p><i>'foo & bar = baz'</i></p>
10190 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10192 title=[[*RFC 1234 http://example.com/]]
10196 <p>*RFC 1234 http://example.com/
10199 <p>*RFC 1234 http://example.com/</p>
10203 Magic Word: {{PAGENAMEE}}
10205 title=[[User:Ævar Arnfjörð Bjarmason]]
10209 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10214 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10216 title=[[*RFC 1234 http://example.com/]]
10220 <p>*RFC_1234_http://example.com/
10223 <p>*RFC_1234_http://example.com/</p>
10227 Magic Word: {{REVISIONID}}
10236 Magic Word: {{SCRIPTPATH}}
10244 Magic Word: {{STYLEPATH}}
10253 Magic Word: {{SERVER}}
10257 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10262 Magic Word: {{SERVERNAME}}
10271 Magic Word: {{SITENAME}}
10280 Case-sensitive magic words, when cased differently, should just be template transclusions
10287 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10288 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10289 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10290 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10295 Case-insensitive magic words should still work with weird casing.
10305 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10309 # From plwiki:PLOS_ONE
10311 Parsoid: Page property magic word with magic word contents
10313 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10315 <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>"}]]}'/>
10319 Parsoid: Template-generated DISPLAYTITLE
10321 {{{{echo|DISPLAYTITLE}}:Foo}}
10323 <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}}]}'/>
10327 Namespace 1 {{ns:1}}
10336 Namespace 1 {{ns:01}}
10345 Namespace 0 {{ns:0}} (bug 4783)
10353 Namespace 0 {{ns:00}} (bug 4783)
10361 Namespace -1 {{ns:-1}}
10370 Namespace User {{ns:User}}
10379 Namespace User talk {{ns:User_talk}}
10388 Namespace User talk {{ns:uSeR tAlK}}
10397 Namespace File {{ns:File}}
10406 Namespace File {{ns:Image}}
10415 Namespace (lang=de) Benutzer {{ns:User}}
10426 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10432 <p>Benutzer Diskussion
10439 {{urlencode:hi world?!}}
10440 {{urlencode:hi world?!|WIKI}}
10441 {{urlencode:hi world?!|PATH}}
10442 {{urlencode:hi world?!|QUERY}}
10452 Magic Word: prioritize type info over data-parsoid
10456 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10462 Magic Word: serialize on separate line (parsoid)
10464 parsoid=wt2wt,html2wt
10470 foo<meta property="mw:PageProp/notoc"/>bar
10474 Magic Word: rt non-english wikis
10481 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10485 __proto__ is treated as normal wikitext (T105997)
10497 Magic links: internal link to RFC (bug 479)
10501 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10504 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10508 Magic links: RFC (bug 479)
10512 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10515 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10519 Magic links: RFC (bug 65278)
10521 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10523 <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.
10526 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10530 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10532 RFC      822
10536 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10541 <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>
10547 Magic links: ISBN (bug 1937)
10551 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10554 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10558 Magic links: ISBN (bug 65278)
10560 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10562 <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.
10565 <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>
10569 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10571 ISBN      978 0 316 09811 3
10577 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10584 <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>
10592 Magic links: PMID incorrectly converts space to underscore
10596 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10599 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10603 Magic links: PMID (bug 65278)
10605 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10607 <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.
10610 <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>
10614 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10616 PMID      1234
10620 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10625 <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>
10630 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10631 # since these are ExtLinkText, not MagicLinkText
10633 Magic links: use appropriate serialization for "almost" magic links.
10635 X[[Special:BookSources/0978739256|foo]]
10637 X[//tools.ietf.org/html/rfc1234 foo]
10639 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10640 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10643 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10644 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10648 Magic links: All disabled (T47942)
10650 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10656 <p>ISBN 0-306-40615-2
10667 Nonexistent template
10669 {{thistemplatedoesnotexist}}
10671 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10676 Template with invalid target containing tags
10678 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10680 <p>{{a<b>b</b>|foo|a=b|a = b}}
10685 Template with invalid target containing unclosed tag
10687 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10689 <p>{{a<b>|foo|a=b|a = b}}</b>
10694 Template with invalid target containing wikilink
10698 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10701 <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>
10705 Template with just whitespace in it, bug #68421
10709 <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>
10715 This is a test template
10723 <p>This is a test template
10728 Template with explicit namespace
10732 <p>This is a test template
10740 This is a test template with parameter {{{param}}}
10746 {{paramtest|param=foo}}
10748 <p>This is a test template with parameter foo
10753 Template:paramtestnum
10755 [[{{{1}}}|{{{2}}}]]
10759 Template unnamed parameter
10761 {{paramtestnum|Main Page|the main page}}
10763 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10768 Template:templatesimple
10774 Template:templateredirect
10776 #redirect [[Template:templatesimple]]
10780 Template:templateasargtestnum
10786 Template:templateasargtest
10788 {{template{{{templ}}}}}
10792 Template:templateasargtest2
10798 Template with template name as unnamed argument
10800 {{templateasargtestnum|templatesimple}}
10807 Template with template name as argument
10809 {{templateasargtest|templ=simple}}
10816 Template with template name as argument (2)
10818 {{templateasargtest2|templ=templatesimple}}
10825 Template:templateasargtestdefault
10827 {{{{{templ|templatesimple}}}}}
10837 Template with default value
10839 {{templateasargtestdefault}}
10846 Template with default value (value set)
10848 {{templateasargtestdefault|templ=templa}}
10857 {{templateredirect}}
10862 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10866 Template with argument in separate line
10868 {{ templateasargtest |
10876 Template with complex template as argument
10879 param ={{ templateasargtest |
10880 templ = simple }}}}
10882 <p>This is a test template with parameter (test)
10887 Template with thumb image (with link in description)
10889 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10891 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>
10894 <p>This is a test template with parameter</p>
10895 <div class="thumb tright">
10896 <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>
10897 <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>
10901 <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>
10905 Template:complextemplate
10907 {{{1}}} {{paramtest|
10908 param ={{{param}}}}}
10912 Template with complex arguments
10915 param ={{ templateasargtest |
10916 templ = simple }}|[[Template:complextemplate|link]]}}
10918 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10923 BUG 553: link with two variables in a piped link
10926 |[[{{{1}}}|{{{2}}}]]
10931 <td>[[{{{1}}}|{{{2}}}]]
10936 <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>
10941 Abort table cell attribute parsing on wikilink
10944 | testing [[one|two]] | three || four
10945 | testing one two | three || four
10946 | testing="[[one|two]]" | three || four
10951 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10957 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10963 <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>
10964 <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>
10965 <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>
10970 Don't abort table cell attribute parsing if wikilink is found in template arg
10973 | Test {{#tag:ref|One two "[[three]]" four}}
10977 <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>
10982 Magic variable as template parameter
10984 {{paramtest|param={{SITENAME}}}}
10986 <p>This is a test template with parameter MediaWiki
10993 [[{{{param}}}|link]]
10997 Template parameter as link source
10999 {{linktest|param=Main Page}}
11001 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11006 Template:paramtest2
11008 including another template, {{paramtest|param={{{arg}}}}}
11012 Template passing argument to another template
11014 {{paramtest2|arg='hmm'}}
11016 <p>including another template, This is a test template with parameter 'hmm'
11027 Template as link source
11031 [[{{linktest2}}|Main Page]]
11033 [[{{linktest2}}]]Page
11035 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11036 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11037 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11055 Template infinite loop
11059 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11064 Template from main namespace
11083 BUG 529: Template with table, not included at beginning of line
11102 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11122 BUG 41: Template parameters shown as broken links
11131 Template with targets containing wikilinks
11135 {{[[{{echo|foo}}]]}}
11137 {{{{echo|[[foo}}]]}}
11139 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11140 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11152 Templates: Double quotes as template target
11159 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11163 ## This test is about making sure Parsoid's data-mw is well formed in the
11164 ## face of multiple templates with intersecting and overlapping ranges. The
11165 ## wikitext itself is wretched.
11167 Templates with intersecting and overlapping ranges
11192 <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":""}]]}'>
11194 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11196 <tbody><tr><td>hi</td></tr>
11201 Template:MSGNW test
11203 ''None'' of '''this''' should be
11205 but rather passed unmodified
11213 # hmm, fix this or just deprecate msgnw and document its behavior?
11217 {{msgnw:MSGNW test}}
11219 <p>''None'' of '''this''' should be
11221  but rather passed unmodified
11222 {{test}}
11226 <!-- comment -->
11233 {{int:youhavenewmessages|lots of money|not!}}
11235 <p>You have lots of money (not!).
11240 int keyword - non-existing message
11251 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11255 <includeonly> and <noinclude> being included
11266 <onlyinclude>Foo</onlyinclude>bar
11270 <onlyinclude> being included
11282 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11286 <onlyinclude> and <includeonly> being included
11295 <includeonly> and <noinclude> on a page
11297 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11304 Un-closed <noinclude>
11311 <onlyinclude> on a page
11313 <onlyinclude>Foo</onlyinclude>bar
11320 Un-closed <onlyinclude>
11327 Self-closed noinclude, includeonly, onlyinclude tags
11338 Unbalanced includeonly and noinclude tags
11342 |b</noinclude></noinclude>
11343 |c</noinclude></includeonly>
11344 |d</includeonly></includeonly>
11353 <td>c</includeonly>
11355 <td>d</includeonly></includeonly>
11361 Template:Includeonly section
11364 ==Includeonly section==
11370 Bug 6563: Edit link generation for section shown by <includeonly>
11372 {{includeonly section}}
11374 <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>
11375 <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>
11379 # Uses same input as the contents of [[Template:Includeonly section]]
11381 Bug 6563: Section extraction for section shown by <includeonly>
11386 ==Includeonly section==
11394 Bug 6563: Edit link generation for section suppressed by <includeonly>
11397 ==Includeonly section==
11401 <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>
11406 Bug 6563: Section extraction for section suppressed by <includeonly>
11411 ==Includeonly section==
11419 Un-closed <includeonly>
11424 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11427 ## We used to, but no longer wt2wt this test since the default serializer
11428 ## will normalize the include directives to serialize on their own line.
11429 ## Selser will take care of preserving formatting in scenarios where they
11430 ## intermingled with other wikitext.
11432 Includes and comments at SOL
11434 parsoid=wt2html,html2html
11436 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11440 </noinclude>* stuff
11443 <includeonly>can have stuff</includeonly>=== here ===
11446 <h2><span class="mw-headline" id="hu">hu</span></h2>
11449 <ul><li> stuff</li>
11450 <li> here</li></ul>
11451 <h3><span class="mw-headline" id="here">here</span></h3>
11454 <!-- 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>
11456 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11458 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11459 <li> here</li></ul>
11461 <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>
11465 # TODO: test with DOM fragment reuse!
11467 Parsoid: DOM fragment reuse
11469 parsoid=wt2wt,wt2html
11471 a{{echo|b<table></table>c}}d
11483 <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>
11485 <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">
11486 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11487 </span><p about="#mwt2">cd</p>
11489 <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">
11491 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11493 </span><p about="#mwt3">b</p>
11497 Parsoid: Merge double tds (T52603)
11502 |{{echo|{{!}} foo}}
11506 <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>
11511 Parsoid: Merge double tds in nested transclusion content (T52603)
11517 |{{echo|{{!}} foo}}
11521 <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}}]}'>
11523 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11529 ### <includeonly> and <noinclude> in attributes
11532 0. includeonly around the entire attribute
11534 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11536 <p><span id="v2">bar</span>
11541 1. includeonly in html attr key
11543 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11545 <p><span id="foo">bar</span>
11550 2. includeonly in html attr value
11552 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11553 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11555 <p><span id="v1">bar</span>
11556 <span id="v1">bar</span>
11561 3. includeonly in part of an attr value
11563 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11565 <p><span style="color:red;">bar</span>
11570 4. includeonly in table attributes
11594 ### Token Stream Patcher tests
11596 ### These tests won't always pass wt2wt and other modes because
11597 ### on serialization, the table will be output on a new line.
11598 ### For now, we are blacklisting them, and using this to test selser.
11602 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11604 parsoid=wt2html,wt2wt
11606 {{echo|}}{| width = '100%'
11610 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11611 <tbody><tr><td>foo</td></tr>
11615 ## We used to, but no longer wt2wt this test since the default serializer
11616 ## will normalize the include directives to serialize on their own line.
11617 ## Selser will take care of preserving formatting in scenarios where they
11618 ## intermingled with other wikitext.
11620 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11624 <includeonly>a</includeonly>{| {{{b}}}
11628 <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":""}]]}'>
11629 <tbody><tr><td>c</td></tr>
11634 Table wikitext syntax outside wiki-tables
11638 ! not a table heading
11641 | class="foo bar" | baz
11649 ! not a table heading
11652 | class="foo bar" | baz
11661 ### Testing parsing of templates where a template arg
11662 ### has the same name as the template itself.
11668 {{{quote|{{{1}}}}}}
11672 Templates: Template Name/Arg clash: 1. Use of positional param
11681 Templates: Template Name/Arg clash: 2. Use of named param
11683 {{quote|quote=foo}}
11690 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11699 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11703 Templates: 1. Simple use
11712 Templates: 2. Inside a block tag
11714 <div>{{echo|Foo}}</div>
11715 <blockquote>{{echo|Foo}}</blockquote>
11718 <blockquote>Foo</blockquote>
11728 Templates: P-wrapping: 1a. Templates on consecutive lines
11739 Templates: P-wrapping: 1b. Templates on consecutive lines
11753 Templates: P-wrapping: 1c. Templates on consecutive lines
11756 {{echo|bar}} <div>baz</div>
11769 Templates: P-wrapping: 1d. Template preceded by comment-only line
11778 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11782 Templates: Inline Text: 1. Multiple template uses
11784 {{echo|Foo}}bar{{echo|baz}}
11791 Templates: Inline Text: 2. Back-to-back template uses
11793 {{echo|Foo}}{{echo|bar}}
11800 Templates: Block Tags: 1. Multiple template uses
11802 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11804 <div>Foo</div><div>bar</div><div>baz</div>
11809 Templates: Block Tags: 2. Back-to-back template uses
11811 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11813 <div>Foo</div><div>bar</div>
11817 # This is an edge case relating to paragraph wrapping.
11819 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11824 <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
11829 Templates: Links: 1. Simple example
11831 {{echo|[[Foo|bar]]}}
11833 <p><a href="/wiki/Foo" title="Foo">bar</a>
11838 Templates: Links: 2. Generation of link href
11840 [[{{echo|Foo}}|bar]]
11842 <p><a href="/wiki/Foo" title="Foo">bar</a>
11847 Templates: Links: 3. Generation of part of a link href
11849 [[Fo{{echo|o}}|bar]]
11851 [[Foo{{echo|bar}}]]
11853 [[Foo{{echo|bar}}baz]]
11855 [[Foo{{echo|bar}}|bar]]
11857 [[:Foo{{echo|bar}}]]
11859 [[:Foo{{echo|bar}}|bar]]
11861 <p><a href="/wiki/Foo" title="Foo">bar</a>
11862 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11863 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11864 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11865 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11866 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11871 Templates: Links: 4. Multiple templates generating link href
11873 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11875 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11880 Templates: Links: 5. Generation of link text
11882 [[Foo|{{echo|bar}}]]
11884 <p><a href="/wiki/Foo" title="Foo">bar</a>
11889 Templates: Links: 5. Nested templates (only outermost template should be marked)
11891 {{echo|[[{{echo|Foo}}|bar]]}}
11893 <p><a href="/wiki/Foo" title="Foo">bar</a>
11898 Templates: HTML Tag: 1. Generation of HTML attr. key
11900 <div {{echo|style}}="color:red;">foo</div>
11902 <div style="color:red;">foo</div>
11907 Templates: HTML Tag: 2. Generation of HTML attr. value
11909 <div style={{echo|'color:red;'}}>foo</div>
11911 <div style="color:red;">foo</div>
11916 Templates: HTML Tag: 3. Generation of HTML attr key and value
11918 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11920 <div style="color:red;">foo</div>
11925 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11927 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11929 <div title="This is a long title with just one piece templated">foo</div>
11934 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11936 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11938 <div title="This is a long title with just one piece templated">foo</div>
11943 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11945 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11947 <div title="This is a long title with just one piece templated">foo</div>
11951 # SSS FIXME: While it is great we added support for all this,
11952 # do we want to make this part of the spec? Maybe we want to
11953 # deprecate this kind of usage in the future?
11955 Templates: HTML Tag: 7. Generation of partial attribute key string
11957 <div st{{echo|yle}}="color:red;">foo</div>
11959 <div style="color:red;">foo</div>
11964 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11966 <div {{echo|1=id="v1"}}>bar</div>
11968 <div id="v1">bar</div>
11973 Templates: HTML Tag: 9. Multiple template-generated attributes
11975 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11977 <div id="v1" title="foo">bar</div>
11982 Templates: Support for templates generating attributes and content
11984 {| {{mixed_attr_content_template}}
11989 <table style="color:red;" title="T48811">
11999 <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|}"]}'>
12008 1. Entities and nowikis inside templated attributes should be handled correctly
12010 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12012 <div style="background:#f9f9f9;">foo</div>
12015 <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>
12019 2. Entities and nowikis inside templated attributes should be handled correctly
12022 |{{table_attribs_3}}
12027 <td style="background:#f9f9f9;">Foo
12032 <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>
12037 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12040 |{{table_attribs_3}}
12045 <td style="background:#f9f9f9;">Foo
12049 <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}}]}'>
12050 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12056 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12059 | {{table_attribs_6}} hi
12064 <td style="background: red;"> hi
12069 <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>
12074 Templates: HTML Tables: 1. Generating start of a HTML table
12076 {{echo|<table><tr><td>foo</td>}}</tr></table>
12078 <table><tr><td>foo</td></tr></table>
12083 Templates: HTML Tables: 2a. Generating middle of a HTML table
12085 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12087 <table><tr><td>foo</td></tr></table>
12092 Templates: HTML Tables: 2b. Generating middle of a HTML table
12094 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12096 <table><tr><td>foo</td></tr></table>
12101 Templates: HTML Tables: 3. Generating end of a HTML table
12103 <table><tr>{{echo|<td>foo</td></tr></table>}}
12105 <table><tr><td>foo</td></tr></table>
12110 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12112 {{echo|<table>}}<tr><td>foo</td></tr></table>
12114 <table><tr><td>foo</td></tr></table>
12119 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12121 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12123 <table><tr><td>foo</td></tr></table>
12128 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12130 <table><tr>{{echo|<td>}}foo</td></tr></table>
12132 <table><tr><td>foo</td></tr></table>
12137 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12139 <table><tr><td>foo{{echo|</td>}}</tr></table>
12141 <table><tr><td>foo</td></tr></table>
12146 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12148 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12150 <table><tr><td>foo</td></tr></table>
12155 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12157 <table><tr><td>foo</td></tr>{{echo|</table>}}
12159 <table><tr><td>foo</td></tr></table>
12164 Templates: HTML Tables: 5. Proper fostering of categories from inside
12166 parsoid=wt2html,wt2wt
12168 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12169 <!--Two categories (Bug 50330)-->
12170 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12172 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12173 <!--Two categories (Bug 50330)-->
12174 <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>
12178 Templates: Wiki Tables: 1a. Fostering of entire template content
12186 <tr><td></td></tr></table>
12198 Templates: Wiki Tables: 1b. Fostering of entire template content
12211 <tr><td></td></tr></table>
12225 Templates: Wiki Tables: 2. Fostering of partial template content
12235 <tr><td></td></tr></table>
12248 Templates: Wiki Tables: 3. td-content via multiple templates
12251 {{echo|{{pipe}}a}}{{echo|b}}
12262 Templates: Wiki Tables: 4. Templated tags, no content
12268 <tr><td></td></tr></table>
12273 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12287 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12300 ## This test case is very specific to Parsoid's internals
12301 ## and is hence only tested for Parsoid's code. Parsoid uses
12302 ## a <meta> marker tag for <ref> tags and they are expanded
12303 ## much later. We are verifying that this <meta> tag usage
12304 ## doesn't prevent foster parenting.
12306 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12308 {{PartialTable}}<ref>foo</ref>
12313 <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span><table about="#mwt2">
12317 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
12321 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12331 <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{{!}}}"]}'>
12332 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12336 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12341 Templates: Lists: Multi-line list-items via templates
12343 *{{echo|a {{nonexistent|
12345 *{{echo|b {{nonexistent|
12348 <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>
12349 <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>
12354 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12356 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12358 <p><i>ab</i>c<i>d</i>e
12363 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12364 (PHP parser generates misnested html)
12366 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12368 <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>
12372 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12373 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12375 parsoid=wt2html,wt2wt
12377 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12379 <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>
12380 <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>
12381 <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>
12385 Templates: Ugly nesting: 4. Divs opened/closed across templates
12387 a<div>b{{echo|c</div>d}}e
12398 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12404 |{{echo|foo</table>}}
12408 <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|}"]}'>
12412 <td>foo</td></tr></tbody></table><span about="#mwt1">
12413 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12418 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12428 <td>1. {{echo|foo </table>}}</td>
12430 <td>2. {{echo|baz </table>}}</td>
12443 <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>"]}'>
12448 <td>1. foo </td></tr></tbody></table></td>
12450 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12451 </span><span about="#mwt2">
12452 </span><span about="#mwt2">
12453 </span><span about="#mwt2">abc</span><span about="#mwt2">
12454 </span><span about="#mwt2">
12455 </span><span about="#mwt2">
12456 </span><span about="#mwt2">
12457 </span><span about="#mwt2">
12458 </span><span about="#mwt2">
12459 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12460 </span><span about="#mwt2">
12465 Templates: Ugly templates: 3. newline-only template parameter
12474 # This looks like a bug: a single newline triggers p/br for some reason.
12476 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12485 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12486 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12488 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12494 <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
12495 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12499 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12500 # that are "identical" and generate nesting cycles in the algorithm
12502 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12504 {{echo|<table><tr><td><table>}}
12508 <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"}'>
12509 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12510 </table></td></tr></tbody></table>
12514 Templates: Parameters substituted at the top-level
12516 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12518 <p><i>who</i> me? <b>never!</b>
12521 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12525 Parser Functions: 1. Simple example
12534 Parser Functions: 2. Nested use (only outermost should be marked up)
12543 ### Pre-save transform tests
12546 pre-save transform: subst:
12552 This is a test template
12556 pre-save transform: normal template
12566 pre-save transform: nonexistent template
12570 {{thistemplatedoesnotexist}}
12572 {{thistemplatedoesnotexist}}
12576 pre-save transform: subst magic variables
12585 # This is bug 89, which I fixed. -- wtm
12587 pre-save transform: subst: templates with parameters
12591 {{subst:paramtest|param="something else"}}
12593 This is a test template with parameter "something else"
12597 Template:nowikitest
12599 <nowiki>'''not wiki'''</nowiki>
12603 pre-save transform: nowiki in subst (bug 1188)
12607 {{subst:nowikitest}}
12609 <nowiki>'''not wiki'''</nowiki>
12613 Template:commenttest
12615 This template has <!-- a comment --> in it.
12619 pre-save transform: comment in subst (bug 1936)
12623 {{subst:commenttest}}
12625 This template has <!-- a comment --> in it.
12629 pre-save transform: unclosed tag
12633 <nowiki>'''not wiki'''
12635 <nowiki>'''not wiki'''
12639 pre-save transform: mixed tag case
12643 <NOwiki>'''not wiki'''</noWIKI>
12645 <NOwiki>'''not wiki'''</noWIKI>
12649 pre-save transform: unclosed comment in <nowiki>
12653 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12655 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12658 # Leading @ in this template definition works around a limitation
12659 # in parsoid's parserTests which otherwise strips the <span> from the
12660 # result (confusing it for a template wrapper)
12664 @<span onmouseover="alert('crap')">Oh no</span>
12668 (confirming safety of fix for subst bug 1936)
12670 {{Template:dangerous}}
12672 <p>@<span>Oh no</span>
12677 pre-save transform: comment containing gallery (bug 5024)
12681 <!-- <gallery>data</gallery> -->
12683 <!-- <gallery>data</gallery> -->
12687 pre-save transform: comment containing extension
12691 <!-- <tag>data</tag> -->
12693 <!-- <tag>data</tag> -->
12697 pre-save transform: comment containing nowiki
12701 <!-- <nowiki>data</nowiki> -->
12703 <!-- <nowiki>data</nowiki> -->
12707 pre-save transform: <noinclude> in subst (bug 3298)
12717 pre-save transform: <onlyinclude> in subst (bug 3298)
12721 {{subst:Includes2}}
12729 {{<includeonly>subst:</includeonly>Includes}}
12733 Template:SafeSubstTest
12735 {{<includeonly>safesubst:</includeonly>Includes}}
12739 bug 22297: safesubst: works during PST
12743 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12749 bug 22297: safesubst: works during normal parse
12758 subst: does not work during normal parse
12762 <p>{{subst:Includes}}
12767 pre-save transform: context links ("pipe trick")
12771 [[Article (context)|]]
12774 [[Bar:Article (context)|]]
12775 [[:Bar:Article (context)|]]
12777 [[|Article (context)]]
12781 [[Article (context)|Article]]
12782 [[Bar:Article|Article]]
12783 [[:Bar:Article|Article]]
12784 [[Bar:Article (context)|Article]]
12785 [[:Bar:Article (context)|Article]]
12787 [[Article (context)]]
12788 [[Bar:X (Y) Z|X (Y) Z]]
12789 [[:Bar:X (Y) Z|X (Y) Z]]
12793 pre-save transform: context links ("pipe trick") with interwiki prefix
12797 [[interwiki:Article|]]
12798 [[:interwiki:Article|]]
12799 [[interwiki:Bar:Article|]]
12800 [[:interwiki:Bar:Article|]]
12802 [[interwiki:Article|Article]]
12803 [[:interwiki:Article|Article]]
12804 [[interwiki:Bar:Article|Bar:Article]]
12805 [[:interwiki:Bar:Article|Bar:Article]]
12809 pre-save transform: context links ("pipe trick") with parens in title
12811 pst title=[[Somearticle (context)]]
12815 [[Article (context)|Article]]
12819 pre-save transform: context links ("pipe trick") with comma in title
12821 pst title=[[Someplace, Somewhere]]
12824 [[Otherplace, Elsewhere|]]
12825 [[Otherplace, Elsewhere, Anywhere|]]
12827 [[Otherplace, Somewhere|Otherplace]]
12828 [[Otherplace, Elsewhere|Otherplace]]
12829 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12833 pre-save transform: context links ("pipe trick") with parens and comma
12835 pst title=[[Someplace (IGNORED), Somewhere]]
12838 [[Otherplace (place), Elsewhere|]]
12840 [[Otherplace, Somewhere|Otherplace]]
12841 [[Otherplace (place), Elsewhere|Otherplace]]
12845 pre-save transform: context links ("pipe trick") with comma and parens
12847 pst title=[[Who, me? (context)]]
12850 [[Me, Myself, and I (1937 song)|]]
12852 [[Yes, you. (context)|Yes, you.]]
12853 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12857 pre-save transform: context links ("pipe trick") with namespace
12859 pst title=[[Ns:Somearticle]]
12863 [[Ns:Article|Article]]
12867 pre-save transform: context links ("pipe trick") with namespace and parens
12869 pst title=[[Ns:Somearticle (context)]]
12873 [[Ns:Article (context)|Article]]
12877 pre-save transform: context links ("pipe trick") with namespace and comma
12879 pst title=[[Ns:Somearticle, Context, Whatever]]
12883 [[Ns:Article, Context, Whatever|Article]]
12887 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12889 pst title=[[Ns:Somearticle, Context (context)]]
12893 [[Ns:Article (context)|Article]]
12897 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12899 pst title=[[Ns:Somearticle (IGNORED), Context]]
12903 [[Ns:Article, Context|Article]]
12907 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12911 [[Article(context)|]]
12912 [[Bar:Article(context)|]]
12913 [[:Bar:Article(context)|]]
12914 [[|Article(context)]]
12918 [[Article(context)|Article]]
12919 [[Bar:Article(context)|Article]]
12920 [[:Bar:Article(context)|Article]]
12921 [[Article(context)]]
12922 [[Bar:X(Y)Z|X(Y)Z]]
12923 [[:Bar:X(Y)Z|X(Y)Z]]
12927 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12931 [[Article (context)|]]
12932 [[Bar:Article (context)|]]
12933 [[:Bar:Article (context)|]]
12934 [[|Article (context)]]
12938 [[Article (context)|Article]]
12939 [[Bar:Article (context)|Article]]
12940 [[:Bar:Article (context)|Article]]
12941 [[Article (context)]]
12942 [[Bar:X (Y) Z|X (Y) Z]]
12943 [[:Bar:X (Y) Z|X (Y) Z]]
12947 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12951 [[Article(context)|]]
12952 [[Bar:Article(context)|]]
12953 [[:Bar:Article(context)|]]
12954 [[|Article(context)]]
12958 [[Article(context)|Article]]
12959 [[Bar:Article(context)|Article]]
12960 [[:Bar:Article(context)|Article]]
12961 [[Article(context)]]
12962 [[Bar:X(Y)Z|X(Y)Z]]
12963 [[:Bar:X(Y)Z|X(Y)Z]]
12967 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12971 [[Article (context), context|]]
12972 [[Article (context),context|]]
12973 [[Bar:Article (context), context|]]
12974 [[Bar:Article (context),context|]]
12975 [[:Bar:Article (context), context|]]
12976 [[:Bar:Article (context),context|]]
12978 [[Article (context), context|Article]]
12979 [[Article (context),context|Article]]
12980 [[Bar:Article (context), context|Article]]
12981 [[Bar:Article (context),context|Article]]
12982 [[:Bar:Article (context), context|Article]]
12983 [[:Bar:Article (context),context|Article]]
12987 pre-save transform: trim trailing empty lines
12991 Empty lines are trimmed
12997 Empty lines are trimmed
13001 pre-save transform: Signature expansion
13006 * <noinclude>~~~</noinclude>
13007 * <includeonly>~~~</includeonly>
13008 * <onlyinclude>~~~</onlyinclude>
13010 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13011 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13012 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13013 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13018 pre-save transform: Signature expansion in nowiki tags (bug 93)
13024 <nowiki>~~~~</nowiki>
13026 <includeonly><nowiki>~~~~</nowiki></includeonly>
13028 <noinclude><nowiki>~~~~</nowiki></noinclude>
13030 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13032 {{subst:Foo}} shall be converted to FOO
13034 As well as inside noinclude/onlyinclude
13035 <noinclude>{{subst:Foo}}</noinclude>
13036 <onlyinclude>{{subst:Foo}}</onlyinclude>
13038 But not inside includeonly
13039 <includeonly>{{subst:Foo}}</includeonly>
13043 <nowiki>~~~~</nowiki>
13045 <includeonly><nowiki>~~~~</nowiki></includeonly>
13047 <noinclude><nowiki>~~~~</nowiki></noinclude>
13049 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13051 FOO shall be converted to FOO
13053 As well as inside noinclude/onlyinclude
13054 <noinclude>FOO</noinclude>
13055 <onlyinclude>FOO</onlyinclude>
13057 But not inside includeonly
13058 <includeonly>{{subst:Foo}}</includeonly>
13062 Parsoid: Recognize nowiki with trailing space in tags
13066 <nowiki ><div>[[foo]]</nowiki >
13074 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13081 Parsoid: Recognize nowiki with odd capitalization
13085 <noWikI ><div>[[foo]]</Nowiki >
13087 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13092 Parsoid: Escape nowiki with trailing space in tags
13096 <p><nowiki > foo </nowiki ></p>
13097 <p>a<nowiki />b</p>
13098 <p>c<nowiki/ >d</p>
13100 <nowiki > foo </nowiki >
13108 Parsoid: Escape weird noWikI capitalizations
13112 <p><noWikI > foo </NoWikI ></p>
13114 <noWikI > foo </NoWikI >
13118 ### Message transform tests
13121 message transform: magic variables
13131 message transform: should not transform wiki markup
13141 message transform: <noinclude> in transcluded template (bug 4926)
13151 message transform: <onlyinclude> in transcluded template (bug 4926)
13161 {{#special:}} page name, known
13165 {{#special:Recentchanges}}
13167 Special:RecentChanges
13171 {{#special:}} page name with subpage, known
13175 {{#special:Recentchanges/param}}
13177 Special:RecentChanges/param
13181 {{#special:}} page name, unknown
13185 {{#special:foobar nonexistent}}
13187 Special:Foobar nonexistent
13191 {{#speciale:}} page name, known
13195 {{#speciale:Recentchanges}}
13197 Special:RecentChanges
13201 {{#speciale:}} page name with subpage, known
13205 {{#speciale:Recentchanges/param}}
13207 Special:RecentChanges/param
13211 {{#speciale:}} page name, unknown
13215 {{#speciale:foobar nonexistent}}
13217 Special:Foobar_nonexistent
13223 ### For Parsoid-specific tests, see
13224 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13229 parsoid=wt2html,wt2wt,html2html
13231 [[Image:foobar.jpg]]
13233 <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>
13236 <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>
13240 Simple image (using File: namespace, now canonical)
13242 [[File:Foobar.jpg]]
13244 <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>
13247 <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>
13251 Right-aligned image
13253 [[File:Foobar.jpg|right]]
13255 <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>
13258 <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>
13264 [[File:Foobar.jpg|right|Caption text]]
13266 <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>
13269 <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>
13273 Image with caption, bug 53312 #1
13275 [[File:Foobar.jpg|right|Caption page stuff]]
13277 <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>
13280 <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>
13284 Image with caption, bug 53312 #2
13286 [[File:Foobar.jpg|right|Caption page=]]
13288 <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>
13291 <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>
13295 Image with caption, bug 53312 #3
13297 [[File:Foobar.jpg|right|Caption page=stuff]]
13299 <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>
13302 <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>
13306 Allow empty links in image captions (Bug 60753)
13310 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13315 <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>
13318 <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>
13320 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13321 </figcaption></figure>
13325 Titles in unlinked images (T23454)
13327 [[File:Foobar.jpg|link=|stuff]]
13329 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13334 Link with empty target
13343 Image with link trail
13345 Linktrails should not work for images: [[File:Foobar.jpg]]s
13347 <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
13350 <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>
13354 Image with empty attribute
13356 parsoid=wt2html,wt2wt,html2html
13358 [[File:Foobar.jpg|right||Caption text]]
13360 <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>
13363 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13367 1. Block image with individual attributes from templates
13369 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13371 <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>
13374 <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>
13378 2. Block Image with individual attributes from templates
13380 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13382 <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>
13385 <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>
13389 3. Inline image with individual attributes from templates
13391 [[File:Foobar.jpg|{{echo|50px}}]]
13393 <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>
13396 <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>
13399 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13400 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13402 Image with multiple attributes from the same template
13404 [[File:Foobar.jpg|{{image_attribs}}]]
13406 <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>
13409 <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>
13413 Image with link tails
13417 123[[File:Foobar.jpg]]456
13418 123[[File:Foobar.jpg|right]]456
13419 123[[File:Foobar.jpg|thumb]]456
13421 <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
13423 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
13424 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
13427 <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>
13429 <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>
13431 <div class="thumb tright">
13432 <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>
13433 <div class="thumbcaption">
13434 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13440 <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>
13441 <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>
13442 <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>
13446 Image with multiple captions -- only last one is accepted
13448 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13450 <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>
13453 <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>
13457 Image with multiple widths -- use last
13459 [[File:Foobar.jpg|200px|300px|caption]]
13461 <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>
13464 <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>
13468 Image with multiple alignments -- use first (bug 48664)
13472 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13474 [[File:Foobar.jpg|middle|text-top|caption]]
13476 <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>
13477 <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>
13480 <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>
13481 <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>
13485 Image with width attribute at different positions
13487 [[File:Foobar.jpg|200px|right|Caption]]
13488 [[File:Foobar.jpg|right|200px|Caption]]
13489 [[File:Foobar.jpg|right|Caption|200px]]
13491 <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>
13492 <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>
13493 <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>
13496 <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>
13497 <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>
13498 <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>
13501 # a sad bit of backward-compatibility
13503 Image with size specified with pxpx (bug 13500, 51628)
13505 parsoid=wt2html,wt2wt,html2html
13507 [[File:Foobar.jpg|20pxpx]]
13508 [[File:Foobar.jpg|200x20pxpx]]
13510 <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>
13511 <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>
13514 <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>
13518 Image with link parameter, wiki target
13520 [[File:Foobar.jpg|link=Main Page]]
13522 <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>
13525 <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>
13528 # parsoid bug 49293 (part 1)
13530 Image with link parameter, URL target
13532 [[File:Foobar.jpg|link=http://example.com/]]
13534 <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>
13537 <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>
13540 # parsoid bug 49293 (part 2)
13542 Image with link parameter, protocol-less URL target
13544 [[File:Foobar.jpg|link=//example.com/]]
13546 <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>
13549 <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>
13553 Escaping non-block captions (T107435)
13556 "modes": ["wt2wt"],
13558 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13562 [[Image:Foobar.jpg|caption]]
13564 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13567 # wgExternalLinkTarget not supported by Parsoid
13569 Image with link parameter, wgExternalLinkTarget
13571 [[Image:foobar.jpg|link=http://example.com/]]
13573 wgExternalLinkTarget='foobar'
13575 <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>
13580 Image with link parameter, wgNoFollowLinks set to false
13582 [[Image:foobar.jpg|link=http://example.com/]]
13584 wgNoFollowLinks=false
13586 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13591 Image with link parameter, wgNoFollowDomainExceptions
13593 [[Image:foobar.jpg|link=http://example.com/]]
13595 wgNoFollowDomainExceptions='example.com'
13597 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13601 # wgExternalLinkTarget not supported by Parsoid
13603 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13605 [[Image:foobar.jpg|link=http://example.com/|Title]]
13607 wgExternalLinkTarget='foobar'
13609 <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>
13614 Image with empty link parameter
13616 [[File:Foobar.jpg|link=]]
13618 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13621 <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>
13625 Image with link parameter (wiki target) and unnamed parameter
13627 [[File:Foobar.jpg|link=Main_Page|Title]]
13629 <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>
13632 <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>
13636 Image with link parameter (URL target) and unnamed parameter
13638 [[File:Foobar.jpg|link=http://example.com/|Title]]
13640 <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>
13643 <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>
13647 Thumbnail image with link parameter
13650 parsoid=wt2html,wt2wt,html2html
13652 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13654 <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>
13657 <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>
13661 Manually-specified thumbnail image
13665 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13667 <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>
13670 <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>
13674 Manually-specified thumbnail image with explicit link to wiki page
13677 parsoid=wt2html,wt2wt,html2html
13679 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13681 <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>
13684 <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>
13688 Manually-specified thumbnail image with explicit link to url
13691 parsoid=wt2html,wt2wt,html2html
13693 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13695 <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>
13698 <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>
13702 Manually-specified thumbnail image with explicit no link
13705 parsoid=wt2html,wt2wt,html2html
13707 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13709 <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>
13712 <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>
13716 Manually-specified thumbnail image with explicit link and alt text
13719 parsoid=wt2html,wt2wt,html2html
13721 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13723 <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>
13726 <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>
13730 Image with frame and link
13732 parsoid=wt2html,wt2wt,html2html
13734 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13736 <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>
13739 <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>
13743 Image with frame and link and explicit alt
13745 parsoid=wt2html,wt2wt,html2html
13747 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13749 <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>
13752 <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>
13756 Image with wiki markup in implicit alt
13758 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13760 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13762 <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>
13763 </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>
13766 <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>
13768 <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>
13772 Alt image option should handle most kinds of wikitext without barfing
13774 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13776 <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>
13779 <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>
13782 ###################
13783 # Conflicting image format options.
13784 # First option specified should 'win'.
13785 # All three cases in each test should be identical.
13788 Image with 'frameless' first.
13790 parsoid=wt2html,wt2wt,html2html
13792 [[File:Foobar.jpg|frameless|caption]]
13794 [[File:Foobar.jpg|frameless|frame|caption]]
13796 [[File:Foobar.jpg|frameless|thumb|caption]]
13798 <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>
13799 </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>
13800 </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>
13803 <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>
13804 <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>
13805 <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>
13809 Image with 'frame' first.
13811 parsoid=wt2html,wt2wt,html2html
13813 [[File:Foobar.jpg|frame|caption]]
13814 [[File:Foobar.jpg|frame|frameless|caption]]
13815 [[File:Foobar.jpg|frame|thumb|caption]]
13817 <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>
13818 <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>
13819 <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>
13822 <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>
13823 <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>
13824 <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>
13828 Image with 'thumb' first.
13830 parsoid=wt2html,wt2wt,html2html
13832 [[File:Foobar.jpg|thumb|caption]]
13833 [[File:Foobar.jpg|thumb|frameless|caption]]
13834 [[File:Foobar.jpg|thumb|frame|caption]]
13836 <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>
13837 <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>
13838 <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>
13841 <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>
13842 <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>
13843 <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>
13846 ###################
13848 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13849 # and https://phabricator.wikimedia.org/T64258
13850 # Foobar has actual size of 1941x220
13851 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13852 # a scalable format.
13853 # 2. Framed images always ignore size options; always render at default size.
13854 # 3. "Unspecified format" and border are the only types which can be
13858 Image: "unspecified format" and border enlarge
13860 parsoid=wt2html,wt2wt,html2html
13862 [[File:Foobar.jpg|2000px]]
13864 [[File:Foobar.jpg|border|2000px]]
13866 <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>
13867 </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>
13870 <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>
13871 <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>
13875 Image: "unspecified format" and border reduce
13877 parsoid=wt2html,wt2wt,html2html
13879 [[File:Foobar.jpg|1000px]]
13881 [[File:Foobar.jpg|border|1000px]]
13883 <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>
13884 </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>
13887 <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>
13888 <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>
13892 Image: thumbs reduce
13894 parsoid=wt2html,wt2wt,html2html
13896 [[File:Foobar.jpg|thumb|50px]]
13898 <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>
13901 <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>
13905 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13907 parsoid=wt2html,wt2wt,html2html
13909 [[File:Foobar.jpg|thumb|2000px]]
13911 [[File:Foobar.svg|thumb|2000px]]
13913 <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>
13914 <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>
13917 <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>
13918 <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>
13922 Image: frameless can reduce in size
13924 parsoid=wt2html,wt2wt,html2html
13926 [[File:Foobar.jpg|frameless|50px]]
13928 <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>
13931 <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>
13935 Image: bitmap frameless can't be enlarged past original size, but vector can
13937 parsoid=wt2html,wt2wt,html2html
13939 [[File:Foobar.jpg|frameless|2000px]]
13941 [[File:Foobar.svg|frameless|2000px]]
13943 <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>
13944 </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>
13947 <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>
13948 <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>
13952 Image: framed images are always unscaled.
13954 parsoid=wt2html,wt2wt,html2html
13956 [[File:Foobar.jpg|frame]]
13958 [[File:Foobar.jpg|frame|50px]]
13960 [[File:Foobar.jpg|frame|50x50px]]
13962 [[File:Foobar.jpg|frame|2000px]]
13964 <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>
13965 <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>
13966 <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>
13967 <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>
13970 <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>
13971 <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>
13972 <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>
13973 <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>
13976 ###################
13979 Link to image page- image page normally doesn't exists, hence edit link
13980 Add test with existing image page
13981 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13985 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13990 bug 18784 Link to non-existent image page with caption should use caption as link text
13992 [[:Image:test|caption]]
13994 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13999 Frameless image caption with a free URL
14001 [[File:Foobar.jpg|http://example.com]]
14003 <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>
14006 <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>
14010 Thumbnail image caption with a free URL
14014 [[File:Foobar.jpg|thumb|http://example.com]]
14016 <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>
14019 <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>
14023 Thumbnail image caption with a free URL and explicit alt
14026 parsoid=wt2html,wt2wt,html2html
14028 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14030 <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>
14033 <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>
14037 SVG thumbnails with no language set
14040 [[File:Foobar.svg|thumb|caption]]
14042 <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>
14045 <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>
14049 SVG thumbnails with language de
14051 parsoid=wt2html,wt2wt,html2html
14053 [[File:Foobar.svg|thumb|caption|lang=de]]
14055 <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>
14058 <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>
14062 SVG thumbnails with invalid language code
14064 parsoid=wt2html,wt2wt,html2html
14066 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14068 <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>
14071 <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>
14075 BUG 1887: A ISBN with a thumbnail
14077 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14079 <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>
14082 <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>
14086 BUG 1887: A RFC with a thumbnail
14088 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14090 <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>
14093 <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>
14097 BUG 1887: A mailto link with a thumbnail
14099 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14101 <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>
14104 <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>
14107 # Pending resolution to bug 368
14109 BUG 648: Frameless image caption with a link
14111 [[File:Foobar.jpg|text with a [[link]] in it]]
14113 <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>
14116 <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>
14120 BUG 648: Frameless image caption with a link (suffix)
14122 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14124 <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>
14127 <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>
14131 BUG 648: Frameless image caption with an interwiki link
14133 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14135 <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>
14138 <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>
14142 BUG 648: Frameless image caption with a piped interwiki link
14144 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14146 <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>
14149 <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>
14153 T107474: Frameless image caption with <nowiki>
14155 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14157 <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>
14161 Escape HTML special chars in image alt text
14163 [[File:Foobar.jpg|& < > "]]
14165 <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>
14168 <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>
14172 Escape HTML special chars in image alt text with LanguageConverter
14176 [[File:Foobar.jpg|& < > "]]
14178 <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>
14181 <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>
14185 Entities in file name and attributes
14187 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14189 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14192 <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>
14196 BUG 499: Alt text should have Ӓ, not &1234;
14198 [[File:Foobar.jpg|♀]]
14200 <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>
14203 <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>
14207 Broken image caption with link
14209 parsoid=wt2html,wt2wt,html2html
14211 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14213 <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.
14216 <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>
14220 Image caption containing another image
14222 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14224 <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>
14227 <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>
14231 Image: caption containing a newline
14233 [[File:Foobar.jpg|This
14236 <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>
14239 <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>
14243 Image: caption containing leading space
14244 (The leading space should not trigger nowiki escaping in wt2wt mode)
14246 [[File:Foobar.jpg|thumb| bar]]
14248 <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>
14251 <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>
14255 Image: caption containing a table
14257 parsoid=wt2html,wt2wt,html2html
14259 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14265 and some more text.]]
14267 <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>
14270 <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
14273 <tr><th>Foo </th><th>Bar</th></tr>
14276 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14280 Bug 3090: External links other than http: in image captions
14282 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14284 <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>
14287 <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>
14293 parsoid=wt2html,wt2wt,html2html
14295 [[Image:foobar.jpg|a|class=b]]
14297 <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>
14300 <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>
14304 Localized image handling (1).
14306 parsoid=wt2html,wt2wt,html2html
14309 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14311 <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>
14314 <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>
14318 Localized image handling (2).
14321 parsoid=wt2html,wt2wt,html2html
14324 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14326 <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>
14329 <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>
14333 Localized image handling (3).
14338 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure>
14340 [[File:Foobar.jpg|بندانگشتی]]
14344 "border", "frameless" and "class" attributes on an image.
14347 parsoid=wt2html,wt2wt,html2html
14349 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14351 <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>
14354 <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>
14357 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14359 Invalid image attributes (bug 62500)
14362 parsoid=wt2html,wt2wt,html2html
14364 [[File:Foobar.jpg|thumb|float|left|caption]]
14366 [[File:Foobar.jpg|thumb|righ|caption]]
14368 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14370 <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>
14371 <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>
14372 <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>
14375 <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>
14376 <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>
14377 <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>
14383 #REDIRECT [[File:Barfoo.jpg]]
14386 # FIXME: Parsoid should run this test -- but we'd need to teach the
14387 # mockAPI about the redirected Barfoo.jpg image.
14391 [[Image:Barfoo.jpg]]
14393 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14398 Missing image with uploads disabled
14402 [[File:Foobaz.jpg]]
14404 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14407 <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>
14410 # Parsoid-specific testing for images
14411 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14412 # Currently imperfect due to a flaw in the Parsoid testrunner
14414 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14418 Parsoid-specific image handling - simple image with size and middle alignment
14420 [[File:Foobar.jpg|middle|50px]]
14422 <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>
14426 Parsoid-specific image handling - simple image with size, middle alignment,
14427 non-standard namespace alias
14429 parsoid=wt2wt,wt2html,html2html
14431 [[Image:Foobar.jpg|middle|50px]]
14433 <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>
14437 Parsoid-specific image handling - simple image with size and middle alignment
14440 [[File:Foobar.jpg|50px|middle]]
14442 <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>
14446 Parsoid-specific image handling - simple image with size and middle alignment
14447 and non-standard namespace name
14449 parsoid=wt2html,wt2wt,html2html
14451 [[Image:Foobar.jpg|50px|middle]]
14453 <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>
14457 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14459 [[File:Foobar.jpg|500x10px|baseline|caption]]
14461 <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>
14465 Parsoid-specific image handling - simple image with border and size spec
14467 [[File:Foobar.jpg|50px|border|caption]]
14469 <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>
14473 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14475 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14477 <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>
14481 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14484 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14486 <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>
14490 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14492 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14494 <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>
14498 Parsoid-specific image handling - thumbnail with specific size, halign,
14499 valign, and caption (existing content)
14501 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14503 <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>
14507 Parsoid-specific image handling - framed image with specific size and caption
14510 parsoid=wt2html,wt2wt,html2html
14512 [[File:Foobar.jpg|frame|500x50px|caption]]
14514 <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>
14518 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14521 parsoid=wt2html,wt2wt,html2html
14523 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14525 <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>
14529 Parsoid-specific image handling - frameless image with specific size, border, and caption
14531 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14533 <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>
14537 Parsoid-specific image handling - simple image with a formatted caption
14539 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14541 <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>
14545 Parsoid-specific image handling - caption with a template in it
14547 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14549 <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>
14553 Parsoid-specific image handling - caption with unbalanced tags in it
14555 parsoid=wt2html,wt2wt,html2html
14558 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14562 <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>
14567 Parsoid-specific image handling - empty caption (1)
14569 parsoid=wt2html,wt2wt
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>
14576 # empty captions don't get serialized unless we're in the "round trip" case
14578 Parsoid-specific image handling - empty caption (2)
14582 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14583 <a href="./File:Foobar.jpg">
14584 <img resource="./File:Foobar.jpg"
14585 src="//example.com/images/3/3a/Foobar.jpg"
14586 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14587 height="25" width="220"/>
14589 <figcaption></figcaption>
14592 [[File:Foobar.jpg|thumb]]
14596 Parsoid-specific image handling - whitespace caption
14598 [[File:Foobar.jpg|thumb| ]]
14600 <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>
14604 Parsoid-specific image handling - lang option
14607 [[File:Foobar.svg|lang=de|caption]]
14611 <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>
14615 ## Edge case bugs in Parsoid from T93580
14617 T93580: 1. Templated <ref> inside block images
14619 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14623 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
14625 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14629 T93580: 2. <ref> inside inline images
14631 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14635 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14637 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14641 T93580: 3. Templated <ref> inside inline images
14643 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14647 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14649 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14656 Subpage test/subpage
14664 subpage title=[[Subpage test]]
14668 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14673 Subpage noslash link
14675 subpage title=[[Subpage test]]
14679 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14684 Subpage test/1/2/subpage
14690 Relative subpage noslash link
14692 parsoid=wt2wt,wt2html,html2html
14693 subpage title=[[Subpage test/1/2/3/4]]
14699 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14700 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14703 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14704 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14708 Parsoid: dot-slash prefixed wikilinks
14718 </p><p>[[././baz/]]
14723 </p><p>[[././baz/]]
14728 Render invalid page names as plain text (bug 51090)
14741 [[{{echo|./../foo}}|bar]]
14742 [[{{echo|foo/.}}|bar]]
14743 [[{{echo|foo/..}}|bar]]
14744 [[{{echo|foo~~~~bar}}]]
14745 [[{{echo|foo>bar}}]]
14746 [[{{echo|foo././bar}}]]
14747 [[{{echo|foo{bar}}]]
14748 [[{{echo|foo}bar}}]]
14749 [[{{echo|foo[bar}}]]
14750 [[{{echo|foo]bar}}]]
14751 [[{{echo|foo<bar}}]]
14753 <p>[[./../foo|bar]]
14763 </p><p>[[./../foo|bar]]
14776 <p>[[./../foo|bar]]
14787 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14788 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14789 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14790 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14791 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14792 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14793 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14794 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14795 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14796 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14797 [[<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>
14805 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14810 BUG 561: {{/Subpage}}
14812 subpage title=[[Page]]
14816 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14824 Category:MediaWiki User's Guide
14832 [[:Category:MediaWiki User's Guide]]
14834 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14843 [[Category:MediaWiki User's Guide]]
14845 cat=MediaWiki_User's_Guide sort=
14847 <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"}}'/>
14851 PAGESINCATEGORY invalid title fatal (r33546 fix)
14853 {{PAGESINCATEGORY:<bogus>}}
14860 Category with different sort key
14864 [[Category:MediaWiki User's Guide|Foo]]
14866 cat=MediaWiki_User's_Guide sort=Foo
14868 <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"}}'/>
14872 Category with identical sort key
14876 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14878 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14880 <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"}}'/>
14884 Category with empty sort key
14889 [[Category:MediaWiki User's Guide|]]
14891 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14895 Category with empty sort key and parentheses
14900 [[Category:Foo (bar)|]]
14902 [[Category:Foo (bar)|Foo]]
14906 Category with link tail
14911 123[[Category:Foo]]456
14913 123[[Category:Foo]]456
14917 Category with template
14922 [[Category:{{echo|Foo}}]]
14924 [[Category:{{echo|Foo}}]]
14928 Category with template in sort key
14933 [[Category:Foo|{{echo|Bar}}]]
14935 [[Category:Foo|{{echo|Bar}}]]
14939 Category with template in sort key and title
14944 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14946 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14949 ## We used to, but no longer wt2wt this test since the default serializer
14950 ## will normalize all categories to serialize on their own line.
14951 ## This wikitext usage is going to be fairly uncommon in production and
14952 ## selser will take care of preserving formatting in those scenarios.
14954 Category / paragraph interactions
14958 Foo [[Category:Baz]] Bar
14960 Foo [[Category:Baz]]
14968 [[Category:Baz]] Bar
14981 {{echo|[[Category:Baz]]}}
14994 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14995 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14996 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14997 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14998 <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>
14999 <link rel="mw:PageProp/Category" href="Category:Baz"/>
15002 ## We used to, but no longer wt2wt this test since the default serializer
15003 ## will normalize all categories to serialize on their own line.
15004 ## This wikitext usage is going to be fairly uncommon in production and
15005 ## selser will take care of preserving formatting in those scenarios.
15007 ## The whitespace on the empty line is part of the test. Please do not delete
15009 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15015 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15017 {{echo|[[Category:Foo]] and so should this!}}
15019 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15024 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15026 <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>
15029 ## Parsoid will not try to wt2wt this while preserving newlines because
15030 ## it suppresses excess newlines within list items -- and we don't want to
15031 ## introduce a special case just for categories, which is, in reality somewhat
15032 ## odd behavior -- categories are unlikely to be used in list items like this
15033 ## in top-level pages and are only likely to show up in template-generated
15034 ## list items where this RT-ing is a non-issue.
15036 ## The whitespace on the empty line is part of the test. Please do not delete
15038 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
15044 [[Category:Foo]] and this should be part of the same list item
15047 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15049 <ul><li>This and this should be part of the same list item</li>
15050 <li>So should this and this should be part of the same list item</li></ul>
15053 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15054 <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>
15058 ## Newlines and categories that follow the last item of a list
15059 ## are treated differently because this (list followed by categories)
15060 ## is an extremely common pattern on wikis.
15062 3. Categories and newlines: newline suppression for last list item should RT properly
15075 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15077 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15078 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15082 4. Categories and newlines: newline suppression for last list item should RT properly
15090 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15092 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15095 ## only wt2html for this to make sure the algo only applies to the rightmost path
15097 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15110 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15112 <ul><li> d</li></ul></li></ul>
15113 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15116 ## We used to, but no longer wt2wt this test since the default serializer
15117 ## will normalize all categories to serialize on their own line.
15118 ## This wikitext usage is going to be fairly uncommon in production and
15119 ## selser will take care of preserving formatting in those scenarios.
15121 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15125 * a [[Category:Foo]]
15127 <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>
15130 # This test also demonstrates because of newline+category tunneling
15131 # through the list hander, template wrapping doesn't expand to the
15132 # containing list when the list item swallows the category.
15134 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15139 <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
15140 </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>
15144 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15148 {{echo|[[Category:Foo]]
15152 <ul><li> a</li></ul>
15154 <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">
15155 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15156 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15160 Category links with multiple namespaces
15162 [[Category:Project:Foo]]
15164 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15168 Parsoid: Serialize link to category page with colon escape
15174 [[:Category:Foo|Bar]]
15177 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15178 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15182 # We used to, but no longer wt2wt this test since the default serializer
15183 # will normalize all categories to serialize on their own line.
15184 # This wikitext usage is going to be fairly uncommon in production and
15185 # selser will take care of preventing whitespace insertion if this
15186 # occurs in an article.
15188 # html2html disabled for the same reason (whitespace insertion between
15191 # html2wt disabled because it localizes the "Category" namespace.
15193 Link prefix/suffixes aren't applied to category links
15203 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15207 Parsoid: Serialize link to file page with colon escape
15213 [[:File:Foo.png|Bar]]
15216 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15217 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15222 Parsoid: Serialize a genuine category link without colon escape
15227 [[Category:Foo|Bar]]
15229 <link rel="mw:PageProp/Category" href="./Category:Foo">
15230 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15234 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15238 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15240 [[Category:Toxine bactérienne]]
15244 Parsoid: Defaultsort
15246 {{DEFAULTSORT:Foo}}
15248 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15252 Parsoid: Defaultsort (template-generated)
15254 {{{{echo|DEFAULTSORT}}:Foo}}
15256 <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}}]}'/>
15260 ### Inter-language links
15263 Interlanguage links
15271 es:Alimento fr:Nourriture zh:食品
15273 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15274 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15275 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15279 Duplicate interlanguage links (bug 24502)
15290 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15291 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15292 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15293 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15300 Basic section headings
15307 ===Smaller headline===
15310 <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>
15313 <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>
15316 <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>
15322 Section headings with TOC
15325 === Subheadline 1 ===
15326 ===== Skipping a level =====
15327 ====== Skipping a level ======
15331 ===Another headline===
15333 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15335 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15337 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15339 <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>
15341 <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>
15348 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15350 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15356 <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>
15357 <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>
15358 <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>
15359 <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>
15360 <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>
15363 <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>
15368 TOC anchors don't collide
15376 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15378 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15379 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15380 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15381 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15385 <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>
15386 <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>
15387 <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>
15388 <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>
15392 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15394 Handling of sections up to level 6 and beyond
15397 == Level 2 Heading==
15398 === Level 3 Heading===
15399 ==== Level 4 Heading====
15400 ===== Level 5 Heading=====
15401 ====== Level 6 Heading======
15402 ======= Level 7 Heading=======
15403 ======== Level 8 Heading========
15404 ========= Level 9 Heading=========
15405 ========== Level 10 Heading==========
15407 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15409 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15411 <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>
15413 <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>
15415 <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>
15417 <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>
15419 <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>
15420 <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>
15421 <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>
15422 <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>
15423 <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>
15437 <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>
15438 <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>
15439 <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>
15440 <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>
15441 <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>
15442 <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>
15443 <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>
15444 <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>
15445 <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>
15446 <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>
15451 TOC regression (T11764)
15455 ==== title 1.1.1 ====
15460 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15462 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15464 <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>
15466 <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>
15469 <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>
15472 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15474 <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>
15480 <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>
15481 <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>
15482 <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>
15483 <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>
15484 <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>
15485 <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>
15490 TOC for heading containing <span id="..."></span> (T96153)
15493 ==<span id="old-anchor"></span>New title==
15495 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15497 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15501 <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>
15506 TOC with wgMaxTocLevel=3 (bug 6204)
15512 ==== title 1.1.1 ====
15517 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15519 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15521 <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>
15522 <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>
15525 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15527 <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>
15533 <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>
15534 <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>
15535 <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>
15536 <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>
15537 <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>
15538 <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>
15543 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15549 ====Section 1.1.1====
15550 ====Section 1.1.1.1====
15553 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15555 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15557 <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>
15560 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15564 <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>
15565 <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>
15566 <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>
15567 <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>
15568 <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>
15574 Resolving duplicate section names
15579 <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>
15580 <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>
15585 Resolving duplicate section names with differing case (bug 10721)
15590 <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>
15591 <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>
15603 Template with sections, __NOTOC__
15610 <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>
15611 <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>
15612 <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>
15613 <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>
15618 __NOEDITSECTION__ keyword
15624 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15625 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15630 Link inside a section heading
15632 ==Section with a [[Main Page|link]] in it==
15634 <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>
15639 TOC regression (T14077)
15646 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15648 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15650 <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>
15653 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15657 <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>
15658 <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>
15659 <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>
15664 BUG 1219 URL next to image (good)
15666 http://example.com [[File:Foobar.jpg]]
15668 <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>
15671 <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>
15675 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15678 The line above must have a trailing space!
15681 But just in case it doesn't...
15683 <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>
15684 <p>The line above must have a trailing space!
15686 <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>
15687 <p>But just in case it doesn't...
15692 Header with special characters (bug 25462)
15694 The tooltips shall not show entities to the user (ie. be double escaped)
15711 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15713 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15715 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15716 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15717 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15718 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15719 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15723 <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>
15726 <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>
15729 <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>
15732 <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>
15735 <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>
15741 Header with space, plus and underscore as entity
15743 Id should not contain + for spaces
15745 == Space between Text ==
15748 == Space-Entity between Text ==
15751 == Plus+between+Text ==
15754 == Plus-Entity+between+Text ==
15757 == Underscore_between_Text ==
15760 == Underscore-Entity_between_Text ==
15763 [[#Space between Text]]
15764 [[#Space-Entity between Text]]
15765 [[#Plus+between+Text]]
15766 [[#Plus-Entity+between+Text]]
15767 [[#Underscore_between_Text]]
15768 [[#Underscore-Entity_between_Text]]
15770 <p>Id should not contain + for spaces
15772 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15774 <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>
15775 <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>
15776 <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>
15777 <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>
15778 <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>
15779 <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>
15783 <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>
15786 <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>
15789 <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>
15792 <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>
15795 <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>
15798 <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>
15800 </p><p><a href="#Space_between_Text">#Space between Text</a>
15801 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15802 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15803 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15804 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15805 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15810 Headers with excess '=' characters
15811 (Are similar tests necessary beyond the 1st level?)
15815 =''italic'' heading==
15816 ==''italic'' heading=
15818 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15820 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15821 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15822 <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>
15823 <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>
15827 <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>
15828 <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>
15829 <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>
15830 <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>
15835 HTML headers vs TOC (bug 23393)
15836 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15848 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15850 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15852 <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>
15853 <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>
15856 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15858 <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>
15859 <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>
15865 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15866 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15867 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15868 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15869 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15870 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15875 Single-line or multiline-comments can follow headings
15877 parsoid=wt2html,wt2wt
15885 <h2><span class="mw-headline" id="foo">foo</span></h2>
15886 <h2><span class="mw-headline" id="bar">bar</span></h2>
15887 <h2><span class="mw-headline" id="baz">baz</span></h2>
15892 BUG 1219 URL next to image (broken)
15894 http://example.com[[File:Foobar.jpg]]
15896 <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>
15899 <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>
15903 Bug 1186 news: in the middle of text
15905 http://en.wikinews.org/wiki/Wikinews:Workplace
15907 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15913 Namespaced link must have a title
15922 Namespaced link must have a title (bad fragment version)
15924 [[Project:#fragment]]
15926 <p>[[Project:#fragment]]
15932 ### HTML tags and HTML attributes
15936 div with no attributes
15938 <div>HTML rocks</div>
15940 <div>HTML rocks</div>
15945 div with double-quoted attribute
15947 <div id="rock">HTML rocks</div>
15949 <div id="rock">HTML rocks</div>
15954 div with single-quoted attribute
15956 <div id='rock'>HTML rocks</div>
15958 <div id="rock">HTML rocks</div>
15963 div with unquoted attribute
15965 <div id=rock>HTML rocks</div>
15967 <div id="rock">HTML rocks</div>
15972 div with illegal double attributes
15974 <div id="a" id="b">HTML rocks</div>
15976 <div id="b">HTML rocks</div>
15981 div with empty attribute value, space before equals
15983 parsoid=wt2html,html2html
15985 <div class =>HTML rocks</div>
15987 <div class="">HTML rocks</div>
15990 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15994 div with multiple empty attribute values
15996 parsoid=wt2html,html2html
15998 <div id= title=>HTML rocks</div>
16000 <div id="title.3D">HTML rocks</div>
16003 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16007 table with multiple empty attribute values
16009 parsoid=wt2html,html2html
16015 <table title="id=">
16021 <table title="id=">
16022 <tbody><tr><td> hi</td></tr>
16027 div with braces in attribute value
16029 <div title="{}">Foo</div>
16031 <div title="{}">Foo</div>
16034 <div title="{}">Foo</div>
16038 div with empty attribute value, no space before equals
16040 parsoid=wt2html,html2html
16042 <div class=>HTML rocks</div>
16044 <div class="">HTML rocks</div>
16047 <div class="">HTML rocks</div>
16051 HTML multiple attributes correction
16053 <p class="error" class="awesome">Awesome!</p>
16055 <p class="awesome">Awesome!</p>
16060 Table multiple attributes correction
16063 !+ class="error" class="awesome"| status
16068 <th class="awesome"> status
16076 <DIV ID="x">HTML ROCKS</DIV>
16078 <div id="x">HTML ROCKS</div>
16083 Non-ASCII pseudo-tags are rendered as text
16092 Pseudo-tag with URL 'name' renders as url link
16094 <http://example.com/>
16096 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16101 text with amp in the middle of nowhere
16105 <p>Remember AT&T?
16110 text with character entity: eacute
16112 I always thought é was a cute letter.
16114 <p>I always thought é was a cute letter.
16117 <p>I always thought é was a cute letter.</p>
16121 text with entity-escaped character entity-like string: eacute
16123 I always thought &eacute; was a cute letter.
16125 <p>I always thought &eacute; was a cute letter.
16130 text with undefined character entity: xacute
16132 I always thought &xacute; was a cute letter.
16134 <p>I always thought &xacute; was a cute letter.
16141 <data value="5">five</data>
16142 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16143 <mark>This highlighted text</mark>
16145 <p><data value="5">five</data>
16146 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16147 <mark>This highlighted text</mark>
16152 HTML tag with leading space is parsed as text
16156 <p>< div>foo< /div>
16161 ### Nesting tests (see bug 41545, 50604, 51081)
16164 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16165 # Note that html2wt is considerably more difficult if we use <b> in
16166 # the test case, instead of <big>
16168 Ensure that HTML adoption agency algorithm is properly implemented.
16170 <big>X<big>Y</big>Z</big>
16172 <p><big>X<big>Y</big>Z</big>
16176 # This was bug 41545 in the PHP parser.
16177 # Note that tidy doesn't handle this correctly.
16181 <kbd>X<kbd>Y</kbd>Z</kbd>
16183 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16187 # The following cases were bug 51081 in the PHP parser.
16188 # Note that there are some other nestable tags (b, i, etc) which are
16189 # not covered; see bug 51081 for discussion.
16191 # Note that tidy doesn't handle this correctly.
16195 <em>X<em>Y</em>Z</em>
16197 <p><em>X<em>Y</em>Z</em>
16201 # Note that tidy doesn't handle this correctly.
16203 Nesting of <strong>
16205 <strong>X<strong>Y</strong>Z</strong>
16207 <p><strong>X<strong>Y</strong>Z</strong>
16216 <p><q>X<q>Y</q>Z</q></p>
16219 # Note that tidy doesn't handle this correctly.
16223 <ruby>X<ruby>Y</ruby>Z</ruby>
16225 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16229 # Note that tidy doesn't handle this correctly.
16233 <bdo>X<bdo>Y</bdo>Z</bdo>
16235 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16247 [[Media:Foobar.jpg]]
16249 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16254 Media link with text
16256 [[Media:Foobar.jpg|A neat file to look at]]
16258 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16262 # FIXME: this is still bad HTML tag nesting
16263 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16265 Media link with nasty text
16267 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16269 <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>
16272 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16273 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16277 Media link to nonexistent file (bug 1702)
16279 [[Media:No such.jpg]]
16281 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16286 Image link to nonexistent file (bug 1850 - good)
16288 [[File:No_such.jpg]]
16290 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16293 <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>
16297 :Image link to nonexistent file (bug 1850 - bad)
16299 [[:Image:No such.jpg]]
16301 <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>
16304 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16310 Character reference normalization in link text (bug 1938)
16312 [[Main Page|this&that]]
16314 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16321 Test for unicode normalization
16323 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16327 (bug 19451) Links should refer to the normalized form.
16335 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16336 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16337 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16338 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16339 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16344 Empty attribute crash test (bug 2067)
16346 <font color="">foo</font>
16348 <p><font color="">foo</font>
16353 Empty attribute crash test single-quotes (bug 2067)
16355 <font color=''>foo</font>
16357 <p><font color="">foo</font>
16362 Attribute test: equals, then nothing
16364 parsoid=wt2html,html2html
16366 <font color=>foo</font>
16368 <p><font color="">foo</font>
16371 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16375 Attribute test: unquoted value
16377 parsoid=wt2html,html2html
16379 <font color=x>foo</font>
16381 <p><font color="x">foo</font>
16384 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16388 Attribute test: unquoted but illegal value (hash)
16390 <font color=#x>foo</font>
16392 <p><font color="#x">foo</font>
16396 # Parsoid does not serialize to empty attribute syntax,
16397 # so wt2wt and html2wt cases are skipped
16399 Attribute test: no value (T54330)
16401 parsoid=wt2html,html2html
16403 <font color>foo</font>
16405 <p><font color="">foo</font>
16408 <p><font color="">foo</font></p>
16412 Bug 2095: link with three closing brackets
16416 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16419 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16423 Bug 2095: link with pipe and three closing brackets
16425 [[Main Page|link]]]
16427 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16430 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16434 Bug 2095: link with pipe and three closing brackets, version 2
16436 [[Main Page|[http://example.com/]]]
16438 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16441 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16450 Template:Dangerous attribute
16452 " onmouseover="alert(document.cookie)
16456 Template:Dangerous style attribute
16458 border-size: expression(alert(document.cookie))
16464 <div style="float: right; {{{1}}}">Magic div</div>
16468 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16470 <div title="{{test}}"></div>
16472 <div title="This is a test template"></div>
16476 # Parsoid has enough context to handle this case
16478 Bug 2304: HTML attribute safety (dangerous template; 2309)
16480 <div title="{{dangerous attribute}}"></div>
16482 <div title=""></div>
16485 <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>
16489 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16491 <div style="{{dangerous style attribute}}"></div>
16493 <div style="/* insecure input */"></div>
16498 Bug 2304: HTML attribute safety (safe parameter; 2309)
16500 {{div style|width: 200px}}
16502 <div style="float: right; width: 200px">Magic div</div>
16507 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16509 {{div style|width: expression(alert(document.cookie))}}
16511 <div style="/* insecure input */">Magic div</div>
16516 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16518 {{div style|"><script>alert(document.cookie)</script>}}
16520 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16525 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16527 {{div style|" ><script>alert(document.cookie)</script>}}
16529 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16534 Bug 2304: HTML attribute safety (link)
16536 <div title="[[Main Page]]"></div>
16538 <div title="[[Main Page]]"></div>
16543 Bug 2304: HTML attribute safety (italics)
16545 <div title="''foobar''"></div>
16547 <div title="''foobar''"></div>
16552 Bug 2304: HTML attribute safety (bold)
16554 <div title="'''foobar'''"></div>
16556 <div title="'''foobar'''"></div>
16562 Bug 2304: HTML attribute safety (ISBN)
16564 <div title="ISBN 1234567890"></div>
16566 <div title="ISBN 1234567890"></div>
16571 Bug 2304: HTML attribute safety (RFC)
16573 <div title="RFC 1234"></div>
16575 <div title="RFC 1234"></div>
16580 Bug 2304: HTML attribute safety (PMID)
16582 <div title="PMID 1234567890"></div>
16584 <div title="PMID 1234567890"></div>
16589 Bug 2304: HTML attribute safety (web link)
16591 <div title="http://example.com/"></div>
16593 <div title="http://example.com/"></div>
16598 Bug 2304: HTML attribute safety (named web link)
16600 <div title="[http://example.com/ link]"></div>
16602 <div title="[http://example.com/ link]"></div>
16607 Bug 3244: HTML attribute safety (extension; safe)
16609 <div style="<nowiki>background:blue</nowiki>"></div>
16611 <div style="background:blue"></div>
16616 Bug 3244: HTML attribute safety (extension; unsafe)
16618 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16620 <div style="/* insecure input */"></div>
16624 # More MSIE fun discovered by Tom Gilder
16627 MSIE CSS safety test: spurious slash
16629 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16631 <div style="/* insecure input */">evil</div>
16636 MSIE CSS safety test: hex code
16638 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16640 <div style="/* insecure input */">evil</div>
16645 MSIE CSS safety test: comment in url
16647 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16649 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16654 MSIE CSS safety test: comment in expression
16656 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16658 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16663 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16665 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16667 <p style="/* invalid control char */">A</p>
16672 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16674 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16675 <div style="top:EXPRESSION(alert())">B</div>
16677 <p style="/* insecure input */">A</p>
16678 <div style="/* insecure input */">B</div>
16683 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16685 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16686 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16688 <div style="/* insecure input */">A</div>
16689 <p style="/* insecure input */">B</p>
16694 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16696 <div style="background-image:url⁽javascript:alert())">A</div>
16697 <div style="background-image:url₍javascript:alert())">B</div>
16698 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16700 <div style="/* insecure input */">A</div>
16701 <div style="/* insecure input */">B</div>
16702 <p style="/* insecure input */">C</p>
16706 # FIXME: Parsoid fails to sanitize this! See T58846.
16711 title="data:text/html,<img src=1 onerror=alert(1)>"
16712 style="-o-link:attr(title);-o-link-source:current">X</div>
16714 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16719 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16721 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16722 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16723 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16724 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16725 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16726 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16727 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16729 <p style="/* insecure input */">A</p>
16730 <p style="/* insecure input */">B</p>
16731 <p style="/* insecure input */">C</p>
16732 <p style="/* insecure input */">D</p>
16733 <p style="/* insecure input */">E</p>
16734 <p style="/* insecure input */">F</p>
16735 <p style="/* insecure input */">G</p>
16740 Table attribute legitimate extension
16743 !+ style="<nowiki>color:blue</nowiki>"| status
16748 <th style="color:blue"> status
16754 Table attribute safety
16757 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16762 <th style="/* insecure input */"> status
16768 CSS line continuation 1
16770 <div style="background-image: u\ rl(test.jpg);"></div>
16772 <div style="/* insecure input */"></div>
16777 CSS line continuation 2
16779 <div style="background-image: u\ rl(test.jpg); "></div>
16781 <div style="/* invalid control char */"></div>
16792 Expansion of multi-line templates in attribute values (bug 6255)
16794 <div style="background: {{identity|#00FF00}}">-</div>
16796 <div style="background: #00FF00">-</div>
16802 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16804 <div style="background:
16807 <div style="background: #00FF00">-</div>
16810 <div style="background:
16815 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16817 <div style="background: #00FF00">-</div>
16819 <div style="background: #00FF00">-</div>
16824 Tags which are hidden from Tidy cannot pass through the Sanitizer
16826 <mw:toc><script>alert();</script></mw:toc>
16828 <p><mw:toc><script>alert();</script></mw:toc></p>
16832 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16835 Parser hook: empty input
16846 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16849 ## Don't expect parsoid to rt this form.
16851 Parser hook: empty input using terminated empty elements
16853 parsoid=wt2html,html2html
16864 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16868 Parser hook: empty input using terminated empty elements (space before)
16879 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16883 Parser hook: basic input
16894 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16897 ## Don't expect parsoid to rt this form.
16899 Parser hook: case insensitive
16901 parsoid=wt2html,html2html
16912 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16915 ## Don't expect parsoid to rt this form.
16917 Parser hook: case insensitive, redux
16919 parsoid=wt2html,html2html
16930 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16934 Parser hook: nested tags
16936 <tag><tag></tag></tag>
16945 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16949 Parser hook: basic arguments
16951 <tag width="200" height="100" depth="50" square=""></tag>
16964 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16967 ## Don't expect parsoid to rt this form.
16969 Parser hook: basic arguments, variations
16971 parsoid=wt2html,html2html
16973 <tag width=200 height = "100" depth = '50' square></tag>
16986 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16990 Parser hook: argument containing a forward slash (bug 5344)
16992 <tag filename="/tmp/bla"></tag>
16997 'filename' => '/tmp/bla',
17002 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17005 ## Don't expect parsoid to rt this form.
17007 Parser hook: empty input using terminated empty elements (bug 2374)
17009 parsoid=wt2html,html2html
17021 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17024 ## </tag> should be output literally since there is no matching tag that begins it
17025 ## Don't expect parsoid to rt this form.
17027 Parser hook: basic arguments using terminated empty elements (bug 2374)
17031 <tag width=200 height = "100" depth = '50' square/>
17048 <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
17052 ## Don't expect parsoid to rt this form.
17054 Parser hook: Don't allow unclosed extension tags
17060 this is a '''test'''
17062 <p>test <tag>123
17063 </p><p>this is a <b>test</b>
17066 <p>test <tag>123</p>
17068 <p>this is a <b>test</b></p>
17072 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17076 Parser hook: static parser hook not inside a comment
17078 <statictag>hello, world</statictag>
17080 <statictag action="flush" />
17086 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17087 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17091 Parser hook: static parser hook inside a comment
17093 <!-- <statictag>hello, world</statictag> -->
17094 <statictag action="flush" />
17099 <!-- <statictag>hello, world</statictag> -->
17100 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17103 # Nested template calls; this case was broken by Parser.php rev 1.506,
17107 Template:One-parameter
17109 (My parameter is: {{{1}}})
17113 Template:Map-one-parameter
17115 {{{{{1}}}|{{{2}}}}}
17119 Nested template calls
17121 {{Map-one-parameter|One-parameter|param}}
17123 <p>(My parameter is: param)
17132 # HTML+Tidy effectively strips out the empty tags completely
17133 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17134 # which Tidy would have done for the PHP parser had there been content inside it.
17136 Sanitizer: Closing of open tags
17138 <s></s><table></table>
17140 <s></s><table></table>
17143 <p><s></s></p><table></table>
17147 Sanitizer: Closing of open but not closed tags
17156 Sanitizer: Closing of closed but not open tags
17166 Sanitizer: Closing of closed but not open table tags
17170 Table not started</td></tr></table>
17172 <p>Table not started</p>
17174 <p>Table not started</p>
17178 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17180 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17182 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17185 <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>
17188 # In HTML5, the restrictions are that id must contain at least one character,
17189 # and must not contain any space characters.
17191 Sanitizer: Validating the contents of the id attribute (bug 4515)
17195 <br id="" /><br id="a space" />
17200 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17202 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17206 <br id="foo" /><br id="foo" />
17208 Something need to be done. foo-2 ?
17212 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17215 <meta itemprop="hello" content="world">
17216 <meta http-equiv="refresh" content="5">
17217 <meta itemprop="hello" http-equiv="refresh" content="5">
17218 <link itemprop="hello" href="{{SERVER}}">
17219 <link rel="stylesheet" href="{{SERVER}}">
17220 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17224 <p> <meta itemprop="hello" content="world" />
17225 <meta http-equiv="refresh" content="5">
17226 <meta itemprop="hello" content="5" />
17228 <link itemprop="hello" href="http://example.org" />
17229 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17230 <link itemprop="hello" href="http://example.org" />
17236 Language converter: output gets cut off unexpectedly (bug 5757)
17240 this bit is safe: }-
17242 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17244 then we get cut off here: }-
17246 all additional text is vanished
17248 <p>this bit is safe: }-
17249 </p><p>but if we add a conversion instance: xxx
17250 </p><p>then we get cut off here: }-
17251 </p><p>all additional text is vanished
17256 Self closed html pairs (bug 5487)
17259 <center><font id="bug" />Centered text</center>
17260 <div><font id="bug2" />In div text</div>
17262 <center><font id="bug" />Centered text</center>
17263 <div><font id="bug2" />In div text</div>
17272 Punctuation: nbsp before exclamation
17276 <p>C'est grave !
17281 Punctuation: CSS !important (bug 11874)
17283 <div style="width:50% !important">important</div>
17285 <div style="width:50% !important">important</div>
17290 Punctuation: CSS ! important (bug 11874; with space after)
17292 <div style="width:50% ! important">important</div>
17294 <div style="width:50% ! important">important</div>
17299 HTML bullet list, closed tags (bug 5497)
17312 <ul data-parsoid='{"stx":"html"}'>
17313 <li data-parsoid='{"stx":"html"}'>One</li>
17314 <li data-parsoid='{"stx":"html"}'>Two</li>
17320 HTML bullet list, unclosed tags (bug 5497)
17332 <ul data-parsoid='{"stx":"html"}'>
17333 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17334 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17340 HTML ordered list, closed tags (bug 5497)
17353 <ol data-parsoid='{"stx":"html"}'>
17354 <li data-parsoid='{"stx":"html"}'>One</li>
17355 <li data-parsoid='{"stx":"html"}'>Two</li>
17361 HTML ordered list, unclosed tags (bug 5497)
17374 <ol data-parsoid='{"stx":"html"}'>
17375 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17376 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17382 HTML nested bullet list, closed tags (bug 5497)
17405 <ul data-parsoid='{"stx":"html"}'>
17406 <li data-parsoid='{"stx":"html"}'>One</li>
17407 <li data-parsoid='{"stx":"html"}'>Two:
17408 <ul data-parsoid='{"stx":"html"}'>
17409 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17410 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17417 HTML nested bullet list, open tags (bug 5497)
17454 HTML nested ordered list, closed tags (bug 5497)
17479 HTML nested ordered list, open tags (bug 5497)
17516 HTML ordered list item with parameters oddity
17518 <ol><li id="fragment">One</li>
17521 <ol><li id="fragment">One</li>
17526 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17528 bug 5918: autonumbering
17530 [http://first/] [http://second] [ftp://ftp]
17534 [mailto:enclosed@mail.tld With target]
17536 [mailto:enclosed@mail.tld]
17538 mailto:inline@mail.tld
17540 <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>
17541 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17542 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17543 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17544 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17547 <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>
17548 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17549 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17550 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17551 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17556 # Security and HTML correctness
17557 # From Nick Jenkins' fuzz testing
17561 Fuzz testing: Parser13
17576 Fuzz testing: Parser14
17581 <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>
17582 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17584 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17590 <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>
17592 <div id="toc" class="toc">
17593 <div id="toctitle">
17597 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17604 Fuzz testing: Parser14-table
17606 parsoid=wt2html,html2html
17611 <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>
17612 <table style="__TOC__">
17617 <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>
17618 <table style="__TOC__">
17625 <table style="__TOC__"></table>
17628 # Known to produce bogus xml (extra </td>)
17630 Fuzz testing: Parser16
17657 Fuzz testing: Parser21
17660 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17665 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17675 Fuzz testing: Parser22
17677 http://===r:::https://b
17681 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17689 # Known to produce bad XML for now
17691 Fuzz testing: Parser24
17696 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17697 <br style="onmouseover='alert(document.cookie);' " />
17699 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17704 <u class="|">}}}} >
17705 <br style="onmouseover='alert(document.cookie);'" />
17707 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17716 # Note: the current result listed for this is not what the original one was,
17717 # but the original bug was JavaScript injection, which is fixed in any case.
17718 # It's not clear that the original result listed was any more correct than the
17719 # current one. Original result:
17722 # <li class="||">
17723 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17725 Fuzz testing: Parser25 (bug 6055)
17731 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17733 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17738 Fuzz testing: URL adjacent extension (with space, clean)
17740 http://example.com <nowiki>junk</nowiki>
17742 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17745 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17749 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17751 http://example.com<nowiki>junk</nowiki>
17753 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17756 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17760 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17762 http://example.com<pre>junk</pre>
17764 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17767 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17772 <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>
17776 Fuzz testing: image with bogus manual thumbnail
17778 [[Image:foobar.jpg|thumbnail= ]]
17780 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17783 <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>
17787 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17789 <pre dir=" "></pre>
17791 <pre dir=" "></pre>
17796 Parsing optional HTML elements (Bug 6171)
17801 <td> Some tabular data</td>
17802 <td> More tabular data ...
17803 <td> And yet som tabular data</td>
17809 <td> Some tabular data</td>
17810 <td> More tabular data ...
17811 </td><td> And yet som tabular data</td>
17818 Correct handling of <td>, <tr> (Bug 6171)
17823 <td> Some tabular data</td>
17824 <td> More tabular data ...</td>
17825 <td> And yet som tabular data</td>
17831 <td> Some tabular data</td>
17832 <td> More tabular data ...</td>
17833 <td> And yet som tabular data</td>
17841 Parsing crashing regression (fr:JavaScript)
17845 <p></body></x>
17850 Inline wiki vs wiki block nesting
17856 <p><b>Bold paragraph</b>
17857 </p><p>New wiki paragraph
17861 # FIXME: The current php output is documented
17862 # and desired output is the parsoid target.
17864 Inline HTML vs wiki block nesting
17870 <p><b>Bold paragraph
17871 </p><p>New wiki paragraph</b>
17874 <p><b>Bold paragraph</b>
17875 </p><p>New wiki paragraph
17879 # Original result was this:
17880 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17882 # While that might be marginally more intuitive, maybe, the six-apostrophe
17883 # construct is clearly pathological and the result stated here (which is what
17884 # the parser actually does) is about as reasonable as anything.
17886 Mixing markup for italics and bold
17889 '''bold''''''bold''bolditalics'''''
17891 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17899 Article for special page transclusion test
17903 Special page transclusion
17906 {{Special:Prefixindex/Xyzzyx}}
17908 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17914 Special page transclusion twice (bug 5021)
17917 {{Special:Prefixindex/Xyzzyx}}
17918 {{Special:Prefixindex/Xyzzyx}}
17920 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17922 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17928 Transclusion of default MediaWiki message
17930 {{MediaWiki:Mainpage}}
17937 Transclusion of nonexistent MediaWiki message
17939 {{MediaWiki:Mainpagexxx}}
17941 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17946 Transclusion of MediaWiki message with underscore
17948 {{MediaWiki:history_short}}
17955 Transclusion of MediaWiki message with space
17957 {{MediaWiki:history short}}
17964 Invalid header with following text
17974 Section extraction test (section 0)
17994 Section extraction test (section 1)
18016 Section extraction test (section 2)
18037 Section extraction test (section 3)
18057 Section extraction test (section 4)
18081 Section extraction test (section 5)
18101 Section extraction test (section 6)
18122 Section extraction test (section 7)
18142 Section extraction test (section 8)
18162 Section extraction test (section 9)
18183 Section extraction test (section 10)
18203 Section extraction test (nonexistent section 11)
18222 Section extraction test with bogus heading (section 1)
18227 ==bogus== not a legal section
18231 ==bogus== not a legal section
18235 Section extraction test with bogus heading (section 2)
18240 ==bogus== not a legal section
18247 Section extraction test with comment after heading (section 1)
18259 Section extraction test with comment after heading (section 2)
18271 Section extraction test with bogus <nowiki> heading (section 1)
18276 ==bogus== <nowiki>not a legal section</nowiki>
18280 ==bogus== <nowiki>not a legal section</nowiki>
18284 Section extraction test with bogus <nowiki> heading (section 2)
18289 ==bogus== <nowiki>not a legal section</nowiki>
18295 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18296 # instead of respecting commented sections
18298 Section extraction prefixed by comment (section 1)
18309 Section extraction prefixed by comment (section 2)
18319 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18320 # instead of respecting HTML-style headings
18322 Section extraction, mixed wiki and html (section 1)
18338 Section extraction, mixed wiki and html (section 2)
18354 # Formerly testing for bug 3342
18356 Section extraction, heading surrounded by <noinclude>
18360 <noinclude>==unmarked==</noinclude>
18366 # Test behavior of bug 19910
18368 Sectiion with all-equals
18373 The line above must have a trailing space
18376 But just in case it doesn't...
18380 But just in case it doesn't...
18384 Section replacement test (section 0)
18415 Section replacement test (section 1)
18444 Section replacement test (section 2)
18474 Section replacement test (section 3)
18505 Section replacement test (section 4)
18532 Section replacement test (section 5)
18563 Section replacement test (section 6)
18593 Section replacement test (section 7)
18624 Section replacement test (section 8)
18655 Section replacement test (section 9)
18684 Section replacement test (section 10)
18714 Section replacement test with initial whitespace (bug 13728)
18718 Preformatted initial line
18722 Preformatted initial line
18729 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18741 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18754 Section extraction, <pre> around bogus header (bug 10309)
18771 Section replacement, <pre> around bogus header (bug 10309)
18793 Handling of 
 in URLs
18797 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18800 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18802 a</a></li></ul></li></ul>
18806 Handling of %0A in URLs
18810 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18813 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18817 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18819 5 quotes, code coverage +1 line
18826 <p><b><i></i></b></p>
18829 # same html as previous, but wikitext adjusted to match parsoid html2wt
18830 # note that wt2html and html2html will put the <i> before the <b>
18832 5 quotes, code coverage +1 line w/ nowiki (1)
18834 parsoid=wt2wt,html2wt
18836 '''''<nowiki/>'''''
18841 <p><b><i></i></b></p>
18844 # same as previous, just swapping the <i> and <b>
18846 5 quotes, code coverage +1 line w/ nowiki (2)
18848 '''''<nowiki/>'''''
18853 <p><i><b></b></i></p>
18857 Special:Search page linking.
18861 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18866 {{!}} is a magic word
18868 {{!}} is a magic word there and {{!}} is still a magic word here
18869 | is not a magic word here but {{!}} is still a magic word here
18871 <p>| is a magic word there and | is still a magic word here
18872 | is not a magic word here but | is still a magic word here
18875 <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
18876 | 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>
18883 title=[[Parser test]]
18888 * {{FULLPAGENAMEE}}
18890 * {{BASEPAGENAMEE}}
18894 * {{ROOTPAGENAMEE}}
18896 * {{TALKPAGENAMEE}}
18897 * {{SUBJECTPAGENAME}}
18898 * {{SUBJECTPAGENAMEE}}
18901 * {{NAMESPACENUMBER}}
18905 * {{SUBJECTSPACEE}}
18906 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18908 <ul><li> Parser test</li>
18909 <li> Parser_test</li>
18910 <li> Parser test</li>
18911 <li> Parser_test</li>
18912 <li> Parser test</li>
18913 <li> Parser_test</li>
18914 <li> Parser test</li>
18915 <li> Parser_test</li>
18916 <li> Parser test</li>
18917 <li> Parser_test</li>
18918 <li> Talk:Parser test</li>
18919 <li> Talk:Parser_test</li>
18920 <li> Parser test</li>
18921 <li> Parser_test</li>
18929 <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>
18932 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18934 ## Parsoid thinks the "centre" here is a property, not a caption.
18939 "modes": ["wt2html"],
18940 "nativeGallery": true
18948 image4 |300px| centre
18949 image5.svg| http://///////
18954 <ul class="gallery mw-gallery-traditional">
18955 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18956 <div class="thumb" style="height: 150px;">Image1.png</div>
18957 <div class="gallerytext">
18960 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18961 <div class="thumb" style="height: 150px;">Image2.gif</div>
18962 <div class="gallerytext">
18965 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18966 <div class="thumb" style="height: 150px;">Image3</div>
18967 <div class="gallerytext">
18970 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18971 <div class="thumb" style="height: 150px;">Image4</div>
18972 <div class="gallerytext">
18977 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18978 <div class="thumb" style="height: 150px;">Image5.svg</div>
18979 <div class="gallerytext">
18980 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18984 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18985 <div class="thumb" style="height: 150px;">* image6</div>
18986 <div class="gallerytext">
18992 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
18993 <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>
18994 <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>
18995 <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>
18996 <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>
18997 <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>
18998 <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>
19003 Gallery (with options, html)
19006 "modes": ["wt2html", "html2html"],
19007 "nativeGallery": true
19010 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19011 File:Nonexistent.jpg|caption
19012 File:Nonexistent.jpg
19013 image:foobar.jpg|some '''caption''' [[Main Page]]
19015 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19018 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19019 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19020 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19021 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19022 <div class="gallerytext">
19027 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19028 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19029 <div class="gallerytext">
19032 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19033 <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>
19034 <div class="gallerytext">
19035 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19039 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19040 <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>
19041 <div class="gallerytext">
19044 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19045 <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>
19046 <div class="gallerytext">
19054 <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":{}}'>
19055 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19056 <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>
19057 <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>
19058 <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>
19059 <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>
19060 <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>
19065 Gallery (with options, extsrc)
19068 "nativeGallery": false
19071 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19072 File:Nonexistent.jpg|caption
19073 File:Nonexistent.jpg
19074 image:foobar.jpg|some '''caption''' [[Main Page]]
19076 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19079 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19080 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19081 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19082 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19083 <div class="gallerytext">
19088 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19089 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19090 <div class="gallerytext">
19093 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19094 <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>
19095 <div class="gallerytext">
19096 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19100 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19101 <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>
19102 <div class="gallerytext">
19105 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19106 <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>
19107 <div class="gallerytext">
19115 <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"}}'>
19116 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19117 <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>
19118 <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>
19119 <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>
19120 <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>
19121 <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>
19126 Gallery with link that has fragment
19129 "modes": ["wt2html", "html2html"],
19130 "nativeGallery": true
19134 image:foobar.jpg|link=Main_Page
19135 image:foobar.jpg|link=Main_Page#section
19136 image:foobar.jpg|link=Main Page#section|caption
19139 <ul class="gallery mw-gallery-traditional">
19140 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19141 <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>
19142 <div class="gallerytext">
19145 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19146 <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>
19147 <div class="gallerytext">
19150 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19151 <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>
19152 <div class="gallerytext">
19160 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19161 <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>
19162 <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>
19163 <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>
19167 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19169 Gallery with template inside caption
19172 "nativeGallery": true
19175 <gallery caption="{{echo|hi}}">
19176 File:Foobar.jpg|{{echo|ho}}
19179 <ul class="gallery mw-gallery-traditional">
19180 <li class='gallerycaption'>{{echo|hi}}</li>
19181 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19182 <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>
19183 <div class="gallerytext">
19191 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19192 <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>
19193 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span 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>
19198 Gallery with wikitext inside caption
19201 "nativeGallery": true
19205 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19206 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19209 <ul class="gallery mw-gallery-traditional">
19210 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19211 <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>
19212 <div class="gallerytext">
19213 <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>
19217 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19218 <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>
19219 <div class="gallerytext">
19220 <p>This is a test template
19227 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19228 <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>
19229 <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>
19234 Gallery (with showfilename option)
19237 "nativeGallery": true
19240 <gallery showfilename="">
19241 File:Nonexistent.jpg|caption
19242 File:Nonexistent.jpg
19243 File:Foobar.jpg|some '''caption''' [[Main Page]]
19247 <ul class="gallery mw-gallery-traditional">
19248 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19249 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19250 <div class="gallerytext">
19251 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19256 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19257 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19258 <div class="gallerytext">
19259 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19263 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19264 <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>
19265 <div class="gallerytext">
19266 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19267 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19271 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19272 <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>
19273 <div class="gallerytext">
19274 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19281 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19282 <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>
19283 <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>
19284 <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>
19285 <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>
19289 ## Should Parsoid be preserving these variations?
19291 Gallery (with namespace-less filenames)
19294 "modes": ["wt2html", "html2html"],
19295 "nativeGallery": true
19299 File:Nonexistent.jpg
19305 <ul class="gallery mw-gallery-traditional">
19306 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19307 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19308 <div class="gallerytext">
19311 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19312 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19313 <div class="gallerytext">
19316 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19317 <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>
19318 <div class="gallerytext">
19321 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19322 <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>
19323 <div class="gallerytext">
19329 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19330 <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>
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 style="vertical-align: middle; display: inline-block;">Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19332 <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>
19333 <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>
19338 Gallery override link with WikiLink (T36852)
19341 "nativeGallery": true
19345 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19348 <ul class="gallery mw-gallery-traditional">
19349 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19350 <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>
19351 <div class="gallerytext">
19357 <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":{}}'>
19358 <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>
19363 Gallery override link with absolute external link (T36852)
19366 "nativeGallery": true
19370 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19373 <ul class="gallery mw-gallery-traditional">
19374 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19375 <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>
19376 <div class="gallerytext">
19382 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19383 <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>
19388 Gallery override link with malicious javascript (T36852)
19391 "modes": ["wt2html", "html2html"],
19392 "nativeGallery": true
19396 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19399 <ul class="gallery mw-gallery-traditional">
19400 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19401 <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>
19402 <div class="gallerytext">
19408 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19409 <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>
19414 Gallery with invalid title as link (T45964)
19417 "modes": ["wt2html", "html2html"],
19418 "nativeGallery": true
19422 File:Foobar.jpg|link=<
19425 <ul class="gallery mw-gallery-traditional">
19426 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19427 <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>
19428 <div class="gallerytext">
19434 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19435 <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>
19440 HTML Hex character encoding (spells the word "JavaScript")
19442 parsoid=wt2html,wt2wt,html2html
19444 JavaScript
19446 <p>JavaScript
19451 <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>
19455 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19459 <p>&#xsee;&#XSEE;
19462 <p>&#xsee;&#XSEE;</p>
19466 HTML Hex character encoding mixed case
19468 parsoid=wt2html,wt2wt,html2html
19477 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19480 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19481 # Note that U+000C (form feed) is not a valid XML character, so
19482 # it is banned even though allowed in HTML5.
19484 Illegal character references (T106578)
19489 ; Control (low): 
19490 ; Control (high):  Ÿ
19491 ; Surrogate: ��
19492 ; This is an okay astral character: 💩
19501 <dt>Control (low)</dt>
19503 <dt>Control (high)</dt>
19504 <dd>&#x7F; &#x9F;</dd>
19506 <dd>&#xD83D;&#xDCA9;</dd>
19507 <dt>This is an okay astral character</dt>
19513 __FORCETOC__ override
19525 ISBN 978-0-1234-56 789
19527 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19530 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19532 <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>
19536 ISBN followed by 5 spaces
19547 ISBN ISBN 1234567890
19549 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19552 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19555 # Uppercase X and lowercase x as well
19566 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19567 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19568 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19569 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19570 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19571 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19574 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19575 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19576 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19577 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19578 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19579 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19583 ISBN with empty prefix (parsoid test)
19587 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19590 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19594 Bug 22905: <abbr> followed by ISBN followed by </a>
19596 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19598 <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>
19601 <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>
19609 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19614 Double RFC with a wiki link
19618 <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>
19627 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19630 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19634 Centre-aligned image
19636 [[Image:foobar.jpg|centre]]
19638 <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>
19645 [[Image:foobar.jpg|none]]
19647 <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>
19652 Width + Height sized image (using px) (height is ignored)
19654 [[Image:foobar.jpg|640x480px]]
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 Width-sized image (using px, no following whitespace)
19663 [[Image:foobar.jpg|640px]]
19665 <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>
19670 Width-sized image (using px, with following whitespace - test regression from r39467)
19672 [[Image:foobar.jpg|640px ]]
19674 <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>
19679 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19681 [[Image:foobar.jpg| 640px]]
19683 <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>
19688 Image with page parameter
19692 [[File:LoremIpsum.djvu|page=2]]
19694 <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>
19697 <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>
19701 Another italics / bold test
19709 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19715 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19718 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19723 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19725 Images with the "|" character in the comment
19727 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19729 <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>
19732 <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>
19736 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19738 <html><script>alert(1);</script></html>
19740 <p><html><script>alert(1);</script></html>
19745 HTML with raw HTML ($wgRawHtml==true)
19749 <html><script>alert(1);</script></html>
19751 <p><script>alert(1);</script>
19756 Parents of subpages, one level up
19758 subpage title=[[Subpage test/L1/L2/L3]]
19762 <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>
19768 Parents of subpages, one level up, not named
19770 subpage title=[[Subpage test/L1/L2/L3]]
19774 <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>
19781 Parents of subpages, two levels up
19783 subpage title=[[Subpage test/L1/L2/L3]]
19789 <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
19790 </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>
19795 Parents of subpages, two levels up, without trailing slash or name.
19797 subpage title=[[Subpage test/L1/L2/L3]]
19806 Parents of subpages, two levels up, with lots of extra trailing slashes.
19808 subpage title=[[Subpage test/L1/L2/L3]]
19812 <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>
19817 Subpage test/L1/L2/L3Sibling
19823 Transclusion of a sibling page (one level up)
19825 subpage title=[[Subpage test/L1/L2/L3]]
19834 Transclusion of a child page
19836 subpage title=[[Subpage test/L1/L2]]
19844 # This is wt2html only in Parsoid because we add <nowiki>
19845 # because of {{..}} and we don't expect to fix that to
19846 # eliminate the nowikis selective for {{..}} markup.
19848 Non-transclusion because of too many up levels
19850 subpage title=[[Subpage test/L1/L2/L3]]
19853 {{../../../../More than parent}}
19855 <p>{{../../../../More than parent}}
19858 <p>{{../../../../More than parent}}</p>
19862 Definition list code coverage
19868 <dl><dt> title  </dt>
19870 <dt> title </dt>
19876 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19877 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19878 <dt>title</dt><dd> def</dd></dl>
19882 Don't fall for the self-closing div
19884 <div>hello world</div/>
19886 <div>hello world</div>
19895 <p>[[:Template:Msg]]
19904 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19908 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19910 Always escape literal '>' in output, not just after '<'
19924 <p>This is a test template
19925 This is a test template
19937 Inclusion of !userCanEdit() content
19941 <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>
19947 Out-of-order TOC heading levels
19956 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19958 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19960 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19961 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19964 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19966 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19967 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19973 <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>
19974 <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>
19975 <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>
19976 <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>
19977 <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>
19978 <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>
19984 ISBN with a dummy number
19994 ISBN with space-delimited number
19998 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20004 ISBN with multiple spaces, no number
20023 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20024 </p><p>ISBN 12345678901
20030 ISBN with trailing year (bug 8110)
20032 ISBN 1-234-56789-0 - 2006
20034 ISBN 1 234 56789 0 - 2006
20036 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20037 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20045 {{anchorencode:foo bar©#%n}}
20047 <p>foo_bar.C2.A9.23.25n
20052 anchorencode trims spaces
20054 {{anchorencode: __pretty__please__}}
20061 anchorencode deals with links
20063 {{anchorencode: [[hello|world]] [[hi]]}}
20070 anchorencode deals with templates
20072 {{anchorencode: {{Foo}} }}
20079 anchorencode encodes like the TOC generator: (bug 18431)
20081 === _ +:.3A%3A&&]] ===
20082 {{anchorencode: _ +:.3A%3A&&]] }}
20085 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20086 <p>.2B:.3A.253A.26.26.5D.5D
20091 Bug 6200: blockquotes and paragraph formatting
20112 Bug 8293: Use of center tag ruins paragraph formatting
20133 Parsing of overlapping (improperly nested) inline html tags
20135 <span><s>x</span></s>
20137 <p><span><s>x</span></s></span>
20140 <p><span><s>x</s></span>
20145 ### Language variants related tests
20148 Self-link in language variants
20150 title=[[Dunav]] language=sr
20152 Both [[Dunav]] and [[Дунав]] are names for this river.
20154 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
20165 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20167 title=[[Duna]] language=sr
20169 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20171 <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.
20176 Link to a section of a variant of this title shouldn't be parsed as self-link
20178 title=[[Duna]] language=sr
20180 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20182 <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.
20187 Link to pages in language variants
20191 Main Page can be written as [[Маин Паге]]
20193 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20199 Multiple links to pages in language variants
20203 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20205 <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>.
20211 Simple template in language variants
20217 <p>This is a test template
20223 Template with explicit namespace in language variants
20229 <p>This is a test template
20235 Basic test for template parameter in language variants
20239 {{парамтест|param=foo}}
20241 <p>This is a test template with parameter foo
20246 Simple category in language variants
20250 [[Category:МедиаWики Усер'с Гуиде]]
20252 cat=МедиаWики_Усер'с_Гуиде sort=
20254 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20269 ## We used to, but no longer wt2wt this test since the default serializer
20270 ## will normalize all categories to serialize on their own line.
20271 ## This wikitext usage is going to be fairly uncommon in production and
20272 ## selser will take care of preserving formatting in those scenarios.
20274 Don't convert blue categorylinks to another variant (bug 33210)
20280 [[A]][[Category:分类]]
20284 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
20285 <link rel="mw:PageProp/Category" href="Category:分类"/>
20289 Stripping -{}- tags (language variants)
20293 Latin proverb: -{Ne nuntium necare}-
20295 <p>Latin proverb: Ne nuntium necare
20301 Prevent conversion with -{}- tags (language variants)
20303 language=sr variant=sr-ec
20305 Latinski: -{Ne nuntium necare}-
20307 <p>Латински: Ne nuntium necare
20313 Prevent conversion of text with -{}- tags (language variants)
20315 language=sr variant=sr-ec
20317 Latinski: -{Ne nuntium necare}-
20319 <p>Латински: Ne nuntium necare
20325 Prevent conversion of links with -{}- tags (language variants)
20327 language=sr variant=sr-ec
20331 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20337 -{}- tags within headlines (within html for parserConvert())
20339 language=sr variant=sr-ec
20343 <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>
20349 Explicit definition of language variant alternatives
20351 language=zh variant=zh-tw
20353 -{zh:China;zh-tw:Taiwan}-, not China
20355 <p>Taiwan, not China
20361 Conversion around HTML tags
20363 language=sr variant=sr-ec
20365 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20366 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20369 <span title="ЛаCтин">ски</span>
20375 Explicit session-wise language variant mapping (A flag and - flag)
20377 language=zh variant=zh-tw
20379 Taiwan is not China.
20380 But -{A|zh:China;zh-tw:Taiwan}- is China,
20381 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20382 and -{China}- is China.
20384 <p>Taiwan is not China.
20385 But Taiwan is Taiwan,
20386 (This should be stripped!)
20387 and China is China.
20392 Explicit session-wise language variant mapping (H flag for hide)
20394 language=zh variant=zh-tw
20396 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20399 <p>(This should be stripped!)
20405 Adding explicit conversion rule for title (T flag)
20407 language=zh variant=zh-tw showtitle
20409 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20412 <p>Should be stripped!
20417 Testing that changing the language variant here in the tests actually works
20419 language=zh variant=zh showtitle
20421 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20424 <p>Should be stripped!
20429 Recursive conversion of alt and title attrs shouldn't clear converter state
20431 language=zh variant=zh-cn showtitle
20433 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20434 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20438 Should be stripped<span title="Exclamation">!</span>
20443 Bug 24072: more test on conversion rule for title
20445 language=zh variant=zh-tw showtitle
20447 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20448 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20451 <p>This should be stripped!
20452 This won't take interferes with the title rule.
20457 Partly disable title conversion if variant == main language code
20459 language=zh variant=zh title=[[ZH]] showtitle
20461 -{T|zh-cn:CN;zh-tw:TW}-
20469 Partly disable title conversion if variant == main language code, more
20471 language=zh variant=zh title=[[ZH]] showtitle
20481 Raw output of variant escape tags (R flag)
20483 language=zh variant=zh-tw
20485 Raw: -{R|zh:China;zh-tw:Taiwan}-
20487 <p>Raw: zh:China;zh-tw:Taiwan
20492 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20494 language=zh variant=zh-cn
20496 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20503 Conversion rules from [numeric-only string] to [something else] (T48634)
20505 language=zh variant=zh-cn
20507 -{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
20514 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20516 language=zh variant=zh-cn
20518 -{H|zh-cn:foo;zh-tw:;}-foobar
20525 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20527 language=zh variant=zh-cn
20529 -{H|=>zh-cn:foo;}-foobar
20536 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20538 language=zh variant=zh-cn
20547 Nested using of manual convert syntax
20549 language=zh variant=zh-hk
20551 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20553 <p>Nested: Hello Hong Kong!
20557 # Since Parsoid is starting to emit canonical wikitext for links,
20558 # [http://example.com http://example.com] will not RT back to that
20561 Proper conversion of text in external links
20563 language=sr variant=sr-ec
20566 http://www.google.com
20567 gopher://www.google.com
20568 [http://www.google.com http://www.google.com]
20569 [gopher://www.google.com gopher://www.google.com]
20570 [https://www.google.com irc://www.google.com]
20571 [ftp://www.google.com www.google.com/ftp://dir]
20572 [//www.google.com www.google.com]
20574 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20575 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20576 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20577 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20578 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20579 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20580 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20583 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20584 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20585 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20586 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20587 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20588 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20589 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20593 Do not convert roman numbers to language variants
20595 language=sr variant=sr-ec
20599 <p>Фридрих IV је цар.
20604 Unclosed language converter markup "-{"
20615 Don't convert raw rule "-{R|=>}-" to "=>"
20626 Don't break link parsing if language converter markup is in the caption.
20628 language=sr variant=sr-ec
20630 [[Main Page|-{R|main page}-]]
20632 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20637 T146304: Don't break template parsing if language converter markup is in the parameter.
20639 language=sr variant=sr-ec
20648 T146305: Don't break image parsing if language converter markup is in the caption.
20652 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
20654 <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>
20657 <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>
20661 T146305: Don't break image parsing if nested language converter markup is in the caption.
20663 language=zh variant=zh-cn
20665 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
20667 <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>
20670 <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>
20674 Don't break gallery if language converter markup is inside.
20679 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
20680 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
20683 <ul class="gallery mw-gallery-traditional">
20684 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20685 <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>
20686 <div class="gallerytext">
20687 <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>
20691 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20692 <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>
20693 <div class="gallerytext">
20694 <p>This is a test template
20702 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20704 Don't break list handling if language converter markup is in the item.
20706 language=zh variant=zh-cn
20708 ;-{zh-cn:AAA;zh-tw:BBB}-
20710 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20718 T153140: Don't break table handling if language converter markup is in the cell.
20720 language=sr variant=sr-ec
20743 Bug 529: Uncovered bullet
20752 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20753 # Templates in Wikipedia rely on this behavior, as tidy has always been
20754 # enabled there. These tests are normally run *without* tidy, so specify the
20755 # full output here.
20756 # To test realistic parsing behavior, apply a tidy-like transformation to both
20757 # the expected output and your parser's output.
20759 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20761 ******* Foo {{bullet}}
20763 <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>
20769 Bug 529: Uncovered table already at line-start
20792 Bug 529: Uncovered bullet in parser function result
20794 * Foo {{lc:{{bullet}} }}
20802 Bug 5678: Double-parsed template argument
20804 {{lc:{{{1}}}|hello}}
20811 Bug 5678: Double-parsed template invocation
20813 {{lc:{{paramtest {{!}} param = hello }} }}
20815 <p>{{paramtest | param = hello }}
20820 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20823 title=[[Main Page]]
20825 {{PRVNÍVELKÉ:ěščř}}
20826 {{prvnívelké:ěščř}}
20846 Morwen/13: Unclosed link followed by heading
20853 <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>
20858 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20865 <h1><span class="mw-headline" id="heading">heading</span></h1>
20870 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20877 <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>
20892 Paragraphs inside divs (no extra line breaks)
20904 Paragraphs inside divs (extra line break on open)
20919 Paragraphs inside divs (extra line break on close)
20934 Paragraphs inside divs (extra line break on open and close)
20951 Nesting tags, paragraphs on lines which begin with <div>
20953 <div></div><strong>A
20956 <p><strong>A</strong></p>
20957 <p><strong>B</strong></p>
20965 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20967 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20969 <blockquote>Line one
20971 Line two</blockquote>
20973 <blockquote>Line one
20974 Line two</blockquote>
20978 <p>Line one Line two</p>
20983 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20988 Line two</blockquote>
20993 Line two</blockquote>
20998 Line two</blockquote>
21002 Bug 6200: paragraphs inside blockquotes (extra line break on close)
21004 <blockquote>Line one
21009 <blockquote>Line one
21022 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
21044 Paragraphs inside blockquotes/divs (no extra line breaks)
21046 <blockquote><div>Line one
21048 Line two</div></blockquote>
21050 <blockquote><div>Line one
21051 Line two</div></blockquote>
21056 Paragraphs inside blockquotes/divs (extra line break on open)
21061 Line two</div></blockquote>
21066 Line two</div></blockquote>
21071 Paragraphs inside blockquotes/divs (extra line break on close)
21073 <blockquote><div>Line one
21076 </div></blockquote>
21078 <blockquote><div>Line one
21081 </div></blockquote>
21086 Paragraphs inside blockquotes/divs (extra line break on open and close)
21092 </div></blockquote>
21098 </div></blockquote>
21103 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21105 wgLinkHolderBatchSize=0
21111 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21112 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21113 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21118 Free external link invading image caption
21120 [[Image:Foobar.jpg|thumb|http://x|hello]]
21122 <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>
21127 Bug 15196: localised external link numbers
21131 [http://en.wikipedia.org/]
21133 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21136 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21140 Multibyte character in padleft
21142 {{padleft:-Hello|7|Æ}}
21149 Multibyte character in padright
21151 {{padright:Hello-|7|Æ}}
21158 formatdate parser function
21160 {{#formatdate:2009-03-24}}
21162 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21167 formatdate parser function, with default format
21169 {{#formatdate:2009-03-24|mdy}}
21171 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21176 Spacing of numbers in formatted dates
21178 {{#formatdate:January 15}}
21180 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21185 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
21187 language=nl title=[[MediaWiki:Common.css]]
21189 {{#formatdate:2009-03-24|dmy}}
21191 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21204 Edit comment with link
21208 I like the [[Main Page]] a lot
21210 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21214 Edit comment with link and link text
21218 I like the [[Main Page|best pages]] a lot
21220 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21224 Edit comment with link and link text with suffix
21228 I like the [[Main Page|best page]]s a lot
21230 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21234 Edit comment with section link (non-local, eg in history list)
21236 comment title=[[Main Page]]
21238 /* External links */ removed bogus entries
21240 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21244 Edit comment with section link and text before it (non-local, eg in history list)
21246 comment title=[[Main Page]]
21248 pre-comment text /* External links */ removed bogus entries
21250 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>
21254 Edit comment with section link (local, eg in diff view)
21256 comment local title=[[Main Page]]
21258 /* External links */ removed bogus entries
21260 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21264 Edit comment with subpage link (bug 14080)
21268 title=[[Subpage test]]
21270 Poked at a [[/subpage]] here...
21272 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21276 Edit comment with subpage link and link text (bug 14080)
21280 title=[[Subpage test]]
21282 Poked at a [[/subpage|neat little page]] here...
21284 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21288 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
21291 title=[[Subpage test]]
21293 Poked at a [[/subpage]] here...
21295 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21299 Edit comment with bare anchor link (local, as on diff)
21303 title=[[Main Page]]
21307 <a href="#section">#section</a>
21311 Edit comment with bare anchor link (non-local, as on history)
21314 title=[[Main Page]]
21318 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21322 Anchor starting with underscore
21328 <p><a href="#_ref">One</a>
21331 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21335 Id starting with underscore
21337 <div id="_ref"></div>
21339 <div id="_ref"></div>
21344 Edit comment with link with more than one pipe (T99346)
21348 [[Main Page|Many|pipes]]
21350 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21354 Complex edit comment with link with more than one pipe (T99346)
21358 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21360 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..."
21364 Space normalisation on autocomment (bug 22784)
21367 title=[[Main Page]]
21369 /* __hello__world__ */
21371 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21375 percent-encoding and + signs in comments (Bug 26410)
21379 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21381 <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>
21384 # Parsoid doesn't support this yet: see bug 73581
21385 # but it *should* omit the 'src' attribute if the image is bad.
21386 # PHP side of tests was disabled in
21387 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21388 # because of issues in the PHP parserTests infrastructure
21389 # (but the output below is indeed what the PHP side emits)
21391 Bad images - basic functionality
21394 !! DISABLED/html/php
21396 <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>
21400 Bad images - bug 16039: text after bad image disappears
21405 !! DISABLED/html/php
21411 <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>
21416 Verify that displaytitle works (bug #22501) no displaytitle
21420 wgAllowDisplayTitle=true
21421 wgRestrictDisplayTitle=false
21423 this is not the the title
21426 <p>this is not the the title
21431 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21436 wgAllowDisplayTitle=true
21437 wgRestrictDisplayTitle=false
21439 this is not the the title
21440 {{DISPLAYTITLE:whatever}}
21443 <p>this is not the the title
21448 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21453 wgAllowDisplayTitle=true
21454 wgRestrictDisplayTitle=true
21456 this is not the the title
21457 {{DISPLAYTITLE:whatever}}
21460 <p>this is not the the title
21465 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21470 wgAllowDisplayTitle=true
21471 wgRestrictDisplayTitle=true
21473 this is not the the title
21474 {{DISPLAYTITLE:screen}}
21477 <p>this is not the the title
21482 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21487 wgAllowDisplayTitle=false
21489 this is not the the title
21490 {{DISPLAYTITLE:screen}}
21493 <p>this is not the the title
21494 <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>
21499 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21504 wgAllowDisplayTitle=false
21506 this is not the the title
21509 <p>this is not the the title
21514 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21519 wgAllowDisplayTitle=true
21520 wgRestrictDisplayTitle=true
21522 this is not the the title
21523 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21525 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21526 <p>this is not the the title
21531 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21536 wgAllowDisplayTitle=true
21537 wgRestrictDisplayTitle=true
21539 this is not the the title
21540 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21542 <span style="color: red;">s</span>creen
21543 <p>this is not the the title
21548 Page status indicators: Empty name is invalid
21552 <indicator name=" "></indicator>
21553 <indicator></indicator>
21555 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21556 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21561 Page status indicators: Weird syntaxes that are okay
21565 <indicator name="empty" />
21566 <indicator name="name"></indicator>
21575 Page status indicators: Torture test
21579 <indicator name="01">hello world</indicator>
21580 <indicator name="02">[[Main Page]]</indicator>
21581 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21582 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21583 <indicator name="05">* foo
21585 <indicator name="06"><nowiki>foo</nowiki></indicator>
21586 <indicator name="07"> Preformatted</indicator>
21587 <indicator name="08"><div>Broken tag</indicator>
21588 <indicator name="09">{| class=wikitable
21591 <indicator name="10">Two
21593 paragraphs</indicator>
21596 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21597 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" />
21598 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>
21599 05=<ul><li> foo</li>
21603 07=<pre>Preformatted
21605 08=<div>Broken tag</div>
21607 09=<table class="wikitable">
21624 preload: check <noinclude> and <includeonly>
21628 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21634 preload: check <onlyinclude>
21638 Goodbye <onlyinclude>Hello world</onlyinclude>
21644 preload: can pass tags through if we want to
21648 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21650 <includeonly>Hello world</includeonly>
21654 preload: check that it doesn't try to do tricks
21658 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21660 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21664 Play a bit with r67090 and bug 3158
21666 <div style="width:50% !important"> </div>
21667 <div style="width:50% !important"> </div>
21668 <div style="width:50% !important"> </div>
21669 <div style="border : solid;"> </div>
21671 <div style="width:50% !important"> </div>
21672 <div style="width:50% !important"> </div>
21673 <div style="width:50% !important"> </div>
21674 <div style="border : solid;"> </div>
21677 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21678 <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>
21679 <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>
21680 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21685 HTML5 data attributes
21687 <span data-foo="bar">Baz</span>
21688 <p data-abc-def_hij="">Quuz</p>
21690 <p><span data-foo="bar">Baz</span>
21692 <p data-abc-def_hij="">Quuz</p>
21695 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21696 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21700 Strip reserved data attributes
21702 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21704 <div data-ok="fred">d</div>
21707 <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>
21711 percent-encoding and + signs in internal links (Bug 26410)
21713 [[User:+%]] [[Page+title%]]
21714 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21715 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21716 [[%33%45]] [[%33%45+]]
21718 <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>
21719 <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>
21720 <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>
21721 <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>
21724 <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>
21725 <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>
21726 <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>
21727 <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>
21731 Special characters in embedded file links (bug 27679)
21733 [[File:Contains & ampersand.jpg]]
21734 [[File:Does not exist.jpg|Title with & ampersand]]
21736 <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>
21737 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21740 <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>
21741 <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>
21745 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21747 Text's been normalized?
21749 <p>Text's been normalized?
21754 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21756 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21758 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21763 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21765 [http://www.example.org/ ideograms]
21767 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21772 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21774 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21776 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21800 Bug 31098 Template which includes system messages which includes the template
21804 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21805 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21810 Bug31490 Turkish: ucfirst 'blah'
21821 Bug31490 Turkish: ucfirst 'ix'
21832 Bug31490 Turkish: lcfirst 'BLAH'
21843 Bug31490 Turkish: ucfırst (with a dotless i)
21849 <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>
21854 Bug31490 ucfırst (with a dotless i) with English language
21860 <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>
21865 Bug 26375: TOC with italics
21867 title=[[Main Page]]
21870 == ''Lost'' episodes ==
21872 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21874 <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>
21878 <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>
21883 Bug 26375: TOC with bold
21885 title=[[Main Page]]
21888 == '''should be bold''' then normal text ==
21890 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21892 <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>
21896 <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>
21901 Bug 33845: Headings become cursive in TOC when they contain an image
21903 title=[[Main Page]]
21906 == Image [[Image:foobar.jpg]] ==
21908 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21910 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21914 <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>
21919 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21921 title=[[Main Page]]
21924 == <blockquote>Quote</blockquote> ==
21926 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21928 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21932 <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>
21936 <div id="toc" class="toc">
21937 <div id="toctitle">
21941 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21945 <h2><span class="mw-headline" id="Quote"></span></h2>
21947 <p><span class="mw-headline" id="Quote">Quote</span></p>
21949 <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>
21953 Unclosed tags in TOC
21955 title=[[Main Page]]
21959 <small>Hanc marginis exiguitas non caperet.</small>
21962 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21964 <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>
21968 <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>
21969 <p><small>Hanc marginis exiguitas non caperet.</small>
21975 Multiple tags in TOC
21978 == <i>Foo</i> <b>Bar</b> ==
21980 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21982 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21984 <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>
21985 <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>
21989 <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>
21990 <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>
21994 <div id="toc" class="toc">
21995 <div id="toctitle">
21999 <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>
22000 <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>
22004 <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>
22005 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22007 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22009 <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>
22012 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22013 # html5 tag parsing.
22015 Tags with parameters in TOC
22020 == <sup class="in-h2">Hello</sup> ==
22022 == <sup class="a > b">Evilbye</sup> ==
22024 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22026 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22027 <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>
22031 <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>
22032 <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>
22035 <meta property="mw:PageProp/toc" />
22036 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22038 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22042 span tags with directionality in TOC
22045 == <span dir="ltr">C++</span> ==
22047 == <span dir="rtl">זבנג!</span> ==
22049 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22051 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22053 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22055 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22057 <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>
22058 <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>
22059 <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>
22060 <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>
22061 <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>
22065 <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>
22066 <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>
22067 <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>
22068 <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>
22069 <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>
22074 Bug 72884: bdi element in ToC
22077 == <bdi>test</bdi> ==
22079 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22081 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22085 <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>
22090 T35715: s/strike element in ToC
22093 == <s>test</s> test <strike>test</strike> ==
22095 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22097 <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>
22101 <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>
22105 # Note that the html output does not have the <p></p>, but the
22106 # html+tidy output *does*. This is because the empty <p></p> is
22107 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22109 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22114 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
22116 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22120 <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>
22124 <div id="toc" class="toc">
22125 <div id="toctitle">
22129 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22133 <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>
22139 == {{int:headline_sample}} ==
22143 Bug 32057: Title needed when expanding <h> nodes.
22145 title=[[Main Page]]
22149 <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>
22154 Strip marker in urlencode
22156 {{urlencode:x<nowiki/>y}}
22157 {{urlencode:x<nowiki/>y|wiki}}
22158 {{urlencode:x<nowiki/>y|path}}
22159 {{urlencode:x<pre id="one">two</pre>y}}
22187 Strip marker in formatNum
22189 {{formatnum:1<nowiki/>2}}
22190 {{formatnum:1<nowiki/>2|R}}
22198 Check noCommafy in formatNum
22202 {{formatnum:123456.78}}
22203 {{formatnum:123456.78|NOSEP}}
22211 Wrong option for formatNum (bug 56199)
22213 {{formatnum:1,234.56|Random}}
22214 {{formatnum:1,234.56|EVERYTHING}}
22215 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22224 Strip marker in grammar
22228 {{grammar:elative|foo<nowiki/>bar}}
22235 Strip marker in padleft
22237 {{padleft:|2|x<nowiki/>y}}
22244 Strip marker in padright
22246 {{padright:|2|x<nowiki/>y}}
22253 Strip marker in anchorencode
22255 {{anchorencode:x<nowiki/>y}}
22262 nowiki inside link inside heading (bug 18295)
22264 ==[[foo|x<nowiki>y</nowiki>z]]==
22266 <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>
22271 new support for bdi element (bug 31817)
22273 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22275 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22280 Ignore pipe between table row attributes
22284 |- id=foo | style='color: red'
22292 <tr id="foo" style="color: red">
22299 Gallery override link with WikiLink (bug 34852)
22302 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
22305 <ul class="gallery mw-gallery-traditional">
22306 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22307 <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>
22308 <div class="gallerytext">
22318 Gallery override link with absolute external link (bug 34852)
22321 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
22324 <ul class="gallery mw-gallery-traditional">
22325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22326 <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>
22327 <div class="gallerytext">
22337 Gallery override link with absolute external link with LanguageConverter
22342 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
22345 <ul class="gallery mw-gallery-traditional">
22346 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22347 <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>
22348 <div class="gallerytext">
22358 Gallery override link with malicious javascript (bug 34852)
22361 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
22364 <ul class="gallery mw-gallery-traditional">
22365 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22366 <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>
22367 <div class="gallerytext">
22377 Gallery with invalid title as link (bug 43964)
22380 File:foobar.jpg|link=<
22383 <ul class="gallery mw-gallery-traditional">
22384 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22385 <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>
22386 <div class="gallerytext">
22394 Language parser function
22403 Padleft and padright as substr
22405 {{padleft:|3|abcde}}
22406 {{padright:|3|abcde}}
22414 Special parser function
22416 {{#special:RandomPage}}
22417 {{#special:BaDtItLe}}
22418 {{#special:Foobar}}
22427 Bug 34939 - Case insensitive link parsing ([HttP://])
22429 [HttP://MediaWiki.Org/]
22431 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22434 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22438 Bug 34939 - Case insensitive link parsing ([HttP:// title])
22440 [HttP://MediaWiki.Org/ MediaWiki]
22442 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22447 Bug 34939 - Case insensitive link parsing (HttP://)
22449 HttP://MediaWiki.Org/
22451 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22454 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22472 <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>
22473 <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>
22474 <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>
22475 <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>
22476 <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>
22482 ### Parsoid-specific tests
22483 ### Parsoid-PHP parser incompatibilities
22486 1. SOL-sensitive wikitext tokens as template-args
22488 parsoid=wt2html,wt2wt
22494 <span about="#mwt1" typeof="mw:Transclusion">
22495 </span><ul about="#mwt1"><li>a</li>
22497 <span about="#mwt2" typeof="mw:Transclusion">
22498 </span><ol about="#mwt2"><li>a</li>
22500 <span about="#mwt3" typeof="mw:Transclusion">
22501 </span><dl about="#mwt3"><dd>a</dd>
22505 #### -----------------------------------------------------------------
22506 #### Parsoid-specific functionality tests
22507 #### -----------------------------------------------------------------
22509 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22510 # We know wt2wt will fail, but we expect selser to pass.
22511 # Due to the nature of our testing, wt2wt and selser tests will enter the
22512 # blacklist and we'll catch selser regressions based on changes to the
22513 # blacklist entries for selser tests.
22515 1. Bad treebuilder fixup of formatting elt is cleaned up
22517 parsoid=wt2html,wt2wt
22522 [[Image:Foobar.jpg|right|Test]]
22529 <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>
22536 2. Bad treebuilder fixup of formatting elt is cleaned up
22538 parsoid=wt2html,wt2wt
22540 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22542 <small>[[Image:Foobar.jpg|right|300px]]</small>
22546 <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>
22548 <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>
22552 3. Bad treebuilder fixup of formatting elt is cleaned up
22554 parsoid=wt2html,wt2wt
22556 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22558 <p><small><b>foo</b></small></p>
22559 <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>
22560 <p><small><b>bar</b></small></p>
22564 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22566 parsoid=wt2html,wt2wt
22568 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22570 <p><b><small></small></b></p>
22571 <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>
22575 #### ----------------------------------------------------------------
22576 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22577 #### tags. Parsoid's output for these tags differs from that of the
22579 #### ----------------------------------------------------------------
22582 Ref: 1. ref-location should be replaced with an index span
22585 B <ref name="x">foo</ref>
22589 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22590 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-2"},"attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-2"><span class="mw-reflink-text">[2]</span></a></span>
22591 C <span about="#mwt6" class="mw-ref" id="cite_ref-y_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="./Main_Page#cite_note-y-3"><span class="mw-reflink-text">[3]</span></a></span></p>
22592 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22593 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22594 <li about="#cite_note-x-2" id="cite_note-x-2"><a href="./Main_Page#cite_ref-x_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-x-2" class="mw-reference-text">foo</span></li>
22595 <li about="#cite_note-y-3" id="cite_note-y-3"><a href="./Main_Page#cite_ref-y_3-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-y-3" class="mw-reference-text"></span></li>
22600 Ref: 2. ref-tags with identical names should all get the same index
22602 A <ref name="x">foo</ref>
22606 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22607 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22608 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22609 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22614 Ref: 3. spaces in ref-names should be ignored
22616 A <ref name="x">foo</ref>
22617 B <ref name=" x " />
22621 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22622 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22623 C <span about="#mwt6" class="mw-ref" id="cite_ref-x_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="./Main_Page#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22624 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22625 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a><a href="./Main_Page#cite_ref-x_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22629 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22631 Ref: 4. 'constructor' should be accepted as a valid ref-name
22633 A <ref name="constructor">foo</ref>
22636 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-constructor-1"},"attrs":{"name":"constructor"}}'><a href="./Main_Page#cite_note-constructor-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22637 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22638 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><a href="./Main_Page#cite_ref-constructor_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
22643 Ref: 5. body should accept generic wikitext
22646 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22651 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22653 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22654 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">This is a <b><a rel="mw:WikiLink" href="Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
22660 Ref: 6. indent-pres should not be output in ref-body
22670 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22672 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22673 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
22681 Ref: 7. No p-wrapping in ref-body
22698 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22700 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22701 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
22716 Ref: 8. transclusion wikitext has lower precedence
22718 A <ref> foo {{echo|</ref> B C}}
22722 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C}}</p>
22723 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22724 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo {{echo|</span></li>
22729 Ref: 9. unclosed comments should not leak out of ref-body
22731 A <ref> foo <!--</ref> B C
22734 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22735 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22736 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <!----></span></li>
22741 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22743 A <ref> <b> foo </ref> B C
22747 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22750 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22751 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
22756 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22762 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
22763 C <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> D</p>
22764 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22765 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22766 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22771 Ref: 12. ref-tags act as trailing newline migration barrier
22773 <!--the newline at the end of this line moves out of the p tag-->a
22775 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22781 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22784 <p>b<!--the newline at the end of this line stays inside the p tag--> <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22785 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22788 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22789 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"></span></li>
22790 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"></span></li></ol>
22794 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22801 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> A
22802 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> B</p>
22803 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22804 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22805 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar
22810 ## Roundtripping fails because of nowiki'ing
22812 Ref: 14. A nested ref-tag should be emitted as plain text
22816 <ref>foo <ref>bar</ref> baz</ref>
22820 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span> baz</ref></p>
22822 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo <ref>bar</span></li></ol>
22826 Ref: 15. ref-tags with identical names should get identical indexes
22828 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22829 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22833 <p>A1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a-1"},"attrs":{"name":"a"}}'><a href="./Main_Page#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span> A2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="./Main_Page#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22834 B1 <span about="#mwt7" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="./Main_Page#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span> B2 <span about="#mwt8" class="mw-ref" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="./Main_Page#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22836 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-a_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-a_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-b_2-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-b_2-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22840 ## We don't bother wt2wt-ing non-standard whitespace
22842 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22850 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22851 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22852 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
22856 Ref: 17. Generate valid HTML5 id/about attributes
22858 <ref name="a b">foo</ref>
22859 <ref name=":0">ve-created name</ref>
22863 <p><span about="#mwt2" class="mw-ref" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_b-1"},"attrs":{"name":"a b"}}'><a href="./Main_Page#cite_note-a_b-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span>
22864 <span about="#mwt4" class="mw-ref" id="cite_ref-:0_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-:0-2"},"attrs":{"name":":0"}}'><a href="./Main_Page#cite_note-:0-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></span>
22866 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a_b-1" id="cite_note-a_b-1"><a href="./Main_Page#cite_ref-a_b_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">foo</span></li><li about="#cite_note-:0-2" id="cite_note-:0-2"><a href="./Main_Page#cite_ref-:0_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-:0-2" class="mw-reference-text">ve-created name</span></li></ol>
22871 Ref: 18. T58916: Extension attributes should be parsed as plain text
22873 <ref name="{{echo|a}}">foo</ref>
22877 <p><span class="mw-ref" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1"},"attrs":{"name":"{{echo|a}}"}}'><a href="./Main_Page#cite_note-.7B.7Becho.7Ca.7D.7D-1"><span class="mw-reflink-text">[1]</span></a></span>
22880 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22881 <li about="#cite_note-.7B.7Becho.7Ca.7D.7D-1" id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><a href="./Main_Page#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1" class="mw-reference-text">foo</span></li>
22886 Ref: 19. ref-tags with identical name encodings should get identical indexes
22888 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22892 <p>1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_.26_b-1"},"attrs":{"name":"a & b"}}'><a href="./Main_Page#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span> 2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="./Main_Page#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22894 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22895 <li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-a_.26_b_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-a_.26_b_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_.26_b-1" class="mw-reference-text">foo</span></li>
22900 Ref: 20. ref-tags with identical names but different content should keep it
22902 A <ref name="foo">Foo one</ref>
22903 B <ref name="foo">Foo two</ref>
22904 C <ref name="foo" />
22908 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-foo_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-foo-1"},"attrs":{"name":"foo"}}'><a href="./Main_Page#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22909 B <span about="#mwt4" class="mw-ref" id="cite_ref-foo_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo two"},"attrs":{"name":"foo"}}'><a href="./Main_Page#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22910 C <span about="#mwt6" class="mw-ref" id="cite_ref-foo_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"foo"}}'><a href="./Main_Page#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22912 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-foo-1" id="cite_note-foo-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-foo_1-0"><span class="mw-linkback-text">1 </span></a><a href="./Main_Page#cite_ref-foo_1-1"><span class="mw-linkback-text">2 </span></a><a href="./Main_Page#cite_ref-foo_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-foo-1" class="mw-reference-text">Foo one</span></li>
22917 References: 1. references tag without any refs should be handled properly
22921 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22925 References: 2. references tag with group only outputs references from that group
22927 A <ref group="a">foo</ref>
22928 B <ref group="b">bar</ref>
22931 <references group="a" />
22933 <references group="b" />
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":{"group":"a"}}'><a href="./Main_Page#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22936 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"b"}}'><a href="./Main_Page#cite_note-2" data-mw-group="b"><span class="mw-reflink-text">[b 1]</span></a></span>
22937 C <span class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="./Main_Page#cite_note-3"><span class="mw-reflink-text">[1]</span></a></span></p>
22939 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22940 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22942 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22943 <li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">baz</span></li>
22945 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22946 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" data-mw-group="b" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22951 References: 3. ref list should be cleared after processing references
22961 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22963 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22966 <p>B <span about="#mwt6" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22968 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22969 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22974 References: 4. only referenced group should be cleared after processing references
22976 A <ref group="a">afoo</ref>
22979 <references group="a" />
22985 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="./Main_Page#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22986 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22988 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">afoo</span></li>
22991 <p>C <span about="#mwt8" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="./Main_Page#cite_note-3"><span class="mw-reflink-text">[2]</span></a></span></p>
22993 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bfoo</span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">cfoo</span></li>
22997 ## Don't expect this to rt since we're dropping content
22999 References: 5. ref tags in references should be processed while ignoring all other content
23001 parsoid=wt2html,html2html
23004 B <ref name="b">bar</ref>
23007 <ref name="a">foo</ref>
23008 This should just get lost.
23011 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="./Main_Page#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
23012 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="./Main_Page#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
23015 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{},"body":{"html":"\n<span about=\"#mwt8\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-a-1\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"./Main_Page#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>\n"}}'><li about="#cite_note-a-1" id="cite_note-a-1"><a href="./Main_Page#cite_ref-a_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><a href="./Main_Page#cite_ref-b_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
23020 References: 6. <references /> from a transclusion
23022 <ref>Foo</ref> {{echo|<references />}}
23024 <p><span about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p> <ol class="mw-references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">Foo</span></li>
23029 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
23031 A <ref>foo bar for a</ref>
23032 B <ref group="X" name="b" />
23036 <references group="X">
23037 <ref name="b">foo</ref>
23040 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
23041 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="./Main_Page#cite_note-b-2" data-mw-group="X"><span class="mw-reflink-text">[X 1]</span></a></span>
23044 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
23045 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo bar for a</span></li>
23048 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","attrs":{"group":"X"},"body":{"html":"\n<span about=\"#mwt10\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-b-2\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"./Main_Page#cite_note-b-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"X\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[X 1]</span></a></span>\n"}}'>
23049 <li about="#cite_note-b-2" id="cite_note-b-2"><a href="./Main_Page#cite_ref-b_2-0" data-mw-group="X" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">foo</span></li>
23054 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
23056 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
23059 <p>X<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
23060 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt7" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</span></li>
23064 # This test only works in wt2html now as the <references /> are always generated
23065 # unless selser is active. Once T72722 is fixed, we should add a changes test
23066 # here to ensure that unrelated changes don't add the new <references />
23067 # when selser is active.
23069 References: 9. Generate missing references list at the end
23072 B <ref group="inexistent">bar</ref>
23074 <p>A <span class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B <span class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"inexistent"}}'><a href="./Main_Page#cite_note-2" data-mw-group="inexistent"><span class="mw-reflink-text">[inexistent 1]</span></a></span></p>
23075 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
23076 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
23078 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
23079 <li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" data-mw-group="inexistent" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
23084 References: 10. New <references/> shouldn't be added for unrelated edits.
23087 "modes": ["selser"],
23088 "changes": [["#x", "remove"]],
23092 Unrelated text<span id="x"> that's going to disappear</span>.
23100 Entities in ref name
23102 <ref name="test & me">hi</ref>
23105 <p><span about="#mwt2" class="mw-ref" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-test_.26_me-1"},"attrs":{"name":"test &amp; me"}}'><a href="./Main_Page#cite_note-test_.26_me-1"><span class="mw-reflink-text">[1]</span></a></span></p>
23106 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23107 <li about="#cite_note-test_.26_me-1" id="cite_note-test_.26_me-1"><a href="./Main_Page#cite_ref-test_.26_me_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-test_.26_me-1" class="mw-reference-text">hi</span></li>
23111 ## The output here may look funny, but it's what the php parser will do. The
23112 ## unclosed references tag becomes escaped text, and then a new references
23113 ## tag is auto-generated. The test is wt2html only because it roundtrips with
23114 ## nowiki tags, and the auto-generated references tag is only dropped in
23117 Generate references for unclosed references tag
23125 <p>a<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
23127 <p><references></p>
23128 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
23132 New reference serializes on its own line
23134 parsoid=wt2wt,html2wt
23139 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
23142 #### ----------------------------------------------------------------
23143 #### Parsoid-only testing of Parsoid's impl of LST
23144 #### Not implemented yet, see
23145 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
23146 #### ----------------------------------------------------------------
23148 ## We still need to support serializing the older format while content is stored.
23150 LST Sections: Backwards compatibility
23153 "suppressErrors": true,
23154 "modes": ["html2wt"]
23157 <section begin="2011-05-16" />
23158 <section end="2014-04-10 (MW 1.23wmf22)" />
23160 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
23161 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
23164 ## The unconventional output is the result of `usePHPPreProcessor` being
23165 ## disabled in parserTests.js. This test is mainly just to show <section> is
23166 ## recognized as an extension tag w/o a native handler.
23168 LST Sections: Newfangled approach
23170 parsoid={ "suppressErrors": true }
23172 <section begin="2011-05-16" />
23173 <section end="2014-04-10 (MW 1.23wmf22)" />
23175 <p><span typeof="mw:Extension/section" about="#mwt1" data-parsoid='{"stx":"html","selfClose":true,"src":"<section begin=\"2011-05-16\" />","tagWidths":[30,0]}'><section begin="2011-05-16" /></span>
23176 <span typeof="mw:Extension/section" about="#mwt2" data-parsoid='{"stx":"html","selfClose":true,"src":"<section end=\"2014-04-10 (MW 1.23wmf22)\" />","tagWidths":[43,0]}'><section end="2014-04-10 (MW 1.23wmf22)" /></span></p>
23179 #--------- Test stripping of empty nodes in template content ----------
23181 Empty LI and TR nodes should be stripped from template content
23186 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23190 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23203 Empty LI and TR nodes should not be stripped from top-level content
23230 Empty TR nodes should not be stripped if they have any attributes set
23232 {{EmptyTRWithHTMLAttrTest}}
23234 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23235 <tr align="center"></tr>
23236 <tr><td>foo</td></tr>
23237 <tr align="center"></tr>
23238 <tr><td>bar</td></tr>
23242 #### ----------------------------------------------------------------
23243 #### The following section of tests are primarily to test
23244 #### wikitext escaping capabilities of Parsoid. Given that
23245 #### escaping can be done any number of ways, the wikitext (input)
23246 #### is always adjusted to reflect how Parsoid adds nowiki
23249 #### We are marking several tests as parsoid-only since the
23250 #### HTML in the result section is different from what the
23251 #### PHP parser generates for it.
23252 #### ----------------------------------------------------------------
23255 #### --------------- Headings ---------------
23257 #### 1. Nested inside html <h1>=foo=</h1>
23258 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23259 #### 3. Nested inside html with wikitext split by html tags
23260 #### 4. No escape needed
23261 #### 5. Empty headings <h1></h1>
23262 #### 6. Heading chars in SOL context
23263 #### ----------------------------------------
23265 Headings: 0. Unnested
23275 <p>=foo<i>a</i>=</p>
23277 <nowiki>=foo=</nowiki>
23279 <nowiki> </nowiki>=foo=
23281 <nowiki>=foo=</nowiki>
23283 =foo''a''<nowiki>=</nowiki>
23286 # New headings and existing headings are handled differently
23288 Headings: 1. Nested inside html
23296 <h1 data-parsoid=''>=foo=</h1>
23297 <h2 data-parsoid=''>=foo=</h2>
23298 <h3 data-parsoid=''>=foo=</h3>
23299 <h4 data-parsoid=''>=foo=</h4>
23300 <h5 data-parsoid=''>=foo=</h5>
23301 <h6 data-parsoid=''>=foo=</h6>
23309 =<nowiki>=foo=</nowiki>=
23310 ==<nowiki>=foo=</nowiki>==
23311 ===<nowiki>=foo=</nowiki>===
23312 ====<nowiki>=foo=</nowiki>====
23313 =====<nowiki>=foo=</nowiki>=====
23314 ======<nowiki>=foo=</nowiki>======
23319 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23328 <nowiki>*</nowiki>bar
23334 <nowiki>=bar=</nowiki>
23338 Headings: 3. Nested inside html with wikitext split by html tags
23342 <h1>=<b>bold</b>foo=</h1>
23344 = ='''bold'''foo= =
23348 Headings: 4a. No escaping needed (testing just h1 and h2)
23359 <h1><i>=</i>foo=</h1>
23379 Headings: 4b. No escaping needed (inside p-tags)
23394 Headings: 5. Empty headings
23398 <h1 data-parsoid='{}'></h1>
23400 <h2 data-parsoid='{}'></h2>
23402 <h3 data-parsoid='{}'></h3>
23404 <h4 data-parsoid='{}'></h4>
23406 <h5 data-parsoid='{}'></h5>
23408 <h6 data-parsoid='{}'></h6>
23418 =====<nowiki/>=====
23420 ======<nowiki/>======
23424 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23434 <nowiki>=a=</nowiki>
23436 <nowiki>=a=</nowiki>
23438 <nowiki>=a=</nowiki>
23442 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23455 <nowiki>=a=</nowiki>
23458 <nowiki>=a=</nowiki>
23461 <nowiki>=a=</nowiki>
23466 Headings: 6c. Heading chars in SOL context (leading newline break)
23474 <nowiki>=b=</nowiki>
23478 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23482 <!--c0--><p>=a=</p>
23484 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23486 <!--c0--><nowiki>=a=</nowiki>
23488 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23492 Headings: 6d. Heading chars in SOL context (No escaping needed)
23502 Headings: 7. Insert a newline between new content and headings
23508 <h2 data-parsoid='{}'>A</h2>
23509 <p data-parsoid='{}'>a</p>
23519 #### --------------- Lists ---------------
23520 #### 0. Outside nests (*foo, etc.)
23521 #### 1. Nested inside html <ul><li>*foo</li></ul>
23522 #### 2. Inside definition lists
23523 #### 3. Only bullets at start should be escaped
23524 #### 4. No escapes needed
23525 #### 5. No unnecessary escapes
23526 #### 6. Escape bullets in SOL position
23527 #### 7. Escape bullets in a multi-line context
23528 #### ----------------------------------------
23531 Lists: 0. Outside nests
23541 <nowiki>*</nowiki>foo
23543 <nowiki>#</nowiki>foo
23545 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23548 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23549 ## to test wikitext escaping, and insignificant whitespace diffs
23550 ## cause PHP parser tests to barf
23552 Lists: 1. Nested inside html (No unnecessary escapes)
23561 <li data-parsoid='{}'>*foo</li>
23562 <li data-parsoid='{}'>#foo</li>
23563 <li data-parsoid='{}'>:foo</li>
23564 <li data-parsoid='{}'>;foo</li>
23572 <li data-parsoid='{}'>*foo</li>
23573 <li data-parsoid='{}'>#foo</li>
23574 <li data-parsoid='{}'>:foo</li>
23575 <li data-parsoid='{}'>;foo</li>
23582 *<nowiki>*foo</nowiki>
23583 *<nowiki>#foo</nowiki>
23584 *<nowiki>:foo</nowiki>
23585 *<nowiki>;foo</nowiki>
23591 #<nowiki>*foo</nowiki>
23592 #<nowiki>#foo</nowiki>
23593 #<nowiki>:foo</nowiki>
23594 #<nowiki>;foo</nowiki>
23598 Lists: 2. Inside definition lists
23602 <dl><dt>;foo</dt></dl>
23603 <dl><dt>:foo</dt></dl>
23606 <dl><dd>:foo</dd></dl>
23610 ; <nowiki>:foo</nowiki>
23612 ; <nowiki>:foo</nowiki>
23619 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23625 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23629 *<nowiki>*foo</nowiki>''it''*bar
23633 Lists: 4. No escapes needed
23646 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23650 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23664 Lists: 5. No unnecessary escapes
23668 <ul><li> bar <span>[[foo]]</span></li></ul>
23669 <ul><li> =bar <span>[[foo]]</span></li></ul>
23670 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23671 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23672 <ul><li> =bar <span>foo]]</span>=</li></ul>
23673 <ul><li> <s></s>: a</li></ul>
23674 <ul><li> <i>* foo</i></li></ul>
23677 * bar <span><nowiki>[[foo]]</nowiki></span>
23679 * =bar <span><nowiki>[[foo]]</nowiki></span>
23681 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23683 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23685 * =bar <span>foo]]</span>=
23693 Lists: 6. Escape bullets in SOL position
23697 <p><!--cmt-->*foo</p>
23699 <!--cmt--><nowiki>*</nowiki>foo
23703 Lists: 7. Escape bullets in a multi-line context
23712 <nowiki>*</nowiki>b
23716 Lists: 8. Escape colons only if not present in tags
23720 <dl><dt>a:b<i>c:d</i></dt></dl>
23722 ; <nowiki>a:b</nowiki>''c:d''
23725 #### --------------- HRs ---------------
23726 #### 1. Single line
23727 #### -----------------------------------
23730 HRs: 1. Single line
23738 ----<nowiki>----</nowiki>
23743 #### --------------- Tables ---------------
23744 #### 1a. Simple example
23745 #### 1b. No escaping needed (!foo)
23746 #### 1c. No escaping needed (|foo)
23747 #### 1d. No escaping needed (|}foo)
23749 #### 2a. Nested in td (<td>foo|bar</td>)
23750 #### 2b. Nested in td (<td>foo||bar</td>)
23751 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23753 #### 3a. Nested in th (<th>foo!bar</th>)
23754 #### 3b. Nested in th (<th>foo!!bar</th>)
23755 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23759 #### 4c. No escaping needed
23760 #### --------------------------------------
23763 Tables: 1a. Simple example
23771 <nowiki>{|</nowiki>
23776 Tables: 1b. No escaping needed
23787 Tables: 1c. No escaping needed
23798 Tables: 1d. No escaping needed
23809 Tables: 2a. Nested in td
23814 <td>foo|bar</td></tr>
23815 <tr><td>x<div>a|b</div></td>
23819 |<nowiki>foo|bar</nowiki>
23821 |x<div><nowiki>a|b</nowiki></div>
23837 Tables: 2b. Nested in td
23843 <td>a<i>b||c</i></td>
23844 <td>a<i><div>b||c</div></i></td>
23845 </tr></tbody></table>
23848 |<nowiki>foo||bar</nowiki>
23849 |a''<nowiki>b||c</nowiki>''
23850 |a''<div><nowiki>b||c</nowiki></div>''
23859 <td>a<i><div>b||c</div></i>
23865 Tables: 2c. Nested in td -- no escaping needed
23881 Tables: 3a. Nested in th
23897 Tables: 3b. Nested in th
23902 <tr><th>foo!!bar</th>
23903 <th><i>foo|bar</i></th>
23904 <th><i>foo!!bar</i></th>
23905 <th><i><span>foo!!bar</span></i></th>
23906 </tr></tbody></table>
23909 !<nowiki>foo!!bar</nowiki>
23910 !''<nowiki>foo|bar</nowiki>''
23911 !''<nowiki>foo!!bar</nowiki>''
23912 !''<span><nowiki>foo!!bar</nowiki></span>''
23921 <th><i>foo!!bar</i>
23923 <th><i><span>foo!!bar</span></i>
23929 Tables: 3c. Nested in th
23934 <tr><th>foo||bar</th>
23935 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23936 </tr></tbody></table>
23939 !<nowiki>foo||bar</nowiki>
23940 !<nowiki>foo||bar</nowiki>
23953 Tables: 4a. Escape -
23969 |<nowiki>-bar</nowiki>
23974 Tables: 4b. Escape +
23990 |<nowiki>+bar</nowiki>
23995 Tables: 4c. No escaping needed
24000 <tr><td>foo-bar</td><td>foo+bar</td></tr>
24001 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
24007 <div>a|b</div></td>
24052 Tables: 4d. No escaping needed
24057 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
24058 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
24059 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
24070 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
24080 T97430: Don't emit empty nowiki pairs around marker meta tags
24084 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24085 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
24087 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24088 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
24092 Unclosed xmlish element in table line shouldn't eat end delimiters
24097 <tbody><tr><td> <foo</td>
24098 <td> bar></td></tr>
24115 #### --------------- Links ----------------
24116 #### 1. Quote marks in link text
24117 #### 2. Wikilinks: Escapes needed
24118 #### 3. Wikilinks: No escapes needed
24119 #### 4. Extlinks: Escapes needed
24120 #### 5. Extlinks: No escapes needed
24121 #### --------------------------------------
24123 Links 1. WikiLinks: No escapes needed
24127 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
24128 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
24129 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
24133 [[Foo|x [Foobar] x]]
24135 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
24136 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
24137 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
24142 Links 2. WikiLinks: Escapes needed
24146 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
24147 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
24148 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
24149 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
24150 <a href="Foo" rel="mw:WikiLink">|Bar</a>
24151 <a href="Foo" rel="mw:WikiLink">]]bar</a>
24152 <a href="Foo" rel="mw:WikiLink">[[bar</a>
24153 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
24154 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
24155 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
24157 [[Foo|<nowiki>Foobar]</nowiki>]]
24158 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
24159 [[Foo|<nowiki>[[Bar]]</nowiki>]]
24160 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
24161 [[Foo|<nowiki>|Bar</nowiki>]]
24162 [[Foo|<nowiki>]]bar</nowiki>]]
24163 [[Foo|<nowiki>[[bar</nowiki>]]
24164 [[Foo|<nowiki>x [[ y</nowiki>]]
24165 [[Foo|<nowiki>x ]] y</nowiki>]]
24166 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
24168 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
24169 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
24170 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
24171 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24172 <a href="/wiki/Foo" title="Foo">|Bar</a>
24173 <a href="/wiki/Foo" title="Foo">]]bar</a>
24174 <a href="/wiki/Foo" title="Foo">[[bar</a>
24175 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24176 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24177 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24182 Links 3. WikiLinks: No escapes needed
24186 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24187 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24192 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24193 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24198 Links 4. ExtLinks: Escapes needed
24202 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24203 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
24204 <p>[http://google.com]</p>
24205 <p>[http://google.com google]</p>
24206 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24207 <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>
24209 [http://google.com <nowiki>[google]</nowiki>]
24210 [http://google.com <nowiki>google]</nowiki>]
24212 <nowiki>[http://google.com]</nowiki>
24214 <nowiki>[http://google.com google]</nowiki>
24216 [http://google.com<nowiki>]</nowiki>
24218 [{{echo|http://google.com}}<nowiki>]</nowiki>
24220 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24221 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24222 </p><p>[http://google.com]
24223 </p><p>[http://google.com google]
24224 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24225 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24230 Links 5. ExtLinks: No escapes needed
24234 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24235 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24237 [http://google.com [google]
24239 [[http://google.com]]
24241 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24242 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24247 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
24251 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24252 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24253 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24254 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24255 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24256 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24257 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24258 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24259 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24260 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24261 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24262 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24263 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24266 x<nowiki/>http://example.com<nowiki/>y
24267 http://example.com<nowiki/>?x
24268 http://example.com<nowiki/>&x
24269 http://example.com<nowiki/>'x
24270 http://example.com<nowiki/>,x
24271 http://example.com<nowiki/>.x
24272 http://example.com<nowiki/>;x
24273 http://example.com<nowiki/>:x
24274 http://example.com<nowiki/>;x
24275 http://example.com<nowiki/>!x
24276 http://example.com<nowiki/>=x
24277 http://example.com<nowiki/>(x)
24278 http://example.com(x<nowiki/>)
24282 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24287 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24289 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24290 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24291 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24292 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24293 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24299 "http://example.com"
24300 (http://example.com)
24301 (http://example.com) foo
24302 http://example.com,
24303 http://example.com, foo
24306 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24308 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24309 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24310 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24311 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24312 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24317 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
24321 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24322 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24324 http://example.com.,;:!?\
24325 -http://example.com:
24327 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24328 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24333 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
24337 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24338 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24339 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24343 X<nowiki/>RFC 123<nowiki/>y
24347 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
24351 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24352 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24353 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24360 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24361 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24362 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24367 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
24371 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24372 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24373 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24377 X<nowiki/>PMID 123<nowiki/>y
24381 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
24385 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24386 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24387 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24394 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24395 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24396 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24401 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
24405 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24406 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24407 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24410 ISBN 1234567890<nowiki/>1
24411 ISBN 1234567890<nowiki/>x
24412 a<nowiki/>ISBN 1234567890<nowiki/>b
24416 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
24420 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24424 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24429 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24433 <p>this is not a link: http://example.com
24436 this is not a link: <nowiki>http://example.com</nowiki>
24440 Links 15. Link trails can't become link prefixes.
24445 <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>
24447 [[Söfnuður]]-[[00]]
24449 <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>
24453 #### --------------- Quotes ---------------
24454 #### 1. Quotes inside <b> and <i>
24455 #### 2. Link fragments separated by <i> and <b> tags
24456 #### 3. Link fragments inside <i> and <b>
24457 #### 4. No escaping needed
24458 #### --------------------------------------
24460 1a. Quotes inside <b> and <i>
24471 <b>foo'<i>bar'</i>baz</b>
24480 <i>fools'<span> errand</span></i>
24481 <i><span>fool</span>'s errand</i>
24482 '<i>foo</i> bar '<i>baz</i>
24483 a|!*#-:;+-~[]{}b'<i>x</i>
24487 ''<nowiki>''foo''</nowiki>''
24488 ''<nowiki>'''foo'''</nowiki>''
24490 '''<nowiki/>'foo''''
24491 '''<nowiki>''foo''</nowiki>'''
24492 '''<nowiki>'''foo'''</nowiki>'''
24493 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24494 '''foo'''<nowiki/>'s
24500 '''foo'''<nowiki/>'
24501 ''''foo'''<nowiki/>'
24502 ''fools'<span> errand</span>''
24503 ''<span>fool</span>'s errand''
24504 '<nowiki/>''foo'' bar '''baz''
24505 a|!*#-:;+-~[]{}b'''x''
24509 1b. Quotes inside <b> and <i> with other tags on same line
24513 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24514 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24515 <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>
24516 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24517 '<i>foo</i> <span class="mw-ref" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
24518 '<i>foo</i> <div title="name">test</div>
24519 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24520 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24521 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
24524 '''a'' foo ''[[bar]]''
24525 ''a''' foo ''[[bar]]''
24526 ''a''' foo '''{{echo|[[bar]]}}'''
24527 [[foo]] x'''[[bar]]''
24528 '''foo'' <ref>test</ref>
24529 '''foo'' <div title="name">test</div>
24530 '''foo'' and <br> bar
24535 2. Link fragments separated by <i> and <b> tags
24539 <p>[[<i>foo</i>hello]]</p>
24540 <p>[[<b>foo</b>hello]]</p>
24542 [[''foo''<nowiki>hello]]</nowiki>
24544 [['''foo'''<nowiki>hello]]</nowiki>
24547 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24548 # this is one of the shortcomings of this format
24550 3. Link fragments inside <i> and <b>
24554 <p><i>[[foo</i>]]</p>
24555 <p><b>[[foo</b>]]</p>
24557 ''[[foo''<nowiki>]]</nowiki>
24559 '''[[foo'''<nowiki>]]</nowiki>
24563 4. No escaping needed
24567 <p>'<span><i>bar</i></span>'
24568 '<span><b>bar</b></span>'
24572 '<span>''bar''</span>'
24573 '<span>'''bar'''</span>'
24577 #### ----------- Paragraphs ---------------
24578 #### 1. No unnecessary escapes
24579 #### --------------------------------------
24582 1. No unnecessary escapes
24586 <p>bar <span>[[foo]]</span>
24587 </p><p>=bar <span>[[foo]]</span>
24588 </p><p>[[bar <span>[[foo]]</span>
24589 </p><p>]]bar <span>[[foo]]</span>
24590 </p><p>=bar <span>foo]]</span>=
24593 bar <span><nowiki>[[foo]]</nowiki></span>
24595 =bar <span><nowiki>[[foo]]</nowiki></span>
24597 [[bar <span><nowiki>[[foo]]</nowiki></span>
24599 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24601 =bar <span>foo]]</span><nowiki>=</nowiki>
24604 #### ----------------------- PRE --------------------------
24605 #### 1. Leading whitespace in SOL context should be escaped
24606 #### ------------------------------------------------------
24608 1. Leading whitespace in SOL context should be escaped
24631 <nowiki> </nowiki>a
24633 <nowiki> </nowiki> a
24637 <nowiki> </nowiki> a
24639 <nowiki> </nowiki>a
24642 <nowiki> </nowiki>b
24665 2. Leading whitespace in non-indent-pre contexts should not be escaped
24669 <p>foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
24670 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24671 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i>a</i>
24681 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24700 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24704 <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>
24706 [[File:Foobar.jpg|thumb|caption]]
24710 5. Nowiki escaping should account for indent-pres
24720 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24733 #### --------------- Behavior Switches --------------------
24736 1. Valid behavior switches should be escaped
24743 <nowiki>__TOC__</nowiki>
24744 ''<nowiki>__TOC__</nowiki>''
24748 2. Invalid behavior switches should not be escaped
24759 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24761 Behavior switches should be SOL-transparent
24765 <meta property="mw:PageProp/toc" />
24767 <!-- this one's bogus -->
24770 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24772 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24776 <!-- this one's bogus -->
24785 #### --------------- HTML tags ---------------
24788 #### 3. multi-line html tag
24789 #### 4. extension tags
24790 #### -----------------------------------------
24796 <a href="http://google.com">google</a>
24798 <a href="http://google.com">google</a>
24806 <ul><li> <div>foo</div></li>
24807 <li> <div style="color:red">foo</div></li>
24808 <li> <td></li></ul>
24811 * <nowiki><div>foo</div></nowiki>
24812 * <nowiki><div style="color:red">foo</div></nowiki>
24813 * <nowiki><td></nowiki>
24817 3. multi-line html tag
24836 <p><ref>foo</ref>
24837 </p><p><ref>bar
24838 </p><p>baz</ref>
24841 <nowiki><ref>foo</ref></nowiki>
24843 <nowiki><ref>bar</nowiki>
24845 baz<nowiki></ref></nowiki>
24848 #### --------------- Others ---------------
24854 <p><nowiki>foo</nowiki>
24857 <nowiki>foo</nowiki>
24860 ## The quote-char in the input is necessary for triggering the bug
24862 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24871 #----------- End of wikitext escaping tests --------------
24875 Tag-like HTML structures are passed through as text
24897 </p><p>1<d e>f
24902 HTML tag with necessary entities in attributes
24904 <span title="&amp;">foo</span>
24906 <p><span title="&amp;">foo</span>
24911 HTML tag with 'unnecessary' entity encoding in attributes
24913 <span title="&">foo</span>
24915 <p><span title="&">foo</span>
24920 HTML tag with broken attribute value quoting
24922 parsoid=wt2html,html2html
24924 <span title="Hello world>Foo</span>
24926 <p><span title="Hello world">Foo</span>
24929 <p><span title="Hello world">Foo</span></p>
24933 Self-closed tag with broken attribute value quoting
24935 parsoid=wt2html,html2html
24937 <div title="Hello world />Foo
24939 <div title="Hello world"></div>
24942 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24946 Table with broken attribute value quoting
24948 parsoid=wt2html,html2html
24951 | title="Hello world|Foo
24956 <td title="Hello world">Foo
24962 <td title="Hello world">Foo
24968 Table with broken attribute value quoting on consecutive lines
24970 parsoid=wt2html,html2html
24973 | title="Hello world|Foo
24974 | style="color:red|Bar
24979 <td title="Hello world">Foo
24981 <td style="color:red">Bar
24987 <td title="Hello world">Foo
24988 </td><td style="color: red">Bar
24989 </td></tr></tbody></table>
24994 Accept empty td cell attribute
24997 | align="center" | foo || |
25002 <td align="center"> foo </td>
25009 Non-empty attributes in th-cells
25012 ! Foo !! style="color: red" | Bar
25018 <th style="color: red"> Bar
25024 Accept empty attributes in th-cells
25039 Empty table rows go away
25060 ### Parsoid-centric tests for testing RTing of inter-element separators
25061 ### Edge cases not tested by existing parser tests and specific to
25062 ### Parsoid-specific serialization strategies.
25066 RT-ed inter-element separators should be valid separators
25078 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
25082 # Parsoid-only since PHP parser relies on Tidy for correct output
25084 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
25098 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
25099 <p>bar</p></small></td></tr>
25103 <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>
25107 # Note that the "style" attribute is really a template parameter here.
25108 # The = would have to be {{=}} if you wanted the literal.
25110 Empty TD followed by TD with tpl-generated attribute
25115 |{{echo|style='color:red'}}|foo
25129 Indented table with an empty td
25147 ## We have some newline diffs RT-ing this edge case
25148 ## and it is not important enough -- we seem to be emitting
25149 ## at most 2 newlines after a </tr> and this is unrelated to
25150 ## the issue from T85627 that this is testing.
25152 Indented table with blank lines in between (T85627)
25171 Indented block & table
25185 <div data-parsoid='{"stx":"html"}'>foo</div>
25187 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25192 Indent and comment before table row
25207 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25208 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25212 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25214 Empty TR followed by a template-generated TR
25220 {{echo|<tr><td>foo</td></tr>}}
25226 <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}}]}'>
25231 ## PHP and parsoid output differ for this, and since this is primarily
25232 ## for testing Parsoid's serializer, marking this Parsoid only
25234 Empty TR followed by mixed-ws-comment line should RT correctly
25250 <!--c--> </tr><!--d-->
25256 Multi-line image caption generated by templates with/without trailing newlines
25258 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25259 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25261 <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>
25262 <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>
25266 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25270 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25272 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25274 <includeonly>foo</includeonly>
25282 ## PHP emits broken html for this, and since this is primarily
25283 ## a Parsoid serializer test, marking this Parsoid only
25285 Improperly nested inline or quotes tags with whitespace in between
25287 <span> <s>x</span> </s>
25290 <p><span> <s>x</s></span><s> </s>
25291 <b> <i>x</i></b><i> </i>
25296 Encapsulate protected attributes from wt
25298 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25300 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25304 <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>
25306 <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">
25307 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25311 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25312 ## Having nested or stray pre tags results in the attempt to add duplicates,
25313 ## causing an assertion fail. This test tries to prevent that situation.
25315 Ensure ParagraphWrapper can deal with stray closing pre tags
25325 1. Ensure fostered text content is wrapped in element nodes
25329 <table>hi</table><table>ho</table>
25338 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25340 parsoid=wt2html,wt2wt
25349 <tbody><tr><td> a</td></tr>
25354 Encapsulation properly handles null DSR information from foster box
25356 parsoid=wt2html,wt2wt
25358 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25360 <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>
25364 1. Encapsulate foster-parented transclusion content
25366 parsoid=wt2wt,wt2html
25368 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25370 <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>
25380 2. Encapsulate foster-parented transclusion content
25382 parsoid=wt2wt,wt2html
25384 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25386 <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>
25397 3. Encapsulate foster-parented transclusion content
25399 parsoid=wt2wt,wt2html
25401 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25403 <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>"]}">
25416 4. Encapsulate foster-parented transclusion content
25418 parsoid=wt2wt,wt2html
25420 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25422 <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>"]}">
25435 5. Encapsulate foster-parented transclusion content
25437 parsoid=wt2wt,wt2html
25439 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25441 <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>
25456 6. Encapsulate foster-parented transclusion content
25458 parsoid=wt2wt,wt2html
25460 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25462 <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>
25478 7. Encapsulate foster-parented transclusion content
25480 parsoid=wt2wt,wt2html
25482 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25484 <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>
25494 # Note that the wt is broken on purpose: the = should be {{=}} if you
25495 # don't want it to be a template parameter key.
25497 8. Encapsulate foster-parented transclusion content
25499 parsoid=wt2wt,wt2html
25502 }}{|{{echo|style='color:red'}}
25507 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25509 <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>
25520 9. Encapsulate foster-parented transclusion content
25522 parsoid=wt2wt,wt2html
25524 <table>{{echo|hi</table>hello}}
25526 <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>
25530 Table in fosterable position
25541 <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">
25543 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25549 # Parsoid only for bug 64747
25551 Properly encapsulate empty-content transclusions in fosterable positions
25559 <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"}]]}'>
25565 Always encapsulate foster box when template range is expanded to table
25578 T115289: Unclosed table
25580 {{echo|<table>}}<!--c-->[[Category:Two]]
25582 <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>
25586 T115289: Don't migrate newlines out of tables with fostered content
25588 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25590 <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>
25594 T73074: More fostering fun
25596 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25598 <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>
25602 Support <object> element with .data attribute
25606 <object data="test.swf"></object>
25608 <object data="test.swf"></object>
25612 Don't block XML namespace declaration
25614 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25616 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25619 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25622 # -----------------------------------------------------------------
25623 # The following section of tests are primarily to spec requirements
25624 # around Parsoid's serialization (old, new, edited content)
25626 # All these tests are marked Parsoid html2wt and html2html only
25627 # ----------------------------------------------------------------
25630 Ignore rel attribute in a-tags during serialization to url-links
25634 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25635 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25636 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25638 http://en.wikipedia.org/wiki/Foobar
25639 http://en.wikipedia.org/wiki/Foobar
25640 http://en.wikipedia.org/wiki/Foobar
25643 # 'mi' is a localinterwiki prefix as well as a language
25645 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25649 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25656 New wikilinks should be serialized properly
25660 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25661 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25662 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25663 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25664 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25668 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25669 http://en.wikipedia.org/wiki/Foo
25670 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25674 New wiki links (href variations)
25678 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25679 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25680 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25681 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25686 [[Toxine bactérienne]]
25690 New wiki links (content string variations)
25694 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25695 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25696 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25700 [[Foo_bar|./Foo_bar]]
25704 New category links (href variations)
25708 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25709 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25710 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25712 [[Category:Toxine bactérienne]]
25713 [[Category:Toxine bactérienne]]
25714 [[Category:Toxine bactérienne]]
25718 New sol transparent links don't need indent-pre nowiki protection
25723 <link rel="mw:PageProp/redirect" href="./Main_Page">
25724 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25725 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25727 #WEITERLEITUNG [[Main Page]]
25728 <!-- this is good --> [[Category:Good]]
25729 <!-- this is great --> [[Kategorie:Great]]
25733 New interlanguage links (href variations)
25737 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25738 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25739 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25741 [[es:Toxine bactérienne]]
25742 [[es:Toxine_bactérienne]]
25743 [[es:Toxine_bactérienne]]
25747 Image: Modifying size of an image (1)
25750 "modes": ["wt2wt"],
25752 ["img[height]", "attr", "height", "22"],
25753 ["img[width]", "attr", "width", "200"]
25757 [[Image:Foobar.jpg|230x230px]]
25759 [[Image:Foobar.jpg|200x200px]]
25763 Image: Modifying size of an image (2)
25766 "modes": ["wt2wt"],
25768 ["img[height]", "attr", "height", "100"],
25769 ["img[width]", "attr", "width", "500"]
25773 [[Image:Foobar.jpg|230x230px]]
25775 [[Image:Foobar.jpg|500x500px]]
25778 # Change in size is ignored so long as class='mw-default-size'
25780 Image: Modifying size of an image (3)
25783 "modes": ["wt2wt"],
25785 ["figure[class]", "removeClass", "mw-default-size"],
25786 ["figure img", "attr", "height", "19"],
25787 ["figure img", "attr", "width", "170"]
25791 [[Image:Foobar.jpg|thumb]]
25793 [[Image:Foobar.jpg|thumb|170x170px]]
25797 Image: Modifying alignment of an image (bug 48665)
25800 "modes": ["wt2wt"],
25802 ["figure[class]", "removeClass", "mw-halign-right"],
25803 ["figure[class]", "addClass", "mw-halign-left"]
25807 [[Image:Foobar.jpg|thumb|caption|right]]
25809 [[Image:Foobar.jpg|thumb|caption|left]]
25813 Image: Modifying mw-default-size of an frameless image (bug 62805)
25816 "modes": ["wt2wt"],
25818 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25822 [[Image:Foobar.jpg|frameless|right]]
25824 [[Image:Foobar.jpg|frameless|right|220x220px]]
25828 Image: Modifying valign of an image (bug 49221)
25831 "modes": ["wt2wt"],
25833 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25834 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25838 [[File:Foobar.jpg|20px|middle]]
25840 [[File:Foobar.jpg|20px|text-top]]
25844 Image: Modifying alt attribute of an image (bug 56400)
25847 "modes": ["wt2wt"],
25849 ["img[alt]", "attr", "alt", "some alternate edited text"]
25853 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25855 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25859 Image: Modifying caption of an image
25862 "modes": ["wt2wt"],
25864 ["figcaption", "text", "new caption"]
25868 [[Image:Foobar.jpg|thumb|original caption]]
25870 [[Image:Foobar.jpg|thumb|new caption]]
25874 Image: empty alt attribute (bug 48924)
25878 [[File:Foobar.jpg|thumb|alt=|bar]]
25880 <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>
25884 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25890 <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>
25892 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25896 Image: Block level image should have \n before and after
25899 [[File:Foobar.jpg|right|thumb|150x150px]]
25903 <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>
25908 Image: New block level image should have \n before and after (existing content)
25911 [[File:Foobar.jpg|right|thumb|150x150px]]
25915 <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>
25920 Image: upright option (parsoid)
25922 [[File:Foobar.jpg|thumb|upright|caption]]
25923 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25924 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25926 <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>
25927 <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>
25928 <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>
25932 Image: upright option is ignored on inline and frame images (parsoid)
25934 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25936 <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>
25940 Image: from basic HTML (1)
25944 <span typeof="mw:Image">
25945 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25948 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25952 Image: from basic HTML (2)
25956 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25958 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25962 Image: from basic HTML (3)
25966 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25968 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25972 Image: from basic HTML (4)
25976 <img src="./File:Foobar.jpg">
25978 [[File:Foobar.jpg|link=]]
25982 Image: Invalid title as link
25984 [[File:Foobar.jpg|link=<]]
25986 <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>
25989 <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>
25993 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25998 <li><p>foo</p></li>
26005 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
26009 <ul> <li>foo</li></ul>
26015 Don't strip leading whitespace when handling indent-pre suppressing tags
26020 <tr><td> indented row</td></tr>
26023 <b>This is very bold of you!</b>
26026 indented cell (no pre-wrapping!)
26036 '''This is very bold of you!'''
26040 indented cell (no pre-wrapping!)
26048 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
26070 <nowiki> </nowiki></span>bar2
26073 <nowiki> </nowiki><span>bar</span>
26076 <nowiki> </nowiki><span>foo</span>
26081 Lists: Dont insert newlines in a serialized list item.
26085 <ul><li>a<br>b</li><li>c</li></ul>
26092 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
26095 "modes": ["html2wt"],
26096 "scrubWikitext": false
26099 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26100 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26102 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26103 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26105 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
26107 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26109 == hello there [[Category:A1]] ==
26111 == [[Category:A2]] hi pal ==
26113 == <!--foo--> [[Category:A3]] how goes it ==
26115 == it goes well [[Category:A4]] <!--bar--> ==
26117 ==howdy [[Category:A5]]==
26123 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
26126 "modes": ["html2wt"],
26127 "scrubWikitext": true
26130 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26131 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26133 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26134 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26136 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26144 <!--foo--> [[Category:A3]]
26149 [[Category:A4]] <!--bar-->
26157 Headings: Don't hoist metas that come from templates
26160 "modes": ["html2wt"],
26161 "scrubWikitext": true
26164 <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>
26166 == {{echo|foo [[Category:Foo]]}} ==
26170 Headings: Category in ref isn't hoisted
26173 "modes": ["html2wt"],
26174 "scrubWikitext": true
26177 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
26179 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">bar <link rel="mw:PageProp/Category" href="./Category:Baz" /> </span></li></ol>
26182 [[Category:Baz]] </ref> ==
26188 Parsoid: Serialize positional parameters with = in them as named parameter
26192 <p about="#mwt1" typeof="mw:Transclusion"
26193 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26195 <p about="#mwt1" typeof="mw:Transclusion"
26196 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26198 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26199 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26200 <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>
26204 {{echo|1=f=oo|2=bar}}
26206 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26207 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26208 {{echo|<nowiki>f=oo</nowiki>|bar}}
26212 Parsoid: Serialize positional parameters with = in extlink as named parameter
26216 <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>
26218 {{echo|1=http://stuff?is=ok}}
26222 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26226 <div>a<p>b</p></div>
26247 Substrings resembling wikitext in hrefs should not get nowiki escapes
26251 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26257 Enforce single-line context in the serializer
26264 <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">
26265 </span><span about="#mwt1">you</span> </h2>
26267 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
26269 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
26270 there</span></li></ol>
26282 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26289 </tbody></table></dd></dl>
26293 == hi {{bogus|there
26304 * foo '''bar''' baz
26316 Serialize new placeholder space without spans
26320 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26322 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26324 <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>
26330 <ref>foo : bar</ref>ok
26334 #-----------------------
26335 # Tag minimization tests
26336 #-----------------------
26339 1. I/B quote minimization: wikitext-only tags should be combined
26343 <p><i>A</i><i>B</i></p>
26344 <p><b>A</b><b>B</b></p>
26345 <p><i>A</i><b><i>B</i></b></p>
26346 <p><b>A</b><i><b>B</b></i></p>
26347 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26348 <p><i><b>A</b></i><i><b>B</b></i></p>
26349 <p><i><b>A</b></i><b><i>B</i></b></p>
26350 <p><b><i>A</i></b><i><b>B</b></i></p>
26370 2. I/B quote minimization: wikitext and html tags should not be combined
26374 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26375 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26379 ''A''<nowiki/>'''<i>B</i>'''
26383 3. I/B quote minimization: templated content stops minimization
26387 <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>
26388 <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>
26390 ''A''{{echo|''B''}}
26392 ''A''{{echo|'''''B'''''}}
26396 4. I/B quote minimization: new content should be mimimized with adjacent old content
26400 <p><i>A</i><i>B</i></p>
26401 <p><b>A</b><b>B</b></p>
26402 <p><i>A</i><b><i>B</i></b></p>
26412 5a. Merge adjacent quote nodes if they've been edited
26415 "modes": ["wt2wt", "selser"],
26417 ["p", "contents", "remove", ":contains('b')"]
26427 5b. Merge adjacent quote nodes if they've been edited
26430 "modes": ["wt2wt", "selser"],
26436 ''a''<span id="x">b</span>''c''
26442 1. Merge adjacent link nodes as long as at least one element is new
26445 "modes": ["html2wt"],
26446 "scrubWikitext": true
26449 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26450 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26451 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26455 [[Football|Foot]][[Football|ball]]
26459 2. Merge adjacent link nodes and enable additional normalizations
26462 "modes": ["html2wt"],
26463 "scrubWikitext": true
26466 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26468 [[Football|''Football'']]
26472 3. Don't merge adjacent link nodes if scrubWikitext is false
26475 "modes": ["html2wt"],
26476 "scrubWikitext": false
26479 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26481 [[Football|Foot]][[Football|ball]]
26484 #------------------------------
26485 # End of tag minimization tests
26486 #------------------------------
26489 Bug 54262: New entities
26493 <span typeof="mw:Entity"> </span>
26498 ## Note that there is no wikitext output for 'unknownproperty' ##
26499 ## Unknown magic words are silently dropped ##
26506 <meta property='mw:PageProp/toc' />
26507 <meta property='mw:PageProp/notoc' />
26508 <meta property='mw:PageProp/forcetoc' />
26509 <meta property='mw:PageProp/index' />
26510 <meta property='mw:PageProp/noindex' />
26511 <meta property='mw:PageProp/nogallery' />
26512 <meta property='mw:PageProp/noeditsection' />
26513 <meta property='mw:PageProp/notitleconvert' />
26514 <meta property='mw:PageProp/nocontentconvert' />
26515 <meta property='mw:PageProp/unknownproperty' />
26525 __NOCONTENTCONVERT__
26529 Consecutive <pre>s should not get merged
26531 parsoid=html2wt,html2html
26533 <pre>a</pre><pre>b</pre>
26561 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26565 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26567 [[Special:BookSources/1234567890|ISBN 1234567895]]
26571 Edited RFC links not serializable as RFC links should serialize as extlinks
26575 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26577 [//tools.ietf.org/html/rfc123 New RFC]
26581 Edited PMID links not serializable as PMID links should serialize as extlinks
26585 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26587 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26591 WTS of autolinks with trailing/surrounding context
26595 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26596 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26597 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26598 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26599 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26600 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26602 http://cscott.net'''foo'''
26604 http://cscott.net<b>foo</b>
26606 '''http://cscott.net'''
26608 '''http://cscott.net '''
26610 '''http://cscott.net<nowiki/>x'''
26612 http://cscott.net<nowiki/>x
26616 WTS of autolinks with nowikis (round-trip)
26618 x<nowiki/>http://cscott.net<nowiki/>x
26620 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26623 # this is the "easy" test because it leaves in place all the
26624 # data-parsoid information indicating this is an autolink
26626 WTS of autolinks with escapes (editing)
26629 "modes": ["wt2wt"],
26631 [ "meta", "remove" ]
26635 x<nowiki/>http://cscott.net<nowiki/>x
26637 x<nowiki/>http://cscott.net<nowiki/>x
26641 WTS of edited autolink-like text (T103364)
26644 "modes": ["wt2wt"],
26646 [ "span[typeof]", "removeAttr", "typeof" ]
26650 Not a link: <nowiki>http://example.com</nowiki>.
26652 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26656 WTS of newly-authored autolink-like text (T103364)
26660 <p>http://example.com is not a link.</p>
26662 <nowiki>http://example.com</nowiki> is not a link.
26666 WTS of autolink-like text after an autolink (T108563)
26670 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26672 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26676 Magic links inside links (not autolinked)
26678 [[Foo|http://example.com]]
26681 [[Foo|ISBN 123456789x]]
26683 [http://foo.com http://example.com]
26684 [http://foo.com RFC 1234]
26685 [http://foo.com PMID 1234]
26686 [http://foo.com ISBN 123456789x]
26688 <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>
26689 <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>
26691 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26692 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26693 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26694 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26696 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26697 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26698 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26699 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26703 Magic links inside image captions (autolinked)
26705 [[File:Foobar.jpg|thumb|http://example.com]]
26706 [[File:Foobar.jpg|thumb|RFC 1234]]
26707 [[File:Foobar.jpg|thumb|PMID 1234]]
26708 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26710 <div class="thumb tright">
26711 <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>
26712 <div class="thumbcaption">
26713 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26714 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26717 <div class="thumb tright">
26718 <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>
26719 <div class="thumbcaption">
26720 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26721 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26724 <div class="thumb tright">
26725 <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>
26726 <div class="thumbcaption">
26727 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26728 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26731 <div class="thumb tright">
26732 <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>
26733 <div class="thumbcaption">
26734 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26735 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26739 <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>
26740 <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>
26741 <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>
26742 <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>
26746 WTS of magic word text (T109371)
26751 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26752 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26754 <nowiki>RFC 1234</nowiki>
26756 [http://foo.com RFC 1234]
26762 Edited Redirect link should emit a non-piped wikitext link
26766 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26772 T75121: Infer extension name from typeOf if data-mw is not present
26774 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26776 <div typeOf="mw:Extension/foo"></div>
26781 # Note that the <p> wrapping isn't present in PHP parser output
26782 # The important thing for this test is that P-wrapping doesn't
26783 # interfere with the <nowiki> protection for leading - in <td>
26784 # (which isn't necessary for <th>).
26786 T88318: p-wrapped dash in table.
26788 parsoid=html2wt,wt2wt
26791 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26792 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26793 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26800 |<nowiki>-</nowiki>
26801 |<nowiki>- </nowiki>
26820 <td><small>-</small></td>
26832 T149209: WTS: Handle newlines in table cells properly
26840 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26842 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26848 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26850 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26872 T149209: Selser: Handle newlines in table cells properly
26875 "modes": ["selser"],
26877 [ "#h1", "html", "a\nb\n" ],
26878 [ "#h2", "html", "a\nb\n" ],
26879 [ "#c1", "html", "a\nb\n" ],
26880 [ "#c2", "html", "<p>a</p>" ],
26881 [ "#c3", "html", "<p>a</p>" ],
26882 [ "#c4", "html", "edit-me<p>a</p>" ]
26887 ! id="h1" |edit-me!!1
26889 ! id="h2" |edit-me||2
26891 | id="c1" |edit-me||3
26893 | id="c2" |edit-me||4
26895 | id="c3" |edit-me||p||q||r
26897 | id="c4" |edit-me||p||q||r
26926 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26931 <td id='mwAc'>foo</td>
26932 <td id='serialize-this'>bar</td>
26937 | id="serialize-this" |bar
26942 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26946 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26948 <div id="hello">ok</div>
26955 "modes": ["wt2wt"],
26957 [ "#xyz", "before", "<b>before</b> stuff " ],
26958 [ "#xyz", "after", " stuff <i>after</i>" ],
26959 [ "#xyz", "html", "x <b>y</b> z" ]
26963 <span id="xyz">hello</span>
26965 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26969 Never serialize a-tag as html, regardless of what data-parsoid has to say
26971 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26973 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26978 ## SSS FIXME: This is broken output nevertheless.
26979 ## What might be a reasonable non-broken output for this?
26980 ## This is an edge case unlikely to be seen in production
26981 ## that I am not wasting more time on this right now.
26983 Never serialize a-tag as html, no matter what attributes it has
26985 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26987 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26989 [http://boo.org http://boohoo.org]
26992 # Misnested is an indication that selser can reuse the source but these have
26993 # shown to sneak through on occasion. See T101768.
26994 # The original wikitext here is: [http://test.com [[one]] two three]
26996 Strip span tags added to mark misnested links
27000 <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>
27002 [http://test.com][[one]] two three
27006 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
27010 <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|}"]}'>
27022 ## This test verifies the presence and computation of this attribute indirectly
27023 ## by making an edit and ensuring that the serialization is correct (which it would be
27024 ## only if firstWikitextNode is properly set).
27026 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
27029 "modes": ["wt2wt"],
27031 [ "div#x", "remove" ],
27032 [ "div", "before", "<div>new</div>" ]
27036 <div id="x">foo</div>
27038 {{echo|<div>boo</div>
27046 {{echo|<div>boo</div>
27052 # --------------------------------------------
27053 # Tests spec'ing wikitext serialization norms |
27054 # --------------------------------------------
27057 1. Categories should always be serialized on their own line
27061 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
27069 2. Categories that are part of templates should not introduce a line break
27071 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
27073 <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>
27076 # Careful while editing these next 2 tests. There are \u200f characters
27077 # before and after the <link> tags in the HTML and following some
27078 # of the categories in wikitext
27079 # Do not remove these characters in edits.
27081 # As part of the serialization, these bidi characters will get stripped.
27083 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
27086 "modes": ["html2wt"],
27087 "scrubWikitext": true
27090 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
27091 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
27094 [[קטגוריה: שיטות משפט]]
27098 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
27101 "modes": ["html2wt"],
27102 "scrubWikitext": true
27105 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
27112 Lists: Add space after bullets
27119 <li><span> baz</span></li>
27124 * <span> baz</span>
27128 1. Headings: Add space before/after == (T53744)
27135 <h2><span> baz</span></h2>
27143 == <span> baz</span> ==
27147 2. Headings: Add space before/after == even after hoisted content
27150 "modes": ["html2wt"],
27151 "scrubWikitext": true
27154 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
27162 1. Headings: suppress newly created empty headings
27165 "modes": ["html2wt"],
27166 "scrubWikitext": true
27174 2. Headings: don't suppress empty headings if scrubWikitext is false
27184 3. Headings: suppress empty headings on edits
27187 "modes": ["selser"],
27188 "scrubWikitext": true,
27194 ==<span id="x">foo</span>==
27199 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27202 "modes": ["html2wt"],
27203 "scrubWikitext": true
27206 <h2>foo<br/>bar</h2>
27207 <h2>foo <span><br/>bar</span> baz</h2>
27211 == foo <span> bar</span> baz ==
27215 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27218 "modes": ["html2wt"],
27219 "scrubWikitext": false
27222 <h2>foo<br/>bar</h2>
27228 1. WT Quote Tags: suppress newly created empty style tags
27231 "modes": ["html2wt"],
27232 "scrubWikitext": true
27240 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27246 ''<nowiki/>'''''<nowiki/>'''
27250 3. WT Quote Tags: suppress empty style tags on edits
27253 "modes": ["selser"],
27254 "scrubWikitext": true,
27260 '''<span id="x">foo</span>'''
27265 1. Anchors: suppress newly created empty anchors
27268 "modes": ["html2wt"],
27269 "scrubWikitext": true
27272 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27277 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27280 "modes": ["html2wt"],
27281 "scrubWikitext": false
27284 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27290 3. Anchors: suppress empty anchors on edits
27293 "modes": ["selser"],
27294 "scrubWikitext": true,
27300 [[Test|<span id="x">foo</span>]]
27305 3a. Anchors: do not suppress numbered extlinks
27308 "modes": ["wt2wt"],
27309 "scrubWikitext": true
27314 <a rel="mw:ExtLink" href="http://foo.com"></a>
27318 3b. Anchors: do not suppress numbered extlinks
27321 "modes": ["wt2wt"],
27322 "scrubWikitext": true,
27328 [http://foo.com <span id="x">foo</span>]
27334 Normalizations should be restricted to edited content
27337 "modes": ["selser"],
27338 "scrubWikitext": true,
27340 [ "h1", "before", "<i></i>"]
27354 1. Multiple normalizations (html2wt)
27357 "modes": ["html2wt"],
27358 "scrubWikitext": true
27362 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27363 </a><b><i></i></b>x</p>
27372 2. Multiple normalizations (selser)
27375 "modes": ["selser"],
27376 "scrubWikitext": true,
27378 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27382 <span id="x">foo</span>
27384 <span id="x">foo</span>
27390 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27393 "modes": ["html2wt"],
27394 "scrubWikitext": true
27406 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27413 <nowiki> </nowiki>hi
27415 <nowiki> </nowiki> hello
27419 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27422 "modes": ["html2wt"],
27423 "scrubWikitext": true
27432 baz bang</td></tr></table>
27438 bar<span>boo</span></p>
27454 bar<span>boo</span>
27458 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27461 "modes": ["selser"],
27462 "scrubWikitext": true,
27464 [ "p", "html", " a\n b" ]
27475 1. New links that end in spaces
27478 "modes": ["html2wt"],
27479 "scrubWikitext": false
27482 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27483 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27484 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27486 [[Berlin ]]<nowiki/>is the capital of Germany.
27490 [[Boston ]] is a city.
27494 2. New links that end in spaces
27497 "modes": ["html2wt"],
27498 "scrubWikitext": true
27501 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27502 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27503 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27505 [[Berlin]] is the capital of Germany.
27509 [[Boston]] is a city.
27513 1. Table cells with escapable prefixes
27516 "modes": ["html2wt"],
27517 "scrubWikitext": false
27521 <tr><td>a</td></tr>
27522 <tr><td>-</td></tr>
27523 <tr><td>+</td></tr>
27529 |<nowiki>-</nowiki>
27531 |<nowiki>+</nowiki>
27536 2. Table cells with escapable prefixes
27539 "modes": ["html2wt"],
27540 "scrubWikitext": true
27544 <tr><td>a</td></tr>
27545 <tr><td>-</td></tr>
27546 <tr><td>+</td></tr>
27559 3a. Table cells with escapable prefixes after edits
27562 "modes": ["selser"],
27563 "scrubWikitext": true,
27565 [ "table tbody tr:first-child td:first-child", "remove"]
27579 3b. Table cells with escapable prefixes after edits
27582 "modes": ["selser"],
27583 "scrubWikitext": true,
27585 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27592 |<span id="x">foo</span>+
27601 # FIXME: This test will fail because
27602 # normalization doesn't realize that the id attribute
27603 # will eliminate the escapable scenario
27605 4a. Table cells without escapable prefixes after edits
27608 "modes": ["selser"],
27609 "scrubWikitext": true,
27611 [ "#x", "html", "-" ]
27624 ## This tests normalizer's ability to discriminate between
27625 ## cells having identical content.
27627 4b. Table cells without escapable prefixes after edits
27630 "modes": ["selser"],
27631 "scrubWikitext": true,
27633 [ "td", "html", "-" ]
27646 ## This tests normalizer's ability to not be tripped by
27647 ## comments (and whitespace)
27649 4c. Table cells without escapable prefixes after edits
27652 "modes": ["selser"],
27653 "scrubWikitext": true,
27655 [ "table tbody tr td:first-child", "remove" ]
27670 ## This tests normalizer's ability to handle HTML cells
27672 4d. Table cells without escapable prefixes after edits
27675 "modes": ["selser"],
27676 "scrubWikitext": true,
27678 [ "td", "html", "-" ]
27683 <tr><td>a</td></tr>
27687 <tr><td>-</td></tr>
27691 ## T111151 Remove font elements without attributes
27693 5a. font tags without attributes should be dropped in scrubWikitext mode
27696 "modes": ["html2wt"],
27697 "scrubWikitext": true
27701 <font><font>bar</font></font>
27702 <font class="x">boo</font>
27706 <font class="x">boo</font>
27710 5b. font tags should not be dropped without scrubWikitext being enabled
27713 "modes": ["html2wt"],
27714 "scrubWikitext": false
27723 Escape nowiki DOM elements
27727 <nowiki><i>foo</i></nowiki>
27729 <nowiki>''foo''</nowiki>
27732 # This is meant to be an interim fix while we go about figuring out
27733 # how to not introduce these trailing <nowiki/>s in the first place.
27735 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27739 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27741 <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>
27742 <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>
27755 # ---------------------------------------------------
27756 # End of tests spec'ing wikitext serialization norms |
27757 # ---------------------------------------------------
27761 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27769 <td><b>c</b><p>d</p></td>
27787 # -----------------------------------------------------------------
27788 # End of section for Parsoid-only html2wt tests for serialization
27790 # -----------------------------------------------------------------
27792 # -----------------------------------------------------------------
27793 # The following section of tests are primarily to spec behavior of
27794 # the selective serializer. All these tests have manual selser
27795 # changes. The automated selser changes for all tests handle the
27796 # wide variation of changes, but these tests here capture specs
27797 # deterministically.
27798 # ----------------------------------------------------------------
27802 Selser: New comments should not be lost
27805 "modes": ["selser"],
27807 [ "#a", "after", "<!--c1-->" ],
27808 [ "#b", "before", "<!--c2-->" ]
27812 <span id="a">a</span>
27814 <span id="b">b</span>
27816 <span id="a">a</span><!--c1-->
27818 <!--c2--><span id="b">b</span>
27823 Selser: Check for validity of DSR before using it
27826 "modes": ["selser"],
27828 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27832 <span id="a">a</span>
27834 {{DISPLAYTITLE:foo}}
27835 <span id="a">a</span>
27839 1. DOMDiff: Changes to <ref> content should be looked up using id
27842 "modes": ["selser"],
27844 ["#X", "after", "bar"],
27845 ["#Y", "after", "baz"]
27849 X <ref><span id="X">foo</span></ref>
27852 <ref name="a"><span id="Y">foo</span></ref>
27855 X <ref><span id="X">foo</span>bar</ref>
27858 <ref name="a"><span id="Y">foo</span>baz</ref>
27863 2. DOMDiff: Changes to <ref> content should be looked up using id
27866 "modes": ["selser"],
27868 ["#Z", "after", "bar"]
27872 A <ref>foo bar for a</ref>
27873 B <ref group="X" name="b" />
27877 <references group="X">
27878 <ref name="b"><span id="Z">foo</span></ref>
27881 A <ref>foo bar for a</ref>
27882 B <ref group="X" name="b" />
27886 <references group="X">
27887 <ref name="b"><span id="Z">foo</span>bar</ref>
27892 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27895 "modes": ["selser"],
27897 [ "div:first-child", "text", "bar" ]
27901 <div style="{{1x|color:red;}}%">foo</div>
27903 <div style="{{1x|color:red;}}%">bar</div>
27916 <li class="mw-empty-elt"></li>
27917 <li class="mw-empty-elt"></li>
27925 [[File:Thumb.png|thumb]]
27927 <div class="thumb tright">
27928 <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>
27929 <div class="thumbcaption">
27930 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27937 unclosed internal link XSS (T137264)
27939 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27941 <p>[[#<script>alert(1)</script>|
27944 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>