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
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
83 MediaWiki:bad image list
85 * [[File:Bad.jpg]] except [[Nasty page]]
112 // For Serbian; localize Template namespace
120 Template:echo_with_span
126 Template:echo_with_div
139 Template:table_attribs
142 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_2
149 |</noinclude>style="color:red;"|Foo
154 Template:table_attribs_3
157 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
161 Template:table_attribs_4
163 | style="background-color:#DC241f;" width="10px" |
167 Template:table_attribs_5
170 |</noinclude>style="color:red;"||Bar
174 Template:table_attribs_6
176 style="background: <nowiki>
183 Template:table_attribs_7
186 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
190 Template:table_header_cells
192 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
198 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
202 Template:PartialTable
209 Template:image_attribs
212 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
215 ## See T48811 for details
217 Template:mixed_attr_content_template
219 style="color:red;" title="T48811"
225 Template:definition_list
272 Template:EmptyTRWithHTMLAttrTest
275 <tr align="center"></tr>
276 <tr><td>foo</td></tr>
277 <tr align="center"></tr>
278 <tr><td>bar</td></tr>
285 <ref>{{CircularRef}}</ref>
309 <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>
310 <ol class="mw-references 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>
316 This is a simple paragraph.
318 <p>This is a simple paragraph.
323 Paragraphs with extra newline spacing
346 Paragraphs with newline spacing with comment lines in between
354 <!--foo--><!--More than 1 comment, still stripped-->
358 <!--foo--> <!----> <!-- bar -->
419 Paragraphs with newline spacing with non-empty white-space lines in between
446 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
454 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
493 Extra newlines: More paragraphs with indented comment
508 Extra newlines followed by heading
523 <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>
524 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
527 <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>
532 Extra newlines between heading and content are swallowed
540 <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>
541 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
546 Heading with line break in nowiki
550 wgFragmentMode=[ 'html5', 'legacy' ]
555 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
557 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>
561 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span> A <span typeof="mw:Nowiki">B
568 http://fr.wikipedia.org/wiki/🍺
569 <!-- EasterEgg we love beer, better be able be able to link to it -->
571 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
582 <li> Item 2</li></ul>
590 * plain''italic''plain
591 * plain''italic''plain''italic''plain
592 * plain'''bold'''plain
593 * plain'''bold'''plain'''bold'''plain
594 * plain''italic''plain'''bold'''plain
595 * plain'''bold'''plain''italic''plain
596 * plain''italic'''bold-italic'''italic''plain
597 * plain'''bold''bold-italic''bold'''plain
598 * plain'''''bold-italic'''italic''plain
599 * plain'''''bold-italic''bold'''plain
600 * plain''italic'''bold-italic'''''plain
601 * plain'''bold''bold-italic'''''plain
602 * plain l'''italic''plain
603 * plain l''''bold''' plain
606 <li> plain<i>italic</i>plain</li>
607 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
608 <li> plain<b>bold</b>plain</li>
609 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
610 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
611 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
612 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
613 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
614 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
615 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
616 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
617 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
618 <li> plain l'<i>italic</i>plain</li>
619 <li> plain l'<b>bold</b> plain</li></ul>
623 # this example taken from the [[simple:Moon]] article (T49326)
625 Italics and possessives (1)
627 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
629 <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
633 # this example taken from [[en:Flaming Pie]] (T51926)
635 Italics and possessives (2)
637 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
639 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
643 # this example taken from [[en:Dictionary]] (T51926)
645 Italics and possessives (3)
647 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''.
649 <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>.
655 ### 2-quote opening sequence tests
658 Italics and bold: 2-quote opening sequence: (2,2)
667 Italics and bold: 2-quote opening sequence: (2,3)
676 Italics and bold: 2-quote opening sequence: (2,4)
686 # same html as previous, but wikitext adjusted to match parsoid html2wt
688 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
690 ''foo<nowiki>''</nowiki>''
696 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
698 Italics and bold: 2-quote opening sequence: (2,5)
711 # same html as previous, but wikitext adjusted to match parsoid html2wt
713 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
715 ''foo'''''<nowiki/>'''
726 ### 3-quote opening sequence tests
730 Italics and bold: 3-quote opening sequence: (3,2)
739 Italics and bold: 3-quote opening sequence: (3,3)
748 Italics and bold: 3-quote opening sequence: (3,4)
756 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
758 Italics and bold: 3-quote opening sequence: (3,5)
771 # same html as previous, but wikitext adjusted to match parsoid html2wt
773 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
775 '''foo'''''<nowiki/>''
786 ### 4-quote opening sequence tests
790 Italics and bold: 4-quote opening sequence: (4,2)
800 # same html as previous, but wikitext adjusted to match parsoid html2wt
802 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
804 <nowiki>''</nowiki>''foo''
811 Italics and bold: 4-quote opening sequence: (4,3)
820 Italics and bold: 4-quote opening sequence: (4,4)
830 # same html as previous, but wikitext adjusted to match parsoid html2wt
832 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
840 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
842 Italics and bold: 4-quote opening sequence: (4,5)
851 <p>'<b>foo</b><i></i>
855 # same html as previous, but wikitext adjusted to match parsoid html2wt
857 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
859 '<nowiki/>'''foo'''''<nowiki/>''
864 <p>'<b>foo</b><i></i>
870 ### 5-quote opening sequence tests
874 Italics and bold: 5-quote opening sequence: (5,2)
884 # same html as previous, but wikitext adjusted to match parsoid html2wt
886 Italics and bold: 5-quote opening sequence: (5,2+3)
895 Italics and bold: 5-quote opening sequence: (5,3)
905 # same html as previous, but wikitext adjusted to match parsoid html2wt
907 Italics and bold: 5-quote opening sequence: (5,3+2)
916 Italics and bold: 5-quote opening sequence: (5,4)
922 <p><i><b>foo'</b></i>
927 Italics and bold: 5-quote opening sequence: (5,5)
936 Italics and bold: 5-quote opening sequence: (5,6)
940 <p><i><b>foo'</b></i>
945 ### multiple quote sequences in a line
949 Italics and bold: multiple quote sequences: (2,4,2)
955 <p><i>foo'<b>bar</b></i>
959 # same html as previous, but wikitext adjusted to match parsoid html2wt
961 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
963 ''foo'<nowiki/>'''bar'''''
965 <p><i>foo'<b>bar</b></i>
970 Italics and bold: multiple quote sequences: (2,4,3)
976 <p><i>foo'<b>bar</b></i>
980 # same html as previous, but wikitext adjusted to match parsoid html2wt
982 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
984 ''foo'<nowiki/>'''bar'''''
986 <p><i>foo'<b>bar</b></i>
991 Italics and bold: multiple quote sequences: (2,4,4)
997 <p><i>foo'<b>bar'</b></i>
1001 # same html as previous, but wikitext adjusted to match parsoid html2wt
1003 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1005 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1007 <p><i>foo'<b>bar'</b></i>
1011 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1013 Italics and bold: multiple quote sequences: (3,4,2)
1022 <p><b>foo'</b>bar<i></i>
1026 # same html as previous, but wikitext adjusted to match parsoid html2wt
1028 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1030 '''foo''''bar''<nowiki/>''
1035 <p><b>foo'</b>bar<i></i>
1039 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1041 Italics and bold: multiple quote sequences: (3,4,3)
1050 <p><b>foo'</b>bar<b></b>
1054 # same html as previous, but wikitext adjusted to match parsoid html2wt
1056 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1058 '''foo''''bar'''<nowiki/>'''
1063 <p><b>foo'</b>bar<b></b>
1068 ### other quote tests
1071 Italics and bold: other quote tests: (2,3,5)
1073 ''this is about '''foo's family'''''
1075 <p><i>this is about <b>foo's family</b></i>
1081 Italics and bold: other quote tests: (2,(3,3),2)
1083 ''this is about '''foo's''' family''
1085 <p><i>this is about <b>foo's</b> family</i>
1091 Italics and bold: other quote tests: (3,2,3,2)
1095 '''this is about ''foo'''s family''
1097 <p><b>this is about <i>foo</i></b><i>s family</i>
1102 # same html as previous, but wikitext adjusted to match parsoid html2wt
1104 Italics and bold: other quote tests: (3,2,3+2+2,2)
1106 '''this is about ''foo'''''<nowiki/>''s family''
1108 <p><b>this is about <i>foo</i></b><i>s family</i>
1114 Italics and bold: other quote tests: (3,2,3,3)
1116 '''this is about ''foo'''s family'''
1118 <p>'<i>this is about </i>foo<b>s family</b>
1124 Italics and bold: other quote tests: (3,(2,2),3)
1126 '''this is about ''foo's'' family'''
1128 <p><b>this is about <i>foo's</i> family</b>
1134 Italicized possessive
1136 The ''[[Main Page]]'''s talk page.
1138 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1141 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1145 Quote balancing context should be restricted to td/th cells on the same wikitext line
1147 parsoid=wt2html,wt2wt
1161 </td></tr></tbody></table>
1169 Non-html5 tags should be accepted
1171 <center>''foo''</center>
1173 <font>''foo''</font>
1174 <strike>''foo''</strike>
1177 <center><i>foo</i></center>
1178 <p><big><i>foo</i></big>
1179 <font><i>foo</i></font>
1180 <strike><i>foo</i></strike>
1186 <wbr> is valid wikitext (T54468)
1194 # <strike> is HTML4, <s> is HTML4/5.
1196 <s> or <strike> for strikethrough
1198 <strike>strike</strike>
1202 <p><strike>strike</strike>
1210 Text-level semantic html elements in wikitext
1213 <strong>text</strong>
1229 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1236 <strong>text</strong>
1252 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1260 # test cases taken from
1261 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1263 Ruby markup (W3C-style)
1265 ; Mono-ruby for individual base characters
1266 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1268 : <ruby>今日<rt>きょう</rt></ruby>
1270 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1272 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1274 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1276 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1277 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1278 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1281 <dl><dt> Mono-ruby for individual base characters</dt>
1282 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1283 <dt> Group ruby</dt>
1284 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1285 <dt> Jukugo ruby</dt>
1286 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1287 <dt> Inline ruby</dt>
1288 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1289 <dt> Double-sided ruby</dt>
1290 <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>
1292 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1293 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1294 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1299 # The next two test different paths in the sanitizer.
1301 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1303 <blockquote|>a</blockquote>
1305 <b→> doesn't terminate </b→>
1307 <bä> doesn't terminate </bä>
1309 <boo> doesn't terminate </boo>
1311 <s.foo> doesn't terminate </s.foo>
1315 <p><blockquote|>a</blockquote>
1316 </p><p><b→> doesn't terminate </b→>
1317 </p><p><bä> doesn't terminate </bä>
1318 </p><p><boo> doesn't terminate </boo>
1319 </p><p><s.foo> doesn't terminate </s.foo>
1320 </p><p><sub-ID#1>
1325 Non-word characters don't terminate tag names
1327 <blockquote|>a</blockquote>
1329 <b→> doesn't terminate </b→>
1331 <bä> doesn't terminate </bä>
1333 <boo> doesn't terminate </boo>
1335 <s.foo> doesn't terminate </s.foo>
1339 <p><blockquote|>a
1340 </p><p><b→> doesn't terminate </b→>
1341 </p><p><bä> doesn't terminate </bä>
1342 </p><p><boo> doesn't terminate </boo>
1343 </p><p><s.foo> doesn't terminate </s.foo>
1344 </p><p><sub-ID#1>
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 (T54760)
1378 <p class="mw-empty-elt">
1379 </p><p><s.foo>s
1382 <p><s.foo>s</p>
1386 ### Special characters
1390 Bare pipe character (T54363)
1399 Bare pipe character from a template (T54363)
1408 ### <nowiki> test cases
1412 <nowiki> unordered list
1414 <nowiki>* This is not an unordered list item.</nowiki>
1416 <p>* This is not an unordered list item.
1419 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1425 <nowiki>Lorem ipsum dolor
1433 <p>Lorem ipsum dolor
1442 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1452 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1454 <nowiki><span class="error"></nowiki>
1456 <p><span class="error">
1459 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1465 :There is not nowiki.
1466 :There is <nowiki>nowiki</nowiki>.
1468 #There is not nowiki.
1469 #There is <nowiki>nowiki</nowiki>.
1471 *There is not nowiki.
1472 *There is <nowiki>nowiki</nowiki>.
1474 <dl><dd>There is not nowiki.</dd>
1475 <dd>There is nowiki.</dd></dl>
1476 <ol><li>There is not nowiki.</li>
1477 <li>There is nowiki.</li></ol>
1478 <ul><li>There is not nowiki.</li>
1479 <li>There is nowiki.</li></ul>
1482 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1483 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1485 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1486 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1488 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1489 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1493 Entities inside <nowiki>
1495 <nowiki><</nowiki>
1500 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1504 Entities inside template parameters
1511 <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>
1515 Properly escape nowiki when combined with other wiki markup
1519 <p>* </nowiki> tag</p>
1521 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1525 T93824: Put escaped HTML tags inside nowiki
1529 <p><h2>foo</h2></p>
1531 <nowiki><h2>foo</h2></nowiki>
1535 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1539 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1540 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1541 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1543 This text: L'[[Foo]]
1544 This text: L<nowiki>''</nowiki>[[Foo]]
1545 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1548 # This test fails because wikitext whitespace is not normalized before comparing.
1550 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1554 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1557 This text : L<nowiki>''</nowiki>[[Foo]]
1560 # This test and the next one are html2wt only as they test that incorrect wikitext
1561 # passed in template arguments gets escaped or wrapped in nowikis where required.
1563 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1567 <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>
1568 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1570 {{echo|foo{{!}}bar}}
1571 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1575 T53961: Output correct nowikis in template arguments
1579 <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>
1580 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1581 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1582 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1583 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1586 {{echo|<nowiki>a }} b</nowiki>}}
1587 {{echo|<nowiki>a [[ b</nowiki>}}
1588 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1589 {{echo|a <nowiki>}</nowiki>}}
1593 Cases where "!!" needs nowiki protection
1598 <tr><th>this needs protection !! here</th></tr>
1602 <tr><th>this does not need
1603 protection !! here</th></tr>
1607 !<nowiki>this needs protection !! here</nowiki>
1620 Comments and Indent-Pre
1622 <!-- comment 1 --> asdf
1624 <!-- comment 1 --> asdf
1627 <!-- comment 1 --> asdf
1628 <!-- comment 2 -->xyz
1630 <!-- comment 1 --> asdf
1631 <!-- comment 2 --> xyz
1687 asdf<!-- comment 1 -->jkl
1697 <!-- foo --> b <!-- bar -->
1711 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1717 Comment semantics and delimiters
1719 <!-- --><!----><!-----><!------>
1723 <!-- --><!----><!-----><!------>
1727 Comment semantics and delimiters, redux
1729 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1730 -- foo -- funky huh? ... -->
1734 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1735 -- foo -- funky huh? ... -->
1739 Comment semantics and delimiters: directors cut
1741 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1742 everything starting with < followed by !-- until the first -- and > we see,
1743 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1749 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1750 everything starting with < followed by !-- until the first -- and > we see,
1751 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1756 Comment semantics: nesting
1758 <!--<!-- no, we're not going to do anything fancy here -->-->
1763 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1766 # Parsoid closes the unclosed comment, even if it means a slight
1769 Comment semantics: unclosed comment at end
1771 parsoid=wt2html,html2html
1773 <!--This comment will run out to the end of the document
1777 <!--This comment will run out to the end of the document-->
1781 Comment semantics: normalize comments to play nice with XML and browsers
1783 <!-- Browsers --!> think this is closed -->
1784 <!--> This would normally be text -->
1785 <!---> As would this -->
1786 <!-- XML doesn't like trailing dashes -------->
1787 <!-- Nor doubled hyphens -- anywhere in the data -->
1788 But this is not a comment.
1790 <p>But this is not a comment.
1793 <!-- Browsers --!> think this is closed -->
1794 <!--> This would normally be text -->
1795 <!---> As would this -->
1796 <!-- XML doesn't like trailing dashes -------->
1797 <!-- Nor doubled hyphens -- anywhere in the data -->
1798 <p>But this is not a comment.</p>
1802 Comment semantics: round-trip even text which contains encoded -->
1804 <!-- hello & goodbye - > --> --&gt; --&xx -->
1806 <!-- hello & goodbye - > --> --&gt; --&xx -->
1810 Comment in template title
1819 Comment on its own line post-expand
1831 Comment on its own line post-expand with non-significant whitespace
1843 Multiple comments should still parse as SOL-transparent
1845 parsoid=wt2html,wt2wt
1848 <!--c2--><!--c3--><!--c4-->*b
1857 <!--c2--><!--c3--><!--c4-->
1863 ## Make sure ">" gets escaped in comments to avoid XSS
1865 IE conditional comments
1868 <script>alert('hi');</script>
1871 <!--[if lt IE 9]>
1872 <script>alert('hi');</script>
1877 ### paragraph wrapping tests
1892 Block tag on one line (<div>)
1902 <p>a </p><div>foo</div>
1907 # Remex wraps empty tag runs with p-tags.
1908 # Parsoid strips them out during p-wrapping.
1910 No p-wrappable content
1912 <span><div>x</div></span>
1913 <span><s><div>x</div></s></span>
1914 <small><em></em></small><span><s><div>x</div></s></span>
1916 <span><div>x</div></span>
1917 <span><s><div>x</div></s></span>
1918 <p><small><em></em></small></p><span><s><div>x</div></s></span>
1920 <span><div>x</div></span>
1921 <span><s><div>x</div></s></span>
1922 <small><em></em></small><span><s><div>x</div></s></span>
1925 # T177612: Parsoid-only test
1927 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
1929 {{echo|<span><div>x</div></span>}}
1932 <span 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":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
1937 Block tag on one line (<blockquote>)
1939 a <blockquote>foo</blockquote>
1943 a <blockquote>foo</blockquote>
1947 <p>a </p><blockquote><p>foo</p></blockquote>
1953 Block tag on both lines (<div>)
1963 <p>a </p><div>foo</div><p>
1964 b </p><div>foo</div>
1968 Block tag on both lines (<blockquote>)
1970 a <blockquote>foo</blockquote>
1972 b <blockquote>foo</blockquote>
1974 a <blockquote>foo</blockquote>
1975 b <blockquote>foo</blockquote>
1978 <p>a </p><blockquote><p>foo</p></blockquote><p>
1979 b </p><blockquote><p>foo</p></blockquote>
1983 Multiple lines without block tags
2004 x </p><div>foo</div><p> z
2008 # The difference between Parsoid & Remex here
2009 # is because of Parsoid's Tidy-emulation code
2010 # for p-wrapping. We'll start work to remove this
2011 # emulation code in Parsoid sooner than later.
2012 # Remex wraps empty tag runs with p-tags.
2013 # Parsoid strips them out in a separate pass.
2015 Empty lines between lines with block tags
2050 </p><div>b</div><p>d
2055 <div data-parsoid='{"stx":"html"}'></div>
2058 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2061 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2063 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2066 <div data-parsoid='{"stx":"html"}'>e</div>
2070 Unclosed HTML p-tags should be handled properly
2077 <div><p>foo</p></div>
2082 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2087 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2088 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2091 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2095 a [[Category:A1]] [[Category:A2]]
2100 <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"/>
2104 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2110 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2114 ### Preformatted text
2123 And a [[Main Page|link]]
2129 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2134 Tabs don't trigger preformatted text
2138 This is preformatted text.
2144 <pre>This is preformatted text.
2149 preformatted text.</p>
2150 <pre>This is preformatted text.
2155 Space before tab needs nowiki pre protection
2161 <nowiki> </nowiki> a
2165 Ident preformatting with inline content
2176 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2193 Regression with preformatted in <center>
2207 T54763: Preformatted in <blockquote>
2213 indented cell (no pre-wrapping!)
2223 <p> indented cell (no pre-wrapping!)
2231 T53086: Double newlines in blockquotes should be turned into paragraphs
2248 T17491: <ins>/<del> in blockquote
2251 Foo <del>bar</del> <ins>baz</ins> quux
2255 <p>Foo <del>bar</del> <ins>baz</ins> quux
2262 T17491: <ins>/<del> in blockquote (2)
2264 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2267 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2271 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2276 <pre> with attributes (T5202)
2278 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2280 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2285 <pre> with width attribute (T5202)
2287 <pre width="8">Narrow screen goodies</pre>
2289 <pre width="8">Narrow screen goodies</pre>
2294 <pre> with forbidden attribute (T5202)
2296 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2298 <pre width="8">Narrow screen goodies</pre>
2303 Entities inside <pre>
2312 <pre> with forbidden attribute values (T5202)
2314 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2316 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2321 <nowiki> inside <pre> (T15238)
2329 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2337 <pre><nowiki>Foo</nowiki></pre>
2342 <nowiki> inside of #tag:pre
2344 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2346 <pre>Foo →bar</pre>
2349 <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>
2352 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2353 ## aren't enclosed in nowikis.
2355 <nowiki> and <pre> preference (first one wins)
2386 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2391 <p><span typeof="mw:Nowiki">
2399 </pre> inside nowiki
2401 <nowiki></pre></nowiki>
2408 Empty pre; pre inside other HTML tags (T56946)
2425 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2427 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2431 HTML pre followed by indent-pre
2444 <p><pre>foo</pre></p>
2446 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2448 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2452 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2460 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2470 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2482 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2503 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2507 {{echo| foo}}{{echo| bar}}
2512 {{echo|<!--cmt--> foo}}
2514 <!--cmt-->{{echo| foo}}
2516 {{echo|{{echo| }}bar}}
2534 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2570 ## Hmm, should Parsoid rt this?
2572 Pres with newline attributes
2574 parsoid=wt2html,html2html
2579 <pre class="one two">hi</pre>
2582 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2586 Things that look like <pre> tags aren't treated as such
2588 Barack Obama <President> of the United States
2589 <President></President>
2591 <p>Barack Obama <President> of the United States
2592 <President></President>
2597 Handle broken pre-like tags (T66025)
2601 {{echo|<pre <pre>x</pre>}}
2603 <table><pre </table>
2606 <table><pre </table>
2610 <pre <table></table>
2612 <pre about="#mwt1" typeof="mw:Transclusion mw:Extension/pre" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2621 Parsoid: handle pre with space after attribute
2625 <pre style="width:50%;" >{{echo|foo}}</pre>
2627 <pre style="width:50%;">{{echo|foo}}</pre>
2630 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2633 # TODO / maybe: fix wt2wt for this
2635 Parsoid: Don't paragraph-wrap fosterable content
2661 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2689 #--------------------------------------------------------------------
2690 # Transclusion parameter whitespace stripping tests
2691 # Behavior is different for positional and named parameters
2692 #--------------------------------------------------------------------
2694 Templates: Strip leading and trailing whitespace from named-param values
2698 {{echo|1= {{echo|b}} }}
2711 <ul><li> d</li></ul>
2716 Templates: Don't strip whitespace from positional-param values
2720 {{echo|{{echo|b}} }}
2752 <ul><li> f</li></ul>
2760 Templates: Don't recognize targets split by newlines
2776 Templates: Recognize targets when newlines and comments don't split the target
2781 <!--X--> ech<!--X-->o<!--X-->
2789 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2793 Templates: Handle empty comment-and-ws-only lines correctly
2796 <!--should be ignored-->
2797 <!--should be ignored as well-->
2804 <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>
2808 Templates: Handle comments in the target
2811 <!-- should be ignored -->
2815 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2818 {{echo<!-- should be ignored -->
2821 {{echo<!-- should be ignored -->|foo}}
2823 {{<!-- should be ignored -->echo|foo}}
2832 <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>
2834 <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>
2836 <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>
2838 <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>
2840 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2844 Templates: Handle comments in parameter names (T69657)
2847 <!-- should be ignored -->
2851 <!-- should be ignored -->
2854 {{echo|1<!-- should be ignored -->=foo}}
2856 {{echo|<!-- should be ignored -->1=foo}}
2864 <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>
2866 <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>
2868 <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>
2870 <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>
2874 Templates: Other wikitext in parameter names (T69657)
2881 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2885 Templates: With colons
2889 <p>Template with colon
2892 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
2895 #--------------------------------------------------------------------
2896 # Transclusion parameter escaping tests
2897 #--------------------------------------------------------------------
2900 Templates: Parsoid parameter escaping test 1
2902 {{echo|[foo]|{{echo|[bar]}}}}
2907 <p about="#mwt1" typeof="mw:Transclusion"
2908 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2912 Parsoid: Pipes in external links in template parameter
2914 {{echo|[{{echo|http://example.com}} link]}}
2916 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
2919 <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>
2923 Parsoid: pipe in transclusion parameter
2925 {{echo|http://foo.com/a|b}}
2927 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
2930 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2931 typeof="mw:Transclusion"
2932 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
2936 Parsoid: Pipe in external link target and content in template parameter
2938 parsoid=html2wt,wt2wt
2940 {{echo|[http://foo.com/a|b a|b]}}
2942 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
2945 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2946 typeof="mw:Transclusion"
2947 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2948 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2952 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2956 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2958 <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>
2962 Templates: Don't escape already nowiki-escaped text in template parameters
2964 parsoid=html2wt,wt2wt
2966 {{echo|foo<nowiki>|</nowiki>bar}}
2967 {{echo|<nowiki><div></nowiki>}}
2968 {{echo|<nowiki></nowiki>}}
2975 <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>
2976 <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>
2977 <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>
2983 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2985 parsoid=html2wt,wt2wt
2987 {{echo|{{echo|1=bar}}}}
2992 <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>
2997 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3004 <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>
3009 Templates: Preserve blank parameter names
3016 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3020 Templates: Preserve blank parameter names in other positions
3022 {{blank_param|bar|=foo}}
3028 <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
3033 ### Parsoid-centric tests for testing RT edge cases for pre
3037 1a. Indent-Pre and Comments
3050 1b. Indent-Pre and Comments
3063 1c. Indent-Pre and Comments
3076 1d. Indent-Pre and Comments
3077 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3090 2a. Indent-Pre and tables
3111 2b. Indent-Pre and tables
3127 2c. Indent-Pre and tables (T44252)
3144 2d. Indent-Pre and tables
3161 <tbody><tr><td> b</td></tr>
3166 2e. Indent-Pre and table-line syntax
3179 2f. Indent-pre started by table-line syntax
3198 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3203 Text that should be rendered preformatted
3211 <pre>Text that should be rendered preformatted
3220 3a. Indent-Pre and block tags (single-line html)
3224 c <blockquote> foo </blockquote>
3229 c <blockquote> foo </blockquote>
3230 <pre><span> foo </span>
3233 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3234 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3235 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3236 <pre><span> foo </span>
3239 <p> a </p><p> foo </p><p>
3240 b </p><div> foo </div><p>
3241 c </p><blockquote><p> foo </p></blockquote>
3242 <pre><span> foo </span>
3247 3b. Indent-Pre and block tags (multi-line html)
3252 <pre>a <span>foo</span>
3257 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3258 b <div data-parsoid='{"stx":"html"}'> foo </div>
3260 <pre>a <span>foo</span>
3262 b </p><div> foo </div>
3266 3c. Indent-Pre and block tags (pre-content on separate line)
3330 4. Indent-Pre and extension tags
3341 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3345 5. Indent-Pre and html pre
3347 <pre class="123">hi</pre>
3349 <pre class="123">hi</pre>
3352 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3356 Render paragraphs when indent-pre is suppressed in blocklevels
3373 4. Multiple spaces at start-of-line
3391 ## NOTE: the leading white-space chars on empty line are significant
3393 5a. White-space in indent-pre
3405 ## NOTE: the leading white-space chars on empty line are significant
3407 5b. White-space in indent-pre
3426 5c. White-space in indent-pre
3439 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3462 7a. Indent-pre and category links
3464 parsoid=wt2html,wt2wt
3466 [[Category:foo]] <!-- No pre-wrapping -->
3467 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3470 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3471 <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 -->
3474 ## We used to, but no longer wt2wt this test since the default serializer
3475 ## will normalize all categories to serialize on their own line.
3476 ## This wikitext usage is going to be fairly uncommon in production and
3477 ## selser will take care of preserving formatting in those scenarios.
3479 7b. Indent-pre and category links
3484 [[Category:foo]] {{echo|b}}
3486 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3487 <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>
3491 Indent-Pre: Newlines in comments shouldn't affect sol state
3506 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3510 HTML-pre: 1. embedded newlines
3542 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3544 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3547 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3552 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3560 HTML-pre: big spaces
3596 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3615 HTML-pre: 2: indented text
3628 HTML-pre: 3: other wikitext
3647 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3656 ### Definition lists
3663 <dl><dt> name </dt>
3664 <dd> Definition</dd></dl>
3669 Definition list for indentation only
3673 <dl><dd> Indented text</dd></dl>
3678 Definition list with no space
3683 <dd>Definition</dd></dl>
3688 Definition list with URL link
3690 ; http://example.com/ : definition
3692 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3693 <dd> definition</dd></dl>
3698 Definition list with bracketed URL link
3700 ;[http://www.example.com/ Example]:Something about it
3702 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3703 <dd>Something about it</dd></dl>
3708 Definition list with wikilink containing colon
3710 ; [[Help:FAQ]]: The least-read page on Wikipedia
3712 <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>
3713 <dd> The least-read page on Wikipedia</dd></dl>
3717 # At Brion's and JeLuF's insistence... :)
3719 Definition list with news link containing colon
3721 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3723 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3724 <dd> This isn't even a real newsgroup!</dd></dl>
3727 <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>
3731 Malformed definition list with colon
3733 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3735 <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>
3740 Definition lists: colon in external link text
3742 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3744 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3745 <dd> OK, I made that up</dd></dl>
3750 Definition lists: colon in HTML attribute
3752 ;<b style="display: inline">bold</b>
3754 <dl><dt><b style="display: inline">bold</b></dt></dl>
3759 Definition lists: self-closed tag
3761 ;one<br/>two : two-line fun
3763 <dl><dt>one<br />two </dt>
3764 <dd> two-line fun</dd></dl>
3769 Definition lists: ignore colons inside tags
3771 ;one <b>two : tag <i>fun:</i>:</b>: def
3773 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3779 Definition lists: excess closed tags
3781 ;one</b>two : bad tag fun
3783 <dl><dt>onetwo </dt>
3784 <dd> bad tag fun</dd></dl>
3788 <dd>bad tag fun</dd>
3793 T13748: Literal closing tags
3797 <dd>test test test test test</dd>
3799 <dd>test test test test test</dd>
3804 <dd>test test test test test</dd>
3806 <dd>test test test test test</dd>
3812 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3815 ; term : description
3820 <dl><dt> term </dt>
3821 <dd> description</dd></dl>
3822 <ul><li> unordered</li></ul>
3828 Definition list with empty definition and following paragraph
3840 Nested definition lists using html syntax
3853 Definition Lists: No nesting: Multiple dd's
3866 Definition Lists: Indentation: Regular
3874 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3879 Definition Lists: Indentation: Missing 1st level
3885 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3890 Definition Lists: Indentation: Multi-level indent
3894 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3899 Definition Lists: Hacky use to indent tables
3906 should be left alone
3908 <dl><dd><dl><dd><table>
3913 </td></tr></table></dd></dl></dd></dl>
3915 should be left alone
3920 Definition Lists: Hacky use to indent tables, with comments (T65979)
3928 should be left alone
3931 <dl><dd><dl><dd><table><tr>
3934 </tr></table><!-- bar --></dd></dl></dd></dl>
3936 should be left alone</p>
3940 Definition Lists: Hacky use to indent tables, with comment before table
3946 <dl><dd><dl><dd><!-- foo --><table><tr>
3948 </tr></table></dd></dl></dd></dl>
3951 # The trailing whitespace in this test is to catch a regression in
3952 # Parsoid after T54473.
3954 Definition Lists: Hacky use to indent tables (WS-insensitive)
3963 </td></tr></table></dd></dl>
3967 <tbody><tr><td>a</td></tr>
3968 </tbody></table> </dd></dl>
3971 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3972 ## as an empty dt item. It also ignores all but the last ";" when followed
3973 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3974 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3977 ## Ex: ";;t2 ::d2" is transformed into:
3989 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3990 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4001 ## All Parsoid only definition list tests have this difference.
4003 ## See also: https://phabricator.wikimedia.org/T8569
4004 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4007 Table / list interaction: indented table with lists in table contents
4022 <ul><li> b</li></ul>
4026 <ul><li> d</li></ul>
4027 </td></tr></table></dd></dl>
4032 Table / list interaction: lists nested in tables nested in indented lists
4055 </td></tr></table></dd></dl>
4062 Definition Lists: Nesting: Multi-level (Parsoid only)
4090 Definition Lists: Nesting: Test 2
4097 <dl><dd>d2</dd></dl></dd></dl>
4102 Definition Lists: Nesting: Test 3
4107 <dl><dd><dl><dt>t1</dt>
4109 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4114 Definition Lists: Nesting: Test 4
4119 <dl><dd><dl><dd><dl><dt>t3</dt>
4120 <dd>d3</dd></dl></dd></dl></dd></dl>
4125 ## The Parsoid team believes the following three test exposes a
4126 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4127 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4128 ## It also exposes a "misfeature" in tidy, which doesn't like
4129 ## <dl> tags with a single <dt> child; it converts the <dt> into
4130 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4132 Definition Lists: Mixed Lists: Test 1
4138 <dl><dd><dl><dt><ul><li> foo</li>
4139 <li> bar</li></ul></dt></dl>
4140 <dl><dt> baz</dt></dl></dd></dl>
4143 <dl><dd><dl><dt><ul><li> foo</li>
4144 <li> bar</li></ul></dt></dl>
4145 <dl><dt> baz</dt></dl></dd></dl>
4163 Definition Lists: Mixed Lists: Test 2
4168 <ul><li><dl><dd> d1</dd>
4169 <dd> d2</dd></dl></li></ul>
4175 Definition Lists: Mixed Lists: Test 3
4180 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4181 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4187 Definition Lists: Mixed Lists: Test 4
4192 <ul><li><dl><dt>d1 </dt>
4195 <dd>d4</dd></dl></li></ul>
4201 Definition Lists: Mixed Lists: Test 5
4207 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4213 Definition Lists: Mixed Lists: Test 6
4218 <ol><li><ul><li><dl><dd>d1
4219 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4225 Definition Lists: Mixed Lists: Test 7
4230 <dl><dd><ul><li> d1</li>
4231 <li> d2</li></ul></dd></dl>
4237 Definition Lists: Mixed Lists: Test 8
4242 <dl><dd><ul><li> d1</li></ul>
4243 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4249 Definition Lists: Mixed Lists: Test 9
4253 <ul><li><dl><dt>foo </dt>
4254 <dd>bar</dd></dl></li></ul>
4260 Definition Lists: Mixed Lists: Test 10
4264 <ul><li><ol><li><dl><dt>foo </dt>
4265 <dd>bar</dd></dl></li></ol></li></ul>
4269 # The Parsoid team disagrees with the PHP parser's seemingly-random
4270 # rules regarding dd/dt on the next few tests. Parsoid is more
4271 # consistent, and recognizes the shared nesting and keeps the
4272 # still-open tags around until the nesting is complete.
4274 # This is a regression test for T175099
4276 Definition Lists: Mixed Lists: Test 11
4283 <ul><li>b</li></ul></dd></dl>
4287 <dd><ul><li>b</li></ul></dd></dl>
4290 # FIXME: Maybe get rid of this test?
4292 Definition Lists: Mixed Lists: Test 12
4297 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4298 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4299 <dl><dt>boo </dt>
4300 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4303 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4304 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4305 <dl><dt>boo </dt>
4306 <dd>baz</dd></dl></li></ol></li></ul>
4323 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4324 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4328 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4329 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4337 # FIXME: Maybe get rid of this test?
4339 # * The test is wrong, there are two colons where there should be :;
4340 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4342 Definition Lists: Weird Ones: Test 1
4344 *#;*::;; foo : bar (who uses this?)
4346 <ul><li><ol><li><dl><dt> foo </dt>
4347 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4364 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4365 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4377 Definition Lists: colons occurring in tags
4394 <dt><span>a:b</span></dt>
4395 <dt><div>a:b</div></dt>
4396 <dt><div>a</div></dt>
4400 <dt><i>a:b</i></dt></dl>
4401 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4403 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4405 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4406 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4407 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4408 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4410 <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>
4411 <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>
4412 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4415 # Parsoid's output differs here again because it shares
4416 # nesting between the two lists unlike the PHP parser.
4417 # Unsure which is more desirable.
4419 Definition Lists: colons and tables 1
4431 </td></tr></table></dd></dl>
4435 </td></tr></table></dd></dl>
4441 </td></tr></table></dd>
4445 </td></tr></table></dd></dl>
4448 # FIXME: Does this need a html/php section?
4450 Definition Lists: template interaction
4452 ::{{definition_list}}
4455 ::{{definition_list}}
4460 <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">
4461 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4463 <dl><dd data-parsoid='{}'>one
4464 <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">
4465 </span><dd about="#mwt2">two
4467 <dd>three</dd></dl></dd>
4468 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4476 External links: non-bracketed
4478 Non-bracketed: http://example.com
4480 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4484 # parsoid doesn't explicitly mark autonumbered links, see T55505
4486 External links: numbered
4488 Numbered: [http://example.com]
4489 Numbered: [http://example.net]
4490 Numbered: [http://example.com]
4492 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4493 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4494 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4497 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4498 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4499 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4503 External links: specified text
4505 Specified text: [http://example.com link]
4507 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4512 External links: trail
4514 Linktrails should not work for external links: [http://example.com link]s
4516 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4521 External links: dollar sign in URL
4523 http://example.com/1$2345
4525 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4529 # parsoid doesn't explicitly mark autonumbered links, see T55505
4531 External links: dollar sign in URL (autonumber)
4533 [http://example.com/1$2345]
4535 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4538 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4542 External links: open square bracket forbidden in URL (T6377)
4544 parsoid=wt2html,wt2wt,html2html
4546 http://example.com/1[2345
4548 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4551 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4555 External links: open square bracket forbidden in URL (named) (T6377)
4557 parsoid=wt2html,html2html
4559 [http://example.com/1[2345]
4561 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4564 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4567 # parsoid adds a space before the link name
4569 External links: open square bracket forbidden in URL (named) (T6377)
4572 [http://example.com/1 [2345]
4574 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4579 External links: nowiki in URL link text (T8230)
4581 [http://example.com/ <nowiki>''example site''</nowiki>]
4583 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4588 External links: newline forbidden in text (T8230 regression check)
4590 [http://example.com/ first
4593 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4599 External links: Pipe char between url and text
4601 [http://example.com | link]
4603 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4608 External links: protocol-relative URL in brackets
4610 [//example.com/ Test]
4612 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4616 # parsoid doesn't explicitly mark autonumbered links, see T55505
4618 External links: protocol-relative URL in brackets without text
4622 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4625 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4629 External links: protocol-relative URL in free text is left alone
4633 <p>//example.com/Foo
4638 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4640 foo//example.com/Foo
4642 <p>foo//example.com/Foo
4646 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4648 External links: with no contents
4650 parsoid=wt2html,wt2wt
4652 [http://en.wikipedia.org/wiki/Foo]
4654 [[wikipedia:Foo|Bar]]
4656 [[wikipedia:Foo|<span>Bar</span>]]
4658 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4659 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4660 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4663 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4664 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4665 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4669 External links: Free with trailing punctuation
4679 http://example.com/url_with_(brackets)
4680 (http://example.com/url_without_brackets)
4681 http://example.com/url_with_entity&
4682 http://example.com/url_with_entity&
4683 http://example.com/url_with_entity&
4684 http://example.com/url_with_entity
4685 http://example.com/url_with_entity 
4686 http://example.com/url_with_entity 
4687 http://example.com/url_with_entity<
4688 http://example.com/url_with_entity<
4689 http://example.com/url_with_entity<
4691 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4692 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4693 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4694 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4695 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4696 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4697 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4698 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4699 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4700 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4701 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4702 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4703 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4704 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4705 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4706 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4707 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4708 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4709 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4712 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4713 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4714 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4715 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4716 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4717 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4718 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4719 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4720 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4721 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4722 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4723 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4724 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4725 <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>
4726 <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>
4727 <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>
4728 <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>
4729 <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>
4730 <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>
4734 External links: tricky Parsoid html2html case
4736 parsoid=wt2html,wt2wt,html2html
4738 http://example.com/url_with_entity&amp;
4740 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4743 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4747 External links: Free with trailing quotes (T113666)
4749 '''News:''' Stuff here
4753 <p><b>News:</b> Stuff here
4754 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4757 <p><b>News:</b> Stuff here</p>
4758 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4762 External links: with entity
4764 [http:// www.librarieswithoutborders.org Libraries without borders]
4766 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4769 <p><a rel="mw:ExtLink" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
4773 External links: Lone protocols are never linked (T105697)
4792 External links: No preceding word characters allowed (T67278)
4794 NOPEhttp://example.com
4795 N0http://example.com
4796 ok:http://example.com
4797 ok-http://example.com
4799 <p>NOPEhttp://example.com
4800 N0http://example.com
4801 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4802 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4807 External links: nofollow domain exception
4809 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4811 <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>.
4818 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4820 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4825 External image from https
4827 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4829 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4834 External image (when not allowed)
4836 wgAllowExternalImages=0
4838 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4840 <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>
4845 Link to non-http image, no img tag
4847 Link to non-http image, no img tag: ftp://example.com/test.jpg
4849 <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>
4854 External links: terminating separator
4856 Terminating separator: http://example.com/thing,
4858 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4863 External links: intervening separator
4865 Intervening separator: http://example.com/1,2,3
4867 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4872 External links: old bug with URL in query
4874 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4876 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4881 External links: old URL-in-URL bug, mixed protocols
4883 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4885 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4889 # Since Parsoid is starting to emit canonical wikitext for links,
4890 # [http://example.com http://example.com] will not RT back to that
4893 External links: URL in text
4897 URL in text: [http://example.com http://example.com]
4899 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4902 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4906 External links: Clickable images
4908 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4910 <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>
4913 <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>
4917 External links: raw ampersand
4919 Old & use: http://x&y
4921 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4926 External links: encoded ampersand
4928 Old & use: http://x&y
4930 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4933 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4937 External links: encoded equals (T8102)
4939 http://example.com/?foo=bar
4941 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4944 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4948 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4949 ## does it number them. As discussed in T55505, we can identify
4950 ## autonumbered links via CSS.
4954 External links: [raw ampersand]
4956 Old & use: [http://x&y]
4958 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4961 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4964 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4965 # mode will return the [raw ampersand] wikitext
4967 External links: [encoded ampersand]
4969 parsoid=wt2html,wt2wt,html2html
4971 Old & use: [http://x&y]
4973 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4976 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4980 External links: [raw equals]
4982 [http://example.com/?foo=bar]
4984 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4987 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4990 # note that parsoid html is identical to [raw equals] case; so html2wt
4991 # mode will return the [raw equals] wikitext
4993 External links: [encoded equals] (T8102)
4995 parsoid=wt2html,wt2wt,html2html
4997 [http://example.com/?foo=bar]
4999 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5002 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5005 # xxx parsoid strips the IDN character, so the round-trip tests will
5006 # obviously fail and are disabled. --cscott
5008 External links: [IDN ignored character reference in hostname; strip it right off]
5010 parsoid=wt2html,wt2wt,html2html
5012 [http://e‌xample.com/]
5014 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5017 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5020 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5021 # Where an external link could easily circumvent the sanitization of the text of
5022 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5023 # test demands a higher standard. That's a bit strange.
5027 # http://example.com -> [http://example.com|http://example.com]
5028 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5030 # The first example is sanitized, but the second is not. Any security benefits
5031 # from this production are trivial to circumvent. Either remove this test and
5032 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5033 # the test accordingly.
5037 # xxx parsoid strips the IDN character, so the round-trip tests will
5038 # obviously fail and are disabled. --cscott
5040 External links: IDN ignored character reference in hostname; strip it right off
5042 parsoid=wt2html,html2html
5044 http://e‌xample.com/
5046 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5049 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5053 External links: www.jpeg.org (T2554)
5057 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5061 # parsoid doesn't explicitly mark autonumbered links, see T55505
5063 External links: URL within URL (T2002)
5065 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5067 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5070 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5074 T2361: URL inside bracketed URL
5076 [http://www.example.com/foo http://www.example.com/bar]
5078 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5083 T2361: URL within URL, not bracketed
5085 http://www.example.com/foo?=http://www.example.com/bar
5087 <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>
5092 T2289: ">"-token in URL-tail
5094 http://www.example.com/<hello>
5096 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5101 T2289: literal ">"-token in URL-tail
5103 http://www.example.com/<b>html</b>
5105 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5108 <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>
5112 T2289: ">"-token in bracketed URL
5114 [http://www.example.com/<hello> stuff]
5116 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5121 T2289: literal ">"-token in bracketed URL
5123 [http://www.example.com/<b>html</b> stuff]
5125 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5130 T2289: literal double quote at end of URL
5132 http://www.example.com/"hello"
5134 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5139 T2289: literal double quote in bracketed URL
5141 [http://www.example.com/"hello" stuff]
5143 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5148 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5150 [http://www.example.com test]
5152 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5157 External links: link text with spaces
5159 [http://www.example.com a b c]
5160 [http://www.example.com ''a'' ''b'']
5162 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5163 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5168 External links: wiki links within external link (T5695)
5170 parsoid=wt2html,html2html
5172 [http://example.com [[wikilink]] embedded in ext link]
5174 <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>
5177 <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>
5181 T2787: Links with one slash after the url protocol are invalid
5185 [http:/example.com title]
5187 <p>http:/example.com
5188 </p><p>[http:/example.com title]
5193 Bracketed external links with template-generated invalid target
5195 [{{echo|http:/example.com}} title]
5197 <p>[http:/example.com title]
5201 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5203 Broken wikilinks (but not external links) prevent templates from closing
5207 [http://example.com x
5209 {{echo|[http://example.com x}}
5215 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5216 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5218 </p><p>{{echo|[[Foo}}
5221 <p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5222 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5224 <p>{{echo|[[Foo}}</p>
5228 Wikilinks with embedded newlines are not broken
5239 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5251 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5255 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5256 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5260 T4702: Mismatched <i>, <b> and <a> tags are invalid
5262 ''[http://example.com text'']
5263 [http://example.com '''text]'''
5264 ''Something [http://example.com in italic'']
5265 ''Something [http://example.com mixed''''', even bold]'''
5266 '''''Now [http://example.com both''''']
5268 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5269 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5270 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5271 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5272 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5280 http://www.example.com/?title=AT%26T
5282 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5285 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5288 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5289 # % is actually legal in HTML5. Any change in output would need testing though.
5291 T6781, T7267: %25 in URL
5293 http://www.example.com/?title=100%25_Bran
5295 <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>
5298 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5302 T6781, T7267: %28, %29 in URL
5304 http://www.example.com/?title=Ben-Hur_%281959_film%29
5306 <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>
5309 <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>
5314 T6781: %26 in autonumber URL
5316 [http://www.example.com/?title=AT%26T]
5318 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5321 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5325 T6781, T7267: %26 in autonumber URL
5327 [http://www.example.com/?title=100%25_Bran]
5329 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5332 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5336 T6781, T7267: %28, %29 in autonumber URL
5338 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5340 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5343 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5348 T6781: %26 in bracketed URL
5350 [http://www.example.com/?title=AT%26T link]
5352 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5355 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5359 T6781, T7267: %25 in bracketed URL
5361 [http://www.example.com/?title=100%25_Bran link]
5363 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5368 T6781, T7267: %28, %29 in bracketed URL
5370 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5372 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5375 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5379 External link containing a period in the anchor. (T65947)
5381 [//foo.org/bar#baz. bang]
5383 [//foo.org/bar. bang]
5385 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5386 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5389 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5390 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5394 External link containing a single quote. (T65947)
5398 [//foo.org/bar'baz bang]
5400 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5401 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5404 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5405 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5409 External link containing double-single-quotes in text '' (T6598 sanity check)
5411 Some [http://example.com/ pretty ''italics'' and stuff]!
5413 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5418 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5420 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5422 <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>
5426 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5428 External link containing double-single-quotes with no space separating the url from text in italics
5430 [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]].]
5432 <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>.
5435 <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>
5439 External link with comments in link text
5441 [http://www.google.com Google <!-- comment -->]
5443 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5446 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5450 External link to bare IPv4 address
5452 [http://192.168.0.1 Link]
5454 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5457 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5461 URL-encoding in URL functions (single parameter)
5463 {{localurl:Some page|amp=&}}
5465 <p>/index.php?title=Some_page&amp=&
5470 URL-encoding in URL functions (multiple parameters)
5472 {{localurl:Some page|q=?&=&}}
5474 <p>/index.php?title=Some_page&q=?&amp=&
5481 http://example.com/index.php?foozoid%5B%5D=bar
5483 http://example.com/index.php?foozoid[]=bar
5485 <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>
5486 </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>
5489 <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>
5491 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5495 IPv6 urls, autolink format (T23261)
5497 http://[2404:130:0:1000::187:2]/index.php
5499 Examples from RFC 2373, section 2.2:
5500 * http://[1080::8:800:200C:417A]/unicast
5501 * http://[FF01::101]/multicast
5502 * http://[::1]/loopback
5503 * http://[::]/unspecified
5504 * http://[::13.1.68.3]/ipv4compat
5505 * http://[::FFFF:129.144.52.38]/ipv4compat
5507 Examples from RFC 2732, section 2:
5508 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5509 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5510 * http://[3ffe:2a00:100:7031::1]
5511 * http://[1080::8:800:200C:417A]/foo
5512 * http://[::192.9.5.5]/ipng
5513 * http://[::FFFF:129.144.52.38]:80/index.html
5514 * http://[2010:836B:4179::836B:4179]
5517 <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>
5518 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5520 <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>
5521 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5522 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5523 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5524 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5525 <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>
5526 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5528 <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>
5529 <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>
5530 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5531 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5532 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5533 <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>
5534 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5537 <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>
5539 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5540 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5541 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5542 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5543 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5544 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5545 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5547 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5548 <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>
5549 <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>
5550 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5551 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5552 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5553 <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>
5554 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5558 IPv6 urls, bracketed format (T23261)
5560 [http://[2404:130:0:1000::187:2]/index.php test]
5562 Examples from RFC 2373, section 2.2:
5563 * [http://[1080::8:800:200C:417A] unicast]
5564 * [http://[FF01::101] multicast]
5565 * [http://[::1]/ loopback]
5566 * [http://[::] unspecified]
5567 * [http://[::13.1.68.3] ipv4compat]
5568 * [http://[::FFFF:129.144.52.38] ipv4compat]
5570 Examples from RFC 2732, section 2:
5571 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5572 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5573 * [http://[3ffe:2a00:100:7031::1] 3]
5574 * [http://[1080::8:800:200C:417A]/foo 4]
5575 * [http://[::192.9.5.5]/ipng 5]
5576 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5577 * [http://[2010:836B:4179::836B:4179] 7]
5580 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5581 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5583 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5584 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5585 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5586 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5587 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5588 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5589 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5591 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5592 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5593 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5594 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5595 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5596 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5597 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5600 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5602 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5603 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5604 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5605 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5606 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5607 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5608 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5610 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5611 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5612 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5613 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5614 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5615 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5616 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5617 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5621 Non-extlinks in brackets
5630 [{{echo|foo}} ''bar'']
5631 [{{echo|foo}}l's] errand
5632 [{{echo|foo}}l's errand]
5634 [url=http://example.com]
5635 [http:// bare protocols don't count]
5648 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5649 [http:// bare protocols don't count]
5657 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5658 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5659 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5660 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5661 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5662 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5663 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5664 [http:// bare protocols don't count]</p>
5668 Percent encoding in external links
5670 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5672 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5675 <p><a rel="mw:ExtLink"
5676 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5680 Use url link syntax for links where the content is equal the link target
5684 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5687 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5691 Parenthesis in external links, especially URL links
5695 http://example.com/test)
5697 http://example.com/(test)
5699 http://example.com/((test)
5701 (http://example.com/(test))
5703 (http://example.com/(test)))))
5705 http://example.com/a)b
5707 [http://example.com) foo]
5709 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5710 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5711 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5712 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5713 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5714 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5715 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5716 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5719 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5720 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5721 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5722 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5723 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5724 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5725 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5726 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5730 Parenthesis in external links, w/ transclusion or comment
5732 (http://example.com/{{echo|hi}})
5734 (http://example.com<!-- hi -->)
5736 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5737 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5740 <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>
5742 <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>
5746 Serialize <a> tags with invalid link targets as plain text
5748 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5750 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5751 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5752 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5753 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5756 <nowiki>*</nowiki>text
5757 <nowiki>[[foo]]</nowiki>
5758 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5762 mw:ExtLink -vs- mw:WikiLink (T94723)
5766 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5767 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5768 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5769 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5771 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5772 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5780 [[:en:European_Robin|European Robin]]
5781 [[:en:European_Robin|European Robin]]
5785 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5789 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5791 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5802 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5804 Normal text. '''''Bold italic text.''''' Normal text.
5806 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5807 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5812 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5813 # parser strips. The wikitext contains just the first half of the bold
5816 Unclosed and unmatched quotes
5818 '''''Bold italic text '''with bold deactivated''' in between.'''''
5820 '''''Bold italic text ''with italic deactivated'' in between.'''''
5824 ..spanning two paragraphs (should not work).'''
5826 '''Bold tag left open
5828 ''Italic tag left open
5832 <!-- Unmatching number of opening, closing tags: -->
5833 '''This year''''s election ''should'' beat '''last year''''s.
5835 ''Tom'''s car is bigger than ''Susan'''s.
5837 Plain ''italic'''s plain
5839 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5840 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5841 </p><p><b>Bold text..</b>
5842 </p><p>..spanning two paragraphs (should not work).
5843 </p><p><b>Bold tag left open</b>
5844 </p><p><i>Italic tag left open</i>
5846 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5847 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5848 </p><p>Plain <i>italic'</i>s plain
5851 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5852 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5853 </p><p><b>Bold text..</b>
5854 </p><p>..spanning two paragraphs (should not work).<b></b>
5855 </p><p><b>Bold tag left open</b>
5856 </p><p><i>Italic tag left open</i>
5859 <!-- Unmatching number of opening, closing tags: -->
5860 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5861 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5862 </p><p>Plain <i>italic'</i>s plain
5869 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5872 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5873 # is the bare minimum required by the spec, see:
5874 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5875 # Parsoid team replies: empty table tags are legal in HTML5
5877 A table with no data.
5890 A table with stray table end tags on start tag line (wt2html)
5894 {|style="color: red;"|}
5896 {|style="color: red;" |}
5900 {|style="color: red;"|} id="foo"
5904 {|style="color: red;" |} id="foo"
5908 <table style="color: red;"></table>
5910 <table style="color: red;">
5916 <table style="color: red;" id="foo">
5922 <table style="color: red;" id="foo">
5931 A table with no data (take 2)
5939 # A table with nothing but a caption is invalid XHTML, we might want to render
5940 # this as <p>caption</p>
5941 # Parsoid team replies: table with only a caption is legal in HTML5
5943 A table with nothing but a caption
5951 </caption><tr><td></td></tr></table>
5954 <table><caption> caption</caption></table>
5958 A table with caption with default-spaced attributes and a table row
5961 |+ style="color: red;" | caption1
5967 <caption style="color: red;"> caption1
5976 A table with captions with non-default spaced attributes and a table row
5979 |+style="color: red;"|caption2
5980 |+ style="color: red;"| caption3
5986 <caption style="color: red;">caption2
5988 <caption style="color: red;"> caption3
5997 Table td-cell syntax variations
6001 | foo bar foo || baz
6002 | style='color:red;' | baz
6003 | style='color:red;' || baz
6010 <td> foo bar foo </td>
6013 <td style="color:red;"> baz
6015 <td> style='color:red;' </td>
6043 Simple table but with multiple dashes for row wikitext
6062 Multiplication table
6064 {| border="1" cellpadding="2"
6065 |+Multiplication table
6067 ! × !! 1 !! 2 !! 3
6085 <table border="1" cellpadding="2">
6086 <caption>Multiplication table
6133 Accept "||" in table headings
6148 Accept "!!" in table data
6162 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6167 Accept "||" in indented table headings
6177 </th></tr></table></dd></dl>
6182 Accept "!!" in templates
6196 <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>
6200 Accept "!!" in table headings after newline
6217 <p>b!!c</p></th></tr>
6222 Accept "!!" in table data of mixed wikitext / html syntax
6226 <tr><td>b!!c</td></tr>
6232 </th></tr><tr><td>b!!c</td></tr>
6236 <tbody><tr><th>a</th></tr>
6237 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6242 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6259 Accept "| !" at start of line in tables (ignore !-attribute)
6263 | !style="color:red" | bar
6275 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 +/-
6279 |style='color:red;'|+1
6280 |style='color:blue;'|-1
6292 <td style="color:red;">+1
6294 <td style="color:blue;">-1
6318 |rowspan=2| Cell 2, row 1 (and 2)
6329 <td rowspan="2"> Cell 2, row 1 (and 2)
6347 {| bgcolor=#ABCDEF border=2
6352 |the original table again
6360 <table bgcolor="#ABCDEF" border="2">
6368 <td>the original table again
6374 Invalid attributes in table cell (T3830)
6388 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6392 | title="foo<nowiki>|</nowiki>" |bar
6393 | title="foo<nowiki>|</nowiki>" bar
6400 <td title="foo|">bar
6402 <td> title="foo|" bar
6407 <tbody><tr><td title="foo">bar</td>
6408 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6409 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6413 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6414 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6415 # *2wt modes will fail.
6417 Table security: embedded pipes
6419 parsoid=wt2html,html2html
6422 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6426 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6427 <td>]" onmouseover="alert(document.cookie)">test
6435 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6439 Element attributes with double ! should not be broken up by <th>
6442 ! hi <div class="!!">ha</div> ho
6447 <th> hi <div class="!!">ha</div> ho
6452 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6457 ! and || in element attributes should not be parsed as <th>/<td>
6460 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6465 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6470 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6474 # FIXME: The output seems broken. Filed as T110268.
6476 ! and || in td attributes should not be parsed as <th>/<td>
6481 | style="color: red !important;" data-contrived="put this here ||" | foo
6486 <td> style="color: red !important;" data-contrived="put this here </td>
6492 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6497 Break on | in element attribute in template
6499 parsoid=wt2html,html2html
6501 {{echo|1=<div class="hi|ho">ha</div>}}
6503 <p>ho">ha</div>
6506 <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>
6510 Break on | in element attribute name in template
6512 {{echo|<div cla|ss="hiho">ha</div>}}
6514 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6518 Don't break on | in extension attribute in template
6520 {{echo|<ref name="hi|ho">ha</ref>}}
6524 <p><span about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" 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|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
6526 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6529 ## We don't support roundtripping of these attributes in Parsoid.
6530 ## Selective serialization takes care of preventing dirty diffs.
6531 ## But, on edits, we dirty-diff the invalid attribute text.
6533 Invalid text in table attributes should be discarded
6537 {| <span>boo</span> style='border:1px solid black'
6538 | <span>boo</span> style='color:blue' | 1
6539 |<span>boo</span> style='color:blue'| 2
6542 <table style="border:1px solid black">
6544 <td style="color:blue"> 1
6546 <td style="color:blue"> 2
6550 <table style="border:1px solid black">
6552 <td style="color:blue"> 1</td>
6553 <td style="color:blue"> 2</td>
6559 Invalid text in table attributes should be preserved by selective serializer
6562 "modes": ["selser"],
6564 ["td:first-child", "text", "abc"],
6565 ["td + td", "text", "xyz"]
6569 {| <span>boo</span> style='border:1px solid black'
6570 | <span>boo</span> style='color:blue' | 1
6571 |<span>boo</span> style='color:blue'| 2
6574 {| <span>boo</span> style='border:1px solid black'
6575 | <span>boo</span> style='color:blue' |abc
6576 |<span>boo</span> style='color:blue'|xyz
6581 1. Template-generated table cell attributes and cell content
6586 || {{table_attribs_5}}
6587 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6588 |align=center {{table_attribs}}
6589 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6594 <td style="color:red;">Foo
6596 <td style="color:red;">Foo
6598 <td> style="color:red;"</td>
6601 <td style="color:red;">Foo
6603 <td align="center" style="color:red;">Foo
6605 <td align="center" style="color:red;">Foo
6611 2. Template-generated table cell attributes and cell content
6614 |{{table_attribs_2}}
6619 <td style="color:red;">Foo
6627 <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>
6628 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6633 3. Template-generated table cell attributes and cell content
6636 !align=center {{table_header_cells}}
6638 |align=center {{table_cells}}
6643 <th align="center" style="color:red;">Foo</th>
6644 <th style="color:red;"><i>Bar</i></th>
6645 <th style="color:brown;"><i>Foo</i> and Baz
6648 <td align="center" style="color:red;">Foo</td>
6649 <td style="color:red;"><i>Bar</i></td>
6650 <td style="color:brown;"><i>Foo</i> and Baz
6655 <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>
6656 <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>
6661 4. Template-generated table cell attributes and cell content inside a templated table
6664 !align=center {{table_header_cells}}
6666 |align=center {{table_cells}}
6671 <th align="center" style="color:red;">Foo</th>
6672 <th style="color:red;"><i>Bar</i></th>
6673 <th style="color:brown;"><i>Foo</i> and Baz
6676 <td align="center" style="color:red;">Foo</td>
6677 <td style="color:red;"><i>Bar</i></td>
6678 <td style="color:brown;"><i>Foo</i> and Baz
6682 <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}}]}'>
6683 <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>
6685 <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>
6689 ## Edge case fix to prevent future regressions
6691 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6694 |{{table_attribs_7}}
6699 <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>
6701 <ol class="mw-references 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>
6705 Table with row followed by newlines and table heading
6707 parsoid=wt2html,html2html
6725 Table with empty line following the start tag
6727 parsoid=wt2html,html2html
6745 Table attributes with empty value
6747 parsoid=wt2html,html2html
6760 <tbody><tr><td style=""> hello</td></tr>
6765 Wikitext table with a lot of comments
6788 Wikitext table comments represented in parsoid dom
6790 {|<!--c1--><!--c2-->
6799 </td></tr></tbody></table>
6801 <table><!--c1--><!--c2-->
6802 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6803 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6808 Wikitext table with double-line table cell
6825 Table cell with a single comment
6842 Table-cell after a comment-only-empty-line
6859 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6861 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6867 Build table with {{!}}
6869 {{{!}} class="wikitable"
6872 {{!}}- style="color:red;"
6873 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6876 <table class="wikitable">
6882 <tr style="color:red;">
6884 <td style="color:red;"> second data
6890 Build table with pipe as data
6892 {| class="wikitable"
6895 |- style="color:red;"
6896 | data || style="color:red;" | second data
6898 | style="color:red;" | data with | || style="color:red;" | second data with |
6900 || data with | ||| second data with |
6903 <table class="wikitable">
6909 <tr style="color:red;">
6911 <td style="color:red;"> second data
6914 <td style="color:red;"> data with | </td>
6915 <td style="color:red;"> second data with |
6918 <td> data with | </td>
6919 <td> second data with |
6925 Build table with wikilink
6927 {| class="wikitable"
6928 ! header || second header
6929 |- style="color:red;"
6930 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6932 | data || second data [[Main Page|link|text with pipe]]
6935 <table class="wikitable">
6940 <tr style="color:red;">
6941 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6942 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6946 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6951 # The expected HTML structure in this test is debatable. The PHP parser does
6952 # not parse this kind of table at all. The main focus for Parsoid is on
6953 # round-tripping, so this output is ok for now. TODO: revisit!
6955 Wikitext table with html-syntax row
6965 <td>foo</td></tr></tbody></table>
6969 Fostered content in tables: Plain text
6971 parsoid=wt2html,html2html
6989 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
6990 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6992 </tr></tbody></table>
6996 Fostered content in tables: Lists
6998 parsoid=wt2html,html2html
7011 <ul><li>a</li></ul><table>
7016 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7017 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7019 </tr></tbody></table>
7023 Template generated table cell with attributes
7027 {{table_attribs_4}} || a || b
7033 <td style="background-color:#DC241f;" width="10px"> </td>
7036 </td></tr></tbody></table>
7039 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7040 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," || a || b"]}'> </td><td about="#mwt1"> a </td><td about="#mwt1"> b</td></tr>
7044 Parsoid: Round-trip tables directly followed by content (T53219)
7046 parsoid=wt2html,wt2wt
7059 </td></tr></tbody></table><p> bar
7063 </td></tr></tbody></table><p><b>quux</b>
7068 Parsoid: Default to a newline after tables in new content (T53219)
7073 <tr><td>foo</td></tr></tbody></table> bar
7075 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7080 <nowiki> </nowiki>bar
7088 Parsoid: newline inducing block nodes don't suppress <nowiki>
7100 Parsoid: Row-syntax table headings followed by comment & table cells
7102 parsoid=wt2html,wt2wt
7106 <!-- foo --> || baz || quux
7120 <tbody><tr><th> foo </th><th> bar
7121 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7126 Parsoid: Recover better from broken table attributes
7140 </td></tr></tbody></table>
7145 <p>foo</p></td></tr>
7150 Tables: Digest broken attributes on table and tr tag
7161 <tr class='mw-empty-elt'></tr>
7162 <tr class='mw-empty-elt'></tr>
7166 # T137406: Whitespace in the HTML
7168 1. Generate correct wikitext for tables with thead/tbody/tfoot
7173 <caption>Test</caption>
7235 </td></tr></tbody></table>
7238 # T137406: No whitespace in the HTML
7240 2. Generate correct wikitext for tables with thead/tbody/tfoot
7244 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7254 Testing serialization after deletion in references
7263 hi <ref><div id="x">ho</div></ref>
7273 Testing serialization after deletion of table cells
7276 "modes": ["wt2wt", "selser"],
7284 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7294 Testing selser after addition of new row before first row (T125419)
7297 "modes": ["wt2wt", "selser"],
7299 [ "tr", "before", "<tr><td>X</td></tr>" ]
7315 Serialize new table rows in a HTML table using HTML tags
7318 "modes": ["wt2wt", "selser"],
7320 [ "tr", "before", "<tr><td>X</td></tr>" ]
7324 <table><tr><td>a</td></tr></table>
7326 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7330 Serialize new table cells in a HTML row using HTML tags
7333 "modes": ["wt2wt", "selser"],
7335 [ "td", "before", "<td>X</td>" ]
7339 <table><tr><td>a</td></tr></table>
7341 <table><tr><td>X</td><td>a</td></tr></table>
7345 Wikitext tables can be nested inside HTML tables
7349 <table data-parsoid='{"stx":"html"}'>
7352 <tr><td>foo</td></tr>
7367 Serialize wikitext list items as HTML list items when embedded in a HTML list
7371 <ul data-parsoid='{"stx": "html"}'>
7372 <li data-parsoid='{}'>a</li>
7382 # SSS FIXME: Is this actually a good thing given the
7383 # odd nested list output that is generated by MW?
7384 # <ul><li>foo<ul>..</ul></li></ul> instead of
7385 # <ul><li>foo</li><ul>..</ul></ul>
7387 Wikitext lists can be nested inside HTML lists
7391 <ul data-parsoid='{"stx": "html"}'>
7392 <li data-parsoid='{"stx": "html"}'>a
7397 <ul data-parsoid='{"stx": "html"}'>
7420 Plain link, capitalized
7424 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7429 Plain link, uncapitalized
7433 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7440 [[Main Page|The Main Page]]
7442 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7447 Piped link with comment in link text
7449 [[Main Page|The Main<!--front--> Page]]
7451 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7456 Piped link with multiple pipe characters in link text
7458 [[Main Page||The|Main|Page|]]
7460 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7463 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7467 Piped link with no link text
7469 [[Thomas Bek (bishop of St David's)|]]
7471 <p>[[Thomas Bek (bishop of St David's)|]]
7474 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7478 Piped link with empty link text
7480 [[Main Page|<nowiki/>]] - empty nowiki
7481 [[Main Page| ]] - empty space
7482 [[Main Page| ]] - empty non breaking space
7484 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7485 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7486 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7489 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7490 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7491 <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>
7499 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7504 Broken link with fragment
7506 [[Zigzagzogzagzig#zug]]
7508 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7513 Special page link with fragment
7515 [[Special:Version#anchor]]
7517 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7522 Nonexistent special page link with fragment
7524 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7526 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7533 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7535 <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>
7542 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7544 <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>!!!
7555 T45661: Piped links with identical prefixes
7557 [[prefixed article|prefixed articles with spaces]]
7559 [[prefixed article|prefixed articlesaoeu]]
7561 [[Main Page|Main Page test]]
7563 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7564 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7565 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7571 Link with HTML entity in suffix / tail
7573 [[Main Page]]", [[Main Page]]a
7575 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7578 <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>
7582 Link with 3 brackets
7593 Link with 4 brackets
7597 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7602 Piped link with 3 brackets
7604 [[[main page|the main page]]]
7606 <p>[[[main page|the main page]]]
7611 Piped link with extlink-like text
7614 [[Main Page|This is a [bar]]]
7617 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7618 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7619 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7622 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7623 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7624 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7628 Link with multiple pipes
7630 [[Main Page|The|Main|Page]]
7632 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7637 Anchor containing a #. (T65430)
7639 wgFragmentMode=[ 'html5', 'legacy' ]
7641 [[Main Page#And#Link]]
7643 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7646 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7652 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7654 <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>
7659 Link with space in namespace
7661 [[User talk:Foo bar]]
7663 <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>
7668 MemoryAlpha:AlphaTest
7670 This is an article in the MemoryAlpha namespace
7671 (which shadows the memoryalpha interwiki link).
7675 Namespace takes precedence over interwiki link (T53680)
7677 [[MemoryAlpha:AlphaTest]]
7679 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7683 # The previous test doesn't work correctly in html2*, due to not recognizing the
7684 # link as an internal one. This one checks for the correct behavior.
7686 Link to namespace preferred over interwiki with correct rel attribute
7688 parsoid=html2wt,html2html
7690 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7692 [[MemoryAlpha:AlphaTest]]
7696 Piped link to namespace
7698 [[Meta:Disclaimers|The disclaimers]]
7700 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7707 [[Usually caused by a typo (oops}]]
7709 <p>[[Usually caused by a typo (oops}]]
7716 Just a test of an article title containing a percent.
7720 Link containing % (not as a hex sequence)
7723 [[7% Solution|7%25 Solution]]
7725 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7726 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7729 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7730 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7733 # note that the parsoid HTML is identical to the previous test output,
7734 # so the previous test ensures that the html2wt mode will generate the
7735 # "not as a hex sequence" wikitext.
7737 Link containing % as a single hex sequence interpreted to char
7739 parsoid=wt2wt,wt2html,html2html
7742 [[7%25 Solution|7%25 Solution]]
7744 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7745 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7748 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7749 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7753 Link containing % as a double hex sequence interpreted to hex sequence
7757 <p>[[7%2525 Solution]]
7761 ## Example for such a section: == < ==
7763 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7765 wgFragmentMode=[ 'html5', 'legacy' ]
7767 [[%23%3c]][[%23%3e]]
7769 <p><a href="#<">#<</a><a href="#>">#></a>
7772 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7775 ## Example for such a section: == < ==
7777 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7779 wgFragmentMode=[ 'legacy' ]
7781 [[%23%3c]][[%23%3e]]
7783 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7788 Link containing "<#" and ">#" as a hex sequences
7790 [[%3c%23]][[%3e%23]]
7792 <p>[[%3c%23]][[%3e%23]]
7797 Link containing an equals sign
7799 [[Special:BookSources/isbn=4-00-026157-6]]
7801 <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>
7804 <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>
7810 Just a test of an article title containing a tilde.
7813 # note that links containing signatures, like [[Foo~~~~]], are
7814 # massaged by the pre-save transform (PST) and so the tildes are never
7815 # seen by the parser.
7817 Link containing a tilde
7821 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7824 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7828 Link containing double-single-quotes '' (T6598)
7830 [[Lista d''e paise d''o munno]]
7832 <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>
7835 <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>
7839 Link containing double quotes and spaces
7843 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
7846 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7850 File containing double quotes and spaces
7852 [[File:Cool "Gator".png]]
7854 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></figure-inline></p>
7858 Redirect containing double quotes and spaces
7860 #REDIRECT [[Cool "Gator"]]
7862 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7866 Link containing double-single-quotes '' in text (T6598 sanity check)
7868 Some [[Link|pretty ''italics'' and stuff]]!
7870 <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>!
7873 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7877 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7879 ''Some [[Link|pretty ''italics'' and stuff]]!''
7881 <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>
7886 Link with double quotes in title part (literal) and alternate part (interpreted)
7888 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7892 [[''Pentecoste''|Pentecoste]]
7894 [[''Pentecoste''|''Pentecoste'']]
7896 <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>
7897 </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>
7898 </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>
7899 </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>
7902 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline></p>
7903 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7904 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7905 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7909 Broken image links with HTML captions (T41700)
7911 [[File:Nonexistent|<script></script>]]
7912 [[File:Nonexistent|100x100px|<script></script>]]
7913 [[File:Nonexistent|<]]
7914 [[File:Nonexistent|a<i>b</i>c]]
7916 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7917 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7918 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7919 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7922 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline>
7923 <figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline>
7924 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline>
7925 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline></p>
7931 [[http://www.example.com]]
7933 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7936 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7940 Plain link to URL with link text
7942 [[http://www.example.com Link text]]
7944 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7949 Plain link to protocol-relative URL
7951 [[//www.example.com]]
7953 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7956 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7960 Plain link to protocol-relative URL with link text
7962 [[//www.example.com Link text]]
7964 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7969 Plain link to page with question mark in title
7975 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7976 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7980 # I'm fairly sure the expected result here is wrong.
7981 # We want these to be URL links, not pseudo-pages with URLs for titles....
7982 # However the current output is also pretty screwy.
7985 # I'm changing it to match the current output--it arguably makes more
7986 # sense in the light of the test above. Old expected result was:
7987 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7989 # But I think this test is bordering on "garbage in, garbage out" anyway.
7994 Piped link to URL: [[http://www.example.com|an example URL]]
7996 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7999 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8003 Plain link in template argument
8007 {{echo|[http://www.example.com |123]}}
8009 {{echo|[[http://www.example.com |123]]}}
8011 {{echo|[[http://www.example.com |123]}}
8013 {{echo|[http://www.example.com |123]]}}
8015 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8016 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8017 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8018 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8021 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">http://www.example.com</a> </p>
8023 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">|123</a>]</p>
8025 <p>{{echo|[<a rel="mw:ExtLink" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8027 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">http://www.example.com</a> </p>
8031 T2002: [[page|http://url/]] should link to page, not http://url/
8033 [[Main Page|http://url/]]
8035 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8038 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8041 # Parsoid does not mark self-links, by design.
8043 T2337: Escaped self-links should be bold
8047 [[Bug462]] [[Bug462]]
8049 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8052 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8056 Self-link to section should not be bold
8060 [[Main Page#section]]
8062 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8073 Self-link to numeric title
8079 <p><a class="mw-selflink selflink">0</a>
8084 Link to numeric-equivalent title
8090 <p><a href="/wiki/00" title="00">00</a>
8095 <nowiki> inside a link
8097 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8099 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8104 Non-breaking spaces in title
8106 [[ Main Page ]]
8108 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8112 # Add new article for the test below so that it doesn't red-link
8120 Multiple spaces in titles should normalize to a single underscore
8122 parsoid=wt2html,wt2wt
8128 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8129 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8130 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8133 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8134 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8135 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8140 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8146 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8151 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8157 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8162 Internal link with en linktrail: no apostrophes (T29473)
8168 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8173 Internal link with ca linktrail with apostrophes (T29473)
8179 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8184 Internal link with kaa linktrail with apostrophes (T29473)
8190 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8195 Link with multiple ":" in a subpage-supporting namespace (T65636)
8197 [[User:Foo/Test/63636:Bar|Test]]
8199 <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>
8202 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8205 ## Mainly a sanity check for Parsoid
8207 Handle title parsing for subpages
8227 Link to a subpage from a namespace other than main
8234 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8237 <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>
8241 Ensure that transclusion titles are not url-decoded
8243 subpage title=[[Test]]
8246 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8248 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8251 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8255 Purely hash wikilink
8257 title=[[User:Test/123]]
8262 <p><a href="#a">b</a>
8265 <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>
8269 Serialization of purely hash wikilink
8271 title=[[User:Test/123]]
8275 <p><a href="#a">[[</a></p>
8277 [[#a|<nowiki>[[</nowiki>]]
8279 <p><a href="#a">[[</a>
8284 1. Interaction of linktrail and template encapsulation
8288 <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>
8292 2. Interaction of linktrail and template encapsulation
8296 {{echo|Some [[Fool]]}}s
8298 <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>
8302 3. Interaction of linktrail and template encapsulation
8306 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8308 <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>
8318 Internal link with is link prefix
8322 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8324 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8335 Internal link with is link trail and link prefix
8339 [[mótmælendatrú|xxx]]ar
8341 mótmælenda[[söfnuður]]
8342 mótmælenda[[söfnuður|söfnuðir]]
8343 mótmælenda[[söfnuður|söfnuðir]]xxx
8345 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8346 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8347 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8348 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8349 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8354 Parsoid link trail escaping
8356 parsoid=html2wt,html2html
8358 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8364 Parsoid link prefix escaping
8367 parsoid=html2wt,html2html
8369 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8371 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8375 Parsoid link bracket escaping
8377 parsoid=html2wt,html2html
8379 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8380 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8381 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8382 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8383 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8384 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8392 [[[<nowiki/>[[Test]]]]]
8396 [[[[[<nowiki/>[[Test]]]]]]]
8400 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8408 [http://wp.org ''foo'']
8410 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8411 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8412 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8413 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8418 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8420 [[Foo|{{echo|a}} b {{echo|c}}]]
8422 <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>
8426 Link with angle bracket after anchor
8428 wgFragmentMode=[ 'html5', 'legacy' ]
8432 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8435 <p><a rel="mw:WikiLink" href="./Foo#<bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#<bar>"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8439 Link with angle bracket after anchor (legacy)
8441 wgFragmentMode=[ 'legacy' ]
8445 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8450 ### Interwiki links (see maintenance/interwiki.sql)
8454 Inline interwiki link
8456 parsoid=wt2html,wt2wt,html2html
8458 [[MeatBall:SoftSecurity]]
8460 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8463 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8467 Inline interwiki link with empty title (T4372)
8469 parsoid=wt2html,wt2wt,html2html
8473 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8476 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8479 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8481 Interwiki link encoding conversion (T3636)
8483 parsoid=wt2html,wt2wt
8485 *[[Wikipedia:ro:Olteniţa]]
8486 *[[Wikipedia:ro:Olteniţa]]
8488 <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>
8489 <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>
8493 <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>
8494 <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>
8498 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8499 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8504 Interwiki link with fragment (T4130)
8506 [[MeatBall:SoftSecurity#foo]]
8508 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8513 Link scenarios with escaped fragments
8515 wgFragmentMode=[ 'html5', 'legacy' ]
8518 [[Foo#Is this great?]]
8519 [[meatball:Foo#Is this great?]]
8521 <p><a href="#Is_this_great?">#Is this great?</a>
8522 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8523 <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>
8526 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8527 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8528 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8532 Link scenarios with escaped fragments (legacy)
8534 wgFragmentMode=[ 'legacy' ]
8537 [[Foo#Is this great?]]
8538 [[meatball:Foo#Is this great?]]
8540 <p><a href="#Is_this_great.3F">#Is this great?</a>
8541 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8542 <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>
8546 # Ideally the wikipedia: prefix here should be proto-relative too
8547 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8548 # define the 'en' prefix, and originally the test used 'wikipedia',
8549 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8552 Different interwiki prefixes mapping to the same URL
8560 [[:wikipedia:Foo|Foo]]
8562 [[wikipedia:en:Foo]]
8564 [[:wikipedia:en:Foo]]
8568 <p><a rel="mw:WikiLink/Interwiki" 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>
8570 <p><a rel="mw:WikiLink/Interwiki" 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>
8572 <p><a rel="mw:WikiLink/Interwiki" 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>
8574 <p><a rel="mw:WikiLink/Interwiki" 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>
8576 <p><a rel="mw:WikiLink/Interwiki" 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>
8578 <p><a rel="mw:WikiLink/Interwiki" 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>
8580 <p><a rel="mw:WikiLink/Interwiki" 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>
8584 Interwiki links that cannot be represented in wiki syntax
8587 [[meatball:ok#foo|ok with fragment]]
8588 [[meatball:ok_as_well?|ok ending with ? mark]]
8589 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8590 [http://de.wikipedia.org/wiki/#foo is just fragment]
8593 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8594 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8595 <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>
8596 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8597 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8600 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8601 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8602 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8603 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8604 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8608 Interwiki links: trail
8610 [[wikipedia:Foo|Ba]]r
8612 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8615 <p><a rel="mw:WikiLink/Interwiki" 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>
8619 Local interwiki link
8621 parsoid=wt2html,wt2wt,html2html
8623 [[local:Template:Foo]]
8625 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8628 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8631 # Parsoid does not mark self-links, by design.
8633 Local interwiki link: self-link to current page
8636 parsoid=wt2html,wt2wt,html2html
8640 <p><a class="mw-selflink selflink">local:Main Page</a>
8643 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8647 Local interwiki link: prefix only (T66167)
8649 parsoid=wt2html,wt2wt,html2html
8653 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8656 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8660 Local interwiki link: with additional interwiki prefix (T63357)
8662 parsoid=wt2html,wt2wt,html2html
8664 [[local:meatball:Hello]]
8666 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8669 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8673 Multiple local interwiki link prefixes
8675 [[local:local:local:local:mi:local:Foo]]
8677 parsoid=wt2html,wt2wt,html2html
8679 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8682 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8686 ### Interlanguage links
8687 ### Language links (so that searching for '### language' matches..)
8699 <p>Blah blah blah</p>
8700 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8703 ## parsoid html2wt will lose the space variations
8705 Interlanguage link with spacing
8707 parsoid=wt2html,wt2wt,html2html
8715 <p>Blah blah blah</p>
8716 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8720 Double interlanguage link
8729 <p>Blah blah blah</p>
8730 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8731 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8734 ## parsoid html2wt will lose the space variations
8736 Interlanguage link variations
8738 parsoid=wt2html,wt2wt,html2html
8748 <p>Blah blah blah</p>
8749 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8750 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8751 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8755 Escaping of interlanguage links (T129218, T156308)
8759 [[ : zh : Chinese ]]
8762 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8763 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8767 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8768 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8772 Multiple colons escaping interlanguage links
8780 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8785 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8787 [[:::es:Spanish]]</p>
8790 ## parsoid html2wt will normalize the space to _
8792 Space and question mark encoding in interlanguage links (T95473)
8794 parsoid=wt2html,wt2wt,html2html
8802 <p>Blah blah blah</p>
8803 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8807 Interlanguage link, with prefix links
8817 <p>Blah blah blah</p>
8818 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8822 Double interlanguage link, with prefix links (T10897)
8833 <p>Blah blah blah</p>
8834 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8835 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8839 "Extra" interlanguage links (T34189 / gerrit 111390)
8847 <p>Blah blah blah</p>
8848 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8851 ## PHP parser tests script needs an update
8852 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8854 Language links render as inline links if $wgInterwikiMagic=false
8856 wgInterwikiMagic=false
8857 parsoid=wt2html,wt2wt,html2html
8862 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8865 ## PHP parser tests script needs an update
8866 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8868 Language links render as inline links in the Talk namespace
8871 parsoid=wt2html,wt2wt,html2html
8876 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8880 Parsoid-specific test: Wikilinks with should RT properly
8886 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8891 Parsoid T55221: Wikilinks should be properly entity-escaped
8893 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8895 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8896 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8898 He&nbsp;llo [[Foo|He&nbsp;llo]]
8900 He&nbsp;llo He&nbsp;llo
8902 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8903 </p><p>He&nbsp;llo He&nbsp;llo
8907 # html2wt will fail because of title normalization without data-parsoid
8909 Parsoid: handle constructor well
8911 parsoid=wt2html,wt2wt
8917 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8918 </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>
8921 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8923 <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>
8932 # Note that `ko` isn't a known interlanguage prefix
8934 Parsoid: recognize interlanguage links without a target page
8944 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8946 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8949 # Note that `ko` isn't a known interwiki prefix
8951 Parsoid: recognize interwiki links without a target page
8953 parsoid=wt2html,wt2wt,html2html
8959 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8960 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8963 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8964 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8968 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
8972 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8975 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8979 Interlanguage link with preceding local interwiki link (T70085)
8981 parsoid=wt2html,wt2wt,html2html
8984 [[local:es:Spanish]]
8987 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8991 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8995 Looks like an interlanguage link, but is actually a local interwiki
8997 parsoid=wt2html,wt2wt,html2html
9003 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9007 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9011 ### Redirects, Parsoid-only
9015 1. Simple redirect to page
9017 #REDIRECT [[Main Page]]
9019 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9023 2. Other redirect variants
9025 #REDIRECT [[Main_Page]]
9027 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9030 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9031 # This tests the Parsoid bail-out code.
9033 3. Other redirect variants
9037 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9039 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9043 4. Redirect to a templated destination
9045 #REDIRECT [[{{echo|Foo}}bar]]
9047 <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"}]]}'/>
9053 parsoid=wt2html,wt2wt
9058 <li>REDIRECT [[]]</li></ol>
9062 Optional colon in #REDIRECT
9064 # the colon is archaic syntax. we support it for wt2html, but we
9065 # don't care that it roundtrips back to the modern syntax.
9066 parsoid=wt2html,html2html
9068 #REDIRECT:[[Main Page]]
9070 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9074 Whitespace in #REDIRECT with optional colon
9076 # the colon and gratuitous whitespace is archaic syntax. we support
9077 # it for wt2html, but we don't care that it roundtrips back to the
9078 # modern syntax (without extra whitespace)
9079 parsoid=wt2html,html2html
9086 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9090 Piped link in #REDIRECT
9092 # content after piped link is ignored. we support this syntax,
9093 # but don't care that the piped link is lost when we roundtrip this.
9096 #REDIRECT [[Main Page|bar]]
9098 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9102 Redirect to category (T104502)
9104 parsoid=wt2html,wt2wt
9106 #REDIRECT [[Category:Foo]]
9108 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9112 Redirect to category with URL encoding (T104502)
9116 #REDIRECT [[Category%3AFoo]]
9118 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9122 Redirect to category page
9124 #REDIRECT [[:Category:Foo]]
9126 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9130 Redirect to image page (1)
9132 #REDIRECT [[File:Wiki.png]]
9134 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9138 Redirect to image page (2)
9140 #REDIRECT [[Image:Wiki.png]]
9142 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9145 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9146 # Next test confirms this.
9148 Redirect to language (1) (T104918)
9150 parsoid=wt2html,wt2wt,html2html
9152 #REDIRECT [[en:File:Wiki.png]]
9154 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9158 Redirect to language (2) (T104918)
9160 #REDIRECT [[:en:File:Wiki.png]]
9162 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9166 Redirect to interwiki (T104918)
9168 #REDIRECT [[meatball:File:Wiki.png]]
9170 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9174 Non-English #REDIRECT
9178 #TILVÍSUN [[Main Page]]
9180 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9184 Redirect syntax under text isn't considered a redirect
9187 #redirect [[Main Page]]
9190 <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>
9198 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9205 Redirect followed by block on the same line
9209 #REDIRECT [[Main Page]]<!-- haha -->== hi ==
9211 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi"> hi </h2>
9215 Redirect followed by a newline
9217 #REDIRECT [[Main Page]]
9220 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9225 Redirect followed by multiple newlines
9227 #REDIRECT [[Main Page]]
9232 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9239 Drop duplicate redirects
9243 <link rel="mw:PageProp/redirect" href="./Foo"/>
9244 <link rel="mw:PageProp/redirect" href="./Bar"/>
9245 <link rel="mw:PageProp/redirect" href="./Baz"/>
9264 Broken br tag sanitization
9272 # TODO: Fix html2html mode (T53055)!
9274 Parsoid: Broken br tag recognition
9288 Incorrecly removing closing slashes from correctly formed XHTML
9290 <br style="clear:both;" />
9292 <p><br style="clear:both;" />
9297 Failing to transform badly formed HTML into correct XHTML
9299 <br style="clear: left;">
9300 <br style="clear: right;">
9301 <br style="clear: both;">
9303 <p><br style="clear: left;" />
9304 <br style="clear: right;" />
9305 <br style="clear: both;" />
9309 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9310 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9312 Handling html with a div self-closing tag
9321 <p><div title />
9325 <p><div title=bar />
9326 <div title=bar/>
9328 <div title="bar/"></div>
9332 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9333 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9334 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9335 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9336 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9337 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9341 Handling html with a br self-closing tag
9368 Horizontal ruler (should it add that extra space?)
9377 foo </p><hr /><p> bar
9382 Horizontal ruler -- 4+ dashes render hr
9391 Horizontal ruler -- eats additional dashes on the same line
9400 Horizontal ruler -- does not collapse dashes on consecutive lines
9411 Horizontal ruler -- <4 dashes render as plain text
9420 Horizontal ruler -- Supports content following dashes on same line
9432 ### Block-level elements
9441 <ul><li>Common list</li>
9443 <li>item 3</li></ul>
9454 <ol><li>Numbered list</li>
9456 <li> item 3</li></ol>
9470 ***#Number on level 4
9472 **#Number on level 3
9473 **#Number on level 3
9477 #** Level 3, but ordered
9480 <ol><li> with numbers</li></ol>
9481 <ul><li> and bullets</li></ul>
9482 <ol><li> and numbers</li></ol></li>
9484 <ul><li>bullet level 2
9485 <ul><li>bullet level 3
9486 <ol><li>Number on level 4</li></ol></li></ul></li>
9488 <ol><li>Number on level 3</li>
9489 <li>Number on level 3</li></ol></li></ul>
9490 <ol><li>number level 2</li></ol></li>
9492 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9493 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9498 1. Nested mixed wikitext and html list
9501 * <ul><li>ho</li></ul>
9506 <li> <ul><li>ho</li></ul></li>
9508 <ul><li> ho</li></ul></li></ul>
9512 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9514 <ul><li> ho</li></ul></li></ul>
9518 2. Nested mixed wikitext and html list (incompatible)
9521 : {{echo|<li>ho</li>}}
9524 <dd> <li>ho</li></dd></dl>
9528 <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>
9538 <ul><li>bar</li></ul></li></ul>
9548 <ul><li><ul><li>foo</li></ul></li>
9554 Nested lists 3 (first element empty)
9560 <ul><li>bar</li></ul></li></ul>
9565 Nested lists 4 (first element empty)
9570 <ul><li><ul><li></li></ul></li>
9576 Nested lists 5 (both elements empty)
9581 <ul><li><ul><li></li></ul></li>
9587 Nested lists 6 (both elements empty)
9593 <ul><li></li></ul></li></ul>
9598 Nested lists 7 (skip initial nesting levels)
9602 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9607 Nested lists 8 (multiple nesting transitions)
9615 <ul><li><ul><li> bar</li></ul></li>
9616 <li> baz</li></ul></li>
9622 Nested lists 9 (extension interaction)
9628 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9632 1. Lists with start-of-line-transparent tokens before bullets: Comments
9645 2. Lists with start-of-line-transparent tokens before bullets: Template close
9650 <ul><li>foo bar</li>
9656 List items are not parsed correctly following a <pre> block (T2785)
9662 <ul><li> <pre>foo</pre></li>
9663 <li> <pre>bar</pre></li>
9667 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9668 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9673 List items from template
9684 * notSOL{{inner list}}
9687 <ul><li> item 1</li>
9688 <li> item 2</li></ul>
9689 <ul><li> item 0</li>
9691 <li> item 2</li></ul>
9692 <ul><li> item 0</li>
9695 <li> item 2</li></ul>
9700 List interrupted by empty line or heading
9708 <ul><li> foo</li></ul>
9709 <ul><li><ul><li> bar</li></ul></li></ul>
9710 <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>
9711 <ul><li> Another list item</li></ul>
9716 Multiple list tags generated by templates
9736 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9739 <!--This line will NOT split the list-->
9741 <!--This line will NOT split the list either-->
9743 <!--foo--> <!----> <!--This line NOT split the list either-->
9754 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9757 <!--This line will NOT split the list-->
9759 <!--This line will NOT split the list either-->
9761 <!--foo--> <!----> <!--This line NOT split the list
9772 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9773 # That pass could possibly be removed.
9775 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9777 parsoid=wt2html,wt2wt
9781 * {{echo|<li>templated li-hack}}
9782 * <!--foo--> <li> unsupported li-hack with preceding comments
9785 <li><li>not a li-hack
9790 <li class="mw-empty-elt"> </li><li>li-hack</li>
9791 <li class="mw-empty-elt"> </li><li>templated li-hack</li>
9792 <li class="mw-empty-elt"> </li><li> unsupported li-hack with preceding comments</li></ul>
9794 <li class="mw-empty-elt"></li><li>not a li-hack
9799 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"* "}'>li-hack</li>
9800 <li 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":"<li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
9801 <li data-parsoid='{"autoInsertedEnd":true}'> <!--foo--> </li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'> unsupported li-hack with preceding comments</li></ul>
9803 <ul data-parsoid='{"stx":"html"}'>
9804 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9811 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9838 Parsoid: Test of whitespace serialization with Templated bullets
9845 <li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9849 # ------------------------------------------------------------------------
9850 # The next set of tests are about Parsoid's ability to handle badly nested
9851 # tags (parse, minimize scope of fixup, and roundtrip back)
9852 # ------------------------------------------------------------------------
9854 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
9855 # Parsoid's list handling is more aware of block structure.
9857 Unbalanced closing block tags break a list
9864 <ul><li>a</li></ul></div><div>
9876 Unbalanced closing non-block tags don't break a list
9884 <ul><li>a<span></span></li>
9889 <li>a<span></span></li>
9895 # Parsoid does some post-dom-building cleanup
9896 # which is why its output differs from Remex.
9898 Unclosed formatting tags that straddle lists are closed and reopened
9900 parsoid=wt2html,wt2wt,html2html
9905 <ol><li> <s> a</s></li><s>
9906 </s><li><s> b </s></li></ol>
9908 <ol><li> <s> a</s><s></s></li>
9909 <li><s> b </s></li></ol>
9912 # Output is ugly because of all the misnested tag fixups.
9913 # Remex is wrapping p-tags around empty elements.
9914 # Parsoid has special-case handling of this pattern of
9915 # wrapping lists in formatting tags.
9916 # FIXME: Should we remove this code from Parsoid? Or add
9917 # special support in Remex? If the latter, maybe just wait
9918 # for Parsoid to become the default parser.
9921 1. List embedded in a formatting tag
9928 </small></p><small><ul><li> foo</li></ul></small><small></small><p><small></small>
9938 # Output is ugly because of all the misnested tag fixups
9939 # Remex is wrapping p-tags around empty elements.
9940 # Parsoid has code that strips useless p-tags.
9942 2. List embedded in a formatting tag in a misnested way
9949 </small></p><small></small><ul><small><li>a</li>
9950 </small><li><small>b</small></li></ul>
9956 <li><small>b</small></li>
9961 Table with missing opening <tr> tag
9963 parsoid=wt2html,wt2wt
9971 <tbody><tr><td>foo</td>
9980 # Note that the current date is hard-coded as
9981 # 1970-01-01T00:02:03Z (a Thursday)
9982 # when running parser tests. The timezone is also fixed to GMT, so
9983 # local date will be identical to current date.
9986 Magic Word: {{CURRENTDAY}}
9995 Magic Word: {{CURRENTDAY2}}
10004 Magic Word: {{CURRENTDAYNAME}}
10013 Magic Word: {{CURRENTDOW}}
10022 Magic Word: {{CURRENTMONTH}}
10031 Magic Word: {{CURRENTMONTH1}}
10040 Magic Word: {{CURRENTMONTHABBREV}}
10042 {{CURRENTMONTHABBREV}}
10049 Magic Word: {{CURRENTMONTHNAME}}
10051 {{CURRENTMONTHNAME}}
10058 Magic Word: {{CURRENTMONTHNAMEGEN}}
10060 {{CURRENTMONTHNAMEGEN}}
10067 Magic Word: {{CURRENTTIME}}
10076 Magic Word: {{CURRENTHOUR}}
10085 Magic Word: {{CURRENTWEEK}} (T6594)
10094 Magic Word: {{CURRENTYEAR}}
10103 Magic Word: {{CURRENTTIMESTAMP}}
10105 {{CURRENTTIMESTAMP}}
10112 Magic Words LOCAL (UTC)
10116 * {{LOCALMONTHNAME}}
10117 * {{LOCALMONTHNAMEGEN}}
10118 * {{LOCALMONTHABBREV}}
10127 * {{LOCALTIMESTAMP}}
10142 <li> 19700101000203</li></ul>
10147 Magic Word: {{FULLPAGENAME}}
10149 title=[[User:Ævar Arnfjörð Bjarmason]]
10150 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10154 <p>User:Ævar Arnfjörð Bjarmason
10159 Magic Word: {{FULLPAGENAMEE}}
10161 title=[[User:Ævar Arnfjörð Bjarmason]]
10162 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10166 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10171 Magic Word: {{TALKSPACE}}
10173 title=[[User:Ævar Arnfjörð Bjarmason]]
10174 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10183 Magic Word: {{TALKSPACE}}, same namespace
10185 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10186 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10195 Magic Word: {{TALKSPACE}}, main namespace
10197 title=[[Parser Test]]
10198 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10207 Magic Word: {{TALKSPACEE}}
10209 title=[[User:Ævar Arnfjörð Bjarmason]]
10210 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10219 Magic Word: {{SUBJECTSPACE}}
10221 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10222 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10231 Magic Word: {{SUBJECTSPACE}}, same namespace
10233 title=[[User:Ævar Arnfjörð Bjarmason]]
10234 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10243 Magic Word: {{SUBJECTSPACE}}, main namespace
10245 title=[[Parser Test]]
10246 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10254 Magic Word: {{SUBJECTSPACEE}}
10256 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10257 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10266 Magic Word: {{NAMESPACE}}
10268 title=[[User:Ævar Arnfjörð Bjarmason]]
10269 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10278 Magic Word: {{NAMESPACEE}}
10280 title=[[User:Ævar Arnfjörð Bjarmason]]
10281 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10290 Magic Word: {{NAMESPACENUMBER}}
10292 title=[[User:Ævar Arnfjörð Bjarmason]]
10293 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10295 {{NAMESPACENUMBER}}
10302 Magic Word: {{SUBPAGENAME}}
10304 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10305 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10314 Magic Word: {{SUBPAGENAMEE}}
10316 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10317 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10326 Magic Word: {{ROOTPAGENAME}}
10328 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10329 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10333 <p>Ævar Arnfjörð Bjarmason
10338 Magic Word: {{ROOTPAGENAMEE}}
10340 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10341 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10345 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10350 Magic Word: {{BASEPAGENAME}}
10352 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10353 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10357 <p>Ævar Arnfjörð Bjarmason
10362 Magic Word: {{BASEPAGENAMEE}}
10364 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10365 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10369 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10374 Magic Word: {{TALKPAGENAME}}
10376 title=[[User:Ævar Arnfjörð Bjarmason]]
10377 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10381 <p>User talk:Ævar Arnfjörð Bjarmason
10386 Magic Word: {{TALKPAGENAMEE}}
10388 title=[[User:Ævar Arnfjörð Bjarmason]]
10389 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10393 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10398 Magic Word: {{SUBJECTPAGENAME}}
10400 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10401 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10403 {{SUBJECTPAGENAME}}
10405 <p>User:Ævar Arnfjörð Bjarmason
10410 Magic Word: {{SUBJECTPAGENAMEE}}
10412 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10413 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10415 {{SUBJECTPAGENAMEE}}
10417 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10422 Magic Word: {{NUMBEROFFILES}}
10424 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10433 Magic Word: {{PAGENAME}}
10435 title=[[User:Ævar Arnfjörð Bjarmason]]
10436 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10440 <p>Ævar Arnfjörð Bjarmason
10445 Magic Word: {{PAGENAME}} with metacharacters
10447 title=[['foo & bar = baz']]
10448 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10452 <p><i>'foo & bar = baz'</i>
10457 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10459 title=[[*RFC 1234 http://example.com/]]
10460 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10464 <p>*RFC 1234 http://example.com/
10469 Magic Word: {{PAGENAMEE}}
10471 title=[[User:Ævar Arnfjörð Bjarmason]]
10472 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10476 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10481 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10483 title=[[*RFC 1234 http://example.com/]]
10484 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10488 <p>*RFC_1234_http://example.com/
10493 Magic Word: {{REVISIONID}}
10495 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10502 flags=vary-revision-id
10506 Magic Word: {{SCRIPTPATH}}
10508 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10516 Magic Word: {{STYLEPATH}}
10518 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10527 Magic Word: {{SERVER}}
10529 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10533 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10538 Magic Word: {{SERVERNAME}}
10540 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10549 Magic Word: {{SITENAME}}
10551 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10560 Magic Word: {{PAGELANGUAGE}}
10563 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10572 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10574 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10583 Case-sensitive magic words, when cased differently, should just be template transclusions
10590 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10591 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10592 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10593 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10598 Case-insensitive magic words should still work with weird casing.
10608 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10612 # From plwiki:PLOS_ONE
10614 Parsoid: Page property magic word with magic word contents
10616 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10618 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<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>"}]]}'/>
10621 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10622 # But, this is a limitation of our representation and is documented in
10623 # TemplateHandler.js in processSpecialMagicWord
10625 Parsoid: Template-generated DISPLAYTITLE
10627 {{{{echo|DISPLAYTITLE}}:Foo}}
10631 wgAllowDisplayTitle=true
10632 wgRestrictDisplayTitle=false
10637 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
10641 Namespace 1 {{ns:1}}
10650 Namespace 1 {{ns:01}}
10659 Namespace 0 {{ns:0}} (T6783)
10667 Namespace 0 {{ns:00}} (T6783)
10675 Namespace -1 {{ns:-1}}
10684 Namespace User {{ns:User}}
10693 Namespace User talk {{ns:User_talk}}
10702 Namespace User talk {{ns:uSeR tAlK}}
10711 Namespace File {{ns:File}}
10720 Namespace File {{ns:Image}}
10729 Namespace (lang=de) Benutzer {{ns:User}}
10740 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10746 <p>Benutzer Diskussion
10753 {{urlencode:hi world?!}}
10754 {{urlencode:hi world?!|WIKI}}
10755 {{urlencode:hi world?!|PATH}}
10756 {{urlencode:hi world?!|QUERY}}
10766 Magic Word: prioritize type info over data-parsoid
10770 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10776 Magic Word: serialize on separate line (parsoid)
10778 parsoid=wt2wt,html2wt
10784 foo<meta property="mw:PageProp/notoc"/>bar
10788 Magic Word: rt non-english wikis
10795 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10799 __proto__ is treated as normal wikitext (T105997)
10811 Magic links: internal link to RFC (T2479)
10815 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10818 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10822 Magic links: RFC (T2479)
10826 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10829 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10833 Magic links: RFC (T67278)
10835 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10837 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
10840 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10844 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10846 RFC      822
10850 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10855 <p><a href="https://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>
10861 Magic links: ISBN (T3937)
10865 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10868 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10872 Magic links: ISBN (T67278)
10874 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10876 <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.
10879 <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>
10883 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10885 ISBN      978 0 316 09811 3
10891 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10898 <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>
10906 Magic links: PMID incorrectly converts space to underscore
10910 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10913 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10917 Magic links: PMID (T67278)
10919 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10921 <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.
10924 <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>
10928 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10930 PMID      1234
10934 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10939 <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>
10944 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10945 # since these are ExtLinkText, not MagicLinkText
10947 Magic links: use appropriate serialization for "almost" magic links.
10949 X[[Special:BookSources/0978739256|foo]]
10951 X[https://tools.ietf.org/html/rfc1234 foo]
10953 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10954 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
10957 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10958 <p>X<a rel="mw:ExtLink" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
10962 Magic links: All disabled (T47942)
10964 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10970 <p>ISBN 0-306-40615-2
10981 Nonexistent template
10983 {{thistemplatedoesnotexist}}
10985 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10990 Template with invalid target containing tags
10992 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10994 <p>{{a<b>b</b>|foo|a=b|a = b}}
10999 Template with invalid target containing unclosed tag
11001 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11003 <p>{{a<b>|foo|a=b|a = b}}</b>
11008 Template with invalid target containing wikilink
11012 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11015 <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>
11019 Template with just whitespace in it, T70421
11023 <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>
11029 This is a test template
11037 <p>This is a test template
11042 Template with explicit namespace
11046 <p>This is a test template
11054 This is a test template with parameter {{{param}}}
11060 {{paramtest|param=foo}}
11062 <p>This is a test template with parameter foo
11067 Template:paramtestnum
11069 [[{{{1}}}|{{{2}}}]]
11073 Template unnamed parameter
11075 {{paramtestnum|Main Page|the main page}}
11077 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11082 Template:templatesimple
11088 Template:templateredirect
11090 #redirect [[Template:templatesimple]]
11094 Template:templateasargtestnum
11100 Template:templateasargtest
11102 {{template{{{templ}}}}}
11106 Template:templateasargtest2
11112 Template with template name as unnamed argument
11114 {{templateasargtestnum|templatesimple}}
11121 Template with template name as argument
11123 {{templateasargtest|templ=simple}}
11130 Template with template name as argument (2)
11132 {{templateasargtest2|templ=templatesimple}}
11139 Template:templateasargtestdefault
11141 {{{{{templ|templatesimple}}}}}
11151 Template with default value
11153 {{templateasargtestdefault}}
11160 Template with default value (value set)
11162 {{templateasargtestdefault|templ=templa}}
11171 {{templateredirect}}
11176 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11180 Template with argument in separate line
11182 {{ templateasargtest |
11190 Template with complex template as argument
11193 param ={{ templateasargtest |
11194 templ = simple }}}}
11196 <p>This is a test template with parameter (test)
11201 Templates with templated name
11203 {{{{echo|echo}}|foo}}
11204 {{{{echo|inner list}} }}
11208 <ul><li> item 1</li></ul>
11211 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11212 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li> item 1</li></ul>
11215 ## Regression test; the output here isn't really that interesting.
11217 Templates with templated name and top level template args
11219 {{1{{2{{{3}}}|4=5}}}}
11221 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11224 # Parsoid markup is deliberate "broken". This is an edge case.
11225 # See long comment in TemplateHandler.js:convertAttribsToString.
11227 Templates with invalid templated targets
11238 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11243 Template with thumb image (with link in description)
11245 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11247 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>
11250 <p>This is a test template with parameter </p><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>
11252 <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":"apierror-filedoesnotexist","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>
11256 Template:complextemplate
11258 {{{1}}} {{paramtest|
11259 param ={{{param}}}}}
11263 Template with complex arguments
11266 param ={{ templateasargtest |
11267 templ = simple }}|[[Template:complextemplate|link]]}}
11269 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11274 T2553: link with two variables in a piped link
11277 |[[{{{1}}}|{{{2}}}]]
11282 <td>[[{{{1}}}|{{{2}}}]]
11287 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11293 Abort table cell attribute parsing on wikilink
11296 | testing [[one|two]] | three || four
11297 | testing one two | three || four
11298 | testing="[[one|two]]" | three || four
11303 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11309 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11315 <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":"row","autoInsertedEnd":true}'> four</td>
11316 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'> four</td>
11317 <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":"row","autoInsertedEnd":true}'> four</td></tr>
11322 Don't abort table cell attribute parsing if wikilink is found in template arg
11325 | Test {{#tag:ref|One two "[[three]]" four}}
11329 <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>
11334 Magic variable as template parameter
11336 {{paramtest|param={{SITENAME}}}}
11338 <p>This is a test template with parameter MediaWiki
11345 [[{{{param}}}|link]]
11349 Template parameter as link source
11351 {{linktest|param=Main Page}}
11353 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11358 Template:paramtest2
11360 including another template, {{paramtest|param={{{arg}}}}}
11364 Template passing argument to another template
11366 {{paramtest2|arg='hmm'}}
11368 <p>including another template, This is a test template with parameter 'hmm'
11379 Template as link source
11383 [[{{linktest2}}|Main Page]]
11385 [[{{linktest2}}]]Page
11387 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11388 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11389 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11407 Template infinite loop
11411 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11416 Template from main namespace
11435 T2529: Template with table, not included at beginning of line
11454 T2523: Template shouldn't eat newline (or add an extra one before table)
11474 T2041: Template parameters shown as broken links
11483 Template with targets containing wikilinks
11489 {{[[{{echo|foo}}]]}}
11491 {{{{echo|[[foo}}]]}}
11493 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11494 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11498 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11499 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11500 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11510 Templates: Double quotes as template target
11517 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11521 ## This test is about making sure Parsoid's data-mw is well formed in the
11522 ## face of multiple templates with intersecting and overlapping ranges. The
11523 ## wikitext itself is wretched.
11525 Templates with intersecting and overlapping ranges
11536 </table><p>ho</p><table>
11540 </td></tr></tbody></table>
11542 <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":""}]]}'>
11544 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11546 <tbody><tr><td>hi</td></tr>
11551 Template:MSGNW test
11553 ''None'' of '''this''' should be
11555 but rather passed unmodified
11563 # hmm, fix this or just deprecate msgnw and document its behavior?
11567 {{msgnw:MSGNW test}}
11569 <p>''None'' of '''this''' should be
11571  but rather passed unmodified
11572 {{test}}
11576 <!-- comment -->
11583 {{int:youhavenewmessages|lots of money|not!}}
11585 <p>You have lots of money (not!).
11590 int keyword - non-existing message
11601 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11605 <includeonly> and <noinclude> being included
11616 <onlyinclude>Foo</onlyinclude>bar
11620 <onlyinclude> being included
11632 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11636 <onlyinclude> and <includeonly> being included
11645 <includeonly> and <noinclude> on a page
11647 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11654 Un-closed <noinclude>
11661 <onlyinclude> on a page
11663 <onlyinclude>Foo</onlyinclude>bar
11670 Un-closed <onlyinclude>
11677 Self-closed noinclude, includeonly, onlyinclude tags
11688 Unbalanced includeonly and noinclude tags
11692 |b</noinclude></noinclude>
11693 |c</noinclude></includeonly>
11694 |d</includeonly></includeonly>
11703 <td>c</includeonly>
11705 <td>d</includeonly></includeonly>
11711 Template:Includeonly section
11714 ==Includeonly section==
11720 T8563: Edit link generation for section shown by <includeonly>
11722 {{includeonly section}}
11724 <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>
11725 <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>
11729 # Uses same input as the contents of [[Template:Includeonly section]]
11731 T8563: Section extraction for section shown by <includeonly>
11736 ==Includeonly section==
11744 T8563: Edit link generation for section suppressed by <includeonly>
11747 ==Includeonly section==
11751 <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>
11756 T8563: Section extraction for section suppressed by <includeonly>
11761 ==Includeonly section==
11769 Un-closed <includeonly>
11774 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11777 ## We used to, but no longer wt2wt this test since the default serializer
11778 ## will normalize the include directives to serialize on their own line.
11779 ## Selser will take care of preserving formatting in scenarios where they
11780 ## intermingled with other wikitext.
11782 Includes and comments at SOL
11784 parsoid=wt2html,html2html
11786 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11790 </noinclude>* stuff
11793 <includeonly>can have stuff</includeonly>=== here ===
11796 <h2><span class="mw-headline" id="hu">hu</span></h2>
11799 <ul><li> stuff</li>
11800 <li> here</li></ul>
11801 <h3><span class="mw-headline" id="here">here</span></h3>
11804 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2 id="hu"> hu </h2>
11806 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11808 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11809 <li> here</li></ul>
11811 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here"> here </h3>
11815 # TODO: test with DOM fragment reuse!
11817 Parsoid: DOM fragment reuse
11819 parsoid=wt2wt,wt2html
11821 a{{echo|b<table></table>c}}d
11833 <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>
11835 <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">
11836 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11837 </span><p about="#mwt2">cd</p>
11839 <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">
11841 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11843 </span><p about="#mwt3">b</p>
11847 Parsoid: Merge double tds (T52603)
11852 |{{echo|{{!}} foo}}
11856 <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>
11861 Parsoid: Merge double tds in nested transclusion content (T52603)
11867 |{{echo|{{!}} foo}}
11871 <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}}]}'>
11873 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11879 ### <includeonly> and <noinclude> in attributes
11882 0. includeonly around the entire attribute
11884 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11886 <p><span id="v2">bar</span>
11891 1. includeonly in html attr key
11893 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11895 <p><span id="foo">bar</span>
11900 2. includeonly in html attr value
11902 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11903 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11905 <p><span id="v1">bar</span>
11906 <span id="v1">bar</span>
11911 3. includeonly in part of an attr value
11913 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11915 <p><span style="color:red;">bar</span>
11920 4. includeonly in table attributes
11944 ### Preprocessor precedence tests
11945 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
11947 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
11949 Preprocessor precedence 1: link is rightmost opening
11955 But close-brace is not a valid character in a link title:
11958 However, we can still tell this was handled as a link in the preprocessor:
11959 {{echo|[[Foo}}|bar]]|bat}}
11961 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
11962 </p><p>But close-brace is not a valid character in a link title:
11964 </p><p>However, we can still tell this was handled as a link in the preprocessor:
11968 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
11969 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
11970 <p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
11974 Preprocessor precedence 2: template is rightmost opening
11983 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
11987 Preprocessor precedence 3: language converter is rightmost opening
12003 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12004 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12005 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12009 Preprocessor precedence 4: left-most angle bracket
12020 Template:Precedence5
12026 Preprocessor precedence 5: tplarg takes precedence over template
12028 {{Precedence5|Bullet}}
12030 <ul><li> Bar</li></ul>
12033 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li> Bar</li></ul>
12037 Preprocessor precedence 6: broken link is rightmost opening
12043 {{echo|[[Foo|bar|bat=baz}}
12046 </p><p>{{echo|[[Foo|bar|bat=baz}}
12049 <p>{{echo|[[Foo}}</p>
12050 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12053 # This next test exposes a difference between PHP and Parsoid:
12054 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12055 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12056 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12057 # outer `[[Foo` extends until the `y]]`
12058 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12059 # intermediate result (after template expansion), and link processing
12060 # happens on this intermediate result, which moves the wikilink
12061 # boundary leftward to `[[Foo|Bar]]`
12062 # 2b) Parsoid works in a single step, so it's going to keep the
12063 # wikilink as extending to the `y]]`
12064 # 3a) Then PHP does linktrail processing which slurps up the trailing
12065 # `xy` inside the link.
12066 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12067 # `z` inside the link.
12068 # This is "correct" behavior. Parsoid's basic worldview is that the
12069 # `]]` inside the template shouldn't be allowed to leak out to affect
12070 # the surrounding wikilink. PHP may match Parsoid (in the future)
12071 # if you use {{#balance}} (T114445).
12074 Preprocessor precedence 7: broken template is rightmost opening
12080 [[Foo|{{echo|Bar]]-x}}-y]]-z
12082 Careful: linktrails can move the end of the wikilink:
12083 [[Foo|{{echo|y']]a}}l]]l
12085 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12086 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12087 </p><p>Careful: linktrails can move the end of the wikilink:
12088 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12091 <p>[[Foo|{{echo|Bar]]</p>
12092 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
12093 <p>Careful: linktrails can move the end of the wikilink:
12094 <a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y']]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
12098 Preprocessor precedence 8: broken language converter is rightmost opening
12109 Template:Preprocessor_precedence_9
12114 ;7: {{{{{{{4}}}}}}}
12118 Preprocessor precedence 9: groups of braces
12120 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12126 <ul><li> Bar</li></ul>
12130 <dd> {Bullet}</dd></dl>
12133 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
12138 </dl><ul about="#mwt1">
12140 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12149 Template:Preprocessor_precedence_10
12156 ;6: -{{{{{{4}}}}}}-
12157 ;7: -{{{{{{{5}}}}}}}-
12161 Preprocessor precedence 10: groups of braces with leading dash
12165 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12171 <ul><li> Bar-</li></ul>
12178 <ul><li> Bar-</li></ul>
12182 <dd> raw2</dd></dl>
12185 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
12187 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12190 </dl><ul about="#mwt1">
12192 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12196 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12199 </dl><ul about="#mwt1">
12201 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12205 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12210 Preprocessor precedence 11: found during visual diff testing
12212 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12214 {{echo|-{{echo|-{{echo|x}}}}}}
12216 {{echo|-{{echo|x}}}}
12218 <p><span>-<span>-x</span></span>
12223 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
12225 <p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
12227 <p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
12231 Preprocessor precedence 12: broken language converter closed by brace.
12235 This form breaks the template, which is unfortunate:
12236 * {{echo|foo-{bar}bat}}
12238 But if the broken language converter markup is inside an extension
12239 tag, nothing bad happens:
12240 * <nowiki>foo-{bar}bat</nowiki>
12241 * {{echo|<nowiki>foo-{bar}bat</nowiki>}}
12242 * <pre>foo-{bar}bat</pre>
12243 * {{echo|<pre>foo-{bar}bat</pre>}}
12245 <tag>foo-{bar}bat</tag>
12246 {{echo|<tag>foo-{bar}bat</tag>}}
12249 <p>This form breaks the template, which is unfortunate:
12251 <ul><li> {{echo|foo-{bar}bat}}</li></ul>
12252 <p>But if the broken language converter markup is inside an extension
12253 tag, nothing bad happens:
12255 <ul><li> foo-{bar}bat</li>
12256 <li> foo-{bar}bat</li>
12257 <li> <pre>foo-{bar}bat</pre></li>
12258 <li> <pre>foo-{bar}bat</pre></li></ul>
12259 <pre>'foo-{bar}bat'
12263 <pre>'foo-{bar}bat'
12268 <p>This form breaks the template, which is unfortunate:</p>
12270 <li>{{echo|foo-{bar}bat}}</li>
12272 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12274 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12275 <li><span typeof="mw:Transclusion mw:Nowiki" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12276 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12277 <li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12279 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tag>foo-{bar}bat</tag>"}},"i":0}}]}'></pre>
12283 Preprocessor precedence 13: broken language converter in external link
12287 * [http://example.com/-{foo Example in URL]
12288 * [http://example.com Example in -{link} description]
12289 * {{echo|[http://example.com/-{foo Breaks template, however]}}
12291 <ul><li> <a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12292 <li> <a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12293 <li> {{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12296 <li><a rel="mw:ExtLink" href="http://example.com/-{foo">Example in URL</a></li>
12297 <li><a rel="mw:ExtLink" href="http://example.com">Example in -{link} description</a></li>
12298 <li>{{echo|<a rel="mw:ExtLink" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12303 Preprocessor precedence 14: broken language converter in comment
12305 * <!--{{foo}}--> ...should be ok
12306 * <!---{{foo}}--> ...extra dashes
12307 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
12309 <ul><li> ...should be ok</li>
12310 <li> ...extra dashes</li>
12311 <li> foobat ...should be ok</li></ul>
12314 <li><!--{{foo}}--> ...should be ok</li>
12315 <li><!---{{foo}}--> ...extra dashes</li>
12316 <li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- -{bar} --></span><span about="#mwt1">bat</span> ...should be ok</li>
12321 Preprocessor precedence 15: broken brace markup in headings
12323 wgFragmentMode=[ 'html5', 'legacy' ]
12327 __NOTOC__ __NOEDITSECTION__
12336 ===5 foo{{{bar 5===
12341 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12344 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12347 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12350 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12353 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
12356 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12360 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12361 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12363 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12365 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12367 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12369 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12371 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12376 Preprocessor precedence 16: matching closing braces to opening braces
12381 -{{{echo|foo}}bar}-
12386 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>bar"}}'></span></p>
12390 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12399 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12403 ### Token Stream Patcher tests
12405 ### These tests won't always pass wt2wt and other modes because
12406 ### on serialization, the table will be output on a new line.
12407 ### For now, we are blacklisting them, and using this to test selser.
12411 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12413 parsoid=wt2html,wt2wt
12415 {{echo|}}{| width = '100%'
12419 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12420 <tbody><tr><td>foo</td></tr>
12424 ## We used to, but no longer wt2wt this test since the default serializer
12425 ## will normalize the include directives to serialize on their own line.
12426 ## Selser will take care of preserving formatting in scenarios where they
12427 ## intermingled with other wikitext.
12429 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12433 <includeonly>a</includeonly>{| {{{b}}}
12437 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
12438 <tbody><tr><td>c</td></tr>
12443 Table wikitext syntax outside wiki-tables
12447 ! not a table heading
12450 | class="foo bar" | baz
12458 ! not a table heading
12461 | class="foo bar" | baz
12470 ### Testing parsing of templates where a template arg
12471 ### has the same name as the template itself.
12477 {{{quote|{{{1}}}}}}
12481 Templates: Template Name/Arg clash: 1. Use of positional param
12490 Templates: Template Name/Arg clash: 2. Use of named param
12492 {{quote|quote=foo}}
12499 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12508 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12512 Templates: 1. Simple use
12521 Templates: 2. Inside a block tag
12523 <div>{{echo|Foo}}</div>
12524 <blockquote>{{echo|Foo}}</blockquote>
12527 <blockquote>Foo</blockquote>
12531 <blockquote><p>Foo</p></blockquote>
12535 Templates: P-wrapping: 1a. Templates on consecutive lines
12546 Templates: P-wrapping: 1b. Templates on consecutive lines
12560 Templates: P-wrapping: 1c. Templates on consecutive lines
12563 {{echo|bar}} <div>baz</div>
12572 bar </p><div>baz</div>
12576 Templates: P-wrapping: 1d. Template preceded by comment-only line
12585 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12589 Templates: Inline Text: 1. Multiple template uses
12591 {{echo|Foo}}bar{{echo|baz}}
12598 Templates: Inline Text: 2. Back-to-back template uses
12600 {{echo|Foo}}{{echo|bar}}
12607 Templates: Block Tags: 1. Multiple template uses
12609 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12611 <div>Foo</div><div>bar</div><div>baz</div>
12616 Templates: Block Tags: 2. Back-to-back template uses
12618 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12620 <div>Foo</div><div>bar</div>
12624 # This is an edge case relating to paragraph wrapping.
12626 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12631 <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
12636 Templates: Links: 1. Simple example
12638 {{echo|[[Foo|bar]]}}
12640 <p><a href="/wiki/Foo" title="Foo">bar</a>
12645 Templates: Links: 2. Generation of link href
12647 [[{{echo|Foo}}|bar]]
12649 <p><a href="/wiki/Foo" title="Foo">bar</a>
12654 Templates: Links: 3. Generation of part of a link href
12656 [[Fo{{echo|o}}|bar]]
12658 [[Foo{{echo|bar}}]]
12660 [[Foo{{echo|bar}}baz]]
12662 [[Foo{{echo|bar}}|bar]]
12664 [[:Foo{{echo|bar}}]]
12666 [[:Foo{{echo|bar}}|bar]]
12668 <p><a href="/wiki/Foo" title="Foo">bar</a>
12669 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12670 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12671 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12672 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12673 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12678 Templates: Links: 4. Multiple templates generating link href
12680 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12682 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12687 Templates: Links: 5. Generation of link text
12689 [[Foo|{{echo|bar}}]]
12691 <p><a href="/wiki/Foo" title="Foo">bar</a>
12696 Templates: Links: 5. Nested templates (only outermost template should be marked)
12698 {{echo|[[{{echo|Foo}}|bar]]}}
12700 <p><a href="/wiki/Foo" title="Foo">bar</a>
12705 Templates: HTML Tag: 1. Generation of HTML attr. key
12707 <div {{echo|style}}="color:red;">foo</div>
12709 <div style="color:red;">foo</div>
12714 Templates: HTML Tag: 2. Generation of HTML attr. value
12716 <div style={{echo|'color:red;'}}>foo</div>
12718 <div style="color:red;">foo</div>
12723 Templates: HTML Tag: 3. Generation of HTML attr key and value
12725 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12727 <div style="color:red;">foo</div>
12732 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12734 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12736 <div title="This is a long title with just one piece templated">foo</div>
12741 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12743 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12745 <div title="This is a long title with just one piece templated">foo</div>
12750 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12752 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12754 <div title="This is a long title with just one piece templated">foo</div>
12758 # SSS FIXME: While it is great we added support for all this,
12759 # do we want to make this part of the spec? Maybe we want to
12760 # deprecate this kind of usage in the future?
12762 Templates: HTML Tag: 7. Generation of partial attribute key string
12764 <div st{{echo|yle}}="color:red;">foo</div>
12766 <div style="color:red;">foo</div>
12771 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12773 <div {{echo|1=id="v1"}}>bar</div>
12775 <div id="v1">bar</div>
12780 Templates: HTML Tag: 9. Multiple template-generated attributes
12782 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12784 <div id="v1" title="foo">bar</div>
12789 Templates: Support for templates generating attributes and content
12791 {| {{mixed_attr_content_template}}
12796 <table style="color:red;" title="T48811">
12806 <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|}"]}'>
12815 1. Entities and nowikis inside templated attributes should be handled correctly
12817 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12819 <div style="background:#f9f9f9;">foo</div>
12822 <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>
12826 2. Entities and nowikis inside templated attributes should be handled correctly
12829 |{{table_attribs_3}}
12834 <td style="background:#f9f9f9;">Foo
12839 <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>
12844 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12847 |{{table_attribs_3}}
12852 <td style="background:#f9f9f9;">Foo
12856 <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}}]}'>
12857 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12863 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12866 | {{table_attribs_6}} hi
12871 <td style="background: red;"> hi
12876 <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>
12881 Templates: HTML Tables: 1. Generating start of a HTML table
12883 {{echo|<table><tr><td>foo</td>}}</tr></table>
12885 <table><tr><td>foo</td></tr></table>
12890 Templates: HTML Tables: 2a. Generating middle of a HTML table
12892 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12894 <table><tr><td>foo</td></tr></table>
12899 Templates: HTML Tables: 2b. Generating middle of a HTML table
12901 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12903 <table><tr><td>foo</td></tr></table>
12908 Templates: HTML Tables: 3. Generating end of a HTML table
12910 <table><tr>{{echo|<td>foo</td></tr></table>}}
12912 <table><tr><td>foo</td></tr></table>
12917 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12919 {{echo|<table>}}<tr><td>foo</td></tr></table>
12921 <table><tr><td>foo</td></tr></table>
12926 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12928 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12930 <table><tr><td>foo</td></tr></table>
12935 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12937 <table><tr>{{echo|<td>}}foo</td></tr></table>
12939 <table><tr><td>foo</td></tr></table>
12944 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12946 <table><tr><td>foo{{echo|</td>}}</tr></table>
12948 <table><tr><td>foo</td></tr></table>
12953 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12955 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12957 <table><tr><td>foo</td></tr></table>
12962 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12964 <table><tr><td>foo</td></tr>{{echo|</table>}}
12966 <table><tr><td>foo</td></tr></table>
12971 Templates: HTML Tables: 5. Proper fostering of categories from inside
12973 parsoid=wt2html,wt2wt
12975 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12976 <!--Two categories (T52330)-->
12977 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12979 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12980 <!--Two categories (T52330)-->
12981 <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>
12985 Templates: Wiki Tables: 1a. Fostering of entire template content
12993 <tr><td></td></tr></table>
12998 <table><tbody><tr><td></td></tr></tbody></table>
13002 Templates: Wiki Tables: 1b. Fostering of entire template content
13015 <tr><td></td></tr></table>
13023 <tbody><tr><td></td></tr></tbody></table>
13025 <div about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\nfoo\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":1}},"\n|}"]}'>
13027 </div><table about="#mwt3">
13033 Templates: Wiki Tables: 2. Fostering of partial template content
13043 <tr><td></td></tr></table>
13048 <div>b</div><table>
13049 <tbody><tr><td></td></tr></tbody></table>
13051 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13058 Templates: Wiki Tables: 3. td-content via multiple templates
13061 {{echo|{{pipe}}a}}{{echo|b}}
13072 Templates: Wiki Tables: 4. Templated tags, no content
13078 <tr><td></td></tr></table>
13083 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13097 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13110 ## This test case is very specific to Parsoid's internals
13111 ## and is hence only tested for Parsoid's code. Parsoid uses
13112 ## a <meta> marker tag for <ref> tags and they are expanded
13113 ## much later. We are verifying that this <meta> tag usage
13114 ## doesn't prevent foster parenting.
13116 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13118 {{PartialTable}}<ref>foo</ref>
13123 <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">
13127 <ol class="mw-references 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>
13131 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13141 <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{{!}}}"]}'>
13142 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13146 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13151 Templates: Lists: Multi-line list-items via templates
13153 *{{echo|a {{nonexistent|
13155 *{{echo|b {{nonexistent|
13158 <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>
13159 <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>
13164 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13166 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13168 <p><i>ab</i>c<i>d</i>e
13173 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13174 (PHP parser generates misnested html)
13176 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13178 <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>
13182 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13183 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13185 parsoid=wt2html,wt2wt
13187 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13189 <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>
13190 <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>
13191 <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>
13195 Templates: Ugly nesting: 4. Divs opened/closed across templates
13197 a<div>b{{echo|c</div>d}}e
13202 <p>a</p><div>bc</div><p>de
13207 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13213 |{{echo|foo</table>}}
13217 <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|}"]}'>
13221 <td>foo</td></tr></tbody></table><span about="#mwt1">
13222 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13227 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13237 <td>1. {{echo|foo </table>}}</td>
13239 <td>2. {{echo|baz </table>}}</td>
13252 <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>"]}'>
13257 <td>1. foo </td></tr></tbody></table></td>
13259 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13260 </span><span about="#mwt2">
13261 </span><span about="#mwt2">
13262 </span><span about="#mwt2">abc</span><span about="#mwt2">
13263 </span><span about="#mwt2">
13264 </span><span about="#mwt2">
13265 </span><span about="#mwt2">
13266 </span><span about="#mwt2">
13267 </span><span about="#mwt2">
13268 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13269 </span><span about="#mwt2">
13274 Templates: Ugly templates: 3. newline-only template parameter
13283 # This looks like a bug: a single newline triggers p/br for some reason.
13285 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13294 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13295 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13297 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13303 <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
13304 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13308 # T66017 -- ugly wikitext with fostered content generates two template ranges
13309 # that are "identical" and generate nesting cycles in the algorithm
13311 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13313 {{echo|<table><tr><td><table>}}
13317 <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"}'>
13318 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13319 </table></td></tr></tbody></table>
13323 Templates: Parameters substituted at the top-level
13325 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13329 <p><i>who</i> me? <b>never!</b>
13333 <p about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"''who'' {{echo|me}}? '''never!'''"}},"i":0}}]}'><i>who</i> me? <b>never!</b></p>
13335 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13339 Templates: Param with empty arg in the final position
13343 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13347 Parser Functions: 1. Simple example
13356 Parser Functions: 2. Nested use (only outermost should be marked up)
13365 ### Pre-save transform tests
13368 pre-save transform: subst:
13374 This is a test template
13378 pre-save transform: normal template
13388 pre-save transform: nonexistent template
13392 {{thistemplatedoesnotexist}}
13394 {{thistemplatedoesnotexist}}
13398 pre-save transform: subst magic variables
13407 # This is T2089, which I fixed. -- wtm
13409 pre-save transform: subst: templates with parameters
13413 {{subst:paramtest|param="something else"}}
13415 This is a test template with parameter "something else"
13419 Template:nowikitest
13421 <nowiki>'''not wiki'''</nowiki>
13425 pre-save transform: nowiki in subst (T3188)
13429 {{subst:nowikitest}}
13431 <nowiki>'''not wiki'''</nowiki>
13435 Template:commenttest
13437 This template has <!-- a comment --> in it.
13441 pre-save transform: comment in subst (T3936)
13445 {{subst:commenttest}}
13447 This template has <!-- a comment --> in it.
13451 pre-save transform: unclosed tag
13455 <nowiki>'''not wiki'''
13457 <nowiki>'''not wiki'''
13461 pre-save transform: mixed tag case
13465 <NOwiki>'''not wiki'''</noWIKI>
13467 <NOwiki>'''not wiki'''</noWIKI>
13471 pre-save transform: unclosed comment in <nowiki>
13475 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13477 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13480 # Leading @ in this template definition works around a limitation
13481 # in parsoid's parserTests which otherwise strips the <span> from the
13482 # result (confusing it for a template wrapper)
13486 @<span onmouseover="alert('crap')">Oh no</span>
13490 (confirming safety of fix for subst T3936)
13492 {{Template:dangerous}}
13494 <p>@<span>Oh no</span>
13499 pre-save transform: comment containing gallery (T7024)
13503 <!-- <gallery>data</gallery> -->
13505 <!-- <gallery>data</gallery> -->
13509 pre-save transform: comment containing extension
13513 <!-- <tag>data</tag> -->
13515 <!-- <tag>data</tag> -->
13519 pre-save transform: comment containing nowiki
13523 <!-- <nowiki>data</nowiki> -->
13525 <!-- <nowiki>data</nowiki> -->
13529 pre-save transform: <noinclude> in subst (T5298)
13539 pre-save transform: <onlyinclude> in subst (T5298)
13543 {{subst:Includes2}}
13551 {{<includeonly>subst:</includeonly>Includes}}
13555 Template:SafeSubstTest
13557 {{<includeonly>safesubst:</includeonly>Includes}}
13561 T24297: safesubst: works during PST
13565 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13571 T24297: safesubst: works during normal parse
13580 subst: does not work during normal parse
13584 <p>{{subst:Includes}}
13589 pre-save transform: context links ("pipe trick")
13593 [[Article (context)|]]
13596 [[Bar:Article (context)|]]
13597 [[:Bar:Article (context)|]]
13599 [[|Article (context)]]
13603 [[Article (context)|Article]]
13604 [[Bar:Article|Article]]
13605 [[:Bar:Article|Article]]
13606 [[Bar:Article (context)|Article]]
13607 [[:Bar:Article (context)|Article]]
13609 [[Article (context)]]
13610 [[Bar:X (Y) Z|X (Y) Z]]
13611 [[:Bar:X (Y) Z|X (Y) Z]]
13615 pre-save transform: context links ("pipe trick") with interwiki prefix
13619 [[interwiki:Article|]]
13620 [[:interwiki:Article|]]
13621 [[interwiki:Bar:Article|]]
13622 [[:interwiki:Bar:Article|]]
13624 [[interwiki:Article|Article]]
13625 [[:interwiki:Article|Article]]
13626 [[interwiki:Bar:Article|Bar:Article]]
13627 [[:interwiki:Bar:Article|Bar:Article]]
13631 pre-save transform: context links ("pipe trick") with parens in title
13633 pst title=[[Somearticle (context)]]
13637 [[Article (context)|Article]]
13641 pre-save transform: context links ("pipe trick") with comma in title
13643 pst title=[[Someplace, Somewhere]]
13646 [[Otherplace, Elsewhere|]]
13647 [[Otherplace, Elsewhere, Anywhere|]]
13649 [[Otherplace, Somewhere|Otherplace]]
13650 [[Otherplace, Elsewhere|Otherplace]]
13651 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13655 pre-save transform: context links ("pipe trick") with parens and comma
13657 pst title=[[Someplace (IGNORED), Somewhere]]
13660 [[Otherplace (place), Elsewhere|]]
13662 [[Otherplace, Somewhere|Otherplace]]
13663 [[Otherplace (place), Elsewhere|Otherplace]]
13667 pre-save transform: context links ("pipe trick") with comma and parens
13669 pst title=[[Who, me? (context)]]
13672 [[Me, Myself, and I (1937 song)|]]
13674 [[Yes, you. (context)|Yes, you.]]
13675 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13679 pre-save transform: context links ("pipe trick") with namespace
13681 pst title=[[Ns:Somearticle]]
13685 [[Ns:Article|Article]]
13689 pre-save transform: context links ("pipe trick") with namespace and parens
13691 pst title=[[Ns:Somearticle (context)]]
13695 [[Ns:Article (context)|Article]]
13699 pre-save transform: context links ("pipe trick") with namespace and comma
13701 pst title=[[Ns:Somearticle, Context, Whatever]]
13705 [[Ns:Article, Context, Whatever|Article]]
13709 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13711 pst title=[[Ns:Somearticle, Context (context)]]
13715 [[Ns:Article (context)|Article]]
13719 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13721 pst title=[[Ns:Somearticle (IGNORED), Context]]
13725 [[Ns:Article, Context|Article]]
13729 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13733 [[Article(context)|]]
13734 [[Bar:Article(context)|]]
13735 [[:Bar:Article(context)|]]
13736 [[|Article(context)]]
13740 [[Article(context)|Article]]
13741 [[Bar:Article(context)|Article]]
13742 [[:Bar:Article(context)|Article]]
13743 [[Article(context)]]
13744 [[Bar:X(Y)Z|X(Y)Z]]
13745 [[:Bar:X(Y)Z|X(Y)Z]]
13749 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13753 [[Article (context)|]]
13754 [[Bar:Article (context)|]]
13755 [[:Bar:Article (context)|]]
13756 [[|Article (context)]]
13760 [[Article (context)|Article]]
13761 [[Bar:Article (context)|Article]]
13762 [[:Bar:Article (context)|Article]]
13763 [[Article (context)]]
13764 [[Bar:X (Y) Z|X (Y) Z]]
13765 [[:Bar:X (Y) Z|X (Y) Z]]
13769 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13773 [[Article(context)|]]
13774 [[Bar:Article(context)|]]
13775 [[:Bar:Article(context)|]]
13776 [[|Article(context)]]
13780 [[Article(context)|Article]]
13781 [[Bar:Article(context)|Article]]
13782 [[:Bar:Article(context)|Article]]
13783 [[Article(context)]]
13784 [[Bar:X(Y)Z|X(Y)Z]]
13785 [[:Bar:X(Y)Z|X(Y)Z]]
13789 pre-save transform: context links ("pipe trick") with commas (T23660)
13793 [[Article (context), context|]]
13794 [[Article (context),context|]]
13795 [[Bar:Article (context), context|]]
13796 [[Bar:Article (context),context|]]
13797 [[:Bar:Article (context), context|]]
13798 [[:Bar:Article (context),context|]]
13800 [[Article (context), context|Article]]
13801 [[Article (context),context|Article]]
13802 [[Bar:Article (context), context|Article]]
13803 [[Bar:Article (context),context|Article]]
13804 [[:Bar:Article (context), context|Article]]
13805 [[:Bar:Article (context),context|Article]]
13809 Parsoid: backwards pipe trick
13816 <p>[[|<b>bar</b>]]</p>
13820 pre-save transform: trim trailing empty lines
13824 Empty lines are trimmed
13830 Empty lines are trimmed
13834 pre-save transform: Signature expansion
13841 * <noinclude>~~~</noinclude>
13842 * <includeonly>~~~</includeonly>
13843 * <onlyinclude>~~~</onlyinclude>
13845 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13846 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13847 * 00:02, 1 January 1970 (UTC)
13848 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13849 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13850 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13855 ParserOutput flags from signature expansion (T84843)
13862 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13863 flags=user-signature
13868 pre-save transform: Signature expansion in nowiki tags (T2093)
13874 <nowiki>~~~~</nowiki>
13876 <includeonly><nowiki>~~~~</nowiki></includeonly>
13878 <noinclude><nowiki>~~~~</nowiki></noinclude>
13880 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13882 {{subst:Foo}} shall be converted to FOO
13884 As well as inside noinclude/onlyinclude
13885 <noinclude>{{subst:Foo}}</noinclude>
13886 <onlyinclude>{{subst:Foo}}</onlyinclude>
13888 But not inside includeonly
13889 <includeonly>{{subst:Foo}}</includeonly>
13893 <nowiki>~~~~</nowiki>
13895 <includeonly><nowiki>~~~~</nowiki></includeonly>
13897 <noinclude><nowiki>~~~~</nowiki></noinclude>
13899 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13901 FOO shall be converted to FOO
13903 As well as inside noinclude/onlyinclude
13904 <noinclude>FOO</noinclude>
13905 <onlyinclude>FOO</onlyinclude>
13907 But not inside includeonly
13908 <includeonly>{{subst:Foo}}</includeonly>
13912 Parsoid: Recognize nowiki with trailing space in tags
13916 <nowiki ><div>[[foo]]</nowiki >
13924 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13931 Parsoid: Recognize nowiki with odd capitalization
13935 <noWikI ><div>[[foo]]</Nowiki >
13937 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13942 Parsoid: Escape nowiki with trailing space in tags
13946 <p><nowiki > foo </nowiki ></p>
13947 <p>a<nowiki />b</p>
13948 <p>c<nowiki/ >d</p>
13950 <nowiki > foo </nowiki >
13958 Parsoid: Escape weird noWikI capitalizations
13962 <p><noWikI > foo </NoWikI ></p>
13964 <noWikI > foo </NoWikI >
13968 ### Message transform tests
13971 message transform: magic variables
13981 message transform: should not transform wiki markup
13991 message transform: <noinclude> in transcluded template (T6926)
14001 message transform: <onlyinclude> in transcluded template (T6926)
14011 {{#special:}} page name, known
14015 {{#special:Recentchanges}}
14017 Special:RecentChanges
14021 {{#special:}} page name with subpage, known
14025 {{#special:Recentchanges/param}}
14027 Special:RecentChanges/param
14031 {{#special:}} page name, unknown
14035 {{#special:foobar nonexistent}}
14037 Special:Foobar nonexistent
14041 {{#speciale:}} page name, known
14045 {{#speciale:Recentchanges}}
14047 Special:RecentChanges
14051 {{#speciale:}} page name with subpage, known
14055 {{#speciale:Recentchanges/param}}
14057 Special:RecentChanges/param
14061 {{#speciale:}} page name, unknown
14065 {{#speciale:foobar nonexistent}}
14067 Special:Foobar_nonexistent
14073 ### For Parsoid-specific tests, see
14074 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14079 parsoid=wt2html,wt2wt,html2html
14081 [[Image:foobar.jpg]]
14083 <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>
14086 <p><figure-inline 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></figure-inline></p>
14090 Serialize simple image with span wrapper
14094 <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>
14096 [[File:Foobar.jpg]]
14100 Simple image (using File: namespace, now canonical)
14102 [[File:Foobar.jpg]]
14104 <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>
14107 <p><figure-inline 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></figure-inline></p>
14111 Right-aligned image
14113 [[File:Foobar.jpg|right]]
14115 <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>
14118 <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>
14124 [[File:Foobar.jpg|right|Caption text]]
14126 <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>
14129 <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>
14133 Image with caption, T55312 #1
14135 [[File:Foobar.jpg|right|Caption page stuff]]
14137 <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>
14140 <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>
14144 Image with caption, T55312 #2
14146 [[File:Foobar.jpg|right|Caption page=]]
14148 <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>
14151 <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>
14155 Image with caption, T55312 #3
14157 [[File:Foobar.jpg|right|Caption page=stuff]]
14159 <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>
14162 <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>
14166 Image caption with pipe entity
14168 [[File:Foobar.jpg|thumb|one | two]]
14169 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14171 <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>one | two</div></div></div>
14172 <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>one <i>two</i> | three</div></div></div>
14175 <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>one <span typeof="mw:Entity">|</span> two</figcaption></figure>
14176 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14180 Allow empty links in image captions (T62753)
14184 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14189 <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>
14192 <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>
14194 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14195 </figcaption></figure>
14199 Titles in unlinked images (T23454)
14201 [[File:Foobar.jpg|link=|stuff]]
14203 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14208 Link with empty target
14217 Image with link trail
14219 Linktrails should not work for images: [[File:Foobar.jpg]]s
14221 <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
14224 <p>Linktrails should not work for images: <figure-inline 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></figure-inline>s</p>
14228 Image with empty attribute
14230 parsoid=wt2html,wt2wt,html2html
14232 [[File:Foobar.jpg|right||Caption text]]
14234 <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>
14237 <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>
14241 1. Block image with individual attributes from templates
14243 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14245 <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>
14248 <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>
14252 2. Block Image with individual attributes from templates
14254 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14256 <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>
14259 <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>
14263 3. Inline image with individual attributes from templates
14265 [[File:Foobar.jpg|{{echo|50px}}]]
14267 <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>
14270 <p><figure-inline 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></figure-inline></p>
14273 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14274 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14276 Image with multiple attributes from the same template
14278 [[File:Foobar.jpg|{{image_attribs}}]]
14280 <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>
14283 <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>
14287 Image with link tails
14291 123[[File:Foobar.jpg]]456
14292 123[[File:Foobar.jpg|right]]456
14293 123[[File:Foobar.jpg|thumb]]456
14295 <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
14297 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
14298 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
14301 <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
14303 123</p><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><p>456
14304 123</p><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><p>456
14307 <p>123<figure-inline 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></figure-inline>456</p>
14308 <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>
14309 <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>
14313 Image with multiple captions -- only last one is accepted
14315 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14317 <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>
14320 <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>
14324 Image with multiple widths -- use last
14326 [[File:Foobar.jpg|200px|300px|caption]]
14328 <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>
14331 <p><figure-inline 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></figure-inline></p>
14335 Image with multiple alignments -- use first (T50664)
14339 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14341 [[File:Foobar.jpg|middle|text-top|caption]]
14343 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14344 <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>
14347 <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>
14348 <p><figure-inline 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></figure-inline></p>
14352 Image with width attribute at different positions
14354 [[File:Foobar.jpg|200px|right|Caption]]
14355 [[File:Foobar.jpg|right|200px|Caption]]
14356 [[File:Foobar.jpg|right|Caption|200px]]
14358 <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>
14359 <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>
14360 <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>
14363 <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>
14364 <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>
14365 <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>
14368 # a sad bit of backward-compatibility
14370 Image with size specified with pxpx (T15500, T53628)
14372 parsoid=wt2html,wt2wt,html2html
14374 [[File:Foobar.jpg|20pxpx]]
14375 [[File:Foobar.jpg|200x20pxpx]]
14377 <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>
14378 <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>
14381 <p><figure-inline 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></figure-inline> <figure-inline 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></figure-inline></p>
14385 Image with link parameter, wiki target
14387 [[File:Foobar.jpg|link=Main Page]]
14389 <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>
14392 <p><figure-inline 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></figure-inline></p>
14395 # parsoid T51293 (part 1)
14397 Image with link parameter, URL target
14399 [[File:Foobar.jpg|link=http://example.com/]]
14401 <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>
14404 <p><figure-inline 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></figure-inline></p>
14407 # parsoid T51293 (part 2)
14409 Image with link parameter, protocol-less URL target
14411 [[File:Foobar.jpg|link=//example.com/]]
14413 <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>
14416 <p><figure-inline 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></figure-inline></p>
14420 Escaping non-block captions (T107435)
14423 "modes": ["wt2wt"],
14425 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14429 [[Image:Foobar.jpg|caption]]
14431 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14434 # wgExternalLinkTarget not supported by Parsoid
14436 Image with link parameter, wgExternalLinkTarget
14438 [[Image:foobar.jpg|link=http://example.com/]]
14440 wgExternalLinkTarget='foobar'
14442 <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>
14447 Image with link parameter, wgNoFollowLinks set to false
14449 [[Image:foobar.jpg|link=http://example.com/]]
14451 wgNoFollowLinks=false
14453 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14458 Image with link parameter, wgNoFollowDomainExceptions
14460 [[Image:foobar.jpg|link=http://example.com/]]
14462 wgNoFollowDomainExceptions='example.com'
14464 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14468 # wgExternalLinkTarget not supported by Parsoid
14470 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14472 [[Image:foobar.jpg|link=http://example.com/|Title]]
14474 wgExternalLinkTarget='foobar'
14476 <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>
14481 Image with empty link parameter
14483 [[File:Foobar.jpg|link=]]
14485 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14488 <p><figure-inline 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></figure-inline></p>
14492 Image with link parameter (wiki target) and unnamed parameter
14494 [[File:Foobar.jpg|link=Main_Page|Title]]
14496 <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>
14499 <p><figure-inline 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></figure-inline></p>
14503 Image with link parameter (URL target) and unnamed parameter
14505 [[File:Foobar.jpg|link=http://example.com/|Title]]
14507 <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>
14510 <p><figure-inline 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></figure-inline></p>
14514 Thumbnail image with link parameter
14517 parsoid=wt2html,wt2wt,html2html
14519 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14521 <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>
14524 <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>
14528 Manually-specified thumbnail image
14532 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14534 <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>
14537 <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>
14541 Manually-specified thumbnail image with explicit link to wiki page
14544 parsoid=wt2html,wt2wt,html2html
14546 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14548 <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>
14551 <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>
14555 Manually-specified thumbnail image with explicit link to url
14558 parsoid=wt2html,wt2wt,html2html
14560 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14562 <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>
14565 <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>
14569 Manually-specified thumbnail image with explicit no link
14572 parsoid=wt2html,wt2wt,html2html
14574 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14576 <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>
14579 <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>
14583 Manually-specified thumbnail image with explicit link and alt text
14586 parsoid=wt2html,wt2wt,html2html
14588 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14590 <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>
14593 <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>
14597 Image with frame and link
14599 parsoid=wt2html,wt2wt,html2html
14601 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14603 <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>
14606 <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>
14610 Image with frame and link and explicit alt
14612 parsoid=wt2html,wt2wt,html2html
14614 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14616 <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>
14619 <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>
14623 Image with wiki markup in implicit alt
14625 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14627 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14629 <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>
14630 </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>
14633 <p><figure-inline 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></figure-inline></p>
14635 <p><figure-inline 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></figure-inline></p>
14639 Alt image option should handle most kinds of wikitext without barfing
14641 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14643 <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>
14646 <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\":\"&apos;&apos;bold template&apos;&apos;\"}},\"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>
14650 Image with table with attributes in caption
14652 parsoid=wt2html,html2html
14654 [[File:Foobar.jpg|thumb|
14661 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"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>
14662 <table class="123">
14663 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14666 </figcaption></figure>
14670 Image with table with rows from templates in caption
14672 [[File:Foobar.jpg|thumb|
14678 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{|\n{{echo|{{!}} hi}}\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"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>
14680 <tbody about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} hi"}},"i":0}},"\n"]}'><tr><td> hi</td></tr>
14682 </figcaption></figure>
14686 Image with nested tables in caption
14688 [[File:Foobar.jpg|thumb|Foo<br />
14697 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Foo<br/>\n{|\n|\n{|\n|z\n|}\n|}\n"}]}'><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 data-parsoid='{"dsr":[null,50,null,null]}'>Foo<br data-parsoid='{"stx":"html","selfClose":true}'/>
14701 <tbody><tr><td>z</td></tr>
14702 </tbody></table></td></tr>
14704 </figcaption></figure>
14707 ###################
14708 # Conflicting image format options.
14709 # First option specified should 'win'.
14710 # All three cases in each test should be identical.
14713 Image with 'frameless' first.
14715 parsoid=wt2html,wt2wt,html2html
14717 [[File:Foobar.jpg|frameless|caption]]
14719 [[File:Foobar.jpg|frameless|frame|caption]]
14721 [[File:Foobar.jpg|frameless|thumb|caption]]
14723 <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>
14724 </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>
14725 </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>
14728 <p><figure-inline 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></figure-inline></p>
14729 <p><figure-inline 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></figure-inline></p>
14730 <p><figure-inline 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></figure-inline></p>
14734 Image with 'frame' first.
14736 parsoid=wt2html,wt2wt,html2html
14738 [[File:Foobar.jpg|frame|caption]]
14739 [[File:Foobar.jpg|frame|frameless|caption]]
14740 [[File:Foobar.jpg|frame|thumb|caption]]
14742 <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>
14743 <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>
14744 <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>
14747 <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>
14748 <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>
14749 <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>
14753 Image with 'thumb' first.
14755 parsoid=wt2html,wt2wt,html2html
14757 [[File:Foobar.jpg|thumb|caption]]
14758 [[File:Foobar.jpg|thumb|frameless|caption]]
14759 [[File:Foobar.jpg|thumb|frame|caption]]
14761 <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>
14762 <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>
14763 <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>
14766 <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>
14767 <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>
14768 <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>
14771 ###################
14773 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14774 # and https://phabricator.wikimedia.org/T64258
14775 # Foobar has actual size of 1941x220
14776 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14777 # a scalable format.
14778 # 2. Framed images always ignore size options; always render at default size.
14779 # 3. "Unspecified format" and border are the only types which can be
14783 Image: unspecified format and border enlarge
14785 parsoid=wt2html,wt2wt,html2html
14787 [[File:Foobar.jpg|2000px]]
14789 [[File:Foobar.jpg|border|2000px]]
14791 <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>
14792 </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>
14795 <p><figure-inline 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="227" width="2000"/></a></figure-inline></p>
14796 <p><figure-inline class="mw-image-border" 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="227" width="2000"/></a></figure-inline></p>
14800 Image: "unspecified format" and border reduce
14802 parsoid=wt2html,wt2wt,html2html
14804 [[File:Foobar.jpg|1000px]]
14806 [[File:Foobar.jpg|border|1000px]]
14808 <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>
14809 </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>
14812 <p><figure-inline 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></figure-inline></p>
14813 <p><figure-inline 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></figure-inline></p>
14817 Image: thumbs reduce
14819 parsoid=wt2html,wt2wt,html2html
14821 [[File:Foobar.jpg|thumb|50px]]
14823 <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>
14826 <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>
14830 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14832 parsoid=wt2html,wt2wt,html2html
14834 [[File:Foobar.jpg|thumb|2000px]]
14836 [[File:Foobar.svg|thumb|2000px]]
14838 <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>
14839 <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>
14842 <figure typeof="mw:Image/Thumb"><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>
14843 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
14847 Image: frameless can reduce in size
14849 parsoid=wt2html,wt2wt,html2html
14851 [[File:Foobar.jpg|frameless|50px]]
14853 <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>
14856 <p><figure-inline 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></figure-inline></p>
14860 Image: bitmap frameless can't be enlarged past original size, but vector can
14862 parsoid=wt2html,wt2wt,html2html
14864 [[File:Foobar.jpg|frameless|2000px]]
14866 [[File:Foobar.svg|frameless|2000px]]
14868 <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>
14869 </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>
14872 <p><figure-inline typeof="mw:Image/Frameless"><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-inline></p>
14873 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure-inline></p>
14877 Image: framed images are always unscaled.
14879 parsoid=wt2html,wt2wt,html2html
14881 [[File:Foobar.jpg|frame]]
14883 [[File:Foobar.jpg|frame|50px]]
14885 [[File:Foobar.jpg|frame|50x50px]]
14887 [[File:Foobar.jpg|frame|2000px]]
14889 <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>
14890 <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>
14891 <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>
14892 <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>
14895 <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>
14896 <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>
14897 <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>
14898 <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>
14901 ###################
14904 Link to image page- image page normally doesn't exists, hence edit link
14905 Add test with existing image page
14906 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14910 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14915 T20784 Link to non-existent image page with caption should use caption as link text
14917 [[:Image:test|caption]]
14919 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14924 Frameless image caption with a free URL
14926 [[File:Foobar.jpg|http://example.com]]
14928 <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>
14931 <p><figure-inline 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></figure-inline></p>
14935 Thumbnail image caption with a free URL
14939 [[File:Foobar.jpg|thumb|http://example.com]]
14941 <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>
14944 <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>
14948 Thumbnail image caption with a free URL and explicit alt
14951 parsoid=wt2html,wt2wt,html2html
14953 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14955 <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>
14958 <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>
14962 SVG thumbnails with no language set
14965 [[File:Foobar.svg|thumb|caption]]
14967 <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>
14970 <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.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
14974 SVG thumbnails with language de
14976 parsoid=wt2html,wt2wt,html2html
14978 [[File:Foobar.svg|thumb|caption|lang=de]]
14980 <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>
14983 <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.png" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
14987 SVG thumbnails with invalid language code
14989 parsoid=wt2html,wt2wt,html2html
14991 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
14993 <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>
14996 <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.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
15000 T3887: A ISBN with a thumbnail
15002 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15004 <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>
15007 <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>
15011 T3887: A RFC with a thumbnail
15013 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15015 <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="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15018 <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="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
15022 T3887: A mailto link with a thumbnail
15024 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15026 <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>
15029 <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>
15032 # Pending resolution to T2368
15034 T2648: Frameless image caption with a link
15036 [[File:Foobar.jpg|text with a [[link]] in it]]
15038 <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>
15041 <p><figure-inline 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></figure-inline></p>
15045 T2648: Frameless image caption with a link (suffix)
15047 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15049 <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>
15052 <p><figure-inline 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></figure-inline></p>
15056 T2648: Frameless image caption with an interwiki link
15058 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15060 <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>
15063 <p><figure-inline 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:WikiLink/Interwiki\" 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></figure-inline></p>
15067 T2648: Frameless image caption with a piped interwiki link
15069 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15071 <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>
15074 <p><figure-inline 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:WikiLink/Interwiki\" 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></figure-inline></p>
15078 T107474: Frameless image caption with <nowiki>
15080 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15082 <p><figure-inline 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></figure-inline></p>
15086 Escape HTML special chars in image alt text
15088 [[File:Foobar.jpg|& < > "]]
15090 <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>
15093 <p><figure-inline 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></figure-inline></p>
15097 Escape HTML special chars in image alt text with LanguageConverter
15101 [[File:Foobar.jpg|& < > "]]
15103 <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>
15106 <p><figure-inline 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></figure-inline></p>
15110 Entities in file name and attributes
15112 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15114 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15117 <p><figure-inline 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":"apierror-filedoesnotexist","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></figure-inline></p>
15121 T2499: Alt text should have Ӓ, not &1234;
15123 [[File:Foobar.jpg|♀]]
15125 <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>
15128 <p><figure-inline 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></figure-inline></p>
15132 Broken image caption with link
15134 parsoid=wt2html,wt2wt,html2html
15136 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15138 <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.
15141 <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>
15145 Image caption containing another image
15147 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15149 <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>
15152 <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 <figure-inline 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></figure-inline> inside it!</figcaption></figure>
15156 Image: caption containing a newline
15158 [[File:Foobar.jpg|This
15161 <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>
15164 <p><figure-inline 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></figure-inline></p>
15168 Image: caption containing leading space
15169 (The leading space should not trigger nowiki escaping in wt2wt mode)
15171 [[File:Foobar.jpg|thumb| bar]]
15173 <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>
15176 <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>
15180 Image: caption containing a table
15182 parsoid=wt2html,wt2wt,html2html
15184 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15190 and some more text.]]
15192 <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>
15195 <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
15198 <tr><th>Foo </th><th>Bar</th></tr>
15201 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15205 T5090: External links other than http: in image captions
15207 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15209 <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>
15212 <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>
15218 parsoid=wt2html,wt2wt,html2html
15220 [[Image:foobar.jpg|a|class=b]]
15222 <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>
15225 <p><figure-inline 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></figure-inline></p>
15229 Localized image handling (1).
15231 parsoid=wt2html,wt2wt,html2html
15234 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15236 <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>
15239 <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>
15243 Localized image handling (2).
15246 parsoid=wt2html,wt2wt,html2html
15249 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15251 <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>
15254 <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>
15258 Localized image handling (3).
15263 <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>
15265 [[File:Foobar.jpg|بندانگشتی]]
15269 "border", "frameless" and "class" attributes on an image.
15272 parsoid=wt2html,wt2wt,html2html
15274 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15276 <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>
15279 <p><figure-inline 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></figure-inline></p>
15282 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15284 Invalid image attributes (T64500)
15287 parsoid=wt2html,wt2wt,html2html
15289 [[File:Foobar.jpg|thumb|float|left|caption]]
15291 [[File:Foobar.jpg|thumb|righ|caption]]
15293 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15295 <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>
15296 <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>
15297 <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>
15300 <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>
15301 <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>
15302 <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>
15308 #REDIRECT [[File:Barfoo.jpg]]
15311 # FIXME: Parsoid should run this test -- but we'd need to teach the
15312 # mockAPI about the redirected Barfoo.jpg image.
15316 [[Image:Barfoo.jpg]]
15318 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15323 Missing image with uploads disabled
15327 [[File:Foobaz.jpg]]
15329 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15332 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline></p>
15335 # Parsoid-specific testing for images
15336 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15337 # Currently imperfect due to a flaw in the Parsoid testrunner
15339 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15343 Parsoid-specific image handling - simple image with size and middle alignment
15345 [[File:Foobar.jpg|middle|50px]]
15347 <p><figure-inline 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></figure-inline></p>
15351 Parsoid-specific image handling - simple image with size, middle alignment,
15352 non-standard namespace alias
15354 parsoid=wt2wt,wt2html,html2html
15356 [[Image:Foobar.jpg|middle|50px]]
15358 <p><figure-inline 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></figure-inline></p>
15362 Parsoid-specific image handling - simple image with size and middle alignment
15365 [[File:Foobar.jpg|50px|middle]]
15367 <p><figure-inline 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></figure-inline></p>
15371 Parsoid-specific image handling - simple image with size and middle alignment
15372 and non-standard namespace name
15374 parsoid=wt2html,wt2wt,html2html
15376 [[Image:Foobar.jpg|50px|middle]]
15378 <p><figure-inline 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></figure-inline></p>
15382 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15384 [[File:Foobar.jpg|500x10px|baseline|caption]]
15386 <p><figure-inline 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></figure-inline></p>
15390 Parsoid-specific image handling - simple image with border and size spec
15392 [[File:Foobar.jpg|50px|border|caption]]
15394 <p><figure-inline 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></figure-inline></p>
15398 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15400 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15402 <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>
15406 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15409 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15411 <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>
15415 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15417 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15419 <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>
15423 Parsoid-specific image handling - thumbnail with specific size, halign,
15424 valign, and caption (existing content)
15426 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15428 <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>
15432 Parsoid-specific image handling - framed image with specific size and caption
15435 parsoid=wt2html,wt2wt,html2html
15437 [[File:Foobar.jpg|frame|500x50px|caption]]
15439 <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>
15443 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15446 parsoid=wt2html,wt2wt,html2html
15448 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15450 <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>
15454 Parsoid-specific image handling - frameless image with specific size, border, and caption
15456 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15458 <p><figure-inline 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></figure-inline></p>
15462 Parsoid-specific image handling - simple image with a formatted caption
15464 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15466 <p><figure-inline 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></figure-inline></p>
15470 Parsoid-specific image handling - caption with a template in it
15472 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15474 <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>
15478 Parsoid-specific image handling - caption with unbalanced tags in it
15480 parsoid=wt2html,wt2wt,html2html
15483 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15487 <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>
15492 Parsoid-specific image handling - empty caption (1)
15494 parsoid=wt2html,wt2wt
15496 [[File:Foobar.jpg|thumb|]]
15498 <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>
15501 # empty captions don't get serialized unless we're in the "round trip" case
15503 Parsoid-specific image handling - empty caption (2)
15507 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15508 <a href="./File:Foobar.jpg">
15509 <img resource="./File:Foobar.jpg"
15510 src="//example.com/images/3/3a/Foobar.jpg"
15511 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15512 height="25" width="220"/>
15514 <figcaption></figcaption>
15517 [[File:Foobar.jpg|thumb]]
15521 Parsoid-specific image handling - whitespace caption
15523 [[File:Foobar.jpg|thumb| ]]
15525 <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>
15529 Parsoid-specific image handling - lang option
15532 [[File:Foobar.svg|lang=de|caption]]
15536 <figure-inline 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></figure-inline>
15540 ## Edge case bugs in Parsoid from T93580
15542 T93580: 1. Templated <ref> inside block images
15544 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15548 <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>
15550 <ol class="mw-references 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>
15554 T93580: 2. <ref> inside inline images
15556 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15560 <p><figure-inline 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>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15562 <ol class="mw-references 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>
15566 T93580: 3. Templated <ref> inside inline images
15568 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15572 <p><figure-inline 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>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15574 <ol class="mw-references 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">foo</span></li></ol>
15581 Subpage test/subpage
15589 subpage title=[[Subpage test]]
15593 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15598 Subpage noslash link
15600 subpage title=[[Subpage test]]
15604 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15609 Subpage test/1/2/subpage
15615 Relative subpage noslash link
15617 parsoid=wt2wt,wt2html,html2html
15618 subpage title=[[Subpage test/1/2/3/4]]
15624 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15625 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15628 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15629 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15633 Parsoid: dot-slash prefixed wikilinks
15643 </p><p>[[././baz/]]
15648 </p><p>[[././baz/]]
15653 Render invalid page names as plain text (T53090)
15665 [[foo[http://example.com]xyz]]
15667 [[{{echo|./../foo}}|bar]]
15668 [[{{echo|foo/.}}|bar]]
15669 [[{{echo|foo/..}}|bar]]
15670 [[{{echo|foo~~~~bar}}]]
15671 [[{{echo|foo>bar}}]]
15672 [[{{echo|foo././bar}}]]
15673 [[{{echo|foo{bar}}]]
15674 [[{{echo|foo}bar}}]]
15675 [[{{echo|foo[bar}}]]
15676 [[{{echo|foo]bar}}]]
15677 [[{{echo|foo<bar}}]]
15679 <p>[[./../foo|bar]]
15689 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15690 </p><p>[[./../foo|bar]]
15703 <p>[[./../foo|bar]]
15713 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15715 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15716 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15717 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15718 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15719 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15720 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15721 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15722 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15723 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15724 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15725 [[<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>
15733 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15738 T2561: {{/Subpage}}
15740 subpage title=[[Page]]
15744 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15752 Category:MediaWiki User's Guide
15760 [[:Category:MediaWiki User's Guide]]
15762 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15771 [[Category:MediaWiki User's Guide]]
15773 cat=MediaWiki_User's_Guide sort=
15775 <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"}}'/>
15779 PAGESINCATEGORY invalid title fatal (r33546 fix)
15781 {{PAGESINCATEGORY:<bogus>}}
15788 Category with different sort key
15792 [[Category:MediaWiki User's Guide|Foo]]
15794 cat=MediaWiki_User's_Guide sort=Foo
15796 <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"}}'/>
15800 Category with identical sort key
15804 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15806 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15808 <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"}}'/>
15812 Category with empty sort key
15817 [[Category:MediaWiki User's Guide|]]
15819 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15823 Category with empty sort key and parentheses
15828 [[Category:Foo (bar)|]]
15830 [[Category:Foo (bar)|Foo]]
15834 Category with link tail
15839 123[[Category:Foo]]456
15841 123[[Category:Foo]]456
15845 Category with template
15850 [[Category:{{echo|Foo}}]]
15852 [[Category:{{echo|Foo}}]]
15856 Category with template in sort key
15861 [[Category:Foo|{{echo|Bar}}]]
15863 [[Category:Foo|{{echo|Bar}}]]
15867 Category with template in sort key and title
15872 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15874 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15877 ## We used to, but no longer wt2wt this test since the default serializer
15878 ## will normalize all categories to serialize on their own line.
15879 ## This wikitext usage is going to be fairly uncommon in production and
15880 ## selser will take care of preserving formatting in those scenarios.
15882 Category / paragraph interactions
15886 Foo [[Category:Baz]] Bar
15888 Foo [[Category:Baz]]
15896 [[Category:Baz]] Bar
15909 {{echo|[[Category:Baz]]}}
15922 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15923 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15924 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15925 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15926 <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>
15927 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15930 ## We used to, but no longer wt2wt this test since the default serializer
15931 ## will normalize all categories to serialize on their own line.
15932 ## This wikitext usage is going to be fairly uncommon in production and
15933 ## selser will take care of preserving formatting in those scenarios.
15935 ## The whitespace on the empty line is part of the test. Please do not delete
15937 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15943 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15945 {{echo|[[Category:Foo]] and so should this!}}
15947 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15952 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15954 <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>
15957 ## Parsoid will not try to wt2wt this while preserving newlines because
15958 ## it suppresses excess newlines within list items -- and we don't want to
15959 ## introduce a special case just for categories, which is, in reality somewhat
15960 ## odd behavior -- categories are unlikely to be used in list items like this
15961 ## in top-level pages and are only likely to show up in template-generated
15962 ## list items where this RT-ing is a non-issue.
15964 ## The whitespace on the empty line is part of the test. Please do not delete
15966 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15972 [[Category:Foo]] and this should be part of the same list item
15975 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15977 <ul><li>This and this should be part of the same list item</li>
15978 <li>So should this and this should be part of the same list item</li></ul>
15981 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15982 <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>
15986 ## Newlines and categories that follow the last item of a list
15987 ## are treated differently because this (list followed by categories)
15988 ## is an extremely common pattern on wikis.
15990 3. Categories and newlines: newline suppression for last list item should RT properly
16003 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16005 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16006 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16010 4. Categories and newlines: newline suppression for last list item should RT properly
16018 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16020 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16023 ## only wt2html for this to make sure the algo only applies to the rightmost path
16025 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16038 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16040 <ul><li> d</li></ul></li></ul>
16041 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16044 ## We used to, but no longer wt2wt this test since the default serializer
16045 ## will normalize all categories to serialize on their own line.
16046 ## This wikitext usage is going to be fairly uncommon in production and
16047 ## selser will take care of preserving formatting in those scenarios.
16049 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16053 * a [[Category:Foo]]
16055 <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>
16058 # This test also demonstrates because of newline+category tunneling
16059 # through the list hander, template wrapping doesn't expand to the
16060 # containing list when the list item swallows the category.
16062 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16067 <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
16068 </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>
16072 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16076 {{echo|[[Category:Foo]]
16080 <ul><li> a</li></ul>
16082 <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">
16083 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16084 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16088 9. Categories and newlines: should behave properly with linkprefix (T87753)
16103 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16104 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16108 10. No regressions on internal links following category (T174639)
16110 parsoid=wt2html,html2html
16112 [[Category:Foo]]<div>a
16117 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16120 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16122 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16125 # Note that Parsoid differs slightly from PHP due to T175421
16127 11. Special case where only newlines separate links (T175416)
16129 parsoid=wt2html,html2html
16133 [[Foo]][[es:Alimento]]
16138 <a href="/wiki/Foo" title="Foo">Foo</a>
16139 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16142 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16144 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16146 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16150 Category links with multiple namespaces
16152 [[Category:Project:Foo]]
16154 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16158 Parsoid: Serialize link to category page with colon escape
16164 [[:Category:Foo|Bar]]
16167 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16168 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16172 # We used to, but no longer wt2wt this test since the default serializer
16173 # will normalize all categories to serialize on their own line.
16174 # This wikitext usage is going to be fairly uncommon in production and
16175 # selser will take care of preventing whitespace insertion if this
16176 # occurs in an article.
16178 # html2html disabled for the same reason (whitespace insertion between
16181 # html2wt disabled because it localizes the "Category" namespace.
16183 Link prefix/suffixes aren't applied to category links
16193 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16197 Link prefix/suffixes aren't applied to language links
16207 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16211 Parsoid: Serialize link to file page with colon escape
16217 [[:File:Foo.png|Bar]]
16220 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16221 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16226 Parsoid: Serialize a genuine category link without colon escape
16231 [[Category:Foo|Bar]]
16233 <link rel="mw:PageProp/Category" href="./Category:Foo">
16234 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16238 Normalize hrefs properly before testing for invalid link targets (T72894)
16242 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16244 [[Category:Toxine bactérienne]]
16248 Parsoid: Defaultsort
16250 {{DEFAULTSORT:Foo}}
16252 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16255 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16256 # But, this is a limitation of our representation and is documented in
16257 # TemplateHandler.js in processSpecialMagicWord
16259 Parsoid: Defaultsort (template-generated)
16261 {{{{echo|DEFAULTSORT}}:Foo}}
16263 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{{{echo|DEFAULTSORT}}:Foo}}","dsr":[0,26,null,null]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,22,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DEFAULTSORT\"}},\"i\":0}}]}'>DEFAULTSORT</span>:Foo"}]]}'/>
16267 ### Inter-language links
16270 Interlanguage links
16278 es:Alimento fr:Nourriture zh:食品
16280 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16281 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16282 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16286 Duplicate interlanguage links (T26502)
16297 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16298 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16299 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16300 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16307 Basic section headings
16314 ===Smaller headline===
16317 <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>
16320 <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>
16323 <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>
16329 Section headings with TOC
16332 === Subheadline 1 ===
16333 ===== Skipping a level =====
16334 ====== Skipping a level ======
16338 ===Another headline===
16340 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16342 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16344 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16346 <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>
16348 <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>
16355 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16357 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16363 <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>
16364 <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>
16365 <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>
16366 <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>
16367 <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>
16370 <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>
16375 TOC anchors don't collide
16383 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16385 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16386 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16387 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16388 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16392 <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>
16393 <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>
16394 <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>
16395 <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>
16399 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16400 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16402 Handling of sections up to level 6 and beyond
16407 == Level 2 Heading==
16408 === Level 3 Heading===
16409 ==== Level 4 Heading====
16410 ===== Level 5 Heading=====
16411 ====== Level 6 Heading======
16412 ======= Level 7 Heading=======
16413 ======== Level 8 Heading========
16414 ========= Level 9 Heading=========
16415 ========== Level 10 Heading==========
16417 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16419 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16421 <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>
16423 <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>
16425 <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>
16427 <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>
16429 <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>
16430 <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>
16431 <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>
16432 <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>
16433 <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>
16447 <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>
16448 <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>
16449 <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>
16450 <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>
16451 <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>
16452 <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>
16453 <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>
16454 <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>
16455 <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>
16456 <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>
16459 <h1 id="Level_1_Heading" data-parsoid='{}'> Level 1 Heading</h1>
16460 <h2 id="Level_2_Heading" data-parsoid='{}'> Level 2 Heading</h2>
16461 <h3 id="Level_3_Heading" data-parsoid='{}'> Level 3 Heading</h3>
16462 <h4 id="Level_4_Heading" data-parsoid='{}'> Level 4 Heading</h4>
16463 <h5 id="Level_5_Heading" data-parsoid='{}'> Level 5 Heading</h5>
16464 <h6 id="Level_6_Heading" data-parsoid='{}'> Level 6 Heading</h6>
16465 <h6 id="=_Level_7_Heading=" data-parsoid='{}'><span id=".3D_Level_7_Heading.3D" typeof="mw:FallbackId"></span>= Level 7 Heading=</h6>
16466 <h6 id="==_Level_8_Heading==" data-parsoid='{}'><span id=".3D.3D_Level_8_Heading.3D.3D" typeof="mw:FallbackId"></span>== Level 8 Heading==</h6>
16467 <h6 id="===_Level_9_Heading===" data-parsoid='{}'><span id=".3D.3D.3D_Level_9_Heading.3D.3D.3D" typeof="mw:FallbackId"></span>=== Level 9 Heading===</h6>
16468 <h6 id="====_Level_10_Heading====" data-parsoid='{}'><span id=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D" typeof="mw:FallbackId"></span>==== Level 10 Heading====</h6>
16472 TOC regression (T11764)
16476 ==== title 1.1.1 ====
16481 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16483 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16485 <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>
16487 <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>
16490 <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>
16493 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16495 <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>
16501 <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>
16502 <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>
16503 <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>
16504 <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>
16505 <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>
16506 <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>
16511 TOC for heading containing <span id="..."></span> (T96153)
16514 ==<span id="old-anchor"></span>New title==
16516 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16518 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16522 <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>
16527 TOC with wgMaxTocLevel=3 (T8204)
16533 ==== title 1.1.1 ====
16538 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16540 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16542 <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>
16543 <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>
16546 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16548 <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>
16554 <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>
16555 <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>
16556 <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>
16557 <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>
16558 <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>
16559 <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>
16564 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16570 ====Section 1.1.1====
16571 ====Section 1.1.1.1====
16574 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16576 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16578 <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>
16581 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16585 <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>
16586 <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>
16587 <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>
16588 <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>
16589 <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>
16595 Resolving duplicate section names
16600 <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>
16601 <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>
16606 Resolving duplicate section names with differing case (T12721)
16611 <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>
16612 <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>
16624 Template with sections, __NOTOC__
16631 <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>
16632 <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>
16633 <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>
16634 <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>
16639 __NOEDITSECTION__ keyword
16645 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16646 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16651 Link inside a section heading
16653 ==Section with a [[Main Page|link]] in it==
16655 <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>
16660 TOC regression (T14077)
16667 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16669 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16671 <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>
16674 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16678 <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>
16679 <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>
16680 <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>
16685 T3219 URL next to image (good)
16687 http://example.com [[File:Foobar.jpg]]
16689 <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>
16692 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <figure-inline 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></figure-inline></p>
16695 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16697 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16699 parsoid=wt2html,html2html
16702 The line above must have a trailing space!
16705 But just in case it doesn't...
16707 <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>
16708 <p>The line above must have a trailing space!
16710 <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>
16711 <p>But just in case it doesn't...
16714 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16715 <p>The line above must have a trailing space!</p>
16716 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16718 <p>But just in case it doesn't...</p>
16722 Header with special characters (T27462)
16724 The tooltips shall not show entities to the user (ie. be double escaped)
16741 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16743 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16745 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16746 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16747 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16748 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16749 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16753 <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>
16756 <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>
16759 <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>
16762 <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>
16765 <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>
16769 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16771 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span> text > text </h2>
16774 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span> text < text </h2>
16777 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span> text & text </h2>
16780 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span> text ' text </h2>
16783 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span> text " text </h2>
16788 Header with space, plus and underscore as entity
16790 Id should not contain + for spaces
16792 == Space between Text ==
16795 == Space-Entity between Text ==
16798 == Plus+between+Text ==
16801 == Plus-Entity+between+Text ==
16804 == Underscore_between_Text ==
16807 == Underscore-Entity_between_Text ==
16810 [[#Space between Text]]
16811 [[#Space-Entity between Text]]
16812 [[#Plus+between+Text]]
16813 [[#Plus-Entity+between+Text]]
16814 [[#Underscore_between_Text]]
16815 [[#Underscore-Entity_between_Text]]
16817 <p>Id should not contain + for spaces
16819 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16821 <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>
16822 <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>
16823 <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>
16824 <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>
16825 <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>
16826 <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>
16830 <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>
16833 <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>
16836 <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>
16839 <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>
16842 <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>
16845 <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>
16847 </p><p><a href="#Space_between_Text">#Space between Text</a>
16848 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16849 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16850 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16851 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16852 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16855 <p>Id should not contain + for spaces</p>
16857 <h2 id="Space_between_Text"> Space between Text </h2>
16860 <h2 id="Space-Entity_between_Text"> Space-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>Text </h2>
16863 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span> Plus+between+Text </h2>
16866 <h2 id="Plus-Entity+between+Text"><span id="Plus-Entity.2Bbetween.2BText" typeof="mw:FallbackId"></span> Plus-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>Text </h2>
16869 <h2 id="Underscore_between_Text"> Underscore_between_Text </h2>
16872 <h2 id="Underscore-Entity_between_Text"> Underscore-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>Text </h2>
16875 <p><a rel="mw:WikiLink" href="./Main_Page#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
16876 <a rel="mw:WikiLink" href="./Main_Page#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
16877 <a rel="mw:WikiLink" href="./Main_Page#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
16878 <a rel="mw:WikiLink" href="./Main_Page#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
16879 <a rel="mw:WikiLink" href="./Main_Page#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
16880 <a rel="mw:WikiLink" href="./Main_Page#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
16883 # Parsoid html2wt disabled because it adds padding spaces around =
16885 Headers with excess '=' characters
16886 (Are similar tests necessary beyond the 1st level?)
16888 parsoid=wt2html,wt2wt,html2html
16892 =''italic'' heading==
16893 ==''italic'' heading=
16895 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16897 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16898 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16899 <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>
16900 <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>
16904 <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>
16905 <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>
16906 <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>
16907 <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>
16910 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
16911 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
16912 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
16913 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
16917 HTML headers vs TOC (T25393)
16918 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16930 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16932 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16934 <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>
16935 <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>
16938 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16940 <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>
16941 <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>
16947 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
16948 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
16949 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
16950 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
16951 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
16952 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16955 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
16956 <h2 id="Header_1.1" data-parsoid='{}'> Header 1.1 </h2>
16957 <h2 id="Header_1.2" data-parsoid='{}'> Header 1.2 </h2>
16959 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
16961 <h2 id="Header_2.1" data-parsoid='{}'> Header 2.1 </h2>
16962 <h2 id="Header_2.2" data-parsoid='{}'> Header 2.2 </h2>
16963 <meta property="mw:PageProp/noeditsection"/>
16967 Single-line or multiline-comments can follow headings
16969 parsoid=wt2html,wt2wt
16977 <h2><span class="mw-headline" id="foo">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></h2>
16978 <h2><span class="mw-headline" id="bar">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: bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16979 <h2><span class="mw-headline" id="baz">baz</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: baz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16982 <h2 id="foo">foo</h2><!---->
16983 <h2 id="bar">bar</h2><!--c1-->
16984 <h2 id="baz">baz</h2><!--
16990 T3219 URL next to image (broken)
16992 http://example.com[[File:Foobar.jpg]]
16994 <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>
16997 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><figure-inline 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></figure-inline></p>
17001 T3186 news: in the middle of text
17003 http://en.wikinews.org/wiki/Wikinews:Workplace
17005 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17011 Namespaced link must have a title
17020 Namespaced link must have a title (bad fragment version)
17022 [[Project:#fragment]]
17024 <p>[[Project:#fragment]]
17030 ### HTML tags and HTML attributes
17034 div with no attributes
17036 <div>HTML rocks</div>
17038 <div>HTML rocks</div>
17043 div with double-quoted attribute
17045 <div id="rock">HTML rocks</div>
17047 <div id="rock">HTML rocks</div>
17052 div with single-quoted attribute
17054 <div id='rock'>HTML rocks</div>
17056 <div id="rock">HTML rocks</div>
17061 div with unquoted attribute
17063 <div id=rock>HTML rocks</div>
17065 <div id="rock">HTML rocks</div>
17070 div with illegal double attributes
17072 <div id="a" id="b">HTML rocks</div>
17074 <div id="b">HTML rocks</div>
17079 div with empty attribute value, space before equals
17081 parsoid=wt2html,html2html
17083 <div class =>HTML rocks</div>
17085 <div class="">HTML rocks</div>
17088 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17092 div with multiple empty attribute values
17094 wgFragmentMode=[ 'html5', 'legacy' ]
17096 parsoid=wt2html,html2html
17098 <div id= title=>HTML rocks</div>
17100 <div id="title=">HTML rocks</div>
17103 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17107 table with multiple empty attribute values
17109 parsoid=wt2html,html2html
17115 <table title="id=">
17121 <table title="id=">
17122 <tbody><tr><td> hi</td></tr>
17127 div with braces in attribute value
17129 <div title="{}">Foo</div>
17131 <div title="{}">Foo</div>
17134 <div title="{}">Foo</div>
17138 div with empty attribute value, no space before equals
17140 parsoid=wt2html,html2html
17142 <div class=>HTML rocks</div>
17144 <div class="">HTML rocks</div>
17147 <div class="">HTML rocks</div>
17151 HTML multiple attributes correction
17153 <p class="error" class="awesome">Awesome!</p>
17155 <p class="awesome">Awesome!</p>
17160 Table multiple attributes correction
17163 !+ class="error" class="awesome"| status
17168 <th class="awesome"> status
17176 <DIV ID="x">HTML ROCKS</DIV>
17178 <div id="x">HTML ROCKS</div>
17183 Non-ASCII pseudo-tags are rendered as text
17192 Pseudo-tag with URL 'name' renders as url link
17194 <http://example.com/>
17196 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17201 text with amp in the middle of nowhere
17205 <p>Remember AT&T?
17210 text with character entity: eacute
17212 I always thought é was a cute letter.
17214 <p>I always thought é was a cute letter.
17219 text with entity-escaped character entity-like string: eacute
17221 I always thought &eacute; was a cute letter.
17223 <p>I always thought &eacute; was a cute letter.
17228 text with undefined character entity: xacute
17230 I always thought &xacute; was a cute letter.
17232 <p>I always thought &xacute; was a cute letter.
17239 <data value="5">five</data>
17240 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17241 <mark>This highlighted text</mark>
17243 <p><data value="5">five</data>
17244 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17245 <mark>This highlighted text</mark>
17250 HTML tag with leading space is parsed as text
17254 <p>< div>foo< /div>
17258 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17259 ## the HTML5 parsing spec.
17261 Element with broken attribute syntax
17265 <div style=" style="123">hi</div>
17268 <div style="123">hi</div>
17272 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17273 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17277 ### Nesting tests (see T43545, T52604, T53081)
17280 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17281 # Note that html2wt is considerably more difficult if we use <b> in
17282 # the test case, instead of <small>
17284 Ensure that HTML adoption agency algorithm is properly implemented.
17286 <small>X<small>Y</small>Z</small>
17288 <p><small>X<small>Y</small>Z</small>
17292 # This was T43545 in the PHP parser.
17296 <kbd>X<kbd>Y</kbd>Z</kbd>
17298 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17302 # The following cases were T53081 in the PHP parser.
17303 # Note that there are some other nestable tags (b, i, etc) which are
17304 # not covered; see T53081 for discussion.
17309 <em>X<em>Y</em>Z</em>
17311 <p><em>X<em>Y</em>Z</em>
17316 Nesting of <strong>
17318 <strong>X<strong>Y</strong>Z</strong>
17320 <p><strong>X<strong>Y</strong>Z</strong>
17329 <p><q>X<q>Y</q>Z</q>
17336 <ruby>X<ruby>Y</ruby>Z</ruby>
17338 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17345 <bdo>X<bdo>Y</bdo>Z</bdo>
17347 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17359 [[Media:Foobar.jpg]]
17360 [[Media:Video.ogv]]
17361 [[:Media:Video.ogv]]
17363 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17364 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17365 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17368 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17369 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17370 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv" data-parsoid='{"a":{"namespace":"Media"},"sa":{"namespace":":Media"}}'>Media:Video.ogv</a></p>
17374 Media link with text
17376 [[Media:Foobar.jpg|A neat file to look at]]
17378 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17381 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17384 # FIXME: this is still bad HTML tag nesting
17385 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17386 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17388 Media link with nasty text
17390 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17392 <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>
17395 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
17396 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
17398 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true}'>Safe Link</a></p><div style="display:none" data-parsoid='{"stx":"html"}'><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'>" onmouseover="alert(document.cookie)" onfoo="</a></div>
17403 Media link to nonexistent file (T3702)
17405 [[Media:No such.jpg]]
17406 [[Media:No_such file.jpg]]
17408 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17409 <a href="/index.php?title=Special:Upload&wpDestFile=No_such_file.jpg" class="new" title="No such file.jpg">Media:No_such file.jpg</a>
17412 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such.jpg"},"sa":{"fileName":"No such.jpg"}}'>Media:No such.jpg</a>
17413 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such_file.jpg"},"sa":{"fileName":"No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
17417 Image link to nonexistent file (T3850 - good)
17419 [[File:No_such.jpg]]
17421 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17424 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline></p>
17428 :Image link to nonexistent file (T3850 - bad)
17430 [[:Image:No such.jpg]]
17432 <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>
17435 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17439 Character reference normalization in link text (T3938)
17441 [[Main Page|this&that]]
17443 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17450 Test for unicode normalization
17452 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17456 (T21451) Links should refer to the normalized form.
17464 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17465 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17466 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17467 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17468 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17473 Empty attribute crash test (T4067)
17475 <font color="">foo</font>
17477 <p><font color="">foo</font>
17482 Empty attribute crash test single-quotes (T4067)
17484 <font color=''>foo</font>
17486 <p><font color="">foo</font>
17491 Attribute test: equals, then nothing
17493 parsoid=wt2html,html2html
17495 <font color=>foo</font>
17497 <p><font color="">foo</font>
17500 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17504 Attribute test: unquoted value
17506 parsoid=wt2html,html2html
17508 <font color=x>foo</font>
17510 <p><font color="x">foo</font>
17513 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17517 Attribute test: unquoted but illegal value (hash)
17519 <font color=#x>foo</font>
17521 <p><font color="#x">foo</font>
17525 # Parsoid does not serialize to empty attribute syntax,
17526 # so wt2wt and html2wt cases are skipped
17528 Attribute test: no value (T54330)
17530 parsoid=wt2html,html2html
17532 <font color>foo</font>
17534 <p><font color="">foo</font>
17537 <p><font color="">foo</font></p>
17541 T4095: link with three closing brackets
17545 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17548 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17552 T4095: link with pipe and three closing brackets
17554 [[Main Page|link]]]
17556 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17559 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17563 T4095: link with pipe and three closing brackets, version 2
17565 [[Main Page|[http://example.com/]]]
17567 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17570 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17579 Template:Dangerous attribute
17581 " onmouseover="alert(document.cookie)
17585 Template:Dangerous style attribute
17587 border-size: expression(alert(document.cookie))
17593 <div style="float: right; {{{1}}}">Magic div</div>
17597 T4304: HTML attribute safety (safe template; regression T4309)
17599 <div title="{{test}}"></div>
17601 <div title="This is a test template"></div>
17604 <div title="This is a test template" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"This is a test template"},"sa":{"title":"{{test}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,20,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"test\",\"href\":\"./Template:Test\"},\"params\":{},\"i\":0}}]}'>This is a test template</span>"}]]}'></div>
17607 # Parsoid has enough context to handle this case
17609 T4304: HTML attribute safety (dangerous template; 2309)
17611 <div title="{{dangerous attribute}}"></div>
17613 <div title=""></div>
17616 <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>
17620 T4304: HTML attribute safety (dangerous style template; 2309)
17622 <div style="{{dangerous style attribute}}"></div>
17624 <div style="/* insecure input */"></div>
17627 <div style="/* insecure input */" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"{{dangerous style attribute}}"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,41,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}'>border-size: expression(alert(document.cookie))</span>"}]]}'></div>
17631 T4304: HTML attribute safety (safe parameter; 2309)
17633 {{div style|width: 200px}}
17635 <div style="float: right; width: 200px">Magic div</div>
17638 <div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
17642 T4304: HTML attribute safety (unsafe parameter; 2309)
17644 {{div style|width: expression(alert(document.cookie))}}
17646 <div style="/* insecure input */">Magic div</div>
17649 <div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
17652 ## Parsoid output here differs; needs investigation.
17654 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17656 {{div style|"><script>alert(document.cookie)</script>}}
17658 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17662 ## Parsoid output here differs; needs investigation.
17664 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17666 {{div style|" ><script>alert(document.cookie)</script>}}
17668 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17673 T4304: HTML attribute safety (link)
17675 <div title="[[Main Page]]"></div>
17677 <div title="[[Main Page]]"></div>
17680 <div title="[[Main Page]]"></div>
17684 T4304: HTML attribute safety (italics)
17686 <div title="''foobar''"></div>
17688 <div title="''foobar''"></div>
17693 T4304: HTML attribute safety (bold)
17695 <div title="'''foobar'''"></div>
17697 <div title="'''foobar'''"></div>
17702 T4304: HTML attribute safety (ISBN)
17704 <div title="ISBN 1234567890"></div>
17706 <div title="ISBN 1234567890"></div>
17711 T4304: HTML attribute safety (RFC)
17713 <div title="RFC 1234"></div>
17715 <div title="RFC 1234"></div>
17720 T4304: HTML attribute safety (PMID)
17722 <div title="PMID 1234567890"></div>
17724 <div title="PMID 1234567890"></div>
17729 T4304: HTML attribute safety (web link)
17731 <div title="http://example.com/"></div>
17733 <div title="http://example.com/"></div>
17738 T4304: HTML attribute safety (named web link)
17740 <div title="[http://example.com/ link]"></div>
17742 <div title="[http://example.com/ link]"></div>
17745 <div title="[http://example.com/ link]"></div>
17749 T5244: HTML attribute safety (extension; safe)
17751 <div style="<nowiki>background:blue</nowiki>"></div>
17753 <div style="background:blue"></div>
17756 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17760 T5244: HTML attribute safety (extension; unsafe)
17762 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17764 <div style="/* insecure input */"></div>
17767 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17770 # More MSIE fun discovered by Tom Gilder
17773 MSIE CSS safety test: spurious slash
17775 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17777 <div style="/* insecure input */">evil</div>
17780 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17784 MSIE CSS safety test: hex code
17786 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17788 <div style="/* insecure input */">evil</div>
17791 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17795 MSIE CSS safety test: comment in url
17797 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17799 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17802 <div style="background-image:u rl(javascript:alert('boo'))" data-parsoid='{"stx":"html","a":{"style":"background-image:u rl(javascript:alert('boo'))"},"sa":{"style":"background-image:u/**/rl(javascript:alert('boo'))"}}'>evil</div>
17806 MSIE CSS safety test: comment in expression
17808 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17810 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17813 <div style="background-image:expres sion(alert('boo4'))" data-parsoid='{"stx":"html","a":{"style":"background-image:expres sion(alert('boo4'))"},"sa":{"style":"background-image:expres/**/sion(alert('boo4'))"}}'>evil4</div>
17817 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17819 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17821 <p style="/* invalid control char */">A</p>
17824 <p style="/* invalid control char */" data-parsoid='{"stx":"html","a":{"style":"/* invalid control char */"},"sa":{"style":"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)"}}'>A</p>
17828 MSIE 6 CSS safety test: Fullwidth (T57332)
17830 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17831 <div style="top:EXPRESSION(alert())">B</div>
17833 <p style="/* insecure input */">A</p>
17834 <div style="/* insecure input */">B</div>
17837 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17838 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17842 MSIE 6 CSS safety test: IPA extensions (T57332)
17844 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17845 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17847 <div style="/* insecure input */">A</div>
17848 <p style="/* insecure input */">B</p>
17851 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17852 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')"}}'>B</p>
17856 MSIE 6 CSS safety test: sup/sub script (T57332)
17858 <div style="background-image:url⁽javascript:alert())">A</div>
17859 <div style="background-image:url₍javascript:alert())">B</div>
17860 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17862 <div style="/* insecure input */">A</div>
17863 <div style="/* insecure input */">B</div>
17864 <p style="/* insecure input */">C</p>
17867 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17868 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17869 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17875 parsoid=wt2html,html2html
17878 title="data:text/html,<img src=1 onerror=alert(1)>"
17879 style="-o-link:attr(title);-o-link-source:current">X</div>
17881 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17884 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */" data-parsoid='{"stx":"html","a":{"title":"data:text/html,<img src=1 onerror=alert(1)>","style":"/* insecure input */"},"sa":{"title":"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;","style":"-o-link:attr(title);-o-link-source:current"}}'>X</div>
17888 MSIE 6 CSS safety test: Repetition markers (T57332)
17890 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17891 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17892 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17893 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17894 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17895 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17896 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17898 <p style="/* insecure input */">A</p>
17899 <p style="/* insecure input */">B</p>
17900 <p style="/* insecure input */">C</p>
17901 <p style="/* insecure input */">D</p>
17902 <p style="/* insecure input */">E</p>
17903 <p style="/* insecure input */">F</p>
17904 <p style="/* insecure input */">G</p>
17907 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title='XSSed'),'red')"}}'>A</p>
17908 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title='XSSed'),'red')"}}'>B</p>
17909 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>C</p>
17910 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresヽion((title='XSSed'),'red')"}}'>D</p>
17911 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹽion((title='XSSed'),'red')"}}'>E</p>
17912 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹼion((title='XSSed'),'red')"}}'>F</p>
17913 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>G</p>
17917 Table attribute legitimate extension
17920 !+ style="<nowiki>color:blue</nowiki>"| status
17925 <th style="color:blue"> status
17931 Table attribute safety
17934 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
17939 <th style="/* insecure input */"> status
17945 CSS line continuation 1
17947 <div style="background-image: u\ rl(test.jpg);"></div>
17949 <div style="/* insecure input */"></div>
17954 CSS line continuation 2
17956 <div style="background-image: u\ rl(test.jpg); "></div>
17958 <div style="/* invalid control char */"></div>
17969 Expansion of multi-line templates in attribute values (T8255)
17971 <div style="background: {{identity|#00FF00}}">-</div>
17973 <div style="background: #00FF00">-</div>
17978 Expansion of multi-line templates in attribute values (T8255 sanity check)
17980 <div style="background:
17983 <div style="background: #00FF00">-</div>
17986 <div style="background:
17991 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
17993 <div style="background: #00FF00">-</div>
17995 <div style="background: #00FF00">-</div>
18000 Tags which are hidden from tidiers cannot pass through the Sanitizer
18002 <mw:toc><script>alert();</script></mw:toc>
18004 <p><mw:toc><script>alert();</script></mw:toc>
18009 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18013 Parser hook: empty input
18024 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18027 ## Don't expect parsoid to rt this form.
18029 Parser hook: empty input using terminated empty elements
18031 parsoid=wt2html,html2html
18042 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18046 Parser hook: empty input using terminated empty elements (space before)
18057 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18061 Parser hook: basic input
18072 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18075 ## Don't expect parsoid to rt this form.
18077 Parser hook: case insensitive
18079 parsoid=wt2html,html2html
18090 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18093 ## Don't expect parsoid to rt this form.
18095 Parser hook: case insensitive, redux
18097 parsoid=wt2html,html2html
18108 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18112 Parser hook: nested tags
18114 <tag><tag></tag></tag>
18123 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18127 Parser hook: basic arguments
18129 <tag width="200" height="100" depth="50" square=""></tag>
18142 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18145 ## Don't expect parsoid to rt this form.
18147 Parser hook: basic arguments, variations
18149 parsoid=wt2html,html2html
18151 <tag width=200 height = "100" depth = '50' square></tag>
18164 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18168 Parser hook: argument containing a forward slash (T7344)
18170 <tag filename="/tmp/bla"></tag>
18175 'filename' => '/tmp/bla',
18180 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18183 ## Don't expect parsoid to rt this form.
18185 Parser hook: empty input using terminated empty elements (T4374)
18187 parsoid=wt2html,html2html
18199 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18202 ## </tag> should be output literally since there is no matching tag that begins it
18203 ## Don't expect parsoid to rt this form.
18205 Parser hook: basic arguments using terminated empty elements (T4374)
18209 <tag width=200 height = "100" depth = '50' square/>
18226 <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
18230 ## Don't expect parsoid to rt this form.
18232 Parser hook: Don't allow unclosed extension tags
18238 this is a '''test'''
18240 <p>test <tag>123
18241 </p><p>this is a <b>test</b>
18244 <p>test <tag>123</p>
18246 <p>this is a <b>test</b></p>
18250 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18254 Parser hook: static parser hook not inside a comment
18256 <statictag>hello, world</statictag>
18258 <statictag action="flush" />
18264 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18265 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18269 Parser hook: static parser hook inside a comment
18271 <!-- <statictag>hello, world</statictag> -->
18272 <statictag action="flush" />
18277 <!-- <statictag>hello, world</statictag> -->
18278 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18281 # Nested template calls; this case was broken by Parser.php rev 1.506,
18285 Template:One-parameter
18287 (My parameter is: {{{1}}})
18291 Template:Map-one-parameter
18293 {{{{{1}}}|{{{2}}}}}
18297 Nested template calls
18299 {{Map-one-parameter|One-parameter|param}}
18301 <p>(My parameter is: param)
18310 # Remex wraps empty tag runs with p-tags.
18311 # Parsoid strips them out during p-wrapping.
18313 Sanitizer: Closing of open tags
18315 <s></s><table></table>
18317 <p><s></s></p><table></table>
18319 <s></s><table></table>
18323 Sanitizer: Closing of open but not closed tags
18332 Sanitizer: Closing of closed but not open tags
18338 <p class="mw-empty-elt">
18344 Sanitizer: Closing of closed but not open table tags
18348 Table not started</td></tr></table>
18350 <p>Table not started
18355 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18357 wgFragmentMode=[ 'html5', 'legacy' ]
18359 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18361 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18364 <p><span id="æ:_v" data-parsoid='{"stx":"html","a":{"id":"æ:_v"},"sa":{"id":"æ: v"}}'>byte</span><a rel="mw:WikiLink" href="./Main_Page#æ:_v" data-parsoid='{"stx":"piped","a":{"href":"./Main_Page#æ:_v"},"sa":{"href":"#æ: v"}}'>backlink</a></p>
18368 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18370 wgFragmentMode=[ 'legacy' ]
18372 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18374 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18378 # In HTML5, the restrictions are that id must contain at least one character,
18379 # and must not contain any space characters.
18381 Sanitizer: Validating the contents of the id attribute (T6515)
18385 <br id="" /><br id="a space" />
18390 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18392 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18396 <br id="foo" /><br id="foo" />
18398 Something need to be done. foo-2 ?
18402 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18405 <meta itemprop="hello" content="world">
18406 <meta http-equiv="refresh" content="5">
18407 <meta itemprop="hello" http-equiv="refresh" content="5">
18408 <link itemprop="hello" href="{{SERVER}}">
18409 <link rel="stylesheet" href="{{SERVER}}">
18410 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18414 <p> <meta itemprop="hello" content="world" />
18415 <meta http-equiv="refresh" content="5">
18416 <meta itemprop="hello" content="5" />
18417 <link itemprop="hello" href="http://example.org" />
18418 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18419 <link itemprop="hello" href="http://example.org" />
18426 Sanitizer: Strip comments from CSS attributes
18428 parsoid=wt2html,wt2wt
18430 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18432 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18435 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18439 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18441 [[meatball:Soft"Security]]
18443 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18446 <p><a rel="mw:WikiLink/Interwiki" href='http://www.usemod.com/cgi-bin/mb.pl?Soft"Security' title='meatball:Soft"Security'>meatball:Soft"Security</a></p>
18450 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18452 [[meatball:Foo<Bar]]
18453 [[meatball:Foo>Bar]]
18454 [[meatball:Foo<bar]]
18455 [[meatball:Foo>bar]]
18457 <p>[[meatball:Foo<Bar]]
18458 [[meatball:Foo>Bar]]
18459 [[meatball:Foo<bar]]
18460 [[meatball:Foo>bar]]
18463 <p>[[meatball:Foo<Bar]]
18464 [[meatball:Foo>Bar]]
18465 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18466 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18470 Language converter: output gets cut off unexpectedly (T7757)
18474 this bit is safe: }-
18476 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18478 then we get cut off here: }-
18480 all additional text is vanished
18482 <p>this bit is safe: }-
18483 </p><p>but if we add a conversion instance: xxx
18484 </p><p>then we get cut off here: }-
18485 </p><p>all additional text is vanished
18488 <p>this bit is safe: }-</p>
18489 <p>but if we add a conversion instance: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"xxx"},{"l":"zh-tw","t":"yyy"}]}'></span></p>
18490 <p>then we get cut off here: }-</p>
18491 <p>all additional text is vanished</p>
18495 Language converter glossary rules inside attributes (T119158)
18497 language=sr variant=sr-el
18499 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18501 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18504 </p><p><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="" onload="alert(1)" data-foo="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
18507 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18509 <p><span class="mw-default-size" typeof="mw:Image"><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека:Foobar.jpg" 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":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></span></p>
18513 Self closed html pairs (T7487)
18515 <center><font id="bug" />Centered text</center>
18516 <div><font id="bug2" />In div text</div>
18518 <center><font id="bug"></font>Centered text</center>
18519 <div><font id="bug2"></font>In div text</div>
18523 Punctuation: nbsp before exclamation
18527 <p>C'est grave !
18532 Punctuation: CSS !important (T13874)
18534 <div style="width:50% !important">important</div>
18536 <div style="width:50% !important">important</div>
18541 Punctuation: CSS ! important (T13874; with space after)
18543 <div style="width:50% ! important">important</div>
18545 <div style="width:50% ! important">important</div>
18550 HTML bullet list, closed tags (T7497)
18563 <ul data-parsoid='{"stx":"html"}'>
18564 <li data-parsoid='{"stx":"html"}'>One</li>
18565 <li data-parsoid='{"stx":"html"}'>Two</li>
18571 HTML bullet list, unclosed tags (T7497)
18583 <ul data-parsoid='{"stx":"html"}'>
18584 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18585 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18591 HTML ordered list, closed tags (T7497)
18604 <ol data-parsoid='{"stx":"html"}'>
18605 <li data-parsoid='{"stx":"html"}'>One</li>
18606 <li data-parsoid='{"stx":"html"}'>Two</li>
18612 HTML ordered list, unclosed tags (T7497)
18625 <ol data-parsoid='{"stx":"html"}'>
18626 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18627 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18633 HTML nested bullet list, closed tags (T7497)
18656 <ul data-parsoid='{"stx":"html"}'>
18657 <li data-parsoid='{"stx":"html"}'>One</li>
18658 <li data-parsoid='{"stx":"html"}'>Two:
18659 <ul data-parsoid='{"stx":"html"}'>
18660 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18661 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18668 HTML nested bullet list, open tags (T7497)
18690 HTML nested ordered list, closed tags (T7497)
18715 HTML nested ordered list, open tags (T7497)
18752 HTML ordered list item with parameters oddity
18754 <ol><li id="fragment">One</li>
18757 <ol><li id="fragment">One</li>
18762 # parsoid doesn't explicitly mark autonumbered links, see T55505
18764 T7918: autonumbering
18766 [http://first/] [http://second] [ftp://ftp]
18770 [mailto:enclosed@mail.tld With target]
18772 [mailto:enclosed@mail.tld]
18774 mailto:inline@mail.tld
18776 <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>
18777 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18778 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18779 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18780 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18783 <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>
18784 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
18785 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
18786 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
18787 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18792 # Security and HTML correctness
18793 # From Nick Jenkins' fuzz testing
18797 Fuzz testing: Parser13
18811 # Note that Parsoid output differs from the PHP parser here: the PHP
18812 # parser breaks the URL for the magic word, while in Parsoid the URL
18813 # production takes precedence.
18815 Fuzz testing: Parser14
18820 <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>
18821 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18823 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18829 <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><p>
18830 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18832 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18836 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span> onmouseover= </h2>
18837 <p><a rel="mw:ExtLink" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
18841 Fuzz testing: Parser14-table
18843 parsoid=wt2html,html2html
18848 <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>
18849 <table style="__TOC__">
18854 <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>
18855 <table style="__TOC__">
18862 <table style="__TOC__"></table>
18865 # Known to produce bogus xml (extra </td>)
18866 # Don't add the html/php section since it generates broken HTML
18868 Fuzz testing: Parser16
18885 Fuzz testing: Parser21
18888 ! irc://{{ftp://a" onmouseover="alert('hello world');"
18893 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18903 Fuzz testing: Parser22
18905 http://===r:::https://b
18909 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18917 # Known to produce bad XML for now
18919 Fuzz testing: Parser24
18926 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18927 <br style="onmouseover='alert(document.cookie);' " />
18929 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18934 <u class="|">}}}} >
18935 <br style="onmouseover='alert(document.cookie);'" />
18937 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18945 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
18946 <u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true}'><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>}}}} >
18947 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true,"autoInsertedStart":true}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
18951 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
18954 # Note: the current result listed for this is not what the original one was,
18955 # but the original bug was JavaScript injection, which is fixed in any case.
18956 # It's not clear that the original result listed was any more correct than the
18957 # current one. Original result:
18960 # <li class="||">
18961 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18963 Fuzz testing: Parser25 (T8055)
18969 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
18971 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18974 <span about="#mwt1" typeof="mw:Param" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"},{"k":"3"}]]}' data-mw='{"parts":[{"templatearg":{"target":{"wt":"\n"},"params":{"1":{"wt":" \n<LI CLASS="},"2":{"wt":""},"3":{"wt":"\n >\n"}},"i":0}},"blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE"]}'>
18975 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
18979 Fuzz testing: URL adjacent extension (with space, clean)
18981 http://example.com <nowiki>junk</nowiki>
18983 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
18986 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
18990 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
18992 http://example.com<nowiki>junk</nowiki>
18994 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
18997 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19001 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19003 http://example.com<pre>junk</pre>
19005 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19008 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19010 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
19014 Fuzz testing: image with bogus manual thumbnail
19016 [[Image:foobar.jpg|thumbnail= ]]
19018 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19021 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"apierror-invalidtitle","message":"Invalid thumbnail title.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/Foobar.jpg" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
19024 # Parsoid will emit the newline literally in wt2wt; see next test case.
19026 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19030 <pre dir=" "></pre>
19032 <pre dir=" "></pre>
19035 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19036 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19040 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19044 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19045 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19055 Templates in extension attributes are not expanded
19057 <pre dir="{{echo|ltr}}"></pre>
19059 <pre dir="{{echo|ltr}}"></pre>
19062 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19066 Parsing optional HTML elements (T8171)
19071 <td> Some tabular data</td>
19072 <td> More tabular data ...
19073 <td> And yet som tabular data</td>
19079 <td> Some tabular data</td>
19080 <td> More tabular data ...
19081 </td><td> And yet som tabular data</td>
19088 Correct handling of <td>, <tr> (T8171)
19093 <td> Some tabular data</td>
19094 <td> More tabular data ...</td>
19095 <td> And yet som tabular data</td>
19101 <td> Some tabular data</td>
19102 <td> More tabular data ...</td>
19103 <td> And yet som tabular data</td>
19111 Parsing crashing regression (fr:JavaScript)
19115 <p></body></x>
19120 Inline wiki vs wiki block nesting
19126 <p><b>Bold paragraph</b>
19127 </p><p>New wiki paragraph
19131 # FIXME: The current php output is documented
19132 # and desired output is the parsoid target.
19134 Inline HTML vs wiki block nesting
19140 <p><b>Bold paragraph
19141 </p><p>New wiki paragraph</b>
19144 <p><b>Bold paragraph</b>
19145 </p><p>New wiki paragraph
19149 # Original result was this:
19150 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19152 # While that might be marginally more intuitive, maybe, the six-apostrophe
19153 # construct is clearly pathological and the result stated here (which is what
19154 # the parser actually does) is about as reasonable as anything.
19156 Mixing markup for italics and bold
19159 '''bold''''''bold''bolditalics'''''
19161 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19169 Article for special page transclusion test
19173 Special page transclusion
19176 {{Special:Prefixindex/Xyzzyx}}
19178 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19184 Special page transclusion twice (T7021)
19187 {{Special:Prefixindex/Xyzzyx}}
19188 {{Special:Prefixindex/Xyzzyx}}
19190 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19192 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19198 Transclusion of default MediaWiki message
19200 {{MediaWiki:Mainpage}}
19207 Transclusion of nonexistent MediaWiki message
19209 {{MediaWiki:Mainpagexxx}}
19211 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19216 Transclusion of MediaWiki message with underscore
19218 {{MediaWiki:history_short}}
19225 Transclusion of MediaWiki message with space
19227 {{MediaWiki:history short}}
19234 Invalid header with following text
19244 Section extraction test (section 0)
19264 Section extraction test (section 1)
19286 Section extraction test (section 2)
19307 Section extraction test (section 3)
19327 Section extraction test (section 4)
19351 Section extraction test (section 5)
19371 Section extraction test (section 6)
19392 Section extraction test (section 7)
19412 Section extraction test (section 8)
19432 Section extraction test (section 9)
19453 Section extraction test (section 10)
19473 Section extraction test (nonexistent section 11)
19492 Section extraction test with bogus heading (section 1)
19497 ==bogus== not a legal section
19501 ==bogus== not a legal section
19505 Section extraction test with bogus heading (section 2)
19510 ==bogus== not a legal section
19517 Section extraction test with comment after heading (section 1)
19529 Section extraction test with comment after heading (section 2)
19541 Section extraction test with bogus <nowiki> heading (section 1)
19546 ==bogus== <nowiki>not a legal section</nowiki>
19550 ==bogus== <nowiki>not a legal section</nowiki>
19554 Section extraction test with bogus <nowiki> heading (section 2)
19559 ==bogus== <nowiki>not a legal section</nowiki>
19565 # Formerly testing for T4587, now resolved by the use of unmarked sections
19566 # instead of respecting commented sections
19568 Section extraction prefixed by comment (section 1)
19579 Section extraction prefixed by comment (section 2)
19589 # Formerly testing for T4607, now resolved by the use of unmarked sections
19590 # instead of respecting HTML-style headings
19592 Section extraction, mixed wiki and html (section 1)
19608 Section extraction, mixed wiki and html (section 2)
19624 # Formerly testing for T5342
19626 Section extraction, heading surrounded by <noinclude>
19630 <noinclude>==unmarked==</noinclude>
19636 # Test behavior of T21910
19638 Sectiion with all-equals
19643 The line above must have a trailing space
19646 But just in case it doesn't...
19650 But just in case it doesn't...
19654 Section replacement test (section 0)
19685 Section replacement test (section 1)
19714 Section replacement test (section 2)
19744 Section replacement test (section 3)
19775 Section replacement test (section 4)
19802 Section replacement test (section 5)
19833 Section replacement test (section 6)
19863 Section replacement test (section 7)
19894 Section replacement test (section 8)
19925 Section replacement test (section 9)
19954 Section replacement test (section 10)
19984 Section replacement test with initial whitespace (T15728)
19988 Preformatted initial line
19992 Preformatted initial line
19999 Section extraction, heading followed by pre with 20 spaces (T8398)
20011 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20024 Section extraction, <pre> around bogus header (T12309)
20041 Section replacement, <pre> around bogus header (T12309)
20062 Handling of 
 in URLs
20066 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20069 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul></li></ul>
20073 Handling of %0A in URLs
20077 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20080 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20083 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20085 5 quotes, code coverage +1 line
20095 # same html as previous, but wikitext adjusted to match parsoid html2wt
20096 # note that wt2html and html2html will put the <i> before the <b>
20098 5 quotes, code coverage +1 line w/ nowiki (1)
20100 parsoid=wt2wt,html2wt
20102 '''''<nowiki/>'''''
20107 <p><b><i></i></b></p>
20110 # same as previous, just swapping the <i> and <b>
20112 5 quotes, code coverage +1 line w/ nowiki (2)
20114 '''''<nowiki/>'''''
20119 <p><i><b></b></i></p>
20123 Special:Search page linking.
20127 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20132 {{!}} is a magic word
20134 {{!}} is a magic word there and {{!}} is still a magic word here
20135 | is not a magic word here but {{!}} is still a magic word here
20137 <p>| is a magic word there and | is still a magic word here
20138 | is not a magic word here but | is still a magic word here
20141 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"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":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
20142 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
20148 title=[[Parser test]]
20153 * {{FULLPAGENAMEE}}
20155 * {{BASEPAGENAMEE}}
20159 * {{ROOTPAGENAMEE}}
20161 * {{TALKPAGENAMEE}}
20162 * {{SUBJECTPAGENAME}}
20163 * {{SUBJECTPAGENAMEE}}
20166 * {{NAMESPACENUMBER}}
20170 * {{SUBJECTSPACEE}}
20171 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20173 <ul><li> Parser test</li>
20174 <li> Parser_test</li>
20175 <li> Parser test</li>
20176 <li> Parser_test</li>
20177 <li> Parser test</li>
20178 <li> Parser_test</li>
20179 <li> Parser test</li>
20180 <li> Parser_test</li>
20181 <li> Parser test</li>
20182 <li> Parser_test</li>
20183 <li> Talk:Parser test</li>
20184 <li> Talk:Parser_test</li>
20185 <li> Parser test</li>
20186 <li> Parser_test</li>
20194 <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>
20197 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20200 Gallery with valid attributes
20202 <gallery type="123" summary="345">
20203 File:File:Foobar.jpg
20206 <ul class="gallery mw-gallery-traditional" type="123">
20207 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20208 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20209 <div class="gallerytext">
20215 <ul class="gallery mw-gallery-traditional" type="123" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"type":"123","summary":"345"},"body":{"extsrc":"\nFile:File:Foobar.jpg\n"}}'>
20216 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:File:Foobar.jpg"><img resource="./File:File:Foobar.jpg" src="./Special:FilePath/File:Foobar.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20220 ## Parsoid thinks the "centre" here is a property, not a caption.
20225 "modes": ["wt2html"],
20226 "nativeGallery": true
20234 image4 |300px| centre
20235 image5.svg| http://///////
20240 <ul class="gallery mw-gallery-traditional">
20241 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20242 <div class="thumb" style="height: 150px;">Image1.png</div>
20243 <div class="gallerytext">
20246 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20247 <div class="thumb" style="height: 150px;">Image2.gif</div>
20248 <div class="gallerytext">
20251 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20252 <div class="thumb" style="height: 150px;">Image3</div>
20253 <div class="gallerytext">
20256 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20257 <div class="thumb" style="height: 150px;">Image4</div>
20258 <div class="gallerytext">
20263 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20264 <div class="thumb" style="height: 150px;">Image5.svg</div>
20265 <div class="gallerytext">
20266 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20270 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20271 <div class="thumb" style="height: 150px;">* image6</div>
20272 <div class="gallerytext">
20278 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20279 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image1.png"><img resource="./File:Image1.png" src="./Special:FilePath/Image1.png" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20280 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image2.gif"><img resource="./File:Image2.gif" src="./Special:FilePath/Image2.gif" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20281 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20282 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></figure-inline></div><div class="gallerytext"></div></li>
20283 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image5.svg"><img resource="./File:Image5.svg" src="./Special:FilePath/Image5.svg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" href="http://///////">http://///////</a></div></li>
20284 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20289 Gallery (with options, html)
20292 "modes": ["wt2html", "html2html"],
20293 "nativeGallery": true
20296 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20297 File:Nonexistent.jpg|caption
20298 File:Nonexistent.jpg
20299 image:foobar.jpg|some '''caption''' [[Main Page]]
20301 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20304 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20305 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20306 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20307 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20308 <div class="gallerytext">
20313 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20314 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20315 <div class="gallerytext">
20318 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20319 <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>
20320 <div class="gallerytext">
20321 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20325 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20326 <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>
20327 <div class="gallerytext">
20330 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20331 <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>
20332 <div class="gallerytext">
20340 <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":{}}'>
20341 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20342 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
20343 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20344 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
20345 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20346 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">blabla.</div></li>
20351 Gallery (with options, extsrc)
20354 "nativeGallery": false
20357 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20358 File:Nonexistent.jpg|caption
20359 File:Nonexistent.jpg
20360 image:foobar.jpg|some '''caption''' [[Main Page]]
20362 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20365 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20366 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20367 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20368 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20369 <div class="gallerytext">
20374 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20375 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20376 <div class="gallerytext">
20379 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20380 <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>
20381 <div class="gallerytext">
20382 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20386 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20387 <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>
20388 <div class="gallerytext">
20391 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20392 <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>
20393 <div class="gallerytext">
20401 <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","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"}}'>
20402 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20403 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
20404 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20405 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
20406 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20407 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">blabla.</div></li>
20412 Gallery (without px units)
20414 <gallery widths="70" heights="40">
20418 <ul class="gallery mw-gallery-traditional">
20419 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20420 <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>
20421 <div class="gallerytext">
20427 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70","heights":"40"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
20428 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20433 Gallery (with invalid units)
20435 <gallery widths="70em" heights="40em">
20439 <ul class="gallery mw-gallery-traditional">
20440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20441 <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>
20442 <div class="gallerytext">
20448 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70em","heights":"40em"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
20449 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20454 Gallery with link that has fragment
20457 "modes": ["wt2html", "html2html"],
20458 "nativeGallery": true
20462 image:foobar.jpg|link=Main_Page
20463 image:foobar.jpg|link=Main_Page#section
20464 image:foobar.jpg|link=Main Page#section|caption
20467 <ul class="gallery mw-gallery-traditional">
20468 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20469 <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>
20470 <div class="gallerytext">
20473 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20474 <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>
20475 <div class="gallerytext">
20478 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20479 <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>
20480 <div class="gallerytext">
20488 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20489 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20490 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20491 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">caption</div></li>
20495 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20497 Gallery with template inside caption
20500 "nativeGallery": true
20503 <gallery caption="{{echo|hi}}">
20504 File:Foobar.jpg|{{echo|ho}}
20507 <ul class="gallery mw-gallery-traditional">
20508 <li class='gallerycaption'>{{echo|hi}}</li>
20509 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20510 <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>
20511 <div class="gallerytext">
20519 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20520 <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>
20521 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></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>
20526 Gallery with wikitext inside caption
20529 "nativeGallery": true
20533 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20534 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20537 <ul class="gallery mw-gallery-traditional">
20538 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20539 <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>
20540 <div class="gallerytext">
20541 <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>
20545 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20546 <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>
20547 <div class="gallerytext">
20548 <p>This is a test template
20555 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20556 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><figure-inline 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></figure-inline></div></li>
20557 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></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>
20562 Gallery (with showfilename option)
20565 "nativeGallery": true
20568 <gallery showfilename="">
20569 File:Nonexistent.jpg|caption
20570 File:Nonexistent.jpg
20571 File:Foobar.jpg|some '''caption''' [[Main Page]]
20575 <ul class="gallery mw-gallery-traditional">
20576 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20577 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20578 <div class="gallerytext">
20579 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20584 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20585 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20586 <div class="gallerytext">
20587 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20591 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20592 <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>
20593 <div class="gallerytext">
20594 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20595 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20599 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20600 <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>
20601 <div class="gallerytext">
20602 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20609 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20610 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a>caption</div></li>
20611 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
20612 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></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>
20613 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
20617 ## Should Parsoid be preserving these variations? See T151367
20619 Gallery (with namespace-less filenames)
20622 "modes": ["wt2html", "html2html"],
20623 "nativeGallery": true
20627 File:Nonexistent.jpg
20633 <ul class="gallery mw-gallery-traditional">
20634 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20635 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20636 <div class="gallerytext">
20639 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20640 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20641 <div class="gallerytext">
20644 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20645 <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>
20646 <div class="gallerytext">
20649 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20650 <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>
20651 <div class="gallerytext">
20657 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20658 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20659 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20660 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20661 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20666 Gallery override link with wikilink (T36852)
20669 "nativeGallery": true
20673 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20676 <ul class="gallery mw-gallery-traditional">
20677 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20678 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Wikilink"><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>
20679 <div class="gallerytext">
20685 <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":{}}'>
20686 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Wikilink"><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></figure-inline></div><div class="gallerytext"></div></li>
20691 Gallery override link with absolute external link (T36852)
20694 "nativeGallery": true
20698 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20701 <ul class="gallery mw-gallery-traditional">
20702 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20703 <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>
20704 <div class="gallerytext">
20710 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20711 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20716 Gallery override link with absolute external link with LanguageConverter
20721 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20724 <ul class="gallery mw-gallery-traditional">
20725 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20726 <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>
20727 <div class="gallerytext">
20737 Gallery override link with malicious javascript (T36852)
20740 "modes": ["wt2html", "html2html"],
20741 "nativeGallery": true
20745 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20748 <ul class="gallery mw-gallery-traditional">
20749 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20750 <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>
20751 <div class="gallerytext">
20757 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20758 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./%22_onclick=%22alert('malicious_javascript_code!');"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20762 # Note that parsoid uses the invalid link as a caption, PHP does not.
20764 Gallery with invalid title as link (T45964)
20767 "modes": ["wt2html", "html2html"],
20768 "nativeGallery": true
20772 File:Foobar.jpg|link=<
20775 <ul class="gallery mw-gallery-traditional">
20776 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20777 <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>
20778 <div class="gallerytext">
20784 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20785 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">link=<</div></li>
20790 Serialize gallery without attrs in data-mw
20793 "modes": ["html2wt"],
20794 "nativeGallery": true
20797 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20798 <li class="gallerycaption">123</li>
20799 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span>File:Test.png</span></div><div class="gallerytext"></div></li>
20802 <gallery caption="123">
20808 Gallery with class and style attributes
20811 "nativeGallery": true
20814 <gallery class="center" style="text-align: center;">
20818 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20819 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20820 <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>
20821 <div class="gallerytext">
20827 <ul class="gallery mw-gallery-traditional center" style="text-align: center;" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"class":"center","style":"text-align: center;"},"body":{}}'>
20828 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20833 Gallery in slideshow mode
20836 "nativeGallery": true
20839 <gallery mode="slideshow" showthumbnails="">
20843 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20844 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20845 <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>
20846 <div class="gallerytext">
20852 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20853 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
20858 HTML Hex character encoding (spells the word "JavaScript")
20860 parsoid=wt2html,wt2wt,html2html
20862 JavaScript
20864 <p>JavaScript
20867 <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>
20871 HTML Hex character encoding bogus encoding (T28437 regression check)
20875 <p>&#xsee;&#XSEE;
20880 HTML Hex character encoding mixed case
20882 parsoid=wt2html,wt2wt,html2html
20889 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20892 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20893 # Note that U+000C (form feed) is not a valid XML character, so
20894 # it is banned even though allowed in HTML5.
20896 Illegal character references (T106578)
20901 ; Control (low): 
20902 ; Control (high):  Ÿ
20903 ; Surrogate: ��
20904 ; This is an okay astral character: 💩
20907 <dd> &#00;</dd>
20909 <dd> &#xC;</dd>
20911 <dd> &#xD;</dd>
20912 <dt> Control (low)</dt>
20914 <dt> Control (high)</dt>
20915 <dd> &#x7F; &#x9F;</dd>
20916 <dt> Surrogate</dt>
20917 <dd> &#xD83D;&#xDCA9;</dd>
20918 <dt> This is an okay astral character</dt>
20919 <dd> 💩</dd></dl>
20923 __FORCETOC__ override
20935 ISBN 978-0-1234-56 789
20937 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
20940 <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>
20944 ISBN followed by 5 spaces
20955 ISBN ISBN 1234567890
20957 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20960 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20963 # Uppercase X and lowercase x as well
20974 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
20975 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
20976 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
20977 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
20978 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
20979 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
20982 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
20983 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
20984 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
20985 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
20986 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
20987 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
20991 ISBN with empty prefix (parsoid test)
20995 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20998 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21002 T24905: <abbr> followed by ISBN followed by </a>
21004 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21006 <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>
21009 <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>
21017 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21022 Double RFC with a wiki link
21026 <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>
21035 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21038 <p><a href="https://tools.ietf.org/html/rfc983" rel="mw:ExtLink" class="external text" data-parsoid='{"stx":"magiclink"}'>RFC 983</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>987</p>
21042 Centre-aligned image
21044 [[Image:foobar.jpg|centre]]
21046 <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>
21053 [[Image:foobar.jpg|none]]
21055 <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>
21060 Width + Height sized image (using px) (height is ignored)
21062 [[Image:foobar.jpg|640x480px]]
21064 <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>
21069 Width-sized image (using px, no following whitespace)
21071 [[Image:foobar.jpg|640px]]
21073 <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>
21078 Width-sized image (using px, with following whitespace - test regression from r39467)
21080 [[Image:foobar.jpg|640px ]]
21082 <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>
21087 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21089 [[Image:foobar.jpg| 640px]]
21091 <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>
21096 Image with page parameter
21100 [[File:LoremIpsum.djvu|page=2]]
21102 <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>
21105 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}' data-mw='{"page":"2"}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{"href":"File:LoremIpsum.djvu"}}'><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></figure-inline></p>
21109 Another italics / bold test
21117 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21123 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21126 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21130 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21132 Images with the "|" character in the comment
21134 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21136 <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>
21139 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=%7Cleft%7C&param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&param2=|x"}}'>external</a> URL</figcaption></figure>
21143 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21145 <html><script>alert(1);</script></html>
21147 <p><html><script>alert(1);</script></html>
21152 HTML with raw HTML ($wgRawHtml==true)
21156 <html><script>alert(1);</script></html>
21158 <p><script>alert(1);</script>
21163 Parents of subpages, one level up
21165 subpage title=[[Subpage test/L1/L2/L3]]
21169 <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>
21175 Parents of subpages, one level up, not named
21177 subpage title=[[Subpage test/L1/L2/L3]]
21181 <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>
21188 Parents of subpages, two levels up
21190 subpage title=[[Subpage test/L1/L2/L3]]
21196 <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
21197 </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>
21202 Parents of subpages, two levels up, without trailing slash or name.
21204 subpage title=[[Subpage test/L1/L2/L3]]
21213 Parents of subpages, two levels up, with lots of extra trailing slashes.
21215 subpage title=[[Subpage test/L1/L2/L3]]
21219 <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>
21224 Subpage test/L1/L2/L3Sibling
21230 Transclusion of a sibling page (one level up)
21232 subpage title=[[Subpage test/L1/L2/L3]]
21241 Transclusion of a child page
21243 subpage title=[[Subpage test/L1/L2]]
21251 # This is wt2html only in Parsoid because we add <nowiki>
21252 # because of {{..}} and we don't expect to fix that to
21253 # eliminate the nowikis selective for {{..}} markup.
21255 Non-transclusion because of too many up levels
21257 subpage title=[[Subpage test/L1/L2/L3]]
21260 {{../../../../More than parent}}
21262 <p>{{../../../../More than parent}}
21265 <p>{{../../../../More than parent}}</p>
21269 Definition list code coverage
21275 <dl><dt> title  </dt>
21277 <dt> title </dt>
21283 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21284 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21285 <dt>title</dt><dd> def</dd></dl>
21289 Don't fall for the self-closing div
21291 <div>hello world</div/>
21293 <div>hello world</div>
21302 <p>[[:Template:Msg]]
21311 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21315 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21317 Always escape literal '>' in output, not just after '<'
21331 <p>This is a test template
21332 This is a test template
21344 Inclusion of !userCanEdit() content
21348 <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>
21354 Out-of-order TOC heading levels
21363 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21365 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21367 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21368 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21371 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21373 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21374 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21380 <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>
21381 <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>
21382 <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>
21383 <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>
21384 <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>
21385 <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>
21391 ISBN with a dummy number
21401 ISBN with space-delimited number
21405 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21408 <p data-parsoid='{"dsr":[0,18,0,0]}'><a href="./Special:BookSources/9290170328" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink","dsr":[0,18,2,2]}'>ISBN 92 9017 032 8</a></p>
21413 ISBN with multiple spaces, no number
21432 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21433 </p><p>ISBN 12345678901
21436 <p>ISBN 123456789</p>
21438 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21440 <p>ISBN 12345678901</p>
21445 ISBN with trailing year (T9110)
21447 ISBN 1-234-56789-0 - 2006
21449 ISBN 1 234 56789 0 - 2006
21451 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21452 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21455 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21457 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21464 wgFragmentMode=[ 'html5', 'legacy' ]
21466 {{anchorencode:foo bar©#%n}}
21471 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:foo bar©#%n","function":"anchorencode"},"params":{},"i":0}}]}'>foo_bar©#%n</p>
21475 anchorencode (legacy)
21477 wgFragmentMode=[ 'legacy' ]
21479 {{anchorencode:foo bar©#%n}}
21481 <p>foo_bar.C2.A9.23.25n
21486 anchorencode trims spaces
21488 wgFragmentMode=[ 'html5', 'legacy' ]
21490 {{anchorencode: __pretty__please__}}
21495 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21499 anchorencode deals with links
21501 wgFragmentMode=[ 'html5', 'legacy' ]
21503 {{anchorencode: [[hello|world]] [[hi]]}}
21508 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21512 anchorencode deals with templates
21514 wgFragmentMode=[ 'html5', 'legacy' ]
21516 {{anchorencode: {{Foo}} x}}
21521 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21525 anchorencode encodes like the TOC generator: (T20431)
21527 wgFragmentMode=[ 'html5', 'legacy' ]
21529 === _ +:.3A%3A _ &&]] x ===
21530 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21533 <h3><span id=".2B:.3A.253A_.26.26.5D.5D_x"></span><span class="mw-headline" id="+:.3A%3A_&&]]_x">_ +:.3A%3A _ &&]] x</span></h3>
21534 <p>+:.3A%3A_&&]]_x
21537 <h3 id="+:.3A%3A_&&]]_x"><span id=".2B:.3A.253A_.26.26.5D.5D_x" typeof="mw:FallbackId"></span> _ +:.3A%3A _ &<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&","dsr":[18,23,null,null]}'>&</span>]] x </h3>
21538 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: _ +:.3A%3A _ &&amp;]] x","function":"anchorencode"},"params":{},"i":0}}]}'>+:.3A%3A_&&<span typeof="mw:Entity">]</span><span typeof="mw:Entity">]</span>_x</p>
21539 <meta property="mw:PageProp/noeditsection"/>
21543 anchorencode encodes like the TOC generator: (T20431) (legacy)
21545 wgFragmentMode=[ 'legacy' ]
21547 === _ +:.3A%3A&&]] ===
21548 {{anchorencode: _ +:.3A%3A&&]] }}
21551 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21552 <p>.2B:.3A.253A.26.26.5D.5D
21557 T8200: blockquotes and paragraph formatting
21578 T10293: Use of center tag ruins paragraph formatting
21599 Parsing of overlapping (improperly nested) inline html tags
21601 <span><s>x</span></s>
21603 <p><span><s>x</span></s></span>
21606 <p><span><s>x</s></span>
21611 ### Language variants related tests
21614 # Parsoid does not mark self-links.
21615 # Parsoid does not convert links; PHP will do any necessary redirects.
21618 Self-link in language variants
21620 title=[[Dunav]] language=sr
21622 Both [[Dunav]] and [[Дунав]] are names for this river.
21624 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21627 <p>Both <a rel="mw:WikiLink" href="./Dunav" title="Dunav">Dunav</a> and <a rel="mw:WikiLink" href="./Дунав" title="Дунав">Дунав</a> are names for this river.</p>
21637 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21639 title=[[Duna]] language=sr
21641 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21643 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <a class="mw-selflink selflink">Duna</a> and <a class="mw-selflink selflink">Dуна</a> are still self-links.
21646 <p><a rel="mw:WikiLink" href="./Дуна" title="Дуна">Дуна</a> is not a self-link while <a rel="mw:WikiLink" href="./Duna" title="Duna">Duna</a> and <a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> are still self-links.</p>
21650 Link to a section of a variant of this title shouldn't be parsed as self-link
21652 title=[[Duna]] language=sr
21654 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21656 <p><a class="mw-selflink selflink">Dуна</a> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
21659 <p><a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> is a self-link while <a rel="mw:WikiLink" href="./Dunа#Foo" title="Dunа">Dunа#Foo</a> and <a rel="mw:WikiLink" href="./Dуна#Foo" title="Dуна">Dуна#Foo</a> are not self-links.</p>
21663 Link to pages in language variants
21667 Main Page can be written as [[Маин Паге]]
21669 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21672 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21677 Multiple links to pages in language variants
21681 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21683 <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>.
21686 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a> can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a> same as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a>.</p>
21691 Simple template in language variants
21697 <p>This is a test template
21703 Template with explicit namespace in language variants
21709 <p>This is a test template
21715 Basic test for template parameter in language variants
21719 {{парамтест|param=foo}}
21721 <p>This is a test template with parameter foo
21726 Simple category in language variants
21730 [[Category:МедиаWики Усер'с Гуиде]]
21732 cat=МедиаWики_Усер'с_Гуиде sort=
21734 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21749 ## We used to, but no longer wt2wt this test since the default serializer
21750 ## will normalize all categories to serialize on their own line.
21751 ## This wikitext usage is going to be fairly uncommon in production and
21752 ## selser will take care of preserving formatting in those scenarios.
21754 Don't convert blue categorylinks to another variant (T35210)
21760 [[A]][[Category:分类]]
21764 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21765 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21769 Stripping -{}- tags (language variants)
21773 Latin proverb: -{Ne nuntium necare}-
21775 <p>Latin proverb: Ne nuntium necare
21778 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21783 Prevent conversion with -{}- tags (language variants)
21785 language=sr variant=sr-ec
21787 Latinski: -{Ne nuntium necare}-
21789 <p>Латински: Ne nuntium necare
21792 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21797 Prevent conversion of text with -{}- tags (language variants)
21799 language=sr variant=sr-ec
21801 Latinski: -{Ne nuntium necare}-
21803 <p>Латински: Ne nuntium necare
21806 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21811 Prevent conversion of links with -{}- tags (language variants)
21813 language=sr variant=sr-ec
21817 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21820 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[2,15,2,2]}'>Main Page</a>"}}'></span></p>
21825 -{}- tags within headlines (within html for parserConvert())
21827 wgFragmentMode=[ 'html5', 'legacy' ]
21829 language=sr variant=sr-ec
21833 Note that even an unprotected headline ID is not affected by language
21838 <h2><span id="-.7BNaslov.7D-"></span><span class="mw-headline" id="-{Naslov}-">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>
21839 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21842 <h2><span class="mw-headline" id="Latinski">Латински</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Уреди одељак „Латински“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
21845 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span> </h2>
21847 <p>Note that even an unprotected headline ID is not affected by language
21850 <h2 id="Latinski">Latinski</h2>
21854 Explicit definition of language variant alternatives
21856 language=zh variant=zh-tw
21858 -{zh:China;zh-tw:Taiwan}-, not China
21860 <p>Taiwan, not China
21863 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, not China</p>
21867 Filter syntax for language variants
21869 language=zh variant=zh-tw
21871 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21873 <p>fooblog, WEBJOURNAL, WEBLOGquux
21876 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21879 # Note that Parsoid post-processing for language variants needs to
21880 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21882 Conversion around HTML tags
21884 language=sr variant=sr-ec
21886 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21887 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21890 <span title="ЛаCтин">ски</span>
21893 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"span","l":"sr-ec","t":"script"},{"f":"title","l":"sr-ec","t":"src"}]}'/>
21894 <span title="Latin" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"title"},{"html":"La<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"sr-el\",\"t\":\"L\"},{\"l\":\"sr-ec\",\"t\":\"C\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[6],\"dsr\":[57,76,null,2]}'></span>tin"}]]}'>ski</span></p>
21898 Explicit session-wise two-way language variant mapping (A flag and - flag)
21900 language=zh variant=zh-tw
21902 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
21904 Taiwan is not China.
21906 But -{A|zh:China; zh-tw:Taiwan}- is China,
21908 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
21910 and -{China}- is China.
21912 <p>This is Taiwan, but we'll forget that now.
21913 </p><p>Taiwan is not China.
21914 </p><p>But Taiwan is Taiwan,
21915 </p><p>(This should be stripped!)
21916 </p><p>and China is China.
21919 <p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
21920 <p>Taiwan is not China.</p>
21921 <p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span> is China,</p>
21922 <p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"remove":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
21923 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
21927 Explicit session-wise one-way language variant mapping (A flag and - flag)
21929 language=zh variant=zh-tw
21931 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
21933 COUNTRY is China or Taiwan.
21935 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
21937 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21939 and -{COUNTRY}- is COUNTRY.
21941 <p>This is Taiwan, but we'll forget that now.
21942 </p><p>COUNTRY is China or Taiwan.
21943 </p><p>But Taiwan is Taiwan,
21944 </p><p>(This should be stripped!)
21945 </p><p>and COUNTRY is COUNTRY.
21948 <p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
21949 <p>COUNTRY is China or Taiwan.</p>
21950 <p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span> is COUNTRY,</p>
21951 <p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}],"remove":true}'/> should be stripped!)</p>
21952 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
21956 Explicit session-wise two-way language variant mapping (H flag for hide)
21958 language=zh variant=zh-tw
21960 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
21964 <p>(This should be stripped!)
21965 </p><p>Taiwan is Taiwan.
21968 <p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
21969 <p>Taiwan is China.</p>
21973 Explicit session-wise one-way language variant mapping (H flag for hide)
21975 language=zh variant=zh-tw
21977 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21979 COUNTRY is Taiwan or China.
21981 <p>(This should be stripped!)
21982 </p><p>Taiwan is Taiwan or China.
21985 <p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
21986 <p>COUNTRY is Taiwan or China.</p>
21989 ## Note that parsoid test runner does not support 'showtitle' option.
21991 Adding explicit conversion rule for title (T flag)
21993 language=zh variant=zh-tw showtitle
21995 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22000 <p>Should be stripped!
22001 </p><p>Taiwan is China.
22004 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22005 <p>Taiwan is China.</p>
22009 Code coverage: T combined with H flag
22011 language=zh variant=zh-tw showtitle
22013 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22018 <p>Should be stripped!
22019 </p><p>Taiwan is Taiwan.
22022 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22023 <p>Taiwan is China.</p>
22027 Code coverage: T with no variants
22029 language=zh variant=zh-tw showtitle
22031 -{H|zh:China; zh-tw:Taiwan}-
22032 Taiwan is China.-{T|Taiwan is China}-
22039 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22040 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22044 Code coverage: rules with no variants
22046 language=zh variant=zh-tw
22048 -{H|zh:China; zh-tw:Taiwan}-
22059 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22061 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22062 Taiwan is China.</p>
22067 Code coverage: D flag for conversion rule
22069 language=zh variant=zh-tw
22071 -{D|zh-cn:XA; zh-tw:YA}-
22072 -{A;D|zh-cn:XB; zh-tw:YB}-
22073 -{D;H|zh-cn:XC; zh-tw:YC}-
22075 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22081 XA XB XC YA YB YC FOO BAR BAT 012345
22086 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22090 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22093 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22094 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22095 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22096 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"FOO","l":"zh-tw","t":"BAR"},{"f":"FOO","l":"zh-cn","t":"BAT"}]}'></span></p>
22097 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22098 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22099 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22100 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22104 Code coverage: N flag for conversion rule
22106 language=zh variant=zh-cn
22116 </p><p>српски (ћирилица)
22119 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22120 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22121 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22124 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22126 Code coverage: N flag for conversion rule (wt2html only)
22128 language=zh variant=zh-cn
22129 parsoid=wt2html,html2html
22136 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22140 Testing that changing the language variant here in the tests actually works
22142 language=zh variant=zh showtitle
22144 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22147 <p>Should be stripped!
22150 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22154 Recursive conversion of alt and title attrs shouldn't clear converter state
22156 language=zh variant=zh-cn
22159 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22160 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22164 Should be stripped<span title="Exclamation">!</span>
22167 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22168 Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/><span title="exclamation">!</span></p>
22172 T26072: more test on conversion rule for title
22174 language=zh variant=zh-tw showtitle
22176 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22178 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22181 <p>This should be stripped!
22182 </p><p>This won't take interferes with the title rule.
22185 <p>This should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22186 <p>This won't take interferes with the title rule<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"Beijing"},{"l":"zh-tw","t":"Taipei"}]}'/>.</p>
22190 Partly disable title conversion if variant == main language code
22192 language=zh variant=zh title=[[ZH]] showtitle
22194 -{T|zh-cn:CN;zh-tw:TW}-
22200 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"CN"},{"l":"zh-tw","t":"TW"}]}'/></p>
22204 Partly disable title conversion if variant == main language code, more
22206 language=zh variant=zh title=[[ZH]] showtitle
22214 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22218 Raw output of variant escape tags (R flag)
22220 language=zh variant=zh-tw
22222 Raw: -{R|zh:China;zh-tw:Taiwan}-
22224 <p>Raw: zh:China;zh-tw:Taiwan
22227 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22230 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22232 Raw output of variant escape tags (R flag) (wt2html only)
22234 language=zh variant=zh-tw
22235 parsoid=wt2html,html2html
22237 -{Variant}- -{D|syntax}- -{D;R|options}-
22239 <p>Variant syntax options
22242 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Variant"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"syntax"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"options"}}'></span></p>
22246 Nested markup inside raw output of variant escape tags (R flag)
22248 language=zh variant=zh-tw
22250 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22252 <p>Nested raw: nested Taiwan nested
22255 <p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh\",\"t\":\"China\"},{\"l\":\"zh-tw\",\"t\":\"Taiwan\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[6],\"dsr\":[23,48,null,2]}'></span> nested"}}'></span></p>
22259 Nested markup and spaces inside raw output of variant escape tags (R flag)
22261 language=zh variant=zh-tw
22263 X-{ outer -{ inner }- outer }-X
22265 <p>X outer inner outer X
22268 <p>X<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":" outer <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\" inner \"}}' data-parsoid='{\"fl\":[],\"dsr\":[10,21,null,2]}'></span> outer "}}'></span>X</p>
22272 Templates inside raw output of variant escape tags (R flag)
22274 language=zh variant=zh-tw
22276 Nested raw: -{R|nested {{echo|hi}} templates}-
22278 <p>Nested raw: nested hi templates
22281 <p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested <span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[23,34,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span> templates"}}'></span></p>
22285 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22287 language=zh variant=zh-cn
22289 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22294 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[12]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"0"},{"l":"zh-sg","t":"1"},{"l":"zh-tw","t":"2"},{"l":"zh-hk","t":"3"}]}'></span></p>
22298 Conversion rules from [numeric-only string] to [something else] (T48634)
22300 language=zh variant=zh-cn
22302 -{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
22307 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"B"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"C"},{"f":"0","l":"zh-cn","t":"D"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-hans","t":"A"}]}'/>012345<span typeof="mw:LanguageVariant" data-parsoid='{"fl":["A"],"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"0"},{"l":"zh-cn","t":"E"}]}'></span>012345</p>
22311 Two-way converter rule entries with an empty value should be ignored (T53551)
22313 language=zh variant=zh-cn
22315 -{H|zh-cn:foo;zh-tw:;}-foobar
22320 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"foo"},{"l":"zh-tw","t":""}]}'/>foobar</p>
22324 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22326 language=zh variant=zh-cn
22328 -{H|=>zh-cn:foo;}-foobar
22333 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22337 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22339 language=zh variant=zh-cn
22346 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22350 Nested using of manual convert syntax
22352 language=zh variant=zh-hk
22354 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22356 <p>Nested: Hello Hong Kong!
22359 <p>Nested: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"twoway":[{"l":"zh-hans","t":"Hi <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-cn\",\"t\":\"China\"},{\"l\":\"zh-sg\",\"t\":\"Singapore\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[21,53,null,2]}'></span>"},{"l":"zh-hant","t":"Hello <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-tw\",\"t\":\"Taiwan\"},{\"l\":\"zh-hk\",\"t\":\"H&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"ong\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[90,97,null,2]}&apos;>&lt;/span> K&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,null,2]}&apos;>&lt;/span>ong\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,null,2]}'></span>"}]}'></span>!</p>
22363 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22365 language=zh variant=zh-cn
22367 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22369 <p><span title="X">A</span>
22372 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[21,49,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[34,39,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22376 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22378 language=zh variant=zh-cn
22380 -{<span title="-{X}-">A</span>}-
22381 !! html/php+disabled
22382 <p><span title="X">A</span>
22385 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[2,30,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[15,20,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22388 # Parsoid and PHP disagree on how to parse this example: Parsoid
22389 # insists that the content of a language converter element be a valid
22390 # DOM fragment or attribute string
22392 Language converter markup with block content
22394 language=zh variant=zh-cn
22396 <span>a-{b<div>c}-d
22398 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22400 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22405 </span></div></span></div></span>
22407 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div><p>d</p>
22409 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div><p>d</p>
22411 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"x<span data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[82,89,6,0]}'>y</span>"},{"f":"0","l":"zh-tw","t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[100,106,5,0]}'>c</div>"}]}'/>d</span></p>
22415 LanguageConverter selser (1)
22417 language=zh variant=zh-cn
22419 "modes": ["wt2wt", "selser"],
22421 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22431 LanguageConverter selser (2)
22433 language=zh variant=zh-cn
22435 "modes": ["wt2wt", "selser"],
22437 ["span[class='x']", "contents", "text", "-{foo}-"],
22438 ["a", "contents", "text", "-{"],
22439 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22443 <span class="x">TEXT1</span>
22444 [http://example.com TEXT2]
22448 <span class="x"><nowiki>-{foo}-</nowiki></span>
22449 [http://example.com -{]
22450 [[Foo|<nowiki>-{</nowiki>]]
22451 {{1x|<nowiki>-{</nowiki>}}
22454 # Tests LanguageVariantText in ConstrainedText
22456 LanguageConverter selser (3)
22458 language=zh variant=zh-cn
22460 "modes": ["wt2wt", "selser"],
22462 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22463 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22474 |<nowiki/>-{edited}-
22478 # Tests LanguageVariantText._fromSelSer
22480 LanguageConverter selser (4)
22482 language=zh variant=zh-cn
22484 "modes": ["wt2wt", "selser"],
22486 ["td > span.x", "remove"]
22492 |<span class="x">Foo</span>-{Bar}-
22493 ||<span class="x">Foo</span>-{Bar}-
22503 # Since Parsoid is starting to emit canonical wikitext for links,
22504 # [http://example.com http://example.com] will not RT back to that
22506 # Parsoid does not language-convert links (it is done in a
22507 # post-processing step)
22509 Proper conversion of text in external links
22511 language=sr variant=sr-ec
22514 http://www.google.com
22515 gopher://www.google.com
22516 [http://www.google.com http://www.google.com]
22517 [gopher://www.google.com gopher://www.google.com]
22518 [https://www.google.com irc://www.google.com]
22519 [ftp://www.google.com www.google.com/ftp://dir]
22520 [//www.google.com www.google.com]
22522 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22523 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22524 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22525 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22526 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22527 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22528 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22531 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22532 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22533 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22534 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22535 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
22536 <a rel="mw:ExtLink" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22537 <a rel="mw:ExtLink" href="//www.google.com">www.google.com</a></p>
22541 Do not convert roman numbers to language variants
22543 language=sr variant=sr-ec
22547 <p>Фридрих IV је цар.
22550 <p>Fridrih IV je car.</p>
22554 Unclosed language converter markup "-{"
22565 Don't convert raw rule "-{R|=>}-" to "=>"
22574 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"=<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;gt;\",\"srcContent\":\">\",\"dsr\":[5,9,null,null]}'>></span>"}}'></span></p>
22578 Don't break link parsing if language converter markup is in the caption.
22580 language=sr variant=sr-ec
22582 [[Main Page|-{R|main page}-]]
22584 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22587 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"main page"}}' data-parsoid='{"fl":["R"]}'></span></a></p>
22591 T146304: Don't break template parsing if language converter markup is in the parameter.
22593 language=sr variant=sr-ec
22600 <p><span typeof="mw:Transclusion mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo"}}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Шаблон:Echo"},"params":{"1":{"wt":"-{R|foo}-"}},"i":0}}]}'></span></p>
22604 T146305: Don't break image parsing if language converter markup is in the caption.
22608 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22610 <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>
22613 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"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-variant='{"disabled":{"t":"caption:"}}' data-parsoid='{"fl":["R"]}'></span></figcaption></figure>
22617 T146305: Don't break image parsing if nested language converter markup is in the caption.
22619 language=zh variant=zh-cn
22621 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22623 <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>
22626 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"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-variant='{"twoway":[{"l":"zh-cn","t":"blog (hk: <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBJOURNAL\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[43,65,null,2]}'></span>, tw: <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBLOG\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[71,89,null,2]}'></span>)"}]}'></span></figcaption></figure>
22629 # XXX html2wt disabled because rich markup in alt is not preserved.
22631 Don't break gallery if language converter markup is inside.
22636 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22637 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22640 <ul class="gallery mw-gallery-traditional">
22641 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22642 <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>
22643 <div class="gallerytext">
22644 <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>
22648 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22649 <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>
22650 <div class="gallerytext">
22651 <p>This is a test template
22658 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-\nFile:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt\n"}}'>
22659 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="" 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></figure-inline></div><div class="gallerytext"><figure-inline typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bar\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[68,77,null,2]}'></span>"}'><a href="./File:Foobar.jpg"><img alt="" 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></figure-inline></div></li>
22660 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></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":"-{R|param}-"}},"i":0}}]}'>This is a test template</span></div></li>
22665 T153135: Don't break list handling if language converter markup is in the item.
22667 language=zh variant=zh-cn
22669 ;-{zh-cn:AAA;zh-tw:BBB}-
22673 <dt>foo:bar</dt></dl>
22676 <dl><dt data-parsoid='{"dsr":[0,24,1,0]}'><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}]}'></span></dt>
22677 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22681 // Note that parsoid does not protect colons unless language converter
22682 // markup is properly nested, because it is a backtracking parser.
22684 T153135: Unclosed markup in definition list (code coverage)
22686 language=zh variant=zh-cn
22691 <dl><dt><b>foo:bar</b></dt><b>
22692 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22695 <dl><dt data-parsoid='{"dsr":[0,11,1,0]}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
22696 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22697 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22702 T153135: Nested language converter markup in definition list (code coverage)
22704 language=zh variant=zh-cn
22706 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22708 <dl><dt>AAA foo:bar bat:baz</dt>
22712 <dl><dt data-parsoid='{"dsr":[0,49,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"foo:bar\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[14,33,null,2]}'></span> <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bat:baz\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[34,47,null,2]}'></span>"}]}'></span></dt>
22713 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22717 # html2wt mode disabled due to <nowiki> insertion.
22719 T153140: Don't break table handling if language converter markup is in the cell.
22721 language=sr variant=sr-ec
22722 parsoid=wt2html,wt2wt,html2html
22739 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22746 Language converter tricky html2wt cases (1)
22749 parsoid=html2wt,wt2wt
22751 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22753 -{<nowiki>}-</nowiki>}-
22760 Language converter tricky html2wt cases (2)
22763 parsoid=html2wt,wt2wt
22767 <nowiki>-{foo}-</nowiki>
22769 <p>-{foo}-
22774 Language converter tricky html2wt cases (3)
22777 parsoid=html2wt,wt2wt
22779 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22780 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22781 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22787 -{<nowiki>-{foo}-</nowiki>}-
22791 </p><p>-{foo}-
22796 Language converter tricky html2wt cases (4)
22799 parsoid=html2wt,wt2wt
22801 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hey\"}},\"i\":0}}]}'>hey</span>"}}'></span></p>
22809 # Note that the <nowiki> escaping added by parsoid for source text,
22810 # destination text, and language names only works on the PHP side
22811 # for *destination text*. (HTML entity escaping wouldn't work
22812 # any better.) This is probably a bug, at least for source texts.
22813 # (For language names PHP uses a precise regexp based on the languages
22814 # it currently knows have variants, which is fragile since this set
22815 # can grow/shrink over time.)
22817 Language converter tricky html2wt cases (5)
22819 language=zh variant=zh-cn
22821 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"a:b=>c","l":"zh-cn","t":"x;foo=>zh-cn:boo"},{"f":"bar","l":"zh-cn","t":"bat;xyz=>zh-cn:abc"}]}'/>foobar</p>
22822 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22823 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"xyz"},{"l":"zh-cn","t":"0;zh-tw:bar"}]}'></span></p>
22824 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22827 -{H|<nowiki>a:b=>c</nowiki>=>zh-cn:<nowiki>x;foo=>zh-cn:boo</nowiki>;bar=>zh-cn:<nowiki>bat;xyz=>zh-cn:abc</nowiki>}-foobar
22829 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22831 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22833 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22836 !! html/php+disabled
22837 <p>foobat;xyz=>zh-cn:abc
22841 </p><p>a:b=>c 0;zh-tw:bar
22846 T179579: Nowiki and lc interaction
22853 -{123<nowiki>|</nowiki>456}-
22855 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
22857 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"123<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[23,41,8,9]}'>|</span>456"}}' data-parsoid='{"fl":[],"src":"-{123<nowiki>|</nowiki>456}-"}'></span></p>
22861 T2529: Uncovered bullet
22871 T2529: Uncovered bullet in a deeply nested list
22873 ******* Foo {{bullet}}
22875 <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>
22881 T2529: Uncovered table already at line-start
22904 T2529: Uncovered bullet in parser function result
22906 * Foo {{lc:{{bullet}} }}
22914 T7678: Double-parsed template argument
22916 {{lc:{{{1}}}|hello}}
22923 T7678: Double-parsed template invocation
22925 {{lc:{{paramtest {{!}} param = hello }} }}
22927 <p>{{paramtest | param = hello }}
22932 Case insensitivity of parser functions for non-ASCII characters (T10143)
22935 title=[[Main Page]]
22937 {{PRVNÍVELKÉ:ěščř}}
22938 {{prvnívelké:ěščř}}
22958 Morwen/13: Unclosed link followed by heading
22965 <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>
22970 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
22977 <h1><span class="mw-headline" id="heading">heading</span></h1>
22982 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
22989 <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>
23004 Paragraphs inside divs (no extra line breaks)
23016 Paragraphs inside divs (extra line break on open)
23031 Paragraphs inside divs (extra line break on close)
23046 Paragraphs inside divs (extra line break on open and close)
23062 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23063 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23065 Nesting tags, paragraphs on lines which begin with <div>
23067 <div></div><strong>A
23070 <div></div><p><strong>A
23071 </strong></p><strong></strong><p><strong>B</strong>
23080 # T8200: <blockquote> should behave like <div> with respect to line breaks
23082 T8200: paragraphs inside blockquotes (no extra line breaks)
23084 <blockquote>Line one
23086 Line two</blockquote>
23088 <blockquote>Line one
23089 Line two</blockquote>
23092 <blockquote><p>Line one
23093 Line two</p></blockquote>
23097 T8200: paragraphs inside blockquotes (extra line break on open)
23102 Line two</blockquote>
23107 Line two</blockquote>
23113 Line two</p></blockquote>
23117 T8200: paragraphs inside blockquotes (extra line break on close)
23119 <blockquote>Line one
23124 <blockquote>Line one
23130 <blockquote><p>Line one
23137 T8200: paragraphs inside blockquotes (extra line break on open and close)
23153 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23155 Paragraphs inside blockquotes/divs (no extra line breaks)
23157 <blockquote><div>Line one
23159 Line two</div></blockquote>
23161 <blockquote><div>Line one
23162 Line two</div></blockquote>
23167 Paragraphs inside blockquotes/divs (extra line break on open)
23172 Line two</div></blockquote>
23177 Line two</div></blockquote>
23182 Paragraphs inside blockquotes/divs (extra line break on close)
23184 <blockquote><div>Line one
23187 </div></blockquote>
23189 <blockquote><div>Line one
23192 </div></blockquote>
23197 Paragraphs inside blockquotes/divs (extra line break on open and close)
23203 </div></blockquote>
23209 </div></blockquote>
23214 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23216 wgLinkHolderBatchSize=0
23222 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23223 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23224 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23229 Free external link invading image caption
23231 [[Image:Foobar.jpg|thumb|http://x|hello]]
23233 <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>
23238 T17196: localised external link numbers
23242 [http://en.wikipedia.org/]
23244 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23247 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
23251 Multibyte character in padleft
23253 {{padleft:-Hello|7|Æ}}
23260 Multibyte character in padright
23262 {{padright:Hello-|7|Æ}}
23269 formatdate parser function
23271 {{#formatdate:2009-03-24}}
23273 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23278 formatdate parser function, with default format
23280 {{#formatdate:2009-03-24|mdy}}
23282 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23287 Spacing of numbers in formatted dates
23289 {{#formatdate:January 15}}
23291 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23296 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
23298 language=nl title=[[MediaWiki:Common.css]]
23300 {{#formatdate:2009-03-24|dmy}}
23302 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23315 Edit comment with link
23319 I like the [[Main Page]] a lot
23321 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23325 Edit comment with link and link text
23329 I like the [[Main Page|best pages]] a lot
23331 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23335 Edit comment with link and link text with suffix
23339 I like the [[Main Page|best page]]s a lot
23341 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23345 Edit comment with section link (non-local, eg in history list)
23347 comment title=[[Main Page]]
23349 /* External links */ removed bogus entries
23351 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23355 Edit comment with section link and text before it (non-local, eg in history list)
23357 comment title=[[Main Page]]
23359 pre-comment text /* External links */ removed bogus entries
23361 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>
23365 Edit comment with section link (local, eg in diff view)
23367 comment local title=[[Main Page]]
23369 /* External links */ removed bogus entries
23371 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23375 Edit comment with subpage link (T16080)
23379 title=[[Subpage test]]
23381 Poked at a [[/subpage]] here...
23383 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23387 Edit comment with subpage link and link text (T16080)
23391 title=[[Subpage test]]
23393 Poked at a [[/subpage|neat little page]] here...
23395 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23399 Edit comment with bogus subpage link in non-subpage NS (T16080)
23402 title=[[Subpage test]]
23404 Poked at a [[/subpage]] here...
23406 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23410 Edit comment with bare anchor link (local, as on diff)
23414 title=[[Main Page]]
23418 <a href="#section">#section</a>
23422 Edit comment with bare anchor link (non-local, as on history)
23425 title=[[Main Page]]
23429 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23433 Anchor starting with underscore
23439 <p><a href="#_ref">One</a>
23442 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23446 Id starting with underscore
23448 <div id="_ref"></div>
23450 <div id="_ref"></div>
23455 Edit comment with link with more than one pipe (T99346)
23459 [[Main Page|Many|pipes]]
23461 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23465 Complex edit comment with link with more than one pipe (T99346)
23469 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23471 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..."
23475 Space normalisation on autocomment (T24784)
23478 title=[[Main Page]]
23480 /* __hello__world__ */
23482 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23486 percent-encoding and + signs in comments (T28410)
23490 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23492 <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>
23495 # Parsoid doesn't support this yet: see T75581
23496 # but it *should* omit the 'src' attribute if the image is bad.
23497 # PHP side of tests was disabled in
23498 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23499 # because of issues in the PHP parserTests infrastructure
23500 # (but the output below is indeed what the PHP side emits)
23502 Bad images - basic functionality
23505 !! DISABLED/html/php
23507 <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>
23511 Bad images - T18039: text after bad image disappears
23516 !! DISABLED/html/php
23522 <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>
23527 Verify that displaytitle works (T24501) no displaytitle
23531 wgAllowDisplayTitle=true
23532 wgRestrictDisplayTitle=false
23534 this is not the the title
23537 <p>this is not the the title
23542 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23547 wgAllowDisplayTitle=true
23548 wgRestrictDisplayTitle=false
23550 this is not the the title
23551 {{DISPLAYTITLE:whatever}}
23554 <p>this is not the the title
23559 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23564 wgAllowDisplayTitle=true
23565 wgRestrictDisplayTitle=true
23567 this is not the the title
23568 {{DISPLAYTITLE:whatever}}
23571 <p>this is not the the title
23576 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23581 wgAllowDisplayTitle=true
23582 wgRestrictDisplayTitle=true
23584 this is not the the title
23585 {{DISPLAYTITLE:screen}}
23588 <p>this is not the the title
23593 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23598 wgAllowDisplayTitle=false
23600 this is not the the title
23601 {{DISPLAYTITLE:screen}}
23604 <p>this is not the the title
23605 <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>
23610 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23615 wgAllowDisplayTitle=false
23617 this is not the the title
23620 <p>this is not the the title
23625 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23630 wgAllowDisplayTitle=true
23631 wgRestrictDisplayTitle=true
23633 this is not the the title
23634 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23636 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23637 <p>this is not the the title
23642 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23647 wgAllowDisplayTitle=true
23648 wgRestrictDisplayTitle=true
23650 this is not the the title
23651 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23653 <span style="color: red;">s</span>creen
23654 <p>this is not the the title
23659 Page status indicators: Empty name is invalid
23663 <indicator name=" "></indicator>
23664 <indicator></indicator>
23666 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23667 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23672 Page status indicators: Weird syntaxes that are okay
23676 <indicator name="empty" />
23677 <indicator name="name"></indicator>
23686 Page status indicators: Torture test
23690 <indicator name="01">hello world</indicator>
23691 <indicator name="02">[[Main Page]]</indicator>
23692 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23693 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23694 <indicator name="05">* foo
23696 <indicator name="06"><nowiki>foo</nowiki></indicator>
23697 <indicator name="07"> Preformatted</indicator>
23698 <indicator name="08"><div>Broken tag</indicator>
23699 <indicator name="09">{| class=wikitable
23702 <indicator name="10">Two
23704 paragraphs</indicator>
23707 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23708 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" />
23709 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>
23710 05=<ul><li> foo</li>
23714 07=<pre>Preformatted
23716 08=<div>Broken tag</div>
23718 09=<table class="wikitable">
23735 preload: check <noinclude> and <includeonly>
23739 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23745 preload: check <onlyinclude>
23749 Goodbye <onlyinclude>Hello world</onlyinclude>
23755 preload: can pass tags through if we want to
23759 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23761 <includeonly>Hello world</includeonly>
23765 preload: check that it doesn't try to do tricks
23769 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23771 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23775 Play a bit with r67090 and T5158
23777 <div style="width:50% !important"> </div>
23778 <div style="width:50% !important"> </div>
23779 <div style="width:50% !important"> </div>
23780 <div style="border : solid;"> </div>
23782 <div style="width:50% !important"> </div>
23783 <div style="width:50% !important"> </div>
23784 <div style="width:50% !important"> </div>
23785 <div style="border : solid;"> </div>
23788 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23789 <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>
23790 <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>
23791 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23796 HTML5 data attributes
23798 <span data-foo="bar">Baz</span>
23799 <p data-abc-def_hij="">Quuz</p>
23801 <p><span data-foo="bar">Baz</span>
23803 <p data-abc-def_hij="">Quuz</p>
23806 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23807 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23811 Strip reserved data attributes
23813 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23815 <div data-ok="fred">d</div>
23818 <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>
23822 percent-encoding and + signs in internal links (T28410)
23824 [[User:+%]] [[Page+title%]]
23825 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23826 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23827 [[%33%45]] [[%33%45+]]
23829 <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>
23830 <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>
23831 <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>
23832 <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>
23835 <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>
23836 <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>
23837 <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> <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline>
23838 <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>
23842 Special characters in embedded file links (T29679)
23844 [[File:Contains & ampersand.jpg]]
23845 [[File:Does not exist.jpg|Title with & ampersand]]
23847 <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>
23848 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23851 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline>
23852 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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></figure-inline></p>
23856 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23858 Text's been normalized?
23860 <p>Text's been normalized?
23865 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23867 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23869 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23874 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23876 [http://www.example.org/ ideograms]
23878 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23883 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
23885 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
23887 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
23911 T33098 Template which includes system messages which includes the template
23915 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23916 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23921 T33490 Turkish: ucfirst 'blah'
23932 T33490 Turkish: ucfirst 'ix'
23943 T33490 Turkish: lcfirst 'BLAH'
23954 T33490 Turkish: ucfırst (with a dotless i)
23960 <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>
23965 T33490 ucfırst (with a dotless i) with English language
23971 <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>
23975 # Note that Parsoid doesn't emit an explicit TOC.
23976 # Note also that the html2wt direction tends to emit an extra newline
23977 # between the __TOC__ magicword and the first heading unless *both*
23978 # the <meta> and the <h2> have a data-parsoid attribute set (even if
23982 T28375: TOC with italics
23984 title=[[Main Page]]
23987 == ''Lost'' episodes ==
23989 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
23991 <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>
23995 <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>
23998 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23999 <h2 id="Lost_episodes" data-parsoid='{}'> <i>Lost</i> episodes </h2>
24003 T28375: TOC with bold
24005 title=[[Main Page]]
24008 == '''should be bold''' then normal text ==
24010 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24012 <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>
24016 <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>
24019 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24020 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
24024 T35845: Headings become cursive in TOC when they contain an image
24026 title=[[Main Page]]
24029 == Image [[Image:foobar.jpg]] ==
24031 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24033 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24037 <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>
24040 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24041 <h2 id="Image" data-parsoid='{}'> Image <figure-inline 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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline> </h2>
24045 T35845 (2): Headings become bold in TOC when they contain a blockquote
24047 title=[[Main Page]]
24050 == <blockquote>Quote</blockquote> ==
24052 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24054 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24058 <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>
24061 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24063 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24067 <h2><span class="mw-headline" id="Quote"><blockquote><p>Quote</p></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>
24069 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24070 <h2 id="Quote" data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
24074 Unclosed tags in TOC
24076 wgFragmentMode=[ 'html5', 'legacy' ]
24078 title=[[Main Page]]
24082 <small>Hanc marginis exiguitas non caperet.</small>
24085 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24087 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_<_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
24091 <h2><span id="Proof:_2_.3C_3"></span><span class="mw-headline" id="Proof:_2_<_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>
24092 <p><small>Hanc marginis exiguitas non caperet.</small>
24096 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24097 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span> Proof: 2 < 3 </h2>
24098 <p><small>Hanc marginis exiguitas non caperet.</small>
24103 Multiple tags in TOC
24106 == <i>Foo</i> <b>Bar</b> ==
24108 == <i>Foo</i> <blockquote>Bar</blockquote> ==
24110 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24112 <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>
24113 <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>
24117 <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>
24118 <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>
24121 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24123 <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>
24124 <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>
24128 <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>
24129 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote><p>Bar</p></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>
24131 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24132 <h2 id="Foo_Bar" data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
24134 <h2 id="Foo_Bar_2" data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
24137 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24138 # html5 tag parsing.
24140 Tags with parameters in TOC
24145 == <sup class="in-h2">Hello</sup> ==
24147 == <sup class="a > b">Evilbye</sup> ==
24149 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24151 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24152 <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>
24156 <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>
24157 <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>
24160 <meta property="mw:PageProp/toc" />
24161 <h2 id="Hello"> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
24163 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
24167 span tags with directionality in TOC
24170 == <span dir="ltr">C++</span> ==
24172 == <span dir="rtl">זבנג!</span> ==
24174 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
24176 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
24178 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
24180 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24182 <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>
24183 <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>
24184 <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>
24185 <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>
24186 <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>
24190 <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>
24191 <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>
24192 <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>
24193 <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>
24194 <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>
24197 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24198 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span> <span dir="ltr">C++</span> </h2>
24199 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span> <span dir="rtl">זבנג!</span> </h2>
24200 <h2 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> </h2>
24201 <h2 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> </h2>
24202 <h2 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> </h2>
24206 T74884: bdi element in ToC
24209 == <bdi>test</bdi> ==
24211 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24213 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24217 <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>
24220 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24221 <h2 id="test" data-parsoid='{}'> <bdi>test</bdi> </h2>
24225 T35715: s/strike element in ToC
24228 == <s>test</s> test <strike>test</strike> ==
24230 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24232 <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>
24236 <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>
24239 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24240 <h2 id="test_test_test" data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
24244 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24249 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24251 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24255 <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>
24258 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24259 <h2 id="x" data-parsoid='{}'> x </h2>
24265 == {{int:headline_sample}} ==
24269 T34057: Title needed when expanding <h> nodes.
24271 title=[[Main Page]]
24275 <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>
24280 Strip marker in urlencode
24282 {{urlencode:x<nowiki/>y}}
24283 {{urlencode:x<nowiki/>y|wiki}}
24284 {{urlencode:x<nowiki/>y|path}}
24285 {{urlencode:x<pre id="one">two</pre>y}}
24313 Strip marker in formatNum
24315 {{formatnum:1<nowiki/>2}}
24316 {{formatnum:1<nowiki/>2|R}}
24324 Check noCommafy in formatNum
24328 {{formatnum:123456.78}}
24329 {{formatnum:123456.78|NOSEP}}
24337 Wrong option for formatNum (T58199)
24339 {{formatnum:1,234.56|Random}}
24340 {{formatnum:1,234.56|EVERYTHING}}
24341 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24350 Strip marker in grammar
24354 {{grammar:elative|foo<nowiki/>bar}}
24361 Strip marker in padleft
24363 {{padleft:|2|x<nowiki/>y}}
24370 Strip marker in padright
24372 {{padright:|2|x<nowiki/>y}}
24379 Strip marker in anchorencode
24381 {{anchorencode:x<nowiki/>y}}
24386 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:x<nowiki/>y","function":"anchorencode"},"params":{},"i":0}}]}'>xy</p>
24390 nowiki inside link inside heading (T20295)
24392 ==[[foo|x<nowiki>y</nowiki>z]]==
24394 <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>
24399 new support for bdi element (T33817)
24401 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24403 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24408 Ignore pipe between table row attributes
24412 |- id=foo | style='color: red'
24420 <tr id="foo" style="color: red">
24427 Language parser function
24436 Padleft and padright as substr
24438 {{padleft:|3|abcde}}
24439 {{padright:|3|abcde}}
24447 Special parser function
24449 {{#special:RandomPage}}
24450 {{#special:BaDtItLe}}
24451 {{#special:Foobar}}
24460 T36939 - Case insensitive link parsing ([HttP://])
24462 [HttP://MediaWiki.Org/]
24464 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24467 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
24471 T36939 - Case insensitive link parsing ([HttP:// title])
24473 [HttP://MediaWiki.Org/ MediaWiki]
24475 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24480 T36939 - Case insensitive link parsing (HttP://)
24482 HttP://MediaWiki.Org/
24484 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24487 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24505 <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>
24506 <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>
24507 <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>
24508 <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>
24509 <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>
24515 ### Parsoid-specific tests
24516 ### Parsoid-PHP parser incompatibilities
24519 1. SOL-sensitive wikitext tokens as template-args
24521 parsoid=wt2html,wt2wt
24527 <span about="#mwt1" typeof="mw:Transclusion">
24528 </span><ul about="#mwt1"><li>a</li>
24530 <span about="#mwt2" typeof="mw:Transclusion">
24531 </span><ol about="#mwt2"><li>a</li>
24533 <span about="#mwt3" typeof="mw:Transclusion">
24534 </span><dl about="#mwt3"><dd>a</dd>
24538 #### -----------------------------------------------------------------
24539 #### Parsoid-specific functionality tests
24540 #### -----------------------------------------------------------------
24542 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24543 # We know wt2wt will fail, but we expect selser to pass.
24544 # Due to the nature of our testing, wt2wt and selser tests will enter the
24545 # blacklist and we'll catch selser regressions based on changes to the
24546 # blacklist entries for selser tests.
24548 1. Bad treebuilder fixup of formatting elt is cleaned up
24550 parsoid=wt2html,wt2wt
24555 [[Image:Foobar.jpg|right|Test]]
24562 <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>
24569 2. Bad treebuilder fixup of formatting elt is cleaned up
24571 parsoid=wt2html,wt2wt
24573 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24575 <small>[[Image:Foobar.jpg|right|300px]]</small>
24579 <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>
24581 <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>
24585 3. Bad treebuilder fixup of formatting elt is cleaned up
24587 parsoid=wt2html,wt2wt
24589 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24591 <p><small><b>foo</b></small></p>
24592 <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>
24593 <p><small><b>bar</b></small></p>
24597 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24599 parsoid=wt2html,wt2wt
24601 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24603 <b><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></b>
24606 #### ----------------------------------------------------------------
24607 #### Parsoid-only testing of Parsoid's impl of LST
24608 #### Not implemented yet, see
24609 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24610 #### ----------------------------------------------------------------
24612 ## We still need to support serializing the older format while content is stored.
24614 LST Sections: Backwards compatibility
24617 "suppressErrors": true,
24618 "modes": ["html2wt"]
24621 <section begin="2011-05-16" />
24622 <section end="2014-04-10 (MW 1.23wmf22)" />
24624 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24625 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24629 LST Sections: Newfangled approach
24631 <section begin="2011-05-16" />
24632 <section end="2014-04-10 (MW 1.23wmf22)" />
24634 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24636 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24640 #--------- Test stripping of empty nodes in template content ----------
24643 Empty LI and TR nodes should be stripped from template content
24648 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24652 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24665 Empty LI and TR nodes should not be stripped from top-level content
24678 <li class='mw-empty-elt'></li>
24683 <tr class='mw-empty-elt'></tr>
24692 Empty TR nodes should not be stripped if they have any attributes set
24694 {{EmptyTRWithHTMLAttrTest}}
24696 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24697 <tr align='center'></tr>
24698 <tr><td>foo</td></tr>
24699 <tr align='center'></tr>
24700 <tr><td>bar</td></tr>
24704 #### ----------------------------------------------------------------
24705 #### The following section of tests are primarily to test
24706 #### wikitext escaping capabilities of Parsoid. Given that
24707 #### escaping can be done any number of ways, the wikitext (input)
24708 #### is always adjusted to reflect how Parsoid adds nowiki
24711 #### We are marking several tests as parsoid-only since the
24712 #### HTML in the result section is different from what the
24713 #### PHP parser generates for it.
24714 #### ----------------------------------------------------------------
24717 #### --------------- Headings ---------------
24719 #### 1. Nested inside html <h1>=foo=</h1>
24720 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24721 #### 3. Nested inside html with wikitext split by html tags
24722 #### 4. No escape needed
24723 #### 5. Empty headings <h1></h1>
24724 #### 6. Heading chars in SOL context
24725 #### ----------------------------------------
24727 Headings: 0. Unnested
24737 <p>=foo<i>a</i>=</p>
24739 <nowiki>=foo=</nowiki>
24741 <nowiki> </nowiki>=foo=
24743 <nowiki>=foo=</nowiki>
24745 =foo''a''<nowiki>=</nowiki>
24748 # New headings and existing headings are handled differently
24750 Headings: 1. Nested inside html
24758 <h1 data-parsoid=''>=foo=</h1>
24759 <h2 data-parsoid=''>=foo=</h2>
24760 <h3 data-parsoid=''>=foo=</h3>
24761 <h4 data-parsoid=''>=foo=</h4>
24762 <h5 data-parsoid=''>=foo=</h5>
24763 <h6 data-parsoid=''>=foo=</h6>
24771 =<nowiki>=foo=</nowiki>=
24772 ==<nowiki>=foo=</nowiki>==
24773 ===<nowiki>=foo=</nowiki>===
24774 ====<nowiki>=foo=</nowiki>====
24775 =====<nowiki>=foo=</nowiki>=====
24776 ======<nowiki>=foo=</nowiki>======
24781 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24790 <nowiki>*</nowiki>bar
24796 <nowiki>=bar=</nowiki>
24800 Headings: 3. Nested inside html with wikitext split by html tags
24804 <h1>=<b>bold</b>foo=</h1>
24806 = ='''bold'''foo= =
24810 Headings: 4a. No escaping needed (testing just h1 and h2)
24821 <h1><i>=</i>foo=</h1>
24841 Headings: 4b. No escaping needed (inside p-tags)
24858 Headings: 4c. Short headings (1)
24865 <nowiki>===</nowiki>
24871 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
24873 Headings: 4d. Short headings (2)
24875 parsoid=wt2html,html2html
24886 <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>
24887 <h1><span class="mw-headline" id=".3D.3D">==</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>
24888 <h2><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=3" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
24893 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
24894 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
24895 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
24899 Headings: 5. Empty headings
24903 <h1 data-parsoid='{}'></h1>
24905 <h2 data-parsoid='{}'></h2>
24907 <h3 data-parsoid='{}'></h3>
24909 <h4 data-parsoid='{}'></h4>
24911 <h5 data-parsoid='{}'></h5>
24913 <h6 data-parsoid='{}'></h6>
24923 =====<nowiki/>=====
24925 ======<nowiki/>======
24929 Headings: 6a. Heading chars in SOL context (with trailing spaces)
24939 <nowiki>=a=</nowiki>
24941 <nowiki>=a=</nowiki>
24943 <nowiki>=a=</nowiki>
24947 Headings: 6b. Heading chars in SOL context (with trailing newlines)
24960 <nowiki>=a=</nowiki>
24963 <nowiki>=a=</nowiki>
24966 <nowiki>=a=</nowiki>
24971 Headings: 6c. Heading chars in SOL context (leading newline break)
24979 <nowiki>=b=</nowiki>
24983 Headings: 6d. Heading chars in SOL context (with interspersed comments)
24987 <!--c0--><p>=a=</p>
24989 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
24991 <!--c0--><nowiki>=a=</nowiki>
24993 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
24997 Headings: 6d. Heading chars in SOL context (No escaping needed)
25007 Headings: 7. Insert a newline between new content and headings
25013 <h2 data-parsoid='{}'>A</h2>
25014 <p data-parsoid='{}'>a</p>
25024 #### --------------- Lists ---------------
25025 #### 0. Outside nests (*foo, etc.)
25026 #### 1. Nested inside html <ul><li>*foo</li></ul>
25027 #### 2. Inside definition lists
25028 #### 3. Only bullets at start should be escaped
25029 #### 4. No escapes needed
25030 #### 5. No unnecessary escapes
25031 #### 6. Escape bullets in SOL position
25032 #### 7. Escape bullets in a multi-line context
25033 #### ----------------------------------------
25036 Lists: 0. Outside nests
25046 <nowiki>*</nowiki>foo
25048 <nowiki>#</nowiki>foo
25050 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25053 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25054 ## to test wikitext escaping, and insignificant whitespace diffs
25055 ## cause PHP parser tests to barf
25057 Lists: 1. Nested inside html (No unnecessary escapes)
25066 <li data-parsoid='{}'>*foo</li>
25067 <li data-parsoid='{}'>#foo</li>
25068 <li data-parsoid='{}'>:foo</li>
25069 <li data-parsoid='{}'>;foo</li>
25077 <li data-parsoid='{}'>*foo</li>
25078 <li data-parsoid='{}'>#foo</li>
25079 <li data-parsoid='{}'>:foo</li>
25080 <li data-parsoid='{}'>;foo</li>
25087 *<nowiki>*foo</nowiki>
25088 *<nowiki>#foo</nowiki>
25089 *<nowiki>:foo</nowiki>
25090 *<nowiki>;foo</nowiki>
25096 #<nowiki>*foo</nowiki>
25097 #<nowiki>#foo</nowiki>
25098 #<nowiki>:foo</nowiki>
25099 #<nowiki>;foo</nowiki>
25103 Lists: 2. Inside definition lists
25107 <dl><dt>;foo</dt></dl>
25108 <dl><dt>:foo</dt></dl>
25111 <dl><dd>:foo</dd></dl>
25115 ; <nowiki>:foo</nowiki>
25117 ; <nowiki>:foo</nowiki>
25124 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25130 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25134 *<nowiki>*foo</nowiki>''it''*bar
25138 Lists: 4. No escapes needed
25151 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25155 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25169 Lists: 5. No unnecessary escapes
25173 <ul><li> bar <span>[[foo]]</span></li></ul>
25174 <ul><li> =bar <span>[[foo]]</span></li></ul>
25175 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25176 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25177 <ul><li> =bar <span>foo]]</span>=</li></ul>
25178 <ul><li> <s></s>: a</li></ul>
25179 <ul><li> <i>* foo</i></li></ul>
25182 * bar <span><nowiki>[[foo]]</nowiki></span>
25184 * =bar <span><nowiki>[[foo]]</nowiki></span>
25186 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25188 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25190 * =bar <span>foo]]</span>=
25198 Lists: 6. Escape bullets in SOL position
25202 <p><!--cmt-->*foo</p>
25204 <!--cmt--><nowiki>*</nowiki>foo
25208 Lists: 7. Escape bullets in a multi-line context
25217 <nowiki>*</nowiki>b
25221 Lists: 8. Escape colons only if not present in tags
25225 <dl><dt>a:b<i>c:d</i></dt></dl>
25227 ; <nowiki>a:b</nowiki>''c:d''
25230 #### --------------- HRs ---------------
25231 #### 1. Single line
25232 #### -----------------------------------
25235 HRs: 1. Single line
25243 ----<nowiki>----</nowiki>
25248 #### --------------- Tables ---------------
25249 #### 1a. Simple example
25250 #### 1b. No escaping needed (!foo)
25251 #### 1c. No escaping needed (|foo)
25252 #### 1d. No escaping needed (|}foo)
25254 #### 2a. Nested in td (<td>foo|bar</td>)
25255 #### 2b. Nested in td (<td>foo||bar</td>)
25256 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25258 #### 3a. Nested in th (<th>foo!bar</th>)
25259 #### 3b. Nested in th (<th>foo!!bar</th>)
25260 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25264 #### 4c. No escaping needed
25265 #### --------------------------------------
25268 Tables: 1a. Simple example
25276 <nowiki>{|</nowiki>
25281 Tables: 1b. No escaping needed
25292 Tables: 1c. No escaping needed
25303 Tables: 1d. No escaping needed
25314 Tables: 2a. Nested in td
25319 <td>foo|bar</td></tr>
25320 <tr><td>x<div>a|b</div></td>
25324 |<nowiki>foo|bar</nowiki>
25326 |x<div><nowiki>a|b</nowiki></div>
25334 <td>x<div>a|b</div>
25335 </td></tr></tbody></table>
25339 Tables: 2b. Nested in td
25345 <td>a<i>b||c</i></td>
25346 <td>a<i><div>b||c</div></i></td>
25347 </tr></tbody></table>
25350 |<nowiki>foo||bar</nowiki>
25351 |a''<nowiki>b||c</nowiki>''
25352 |a''<div><nowiki>b||c</nowiki></div>''
25361 <td>a<i><div>b||c</div></i>
25367 Tables: 2c. Nested in td -- no escaping needed
25383 Tables: 3a. Nested in th
25399 Tables: 3b. Nested in th
25404 <tr><th>foo!!bar</th>
25405 <th><i>foo|bar</i></th>
25406 <th><i>foo!!bar</i></th>
25407 <th><i><span>foo!!bar</span></i></th>
25408 </tr></tbody></table>
25411 !<nowiki>foo!!bar</nowiki>
25412 !''<nowiki>foo|bar</nowiki>''
25413 !''<nowiki>foo!!bar</nowiki>''
25414 !''<span><nowiki>foo!!bar</nowiki></span>''
25423 <th><i>foo!!bar</i>
25425 <th><i><span>foo!!bar</span></i>
25431 Tables: 3c. Nested in th
25436 <tr><th>foo||bar</th>
25437 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25438 </tr></tbody></table>
25441 !<nowiki>foo||bar</nowiki>
25442 !<nowiki>foo||bar</nowiki>
25455 Tables: 4a. Escape -
25471 |<nowiki>-bar</nowiki>
25476 Tables: 4b. Escape +
25492 |<nowiki>+bar</nowiki>
25497 Tables: 4c. No escaping needed
25502 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25503 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25509 <div>a|b</div></td>
25554 Tables: 4d. No escaping needed
25559 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25560 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25561 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25572 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25582 T97430: Don't emit empty nowiki pairs around marker meta tags
25586 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25587 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25589 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25590 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25594 Unclosed xmlish element in table line shouldn't eat end delimiters
25599 <tbody><tr><td> <foo</td>
25600 <td> bar></td></tr>
25617 #### --------------- Links ----------------
25618 #### 1. Quote marks in link text
25619 #### 2. Wikilinks: Escapes needed
25620 #### 3. Wikilinks: No escapes needed
25621 #### 4. Extlinks: Escapes needed
25622 #### 5. Extlinks: No escapes needed
25623 #### --------------------------------------
25625 Links 1. WikiLinks: No escapes needed
25629 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25630 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25631 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25635 [[Foo|x [Foobar] x]]
25637 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25638 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25639 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25644 Links 2. WikiLinks: Escapes needed
25648 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25649 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25650 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25651 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25652 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25653 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25654 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25655 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25656 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25657 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25659 [[Foo|<nowiki>Foobar]</nowiki>]]
25660 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25661 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25662 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25663 [[Foo|<nowiki>|Bar</nowiki>]]
25664 [[Foo|<nowiki>]]bar</nowiki>]]
25665 [[Foo|<nowiki>[[bar</nowiki>]]
25666 [[Foo|<nowiki>x [[ y</nowiki>]]
25667 [[Foo|<nowiki>x ]] y</nowiki>]]
25668 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25670 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25671 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25672 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25673 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25674 <a href="/wiki/Foo" title="Foo">|Bar</a>
25675 <a href="/wiki/Foo" title="Foo">]]bar</a>
25676 <a href="/wiki/Foo" title="Foo">[[bar</a>
25677 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25678 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25679 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25684 Links 3. WikiLinks: No escapes needed
25688 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25689 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25694 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25695 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25700 Links 4. ExtLinks: Escapes needed
25704 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25705 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25706 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25707 <p>[http://google.com]</p>
25708 <p>[http://google.com google]</p>
25709 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25710 <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>
25712 [http://google.com <nowiki>[google]</nowiki>]
25713 [http://google.com <nowiki>google]</nowiki>]
25714 [http://google.com <nowiki>goog] le</nowiki>]
25716 <nowiki>[http://google.com]</nowiki>
25718 <nowiki>[http://google.com google]</nowiki>
25720 [http://google.com<nowiki>]</nowiki>
25722 [{{echo|http://google.com}}<nowiki>]</nowiki>
25724 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25725 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25726 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25727 </p><p>[http://google.com]
25728 </p><p>[http://google.com google]
25729 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25730 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25735 Links 5. ExtLinks: No escapes needed
25739 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25740 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25742 [http://google.com [google]
25744 [[http://google.com]]
25746 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25747 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25752 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25756 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25757 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25758 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25759 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25760 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25761 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25762 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25763 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25764 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25765 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25766 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25767 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25768 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25771 x<nowiki/>http://example.com<nowiki/>y
25772 http://example.com<nowiki/>?x
25773 http://example.com<nowiki/>&x
25774 http://example.com<nowiki/>'x
25775 http://example.com<nowiki/>,x
25776 http://example.com<nowiki/>.x
25777 http://example.com<nowiki/>;x
25778 http://example.com<nowiki/>:x
25779 http://example.com<nowiki/>;x
25780 http://example.com<nowiki/>!x
25781 http://example.com<nowiki/>=x
25782 http://example.com<nowiki/>(x)
25783 http://example.com(x<nowiki/>)
25787 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25792 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25794 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25795 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25796 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25797 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25798 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25804 "http://example.com"
25805 (http://example.com)
25806 (http://example.com) foo
25807 http://example.com,
25808 http://example.com, foo
25811 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25813 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25814 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25815 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25816 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25817 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25822 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25826 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
25827 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
25829 http://example.com.,;:!?\
25830 -http://example.com:
25832 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
25833 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
25838 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
25842 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
25843 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
25844 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
25848 X<nowiki/>RFC 123<nowiki/>y
25852 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
25856 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
25857 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
25858 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
25865 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
25866 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
25867 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
25872 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
25876 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
25877 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25878 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25882 X<nowiki/>PMID 123<nowiki/>y
25886 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
25890 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
25891 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
25892 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
25899 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
25900 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
25901 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
25906 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
25910 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
25911 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
25912 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
25915 ISBN 1234567890<nowiki/>1
25916 ISBN 1234567890<nowiki/>x
25917 a<nowiki/>ISBN 1234567890<nowiki/>b
25921 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
25925 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
25929 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
25934 Links 14. Protect link-like plain text. (Parsoid bug T78425)
25938 <p>this is not a link: http://example.com
25941 this is not a link: <nowiki>http://example.com</nowiki>
25945 Links 15. Link trails can't become link prefixes.
25950 <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>
25952 [[Söfnuður]]-[[00]]
25954 <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>
25958 #### --------------- Quotes ---------------
25959 #### 1. Quotes inside <b> and <i>
25960 #### 2. Link fragments separated by <i> and <b> tags
25961 #### 3. Link fragments inside <i> and <b>
25962 #### 4. No escaping needed
25963 #### --------------------------------------
25965 1a. Quotes inside <b> and <i>
25976 <b>foo'<i>bar'</i>baz</b>
25985 <i>fools'<span> errand</span></i>
25986 <i><span>fool</span>'s errand</i>
25987 '<i>foo</i> bar '<i>baz</i>
25988 a|!*#-:;+-~[]{}b'<i>x</i>
25992 ''<nowiki>''foo''</nowiki>''
25993 ''<nowiki>'''foo'''</nowiki>''
25995 '''<nowiki/>'foo''''
25996 '''<nowiki>''foo''</nowiki>'''
25997 '''<nowiki>'''foo'''</nowiki>'''
25998 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
25999 '''foo'''<nowiki/>'s
26005 '''foo'''<nowiki/>'
26006 ''''foo'''<nowiki/>'
26007 ''fools'<span> errand</span>''
26008 ''<span>fool</span>'s errand''
26009 '<nowiki/>''foo'' bar '''baz''
26010 a|!*#-:;+-~[]{}b'''x''
26014 1b. Quotes inside <b> and <i> with other tags on same line
26018 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26019 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26020 <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>
26021 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26022 '<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>
26023 '<i>foo</i> <div title="name">test</div>
26024 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26025 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26026 <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>
26029 '''a'' foo ''[[bar]]''
26030 ''a''' foo ''[[bar]]''
26031 ''a''' foo '''{{echo|[[bar]]}}'''
26032 [[foo]] x'''[[bar]]''
26033 '''foo'' <ref>test</ref>
26034 '''foo'' <div title="name">test</div>
26035 '''foo'' and <br> bar
26040 2. Link fragments separated by <i> and <b> tags
26044 <p>[[<i>foo</i>hello]]</p>
26045 <p>[[<b>foo</b>hello]]</p>
26047 [[''foo''<nowiki>hello]]</nowiki>
26049 [['''foo'''<nowiki>hello]]</nowiki>
26052 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26053 # this is one of the shortcomings of this format
26055 3. Link fragments inside <i> and <b>
26059 <p><i>[[foo</i>]]</p>
26060 <p><b>[[foo</b>]]</p>
26062 ''[[foo''<nowiki>]]</nowiki>
26064 '''[[foo'''<nowiki>]]</nowiki>
26068 4. No escaping needed
26072 <p>'<span><i>bar</i></span>'
26073 '<span><b>bar</b></span>'
26077 '<span>''bar''</span>'
26078 '<span>'''bar'''</span>'
26082 #### ----------- Paragraphs ---------------
26083 #### 1. No unnecessary escapes
26084 #### --------------------------------------
26087 1. No unnecessary escapes
26091 <p>bar <span>[[foo]]</span>
26092 </p><p>=bar <span>[[foo]]</span>
26093 </p><p>[[bar <span>[[foo]]</span>
26094 </p><p>]]bar <span>[[foo]]</span>
26095 </p><p>=bar <span>foo]]</span>=
26098 bar <span><nowiki>[[foo]]</nowiki></span>
26100 =bar <span><nowiki>[[foo]]</nowiki></span>
26102 [[bar <span><nowiki>[[foo]]</nowiki></span>
26104 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26106 =bar <span>foo]]</span><nowiki>=</nowiki>
26109 #### ----------------------- PRE --------------------------
26110 #### 1. Leading whitespace in SOL context should be escaped
26111 #### ------------------------------------------------------
26113 1. Leading whitespace in SOL context should be escaped
26136 <nowiki> </nowiki>a
26138 <nowiki> </nowiki> a
26142 <nowiki> </nowiki> a
26144 <nowiki> </nowiki>a
26147 <nowiki> </nowiki>b
26170 2. Leading whitespace in non-indent-pre contexts should not be escaped
26174 <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>
26175 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26176 <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>
26186 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26205 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26209 <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>
26211 [[File:Foobar.jpg|thumb|caption]]
26215 5. Nowiki escaping should account for indent-pres
26225 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26238 #### --------------- Behavior Switches --------------------
26241 1. Valid behavior switches should be escaped
26248 <nowiki>__TOC__</nowiki>
26249 ''<nowiki>__TOC__</nowiki>''
26253 2. Invalid behavior switches should not be escaped
26264 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26266 Behavior switches should be SOL-transparent
26270 <meta property="mw:PageProp/toc" />
26272 <!-- this one's bogus -->
26275 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26277 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26281 <!-- this one's bogus -->
26290 #### --------------- HTML tags ---------------
26293 #### 3. multi-line html tag
26294 #### 4. extension tags
26295 #### -----------------------------------------
26301 <a href="http://google.com">google</a>
26303 <a href="http://google.com">google</a>
26311 <ul><li> <div>foo</div></li>
26312 <li> <div style="color:red">foo</div></li>
26313 <li> <td></li></ul>
26316 * <nowiki><div>foo</div></nowiki>
26317 * <nowiki><div style="color:red">foo</div></nowiki>
26318 * <nowiki><td></nowiki>
26322 3. multi-line html tag
26341 <p><ref>foo</ref>
26342 </p><p><ref>bar
26343 </p><p>baz</ref>
26346 <nowiki><ref>foo</ref></nowiki>
26348 <nowiki><ref>bar</nowiki>
26350 baz<nowiki></ref></nowiki>
26353 #### --------------- Others ---------------
26359 <p><nowiki>foo</nowiki>
26362 <nowiki>foo</nowiki>
26365 ## The quote-char in the input is necessary for triggering the bug
26367 (T54035) Nowiki-escaping should not get tripped by " :" in text
26376 #----------- End of wikitext escaping tests --------------
26380 Tag-like HTML structures are passed through as text
26402 </p><p>1<d e>f
26407 HTML tag with necessary entities in attributes
26409 <span title="&amp;">foo</span>
26411 <p><span title="&amp;">foo</span>
26416 HTML tag with 'unnecessary' entity encoding in attributes
26418 <span title="&">foo</span>
26420 <p><span title="&">foo</span>
26425 HTML tag with broken attribute value quoting
26427 parsoid=wt2html,html2html
26429 <span title="Hello world>Foo</span>
26431 <p><span title="Hello world">Foo</span>
26434 <p><span title="Hello world">Foo</span></p>
26438 Self-closed tag with broken attribute value quoting
26440 parsoid=wt2html,html2html
26442 <div title="Hello world />Foo
26444 <div title="Hello world"></div><p>Foo
26447 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26451 Table with broken attribute value quoting
26453 parsoid=wt2html,html2html
26456 | title="Hello world|Foo
26461 <td title="Hello world">Foo
26467 <td title="Hello world">Foo
26473 Table with broken attribute value quoting on consecutive lines
26475 parsoid=wt2html,html2html
26478 | title="Hello world|Foo
26479 | style="color:red|Bar
26484 <td title="Hello world">Foo
26486 <td style="color:red">Bar
26492 <td title="Hello world">Foo
26493 </td><td style="color: red">Bar
26494 </td></tr></tbody></table>
26499 Accept empty td cell attribute
26502 | align="center" | foo || |
26507 <td align="center"> foo </td>
26514 Non-empty attributes in th-cells
26517 ! Foo !! style="color: red" | Bar
26523 <th style="color: red"> Bar
26529 Accept empty attributes in th-cells
26544 Empty table rows go away
26565 ### Parsoid-centric tests for testing RTing of inter-element separators
26566 ### Edge cases not tested by existing parser tests and specific to
26567 ### Parsoid-specific serialization strategies.
26571 RT-ed inter-element separators should be valid separators
26583 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26587 # Parsoid-only test of a DOM pass
26589 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26601 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26602 <p>bar</p></small></td></tr>
26606 <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>
26610 # Note that the "style" attribute is really a template parameter here.
26611 # The = would have to be {{=}} if you wanted the literal.
26613 Empty TD followed by TD with tpl-generated attribute
26618 |{{echo|style='color:red'}}|foo
26632 Indented table with an empty td
26650 ## We have some newline diffs RT-ing this edge case
26651 ## and it is not important enough -- we seem to be emitting
26652 ## at most 2 newlines after a </tr> and this is unrelated to
26653 ## the issue from T85627 that this is testing.
26655 Indented table with blank lines in between (T85627)
26674 Indented block & table
26688 <div data-parsoid='{"stx":"html"}'>foo</div>
26690 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26695 Indent and comment before table row
26710 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26711 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26715 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26717 Empty TR followed by a template-generated TR
26723 {{echo|<tr><td>foo</td></tr>}}
26728 <tr class='mw-empty-elt'></tr>
26729 <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}}]}'>
26734 ## PHP and parsoid output differ for this, and since this is primarily
26735 ## for testing Parsoid's serializer, marking this Parsoid only
26737 Empty TR followed by mixed-ws-comment line should RT correctly
26750 <tr class='mw-empty-elt'></tr>
26753 <!--c--> </tr><!--d-->
26759 Multi-line image caption generated by templates with/without trailing newlines
26761 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26762 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26764 <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>
26765 <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>
26769 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26773 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26775 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26777 <includeonly>foo</includeonly>
26785 ## PHP emits broken html for this, and since this is primarily
26786 ## a Parsoid serializer test, marking this Parsoid only
26788 Improperly nested inline or quotes tags with whitespace in between
26790 <span> <s>x</span> </s>
26793 <p><span> <s>x</s></span><s> </s>
26794 <b> <i>x</i></b><i> </i>
26799 Encapsulate protected attributes from wt
26801 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26803 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26807 <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>
26809 <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">
26810 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26814 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26815 ## Having nested or stray pre tags results in the attempt to add duplicates,
26816 ## causing an assertion fail. This test tries to prevent that situation.
26818 Ensure ParagraphWrapper can deal with stray closing pre tags
26828 1. Ensure fostered text content is wrapped in element nodes
26832 <table>hi</table><table>ho</table>
26841 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
26843 parsoid=wt2html,wt2wt
26852 <tbody><tr><td> a</td></tr>
26857 Encapsulation properly handles null DSR information from foster box
26859 parsoid=wt2html,wt2wt
26861 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
26863 <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>
26867 1. Encapsulate foster-parented transclusion content
26869 parsoid=wt2wt,wt2html
26871 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
26873 <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>
26883 2. Encapsulate foster-parented transclusion content
26885 parsoid=wt2wt,wt2html
26887 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
26889 <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>
26900 3. Encapsulate foster-parented transclusion content
26902 parsoid=wt2wt,wt2html
26904 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26906 <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>"]}">
26919 4. Encapsulate foster-parented transclusion content
26921 parsoid=wt2wt,wt2html
26923 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26925 <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>"]}">
26938 5. Encapsulate foster-parented transclusion content
26940 parsoid=wt2wt,wt2html
26942 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
26944 <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>
26959 6. Encapsulate foster-parented transclusion content
26961 parsoid=wt2wt,wt2html
26963 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
26965 <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>
26981 7. Encapsulate foster-parented transclusion content
26983 parsoid=wt2wt,wt2html
26985 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
26987 <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>
26997 # Note that the wt is broken on purpose: the = should be {{=}} if you
26998 # don't want it to be a template parameter key.
27000 8. Encapsulate foster-parented transclusion content
27002 parsoid=wt2wt,wt2html
27005 }}{|{{echo|style='color:red'}}
27010 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27012 <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>
27023 9. Encapsulate foster-parented transclusion content
27025 parsoid=wt2wt,wt2html
27027 <table>{{echo|hi</table>hello}}
27029 <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>
27033 Table in fosterable position
27044 <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">
27046 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27052 # Parsoid only for T66747
27054 Properly encapsulate empty-content transclusions in fosterable positions
27062 <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"}]]}'>
27068 Always encapsulate foster box when template range is expanded to table
27081 T115289: Unclosed table
27083 {{echo|<table>}}<!--c-->[[Category:Two]]
27085 <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>
27089 T115289: Don't migrate newlines out of tables with fostered content
27091 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27093 <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>
27097 T73074: More fostering fun
27099 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27101 <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>
27105 Support <object> element with .data attribute
27109 <object data="test.swf"></object>
27111 <object data="test.swf"></object>
27115 Don't block XML namespace declaration
27117 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27119 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27122 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27125 # -----------------------------------------------------------------
27126 # The following section of tests are primarily to spec requirements
27127 # around Parsoid's serialization (old, new, edited content)
27129 # All these tests are marked Parsoid html2wt and html2html only
27130 # ----------------------------------------------------------------
27133 Ignore rel attribute in a-tags during serialization to url-links
27137 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27138 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27139 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27141 http://en.wikipedia.org/wiki/Foobar
27142 http://en.wikipedia.org/wiki/Foobar
27143 http://en.wikipedia.org/wiki/Foobar
27146 # 'mi' is a localinterwiki prefix as well as a language
27148 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27152 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27158 Parsoid should accept interwiki shortcuts
27162 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27163 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27164 <a href='./fr:Foo'>Foo</a></p>
27165 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27166 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27167 <a href='fr%3AFoo'>Foo</a></p>
27168 <p><a href='FR%3AFoo'>Foo</a>
27169 <a href='./FR:Foo'>Foo</a></p>
27184 Parsoid should not accept invalid interwiki shortcuts
27188 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27189 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27190 <a href='news:Foo'>Foo</a></p>
27199 New wikilinks should be serialized properly
27203 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27204 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27205 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27206 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27207 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27211 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27212 http://en.wikipedia.org/wiki/Foo
27213 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27217 New wiki links (href variations)
27221 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27222 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27223 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27224 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27229 [[Toxine bactérienne]]
27233 New wiki links (content string variations)
27237 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27238 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27239 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27243 [[Foo_bar|./Foo_bar]]
27247 New category links (href variations)
27251 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27252 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27253 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27255 [[Category:Toxine bactérienne]]
27256 [[Category:Toxine bactérienne]]
27257 [[Category:Toxine bactérienne]]
27261 New sol transparent links don't need indent-pre nowiki protection
27266 <link rel="mw:PageProp/redirect" href="./Main_Page">
27267 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27268 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27270 #WEITERLEITUNG [[Main Page]]
27271 <!-- this is good --> [[Category:Good]]
27272 <!-- this is great --> [[Kategorie:Great]]
27276 New interlanguage links (href variations)
27280 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27281 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27282 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27284 [[es:Toxine bactérienne]]
27285 [[es:Toxine_bactérienne]]
27286 [[es:Toxine_bactérienne]]
27290 Image: Modifying size of an image (1)
27293 "modes": ["wt2wt"],
27295 ["img[height]", "attr", "height", "22"],
27296 ["img[width]", "attr", "width", "200"]
27300 [[Image:Foobar.jpg|230x230px]]
27302 [[Image:Foobar.jpg|200x200px]]
27306 Image: Modifying size of an image (2)
27309 "modes": ["wt2wt"],
27311 ["img[height]", "attr", "height", "100"],
27312 ["img[width]", "attr", "width", "500"]
27316 [[Image:Foobar.jpg|230x230px]]
27318 [[Image:Foobar.jpg|500x500px]]
27321 # Change in size is ignored so long as class='mw-default-size'
27323 Image: Modifying size of an image (3)
27326 "modes": ["wt2wt"],
27328 ["figure[class]", "removeClass", "mw-default-size"],
27329 ["figure img", "attr", "height", "19"],
27330 ["figure img", "attr", "width", "170"]
27334 [[Image:Foobar.jpg|thumb]]
27336 [[Image:Foobar.jpg|thumb|170x170px]]
27340 Image: Modifying alignment of an image (T50665)
27343 "modes": ["wt2wt"],
27345 ["figure[class]", "removeClass", "mw-halign-right"],
27346 ["figure[class]", "addClass", "mw-halign-left"]
27350 [[Image:Foobar.jpg|thumb|caption|right]]
27352 [[Image:Foobar.jpg|thumb|caption|left]]
27356 Image: Modifying mw-default-size of an frameless image (T64805)
27359 "modes": ["wt2wt"],
27361 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27365 [[Image:Foobar.jpg|frameless|right]]
27367 [[Image:Foobar.jpg|frameless|right|220x220px]]
27371 Image: Modifying valign of an image (T51221)
27374 "modes": ["wt2wt"],
27376 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27377 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27381 [[File:Foobar.jpg|20px|middle]]
27383 [[File:Foobar.jpg|20px|text-top]]
27387 Image: Modifying alt attribute of an image (T58400)
27390 "modes": ["wt2wt"],
27392 ["img[alt]", "attr", "alt", "some alternate edited text"]
27396 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27398 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27402 Image: Modifying caption of an image
27405 "modes": ["wt2wt"],
27407 ["figcaption", "text", "new caption"]
27411 [[Image:Foobar.jpg|thumb|original caption]]
27413 [[Image:Foobar.jpg|thumb|new caption]]
27417 Image: empty alt attribute (T50924)
27421 [[File:Foobar.jpg|thumb|alt=|bar]]
27423 <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>
27427 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27433 <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>
27435 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27439 Image: Block level image should have \n before and after
27442 [[File:Foobar.jpg|right|thumb|150x150px]]
27446 <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>
27451 Image: New block level image should have \n before and after (existing content)
27454 [[File:Foobar.jpg|right|thumb|150x150px]]
27458 <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>
27463 Image: upright option (parsoid)
27465 [[File:Foobar.jpg|thumb|upright|caption]]
27466 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27467 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27469 <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>
27470 <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>
27471 <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>
27475 Image: upright option is ignored on inline and frame images (parsoid)
27477 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27479 <p><figure-inline 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></figure-inline></p>
27483 Image: in template parameter with empty parameter
27485 {{echo|[[File:Foobar.jpg|link=]]}}
27487 <p><figure-inline class="mw-default-size" typeof="mw:Transclusion mw:Image" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[File:Foobar.jpg|link=]]"}},"i":0}}]}'><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></figure-inline></p>
27491 Image: from basic HTML (1)
27495 <span typeof="mw:Image">
27496 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27499 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27503 Image: from basic HTML (2)
27507 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27509 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27513 Image: from basic HTML (3)
27517 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27519 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27523 Image: from basic HTML (4)
27527 <img src="./File:Foobar.jpg">
27529 [[File:Foobar.jpg|link=]]
27533 Image: Invalid title as link
27535 [[File:Foobar.jpg|link=<]]
27537 <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>
27540 <p><figure-inline 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></figure-inline></p>
27544 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27549 <li><p>foo</p></li>
27556 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27560 <ul> <li>foo</li></ul>
27566 Don't strip leading whitespace when handling indent-pre suppressing tags
27571 <tr><td> indented row</td></tr>
27574 <b>This is very bold of you!</b>
27577 indented cell (no pre-wrapping!)
27587 '''This is very bold of you!'''
27591 indented cell (no pre-wrapping!)
27599 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27621 <nowiki> </nowiki></span>bar2
27624 <nowiki> </nowiki><span>bar</span>
27627 <nowiki> </nowiki><span>foo</span>
27632 Lists: Dont insert newlines in a serialized list item.
27636 <ul><li>a<br>b</li><li>c</li></ul>
27643 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27646 "modes": ["html2wt"],
27647 "scrubWikitext": false
27650 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27651 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27653 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27654 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27656 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27658 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27660 == hello there [[Category:A1]] ==
27662 == [[Category:A2]] hi pal ==
27664 == <!--foo--> [[Category:A3]] how goes it ==
27666 == it goes well [[Category:A4]] <!--bar--> ==
27668 ==howdy [[Category:A5]]==
27674 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27677 "modes": ["html2wt"],
27678 "scrubWikitext": true
27681 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27682 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27684 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27685 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27687 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27695 <!--foo--> [[Category:A3]]
27700 [[Category:A4]] <!--bar-->
27708 Headings: Don't hoist metas that come from templates
27711 "modes": ["html2wt"],
27712 "scrubWikitext": true
27715 <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>
27717 == {{echo|foo [[Category:Foo]]}} ==
27721 Headings: Category in ref isn't hoisted
27724 "modes": ["html2wt"],
27725 "scrubWikitext": true
27728 <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>
27730 <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>
27733 [[Category:Baz]] </ref> ==
27739 Parsoid: Serialize positional parameters with = in them as named parameter
27743 <p about="#mwt1" typeof="mw:Transclusion"
27744 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27746 <p about="#mwt1" typeof="mw:Transclusion"
27747 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27749 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27750 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27751 <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>
27755 {{echo|1=f=oo|2=bar}}
27757 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27758 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27759 {{echo|<nowiki>f=oo</nowiki>|bar}}
27763 Parsoid: Serialize positional parameters with = in extlink as named parameter
27767 <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>
27769 {{echo|1=http://stuff?is=ok}}
27773 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27777 <div>a<p>b</p></div>
27798 Substrings resembling wikitext in hrefs should not get nowiki escapes
27802 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27808 Enforce single-line context in the serializer
27815 <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">
27816 </span><span about="#mwt1">you</span> </h2>
27818 <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>
27820 <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
27821 there</span></li></ol>
27833 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
27840 </tbody></table></dd></dl>
27844 == hi {{bogus|there
27855 * foo '''bar''' baz
27867 Serialize new placeholder space without spans
27871 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
27873 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
27875 <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>
27881 <ref>foo : bar</ref>ok
27885 #-----------------------
27886 # Tag minimization tests
27887 #-----------------------
27890 1. I/B quote minimization: wikitext-only tags should be combined
27894 <p><i>A</i><i>B</i></p>
27895 <p><b>A</b><b>B</b></p>
27896 <p><i>A</i><b><i>B</i></b></p>
27897 <p><b>A</b><i><b>B</b></i></p>
27898 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
27899 <p><i><b>A</b></i><i><b>B</b></i></p>
27900 <p><i><b>A</b></i><b><i>B</i></b></p>
27901 <p><b><i>A</i></b><i><b>B</b></i></p>
27921 2. I/B quote minimization: wikitext and html tags should not be combined
27925 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
27926 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
27930 ''A''<nowiki/>'''<i>B</i>'''
27934 3. I/B quote minimization: templated content stops minimization
27938 <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>
27939 <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>
27941 ''A''{{echo|''B''}}
27943 ''A''{{echo|'''''B'''''}}
27947 4. I/B quote minimization: new content should be mimimized with adjacent old content
27951 <p><i>A</i><i>B</i></p>
27952 <p><b>A</b><b>B</b></p>
27953 <p><i>A</i><b><i>B</i></b></p>
27963 5a. Merge adjacent quote nodes if they've been edited
27966 "modes": ["wt2wt", "selser"],
27968 ["p", "contents", "remove", ":contains('b')"]
27978 5b. Merge adjacent quote nodes if they've been edited
27981 "modes": ["wt2wt", "selser"],
27987 ''a''<span id="x">b</span>''c''
27993 1. Merge adjacent link nodes as long as at least one element is new
27996 "modes": ["html2wt"],
27997 "scrubWikitext": true
28000 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28001 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28002 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28006 [[Football|Foot]][[Football|ball]]
28010 2. Merge adjacent link nodes and enable additional normalizations
28013 "modes": ["html2wt"],
28014 "scrubWikitext": true
28017 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28019 [[Football|''Football'']]
28023 3. Don't merge adjacent link nodes if scrubWikitext is false
28026 "modes": ["html2wt"],
28027 "scrubWikitext": false
28030 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28032 [[Football|Foot]][[Football|ball]]
28035 #------------------------------
28036 # End of tag minimization tests
28037 #------------------------------
28040 T56262: New entities
28044 <span typeof="mw:Entity"> </span>
28049 ## Note that there is no wikitext output for 'unknownproperty' ##
28050 ## Unknown magic words are silently dropped ##
28057 <meta property='mw:PageProp/toc' />
28058 <meta property='mw:PageProp/notoc' />
28059 <meta property='mw:PageProp/forcetoc' />
28060 <meta property='mw:PageProp/index' />
28061 <meta property='mw:PageProp/noindex' />
28062 <meta property='mw:PageProp/nogallery' />
28063 <meta property='mw:PageProp/noeditsection' />
28064 <meta property='mw:PageProp/notitleconvert' />
28065 <meta property='mw:PageProp/nocontentconvert' />
28066 <meta property='mw:PageProp/unknownproperty' />
28076 __NOCONTENTCONVERT__
28080 Consecutive <pre>s should not get merged
28082 parsoid=html2wt,html2html
28084 <pre>a</pre><pre>b</pre>
28112 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28116 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28118 [[Special:BookSources/1234567890|ISBN 1234567895]]
28122 Edited RFC links not serializable as RFC links should serialize as extlinks
28126 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28128 [https://tools.ietf.org/html/rfc123 New RFC]
28132 Edited PMID links not serializable as PMID links should serialize as extlinks
28136 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28138 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28142 WTS of autolinks with trailing/surrounding context
28146 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28147 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28148 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28149 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28150 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28151 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28153 http://cscott.net'''foo'''
28155 http://cscott.net<b>foo</b>
28157 '''http://cscott.net'''
28159 '''http://cscott.net '''
28161 '''http://cscott.net<nowiki/>x'''
28163 http://cscott.net<nowiki/>x
28167 WTS of autolinks with nowikis (round-trip)
28169 x<nowiki/>http://cscott.net<nowiki/>x
28171 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
28174 # this is the "easy" test because it leaves in place all the
28175 # data-parsoid information indicating this is an autolink
28177 WTS of autolinks with escapes (editing)
28180 "modes": ["wt2wt"],
28182 [ "span", "remove" ]
28186 x<nowiki/>http://cscott.net<nowiki/>x
28188 x<nowiki/>http://cscott.net<nowiki/>x
28192 WTS of edited autolink-like text (T103364)
28195 "modes": ["wt2wt"],
28197 [ "span[typeof]", "removeAttr", "typeof" ]
28201 Not a link: <nowiki>http://example.com</nowiki>.
28203 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28207 WTS of newly-authored autolink-like text (T103364)
28211 <p>http://example.com is not a link.</p>
28213 <nowiki>http://example.com</nowiki> is not a link.
28217 WTS of autolink-like text after an autolink (T108563)
28221 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28223 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28227 Magic links inside links (not autolinked)
28229 [[Foo|http://example.com]]
28232 [[Foo|ISBN 123456789x]]
28234 [http://foo.com http://example.com]
28235 [http://foo.com RFC 1234]
28236 [http://foo.com PMID 1234]
28237 [http://foo.com ISBN 123456789x]
28239 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28240 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28241 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28242 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28243 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28244 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28245 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28246 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28249 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28250 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28251 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28252 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28254 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
28255 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
28256 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
28257 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
28261 Magic links inside image captions (autolinked)
28263 [[File:Foobar.jpg|thumb|http://example.com]]
28264 [[File:Foobar.jpg|thumb|RFC 1234]]
28265 [[File:Foobar.jpg|thumb|PMID 1234]]
28266 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28268 <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 rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
28269 <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 class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
28270 <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 class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
28271 <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/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
28273 <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>
28274 <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="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
28275 <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>
28276 <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>
28280 WTS of magic word text (T109371)
28285 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28286 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28288 <nowiki>RFC 1234</nowiki>
28290 [http://foo.com RFC 1234]
28296 Edited Redirect link should emit a non-piped wikitext link
28300 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28306 T75121: Infer extension name from typeOf if data-mw is not present
28308 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28310 <div typeOf="mw:Extension/foo"></div>
28315 # Note that the <p> wrapping isn't present in PHP parser output
28316 # The important thing for this test is that P-wrapping doesn't
28317 # interfere with the <nowiki> protection for leading - in <td>
28318 # (which isn't necessary for <th>).
28320 T88318: p-wrapped dash in table.
28322 parsoid=html2wt,wt2wt
28325 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28326 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28327 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28334 |<nowiki>-</nowiki>
28335 |<nowiki>- </nowiki>
28356 <td><small>-</small>
28365 </td></tr></tbody></table>
28369 T149209: WTS: Handle newlines in table cells properly
28377 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28379 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28385 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28387 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28409 T149209: Selser: Handle newlines in table cells properly
28412 "modes": ["selser"],
28414 [ "#h1", "html", "a\nb\n" ],
28415 [ "#h2", "html", "a\nb\n" ],
28416 [ "#c1", "html", "a\nb\n" ],
28417 [ "#c2", "html", "<p>a</p>" ],
28418 [ "#c3", "html", "<p>a</p>" ],
28419 [ "#c4", "html", "edit-me<p>a</p>" ]
28424 ! id="h1" |edit-me!!1
28426 ! id="h2" |edit-me||2
28428 | id="c1" |edit-me||3
28430 | id="c2" |edit-me||4
28432 | id="c3" |edit-me||p||q||r
28434 | id="c4" |edit-me||p||q||r
28463 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28468 <td id='mwAc'>foo</td>
28469 <td id='serialize-this'>bar</td>
28474 | id="serialize-this" |bar
28479 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28483 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28485 <div id="hello">ok</div>
28492 "modes": ["wt2wt"],
28494 [ "#xyz", "before", "<b>before</b> stuff " ],
28495 [ "#xyz", "after", " stuff <i>after</i>" ],
28496 [ "#xyz", "html", "x <b>y</b> z" ]
28500 <span id="xyz">hello</span>
28502 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28506 Never serialize a-tag as html, regardless of what data-parsoid has to say
28508 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28510 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28515 ## SSS FIXME: This is broken output nevertheless.
28516 ## What might be a reasonable non-broken output for this?
28517 ## This is an edge case unlikely to be seen in production
28518 ## that I am not wasting more time on this right now.
28520 Never serialize a-tag as html, no matter what attributes it has
28522 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28524 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28526 [http://boo.org http://boohoo.org]
28529 # Misnested is an indication that selser can reuse the source but these have
28530 # shown to sneak through on occasion. See T101768.
28531 # The original wikitext here is: [http://test.com [[one]] two three]
28533 Strip span tags added to mark misnested links
28537 <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>
28539 [http://test.com][[one]] two three
28543 Catch regression when unpacking misnested links
28547 {{echo|hi}}[http://example.com [[ho]]]
28549 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
28553 Catch regression when unpacking with trailing content
28555 {{echo|Foo <references/> bar}}
28557 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Foo <references/> bar"}},"i":0}}]}'>Foo </p><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol><p about="#mwt2"> bar</p>
28561 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28565 <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|}"]}'>
28577 ## This test verifies the presence and computation of this attribute indirectly
28578 ## by making an edit and ensuring that the serialization is correct (which it would be
28579 ## only if firstWikitextNode is properly set).
28581 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28584 "modes": ["wt2wt"],
28586 [ "div#x", "remove" ],
28587 [ "div", "before", "<div>new</div>" ]
28591 <div id="x">foo</div>
28593 {{echo|<div>boo</div>
28601 {{echo|<div>boo</div>
28607 # --------------------------------------------
28608 # Tests spec'ing wikitext serialization norms |
28609 # --------------------------------------------
28612 Serialize multi-line indent-pre starting with wikitext syntax
28626 1. Categories should always be serialized on their own line
28630 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28638 2. Categories that are part of templates should not introduce a line break
28640 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28642 <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>
28645 # Careful while editing these next 2 tests. There are \u200f characters
28646 # before and after the <link> tags in the HTML and following some
28647 # of the categories in wikitext
28648 # Do not remove these characters in edits.
28650 # As part of the serialization, these bidi characters will get stripped.
28652 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28655 "modes": ["html2wt"],
28656 "scrubWikitext": true
28659 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28660 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28663 [[קטגוריה: שיטות משפט]]
28667 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28670 "modes": ["html2wt"],
28671 "scrubWikitext": true
28674 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28681 Lists: Add space after bullets
28688 <li><span> baz</span></li>
28693 * <span> baz</span>
28697 1. Headings: Add space before/after == (T53744)
28704 <h2><span> baz</span></h2>
28712 == <span> baz</span> ==
28716 2. Headings: Add space before/after == even after hoisted content
28719 "modes": ["html2wt"],
28720 "scrubWikitext": true
28723 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28731 1. Headings: suppress newly created empty headings
28734 "modes": ["html2wt"],
28735 "scrubWikitext": true
28743 2. Headings: don't suppress empty headings if scrubWikitext is false
28753 3. Headings: suppress empty headings on edits
28756 "modes": ["selser"],
28757 "scrubWikitext": true,
28763 ==<span id="x">foo</span>==
28768 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28771 "modes": ["html2wt"],
28772 "scrubWikitext": true
28775 <h2>foo<br/>bar</h2>
28776 <h2>foo <span><br/>bar</span> baz</h2>
28780 == foo <span> bar</span> baz ==
28784 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28787 "modes": ["html2wt"],
28788 "scrubWikitext": false
28791 <h2>foo<br/>bar</h2>
28797 1. WT Quote Tags: suppress newly created empty style tags
28800 "modes": ["html2wt"],
28801 "scrubWikitext": true
28809 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28815 ''<nowiki/>'''''<nowiki/>'''
28819 3. WT Quote Tags: suppress empty style tags on edits
28822 "modes": ["selser"],
28823 "scrubWikitext": true,
28829 '''<span id="x">foo</span>'''
28834 1. Anchors: suppress newly created empty anchors
28837 "modes": ["html2wt"],
28838 "scrubWikitext": true
28841 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28846 2. Anchors: don't suppress empty anchors if scrubWikitext is false
28849 "modes": ["html2wt"],
28850 "scrubWikitext": false
28853 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28859 3. Anchors: suppress empty anchors on edits
28862 "modes": ["selser"],
28863 "scrubWikitext": true,
28869 [[Test|<span id="x">foo</span>]]
28874 3a. Anchors: do not suppress numbered extlinks
28877 "modes": ["wt2wt"],
28878 "scrubWikitext": true
28883 <a rel="mw:ExtLink" href="http://foo.com"></a>
28887 3b. Anchors: do not suppress numbered extlinks
28890 "modes": ["wt2wt"],
28891 "scrubWikitext": true,
28897 [http://foo.com <span id="x">foo</span>]
28903 Normalizations should be restricted to edited content
28906 "modes": ["selser"],
28907 "scrubWikitext": true,
28909 [ "h1", "before", "<i></i>"]
28923 1. Multiple normalizations (html2wt)
28926 "modes": ["html2wt"],
28927 "scrubWikitext": true
28931 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
28932 </a><b><i></i></b>x</p>
28941 2. Multiple normalizations (selser)
28944 "modes": ["selser"],
28945 "scrubWikitext": true,
28947 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
28951 <span id="x">foo</span>
28953 <span id="x">foo</span>
28959 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
28962 "modes": ["html2wt"],
28963 "scrubWikitext": true
28975 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
28982 <nowiki> </nowiki>hi
28984 <nowiki> </nowiki> hello
28988 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
28991 "modes": ["html2wt"],
28992 "scrubWikitext": true
29001 baz bang</td></tr></table>
29007 bar<span>boo</span></p>
29023 bar<span>boo</span>
29027 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29030 "modes": ["selser"],
29031 "scrubWikitext": true,
29033 [ "p", "html", " a\n b" ]
29044 1. New links that end in spaces
29047 "modes": ["html2wt"],
29048 "scrubWikitext": false
29051 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29052 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29053 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29055 [[Berlin ]]<nowiki/>is the capital of Germany.
29059 [[Boston ]] is a city.
29063 2. New links that end in spaces
29066 "modes": ["html2wt"],
29067 "scrubWikitext": true
29070 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29071 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29072 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29074 [[Berlin]] is the capital of Germany.
29078 [[Boston]] is a city.
29082 1. Table cells with escapable prefixes
29085 "modes": ["html2wt"],
29086 "scrubWikitext": false
29090 <tr><td>a</td></tr>
29091 <tr><td>-</td></tr>
29092 <tr><td>+</td></tr>
29098 |<nowiki>-</nowiki>
29100 |<nowiki>+</nowiki>
29105 2. Table cells with escapable prefixes
29108 "modes": ["html2wt"],
29109 "scrubWikitext": true
29113 <tr><td>a</td></tr>
29114 <tr><td>-</td></tr>
29115 <tr><td>+</td></tr>
29128 3a. Table cells with escapable prefixes after edits
29131 "modes": ["selser"],
29132 "scrubWikitext": true,
29134 [ "table tbody tr:first-child td:first-child", "remove"]
29148 3b. Table cells with escapable prefixes after edits
29151 "modes": ["selser"],
29152 "scrubWikitext": true,
29154 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29161 |<span id="x">foo</span>+
29170 # FIXME: This test will fail because
29171 # normalization doesn't realize that the id attribute
29172 # will eliminate the escapable scenario
29174 4a. Table cells without escapable prefixes after edits
29177 "modes": ["selser"],
29178 "scrubWikitext": true,
29180 [ "#x", "html", "-" ]
29193 ## This tests normalizer's ability to discriminate between
29194 ## cells having identical content.
29196 4b. Table cells without escapable prefixes after edits
29199 "modes": ["selser"],
29200 "scrubWikitext": true,
29202 [ "td", "html", "-" ]
29215 ## This tests normalizer's ability to not be tripped by
29216 ## comments (and whitespace)
29218 4c. Table cells without escapable prefixes after edits
29221 "modes": ["selser"],
29222 "scrubWikitext": true,
29224 [ "table tbody tr td:first-child", "remove" ]
29239 ## This tests normalizer's ability to handle HTML cells
29241 4d. Table cells without escapable prefixes after edits
29244 "modes": ["selser"],
29245 "scrubWikitext": true,
29247 [ "td", "html", "-" ]
29252 <tr><td>a</td></tr>
29256 <tr><td>-</td></tr>
29260 ## T111151 Remove font elements without attributes
29262 5a. font tags without attributes should be dropped in scrubWikitext mode
29265 "modes": ["html2wt"],
29266 "scrubWikitext": true
29270 <font><font>bar</font></font>
29271 <font class="x">boo</font>
29275 <font class="x">boo</font>
29279 5b. font tags should not be dropped without scrubWikitext being enabled
29282 "modes": ["html2wt"],
29283 "scrubWikitext": false
29292 Escape nowiki DOM elements
29296 <nowiki><i>foo</i></nowiki>
29298 <nowiki>''foo''</nowiki>
29301 # This is meant to be an interim fix while we go about figuring out
29302 # how to not introduce these trailing <nowiki/>s in the first place.
29304 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29308 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29310 <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>
29311 <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>
29324 # ---------------------------------------------------
29325 # End of tests spec'ing wikitext serialization norms |
29326 # ---------------------------------------------------
29330 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29338 <td><b>c</b><p>d</p></td>
29357 Anchor without href scenarios
29359 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29362 <a class="no">dice</a>
29367 <span name="foo"></span>
29371 New transclusion added after a list should be serialized after the list
29375 <ul><li>a</li></ul><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>
29381 # -----------------------------------------------------------------
29382 # End of section for Parsoid-only html2wt tests for serialization
29384 # -----------------------------------------------------------------
29386 # -----------------------------------------------------------------
29387 # The following section of tests are primarily to spec behavior of
29388 # the selective serializer. All these tests have manual selser
29389 # changes. The automated selser changes for all tests handle the
29390 # wide variation of changes, but these tests here capture specs
29391 # deterministically.
29392 # ----------------------------------------------------------------
29396 Selser: New comments should not be lost
29399 "modes": ["selser"],
29401 [ "#a", "after", "<!--c1-->" ],
29402 [ "#b", "before", "<!--c2-->" ]
29406 <span id="a">a</span>
29408 <span id="b">b</span>
29410 <span id="a">a</span><!--c1-->
29412 <!--c2--><span id="b">b</span>
29417 Selser: Check for validity of DSR before using it
29420 "modes": ["selser"],
29422 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29426 <span id="a">a</span>
29428 {{DISPLAYTITLE:foo}}
29429 <span id="a">a</span>
29433 1. DOMDiff: Changes to <ref> content should be looked up using id
29436 "modes": ["selser"],
29438 ["#X", "after", "bar"],
29439 ["#Y", "after", "baz"]
29443 X <ref><span id="X">foo</span></ref>
29446 <ref name="a"><span id="Y">foo</span></ref>
29449 X <ref><span id="X">foo</span>bar</ref>
29452 <ref name="a"><span id="Y">foo</span>baz</ref>
29457 2. DOMDiff: Changes to <ref> content should be looked up using id
29460 "modes": ["selser"],
29462 ["#Z", "after", "bar"]
29466 A <ref>foo bar for a</ref>
29467 B <ref group="X" name="b" />
29471 <references group="X">
29472 <ref name="b"><span id="Z">foo</span></ref>
29475 A <ref>foo bar for a</ref>
29476 B <ref group="X" name="b" />
29480 <references group="X">
29481 <ref name="b"><span id="Z">foo</span>bar</ref>
29486 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29489 "modes": ["selser"],
29491 [ "div:first-child", "text", "bar" ]
29495 <div style="{{1x|color:red;}}%">foo</div>
29497 <div style="{{1x|color:red;}}%">bar</div>
29509 <li class="mw-empty-elt"> </li>
29510 <li class="mw-empty-elt"></li>
29514 # FIXME: Why is there no html/parsoid section here?
29518 [[File:Thumb.png|thumb]]
29520 <div class="thumb tright"><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> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div></div></div></div>
29524 unclosed internal link XSS (T137264)
29526 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29528 <p>[[#<script>alert(1)</script>|
29531 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29534 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
29535 # (Parsoid doesn't support $wgRawHtml==true)
29537 Validating that <style> isn't eaten by tidy (T167349)
29542 <html><style>.foo::before { content: "<foo>"; }</style></html>
29543 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
29547 <style>.foo::before { content: "<foo>"; }</style>
29548 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29553 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29555 wgFragmentMode=[ 'html5', 'legacy' ]
29557 == A&B&C&amp;D&amp;amp;E ==
29558 [[#A&B&C&amp;D&amp;amp;E]]
29560 <h2><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE"></span><span class="mw-headline" id="A&B&C&amp;D&amp;amp;E">A&B&C&amp;D&amp;amp;E</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&amp;D&amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29561 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29564 <h2 id="A&B&C&amp;D&amp;amp;E"><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE" typeof="mw:FallbackId" data-parsoid="{}"></span> A&B<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>C<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp;D<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp;amp;E </h2>
29565 <p><a rel="mw:WikiLink" href="./Main_Page#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#A&B&C&amp;D&amp;amp;E"},"sa":{"href":"#A&B&amp;C&amp;amp;D&amp;amp;amp;E"}}'>#A&B&C&amp;D&amp;amp;E</a></p>
29569 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29571 wgFragmentMode=[ 'legacy' ]
29573 == A&B&C&amp;D&amp;amp;E ==
29574 [[#A&B&C&amp;D&amp;amp;E]]
29576 <h2><span class="mw-headline" id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">A&B&C&amp;D&amp;amp;E</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&amp;D&amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29577 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29582 Decoding of HTML entities in embedded HTML tags
29584 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29586 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29589 <table class="1&2&3&amp;4&amp;amp;5" data-parsoid='{"stx":"html","a":{"class":"1&2&3&amp;4&amp;amp;5"},"sa":{"class":"1&2&amp;3&amp;amp;4&amp;amp;amp;5"}}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>x</td></tr></tbody></table>
29593 Decoding of HTML entities in indicator names for IDs (T104196)
29595 parsoid=wt2html,html2html
29598 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29600 1&2&3&4&amp;5=Indicator
29603 <p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&2&3&amp;4&amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
29606 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29608 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29612 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29614 1&2&3&4&amp;5=Indicator
29617 <p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&2&3&amp;4&amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
29620 # This fragment mode is what Parsoid supports.
29622 HTML5 ids: fallback to legacy
29624 wgFragmentMode=[ 'html5', 'legacy' ]
29636 == Hey < # " > % : ' ==
29637 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29639 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29641 <!-- These two links should produce identical HTML -->
29642 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29645 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29647 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29648 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29649 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29650 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29651 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29652 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29656 <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>
29657 <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>
29658 <h2><span id=".D0.A2.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="Тест">Тест</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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29659 <h2><span id=".D0.A2.D0.B5.D1.81.D1.82_2"></span><span class="mw-headline" id="Тест_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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29660 <h2><span id=".D1.82.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="тест">тест</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: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29661 <h2><span id="Hey_.3C_.23_.22_.3E_.25_:_.27"></span><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</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: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29662 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
29663 </p><p>💩 <span id="💩"></span>
29664 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29667 <h2 id="Foo_bar"> Foo bar </h2>
29669 <h2 id="foo_Bar_2"> foo Bar </h2>
29671 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span> Тест </h2>
29673 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span> Тест </h2>
29675 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span> тест </h2>
29677 <h2 id="Hey_<_#_"_>_%_:_'"><span id="Hey_.3C_.23_.22_.3E_.25_:_.27" typeof="mw:FallbackId"></span> Hey < # " > %<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: ' </h2>
29678 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Main_Page#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Main_Page#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Main_Page#тест">#тест</a> <a rel="mw:WikiLink" href="./Main_Page#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
29680 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:💩","function":"anchorencode"},"params":{},"i":0}}]}'>💩</span> <span id="💩" about="#mwt3" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"id"},{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[190,209,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:💩\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>💩</span>"}]]}'></span></p>
29682 <!-- These two links should produce identical HTML -->
29683 <p><a rel="mw:WikiLink" href="./Main_Page#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Main_Page#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
29686 # Parsoid doesn't support this mode
29688 HTML5 ids: legacy with a fallback to modern
29690 wgFragmentMode=[ 'legacy', 'html5' ]
29702 == Hey < # " > % : ' ==
29703 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29705 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29707 <!-- These two links should produce identical HTML -->
29708 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29711 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29713 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29714 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29715 <li class="toclevel-1 tocsection-3"><a href="#.D0.A2.D0.B5.D1.81.D1.82"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29716 <li class="toclevel-1 tocsection-4"><a href="#.D0.A2.D0.B5.D1.81.D1.82_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29717 <li class="toclevel-1 tocsection-5"><a href="#.D1.82.D0.B5.D1.81.D1.82"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29718 <li class="toclevel-1 tocsection-6"><a href="#Hey_.3C_.23_.22_.3E_.25_:_.27"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29722 <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>
29723 <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>
29724 <h2><span id="Тест"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82">Тест</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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29725 <h2><span id="Тест_2"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82_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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29726 <h2><span id="тест"></span><span class="mw-headline" id=".D1.82.D0.B5.D1.81.D1.82">тест</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: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29727 <h2><span id="Hey_<_#_"_>_%_:_'"></span><span class="mw-headline" id="Hey_.3C_.23_.22_.3E_.25_:_.27">Hey < # " > % : '</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: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29728 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#.D0.A2.D0.B5.D1.81.D1.82">#Тест</a> <a href="#.D1.82.D0.B5.D1.81.D1.82">#тест</a> <a href="#Hey_.3C_.23_.22_.3E_.25_:_.27">#Hey < # " > % : '</a>
29729 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
29730 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
29734 # Parsoid doesn't support this mode.
29736 HTML5 ids: no legacy
29738 wgFragmentMode=[ 'html5' ]
29750 == Hey < # " > % : ' ==
29751 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29753 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29755 <!-- These two links should produce identical HTML -->
29756 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29759 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29761 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29762 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29763 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29764 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29765 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29766 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29770 <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>
29771 <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>
29772 <h2><span class="mw-headline" id="Тест">Тест</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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29773 <h2><span class="mw-headline" id="Тест_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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29774 <h2><span class="mw-headline" id="тест">тест</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: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29775 <h2><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</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: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29776 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
29777 </p><p>💩 <span id="💩"></span>
29778 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29783 T90902: Normalize weird characters in section IDs
29785 wgFragmentMode=[ 'html5', 'legacy' ]
29791 <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>
29792 <p><a href="#Foo_bar">#Foo bar</a>
29797 T51672: Test for brackets in attributes of elements in external link texts
29799 [http://example.com/ link <span title="title with [brackets]">span</span>]
29800 [http://example.com/ link <span title="title with [brackets]">span</span>]
29803 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29804 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29807 <p><a rel="mw:ExtLink" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29808 <a rel="mw:ExtLink" href="http://example.com/">link <span title="title with [brackets]" data-parsoid='{"stx":"html","a":{"title":"title with [brackets]"},"sa":{"title":"title with &#91;brackets&#93;"}}'>span</span></a></p>
29812 T72875: Test for brackets in attributes of elements in internal link texts
29814 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
29815 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
29818 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
29819 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
29822 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
29823 <a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]" data-parsoid='{"stx":"html","a":{"title":"title with [[double brackets]]"},"sa":{"title":"title with &#91;&#91;double brackets&#93;&#93;"}}'>span</span></a></p>
29827 T179544: {{anchorencode:}} output should be always usable in links
29829 wgFragmentMode=[ 'html5' ]
29831 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
29833 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
29836 <p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt1\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Main_Page#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt2\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'>#[foo]</a></p>
29839 ## ------------------------------
29840 ## Parsoid section-wrapping tests
29841 ## ------------------------------
29843 Section wrapping for well-nested sections (no leading content)
29846 "wrapSections": true
29867 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29870 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
29873 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
29876 </section><section data-mw-section-id="4"><h2 id="2.2"> 2.2 </h2>
29879 <section data-mw-section-id="5"><h3 id="2.2.1"> 2.2.1 </h3>
29882 </section></section></section><section data-mw-section-id="6"><h1 id="3"> 3 </h1>
29889 Section wrapping for well-nested sections (with leading content)
29892 "wrapSections": true
29897 Para 2 with a <div>nested in it</div>
29910 <section data-mw-section-id="0"><p>Para 1.</p>
29912 <p>Para 2 with a </p><div>nested in it</div>
29916 </section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29919 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
29922 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
29925 </section></section>
29929 Section wrapping with template-generated sections (good nesting 1)
29932 "wrapSections": true
29949 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29952 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,33,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.1 ==\nb"}},"i":0}}]}'> 1.1 </h2><span about="#mwt1">
29953 </span><p about="#mwt1">b</p>
29954 </section><section data-mw-section-id="3"><h2 id="1.2"> 1.2 </h2>
29957 </section></section><section data-mw-section-id="4"><h1 id="2"> 2 </h1>
29961 # In this example, the template scope is mildly expanded to incorporate the
29962 # trailing newline after the transclusion since that is part of section 1.1.1
29964 Section wrapping with template-generated sections (good nesting 2)
29967 "wrapSections": true,
29968 "modes": ["wt2html", "wt2wt"]
29983 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29986 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,50,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.1 ==\nb\n=== 1.1.1 ===\nd"}},"i":0}},"\n"]}'> 1.1 </h2><span about="#mwt1">
29987 </span><p about="#mwt1">b</p><span about="#mwt1">
29988 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1"> 1.1.1 </h3><span about="#mwt1">
29989 </span><p about="#mwt1">d</p><span about="#mwt1">
29990 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2"> 2 </h1>
29994 # In this example, the template scope is mildly expanded to incorporate the
29995 # trailing newline after the transclusion since that is part of section 1.2.1
29997 Section wrapping with template-generated sections (good nesting 3)
30000 "wrapSections": true,
30001 "modes": ["wt2html", "wt2wt"]
30019 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30022 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[9,60,0,0],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"x\n== 1.1 ==\nb\n==1.2==\nc\n===1.2.1===\nd"}},"i":0}},"\n"]}'>x</p><span about="#mwt1">
30023 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1"> 1.1 </h2><span about="#mwt1">
30024 </span><p about="#mwt1">b</p><span about="#mwt1">
30025 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30026 </span><p about="#mwt1">c</p><span about="#mwt1">
30027 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30028 </span><p about="#mwt1">d</p><span about="#mwt1">
30029 </span></section></section></section><section data-mw-section-id="5"><h1 id="2"> 2 </h1>
30033 # Because of section-wrapping and template-wrapping interactions,
30034 # the scope of the template is expanded so that the template markup
30035 # is valid in the presence of <section> tags.
30036 # This exercises the s1 is null scenario in the wrapSections code
30038 Section wrapping with template-generated sections (bad nesting 1)
30041 "wrapSections": true
30055 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30058 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n= 1 =\nb\n"}},"i":0}},"\n\nc\n"]}'>
30059 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1"> 1 </h1><span about="#mwt1">
30060 </span><p about="#mwt1">b
30061 </p><span about="#mwt1">
30063 </span><p about="#mwt1">c</p><span about="#mwt1">
30064 </span></section></div></section>
30067 # Because of section-wrapping and template-wrapping interactions,
30068 # the scope of the template is expanded so that the template markup
30069 # is valid in the presence of <section> tags.
30070 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30072 Section wrapping with template-generated sections (bad nesting 2)
30075 "wrapSections": true
30093 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30096 </section><section data-mw-section-id="-1"><h1 about="#mwt1" typeof="mw:Transclusion" id="2" data-parsoid='{"dsr":[9,45,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"= 2 =\nb\n== 2.1 ==\nc"}},"i":0}},"\n\nd\n\n"]}'> 2 </h1><span about="#mwt1">
30097 </span><p about="#mwt1">b</p><span about="#mwt1">
30098 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1"> 2.1 </h2><span about="#mwt1">
30099 </span><p about="#mwt1">c</p><span about="#mwt1">
30101 </span><p about="#mwt1">d</p><span about="#mwt1">
30103 </span></section></section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30107 # Because of section-wrapping and template-wrapping interactions,
30108 # additional template wrappers are added to <section> tags
30109 # so that template wrapping semantics are valid whether section
30110 # tags are retained or stripped. But, the template scope can expand
30111 # greatly when accounting for section tags.
30112 # This exercises the s1 and s2 are in different subtrees scenario
30114 Section wrapping with template-generated sections (bad nesting 3)
30117 "wrapSections": true,
30118 "modes": ["wt2html", "wt2wt"]
30136 <section data-mw-section-id="0"></section><section data-mw-section-id="1" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["= 1 =\na\n\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.2 ==\nb\n= 2 =\nc"}},"i":0}},"\n\nd\n\n"]}'><h1 id="1"> 1 </h1>
30139 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.2 ==\nb\n= 2 =\nc"}},"i":0}}]}'> 1.2 </h2><span about="#mwt1">
30140 </span><p about="#mwt1">b</p><span about="#mwt1">
30141 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2"> 2 </h1><span about="#mwt1">
30142 </span><p about="#mwt1">c</p>
30145 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3"> 3 </h1>
30150 Section wrapping with uneditable lead section + div wrapping multiple sections
30153 "wrapSections": true
30158 <div style="border:1px solid red;">
30175 <section data-mw-section-id="-1"><p>foo</p>
30177 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30178 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30181 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30184 </section></section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30188 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30191 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30193 </section></section>
30197 Section wrapping with editable lead section + div overlapping multiple sections
30200 "wrapSections": true
30207 <div style="border:1px solid red;">
30224 <section data-mw-section-id="0"><p>foo</p>
30226 </section><section data-mw-section-id="-1"><h1 id="1"> 1 </h1>
30228 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30231 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30234 </section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30239 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30242 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30244 </section></section>
30248 HTML header tags should not be wrapped in section tags
30251 "wrapSections": true
30264 <section data-mw-section-id="0"><p>foo</p>
30266 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30268 </section><section data-mw-section-id="1"><h1 id="b"> b </h1>
30270 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30272 </section><section data-mw-section-id="2"><h1 id="d"> d </h1></section>
30276 Lead section containing only whitespace and comments.
30279 "wrapSections": true
30283 <!-- this is a comment, presumably significant to editors -->
30290 <section data-mw-section-id="0" data-parsoid="{}">
30291 <!-- this is a comment, presumably significant to editors -->
30292 </section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30295 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
30300 Pseudo-sections emitted by templates should have id -2
30303 "wrapSections": true
30313 <section data-mw-section-id="-1"><p>foo</p>
30314 </section><section data-mw-section-id="-2"><div 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":"<div>\n== a ==\n== b ==\n</div>\n"}},"i":0}}]}'>
30315 <section data-mw-section-id="-1"><h2 id="a"> a </h2>
30316 </section><section data-mw-section-id="-1"><h2 id="b"> b </h2>
30317 </section></div><span about="#mwt1">