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]]
120 // For Serbian; localize Template namespace
128 Template:echo_with_span
134 Template:echo_with_div
140 Template:echo with depth
153 Template:table_attribs
156 |</noinclude>style="color:red;"|Foo
160 Template:table_attribs_2
163 |</noinclude>style="color:red;"|Foo
168 Template:table_attribs_3
171 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
175 Template:table_attribs_4
177 | style="background-color:#DC241f;" width="10px" |
181 Template:table_attribs_5
184 |</noinclude>style="color:red;"||Bar
188 Template:table_attribs_6
190 style="background: <nowiki>
197 Template:table_attribs_7
200 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
204 Template:table_header_cells
206 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
212 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
216 Template:PartialTable
223 Template:image_attribs
226 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
229 ## See T48811 for details
231 Template:mixed_attr_content_template
233 style="color:red;" title="T48811"
239 Template:definition_list
286 Template:EmptyTRWithHTMLAttrTest
289 <tr align="center"></tr>
290 <tr><td>foo</td></tr>
291 <tr align="center"></tr>
292 <tr><td>bar</td></tr>
315 This is a simple paragraph.
317 <p>This is a simple paragraph.
322 Paragraphs with extra newline spacing
345 Paragraphs with newline spacing with comment lines in between
353 <!--foo--><!--More than 1 comment, still stripped-->
357 <!--foo--> <!----> <!-- bar -->
418 Paragraphs with newline spacing with non-empty white-space lines in between
445 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
453 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
492 Extra newlines: More paragraphs with indented comment
507 Extra newlines followed by heading
522 <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>
523 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
526 <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>
531 Extra newlines between heading and content are swallowed
539 <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>
540 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
545 Heading with line break in nowiki
549 wgFragmentMode=[ 'html5', 'legacy' ]
554 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
556 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>
560 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
567 http://fr.wikipedia.org/wiki/🍺
568 <!-- EasterEgg we love beer, better be able be able to link to it -->
570 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
589 *plain''italic''plain
590 *plain''italic''plain''italic''plain
591 *plain'''bold'''plain
592 *plain'''bold'''plain'''bold'''plain
593 *plain''italic''plain'''bold'''plain
594 *plain'''bold'''plain''italic''plain
595 *plain''italic'''bold-italic'''italic''plain
596 *plain'''bold''bold-italic''bold'''plain
597 *plain'''''bold-italic'''italic''plain
598 *plain'''''bold-italic''bold'''plain
599 *plain''italic'''bold-italic'''''plain
600 *plain'''bold''bold-italic'''''plain
601 *plain l'''italic''plain
602 *plain l''''bold''' plain
605 <li>plain<i>italic</i>plain</li>
606 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
607 <li>plain<b>bold</b>plain</li>
608 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
609 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
610 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
611 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
612 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
613 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
614 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
615 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
616 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
617 <li>plain l'<i>italic</i>plain</li>
618 <li>plain l'<b>bold</b> plain</li></ul>
622 # this example taken from the [[simple:Moon]] article (T49326)
624 Italics and possessives (1)
626 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
628 <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
632 # this example taken from [[en:Flaming Pie]] (T51926)
634 Italics and possessives (2)
636 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
638 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
642 # this example taken from [[en:Dictionary]] (T51926)
644 Italics and possessives (3)
646 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''.
648 <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>.
654 ### 2-quote opening sequence tests
657 Italics and bold: 2-quote opening sequence: (2,2)
666 Italics and bold: 2-quote opening sequence: (2,3)
675 Italics and bold: 2-quote opening sequence: (2,4)
685 # same html as previous, but wikitext adjusted to match parsoid html2wt
687 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
689 ''foo<nowiki>''</nowiki>''
695 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
697 Italics and bold: 2-quote opening sequence: (2,5)
710 # same html as previous, but wikitext adjusted to match parsoid html2wt
712 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
714 ''foo'''''<nowiki/>'''
725 ### 3-quote opening sequence tests
729 Italics and bold: 3-quote opening sequence: (3,2)
738 Italics and bold: 3-quote opening sequence: (3,3)
747 Italics and bold: 3-quote opening sequence: (3,4)
755 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
757 Italics and bold: 3-quote opening sequence: (3,5)
770 # same html as previous, but wikitext adjusted to match parsoid html2wt
772 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
774 '''foo'''''<nowiki/>''
785 ### 4-quote opening sequence tests
789 Italics and bold: 4-quote opening sequence: (4,2)
799 # same html as previous, but wikitext adjusted to match parsoid html2wt
801 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
803 <nowiki>''</nowiki>''foo''
810 Italics and bold: 4-quote opening sequence: (4,3)
819 Italics and bold: 4-quote opening sequence: (4,4)
829 # same html as previous, but wikitext adjusted to match parsoid html2wt
831 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
839 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
841 Italics and bold: 4-quote opening sequence: (4,5)
850 <p>'<b>foo</b><i></i>
854 # same html as previous, but wikitext adjusted to match parsoid html2wt
856 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
858 '<nowiki/>'''foo'''''<nowiki/>''
863 <p>'<b>foo</b><i></i>
869 ### 5-quote opening sequence tests
873 Italics and bold: 5-quote opening sequence: (5,2)
883 # same html as previous, but wikitext adjusted to match parsoid html2wt
885 Italics and bold: 5-quote opening sequence: (5,2+3)
894 Italics and bold: 5-quote opening sequence: (5,3)
904 # same html as previous, but wikitext adjusted to match parsoid html2wt
906 Italics and bold: 5-quote opening sequence: (5,3+2)
915 Italics and bold: 5-quote opening sequence: (5,4)
921 <p><i><b>foo'</b></i>
926 Italics and bold: 5-quote opening sequence: (5,5)
935 Italics and bold: 5-quote opening sequence: (5,6)
939 <p><i><b>foo'</b></i>
944 ### multiple quote sequences in a line
948 Italics and bold: multiple quote sequences: (2,4,2)
954 <p><i>foo'<b>bar</b></i>
958 # same html as previous, but wikitext adjusted to match parsoid html2wt
960 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
962 ''foo'<nowiki/>'''bar'''''
964 <p><i>foo'<b>bar</b></i>
969 Italics and bold: multiple quote sequences: (2,4,3)
975 <p><i>foo'<b>bar</b></i>
979 # same html as previous, but wikitext adjusted to match parsoid html2wt
981 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
983 ''foo'<nowiki/>'''bar'''''
985 <p><i>foo'<b>bar</b></i>
990 Italics and bold: multiple quote sequences: (2,4,4)
996 <p><i>foo'<b>bar'</b></i>
1000 # same html as previous, but wikitext adjusted to match parsoid html2wt
1002 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1004 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1006 <p><i>foo'<b>bar'</b></i>
1010 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1012 Italics and bold: multiple quote sequences: (3,4,2)
1021 <p><b>foo'</b>bar<i></i>
1025 # same html as previous, but wikitext adjusted to match parsoid html2wt
1027 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1029 '''foo''''bar''<nowiki/>''
1034 <p><b>foo'</b>bar<i></i>
1038 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1040 Italics and bold: multiple quote sequences: (3,4,3)
1049 <p><b>foo'</b>bar<b></b>
1053 # same html as previous, but wikitext adjusted to match parsoid html2wt
1055 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1057 '''foo''''bar'''<nowiki/>'''
1062 <p><b>foo'</b>bar<b></b>
1067 ### other quote tests
1070 Italics and bold: other quote tests: (2,3,5)
1072 ''this is about '''foo's family'''''
1074 <p><i>this is about <b>foo's family</b></i>
1080 Italics and bold: other quote tests: (2,(3,3),2)
1082 ''this is about '''foo's''' family''
1084 <p><i>this is about <b>foo's</b> family</i>
1090 Italics and bold: other quote tests: (3,2,3,2)
1094 '''this is about ''foo'''s family''
1096 <p><b>this is about <i>foo</i></b><i>s family</i>
1101 # same html as previous, but wikitext adjusted to match parsoid html2wt
1103 Italics and bold: other quote tests: (3,2,3+2+2,2)
1105 '''this is about ''foo'''''<nowiki/>''s family''
1107 <p><b>this is about <i>foo</i></b><i>s family</i>
1113 Italics and bold: other quote tests: (3,2,3,3)
1115 '''this is about ''foo'''s family'''
1117 <p>'<i>this is about </i>foo<b>s family</b>
1123 Italics and bold: other quote tests: (3,(2,2),3)
1125 '''this is about ''foo's'' family'''
1127 <p><b>this is about <i>foo's</i> family</b>
1133 Italicized possessive
1135 The ''[[Main Page]]'''s talk page.
1137 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1140 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1144 Quote balancing context should be restricted to td/th cells on the same wikitext line
1146 parsoid=wt2html,wt2wt
1160 </td></tr></tbody></table>
1168 Non-html5 tags should be accepted
1170 <center>''foo''</center>
1172 <font>''foo''</font>
1173 <strike>''foo''</strike>
1176 <center><i>foo</i></center>
1177 <p><big><i>foo</i></big>
1178 <font><i>foo</i></font>
1179 <strike><i>foo</i></strike>
1185 <wbr> is valid wikitext (T54468)
1193 # <strike> is HTML4, <s> is HTML4/5.
1195 <s> or <strike> for strikethrough
1197 <strike>strike</strike>
1201 <p><strike>strike</strike>
1209 Text-level semantic html elements in wikitext
1212 <strong>text</strong>
1228 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1235 <strong>text</strong>
1251 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1259 # test cases taken from
1260 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1262 Ruby markup (W3C-style)
1264 ;Mono-ruby for individual base characters
1265 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1267 :<ruby>今日<rt>きょう</rt></ruby>
1269 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1271 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1273 :<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>
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 post-expand include size being exceeded
1847 {{echo3|1234567890}}
1849 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1854 max template depth being reached
1858 {{echo with depth|too deep!}}
1860 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1865 Multiple comments should still parse as SOL-transparent
1867 parsoid=wt2html,wt2wt
1870 <!--c2--><!--c3--><!--c4-->*b
1879 <!--c2--><!--c3--><!--c4-->
1885 ## Make sure ">" gets escaped in comments to avoid XSS
1887 IE conditional comments
1890 <script>alert('hi');</script>
1893 <!--[if lt IE 9]>
1894 <script>alert('hi');</script>
1899 ### paragraph wrapping tests
1915 Block tag on one line (<div>)
1925 <p>a </p><div>foo</div>
1930 # Remex wraps empty tag runs with p-tags.
1931 # Parsoid strips them out during p-wrapping.
1933 No p-wrappable content
1935 <span><div>x</div></span>
1936 <span><s><div>x</div></s></span>
1937 <small><em></em></small><span><s><div>x</div></s></span>
1939 <span><div>x</div></span>
1940 <span><s><div>x</div></s></span>
1941 <p><small><em></em></small></p><span><s><div>x</div></s></span>
1943 <span><div>x</div></span>
1944 <span><s><div>x</div></s></span>
1945 <small><em></em></small><span><s><div>x</div></s></span>
1948 # T177612: Parsoid-only test
1950 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
1952 {{echo|<span><div>x</div></span>}}
1955 <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>
1960 Block tag on one line (<blockquote>)
1962 a <blockquote>foo</blockquote>
1966 a <blockquote>foo</blockquote>
1970 <p>a </p><blockquote><p>foo</p></blockquote>
1976 Block tag on both lines (<div>)
1986 <p>a </p><div>foo</div><p>
1987 b </p><div>foo</div>
1991 Block tag on both lines (<blockquote>)
1993 a <blockquote>foo</blockquote>
1995 b <blockquote>foo</blockquote>
1997 a <blockquote>foo</blockquote>
1998 b <blockquote>foo</blockquote>
2001 <p>a </p><blockquote><p>foo</p></blockquote><p>
2002 b </p><blockquote><p>foo</p></blockquote>
2006 Multiple lines without block tags
2027 x </p><div>foo</div><p> z
2031 # The difference between Parsoid & Remex here
2032 # is because of Parsoid's Tidy-emulation code
2033 # for p-wrapping. We'll start work to remove this
2034 # emulation code in Parsoid sooner than later.
2035 # Remex wraps empty tag runs with p-tags.
2036 # Parsoid strips them out in a separate pass.
2038 Empty lines between lines with block tags
2073 </p><div>b</div><p>d
2078 <div data-parsoid='{"stx":"html"}'></div>
2081 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2084 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2086 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2089 <div data-parsoid='{"stx":"html"}'>e</div>
2093 Unclosed HTML p-tags should be handled properly
2100 <div><p>foo</p></div>
2105 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2110 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2111 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2114 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2118 a [[Category:A1]] [[Category:A2]]
2123 <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"/>
2127 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2133 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2137 No paragraph necessary for SOL transparent template
2139 <span><div>foo</div></span>
2142 <span><div>foo</div></span>
2143 {{echo|[[Category:Foo]]}}
2145 <span><div>foo</div></span>
2146 <span><div>foo</div></span>
2149 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2150 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2152 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2153 <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]]"}},"i":0}}]}'/>
2157 Avoid expanding multiline sol transparent template ranges unnecessarily
2175 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2178 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2182 ### Preformatted text
2192 And a [[Main Page|link]]
2198 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2203 Tabs don't trigger preformatted text
2207 This is preformatted text.
2213 <pre>This is preformatted text.
2218 preformatted text.</p>
2219 <pre>This is preformatted text.
2224 Space before tab needs nowiki pre protection
2230 <nowiki> </nowiki> a
2234 Ident preformatting with inline content
2245 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2262 Regression with preformatted in <center>
2276 T54763: Preformatted in <blockquote>
2282 indented cell (no pre-wrapping!)
2292 <p> indented cell (no pre-wrapping!)
2300 T53086: Double newlines in blockquotes should be turned into paragraphs
2317 T17491: <ins>/<del> in blockquote
2320 Foo <del>bar</del> <ins>baz</ins> quux
2324 <p>Foo <del>bar</del> <ins>baz</ins> quux
2331 T17491: <ins>/<del> in blockquote (2)
2333 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2336 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2340 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2345 <pre> with attributes (T5202)
2347 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2349 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2354 <pre> with width attribute (T5202)
2356 <pre width="8">Narrow screen goodies</pre>
2358 <pre width="8">Narrow screen goodies</pre>
2363 <pre> with forbidden attribute (T5202)
2365 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2367 <pre width="8">Narrow screen goodies</pre>
2372 Entities inside <pre>
2381 <pre> with forbidden attribute values (T5202)
2383 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2385 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2390 <nowiki> inside <pre> (T15238)
2398 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2406 <pre><nowiki>Foo</nowiki></pre>
2411 <nowiki> inside of #tag:pre
2413 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2415 <pre>Foo →bar</pre>
2418 <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>
2421 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2422 ## aren't enclosed in nowikis.
2424 <nowiki> and <pre> preference (first one wins)
2455 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2460 <p><span typeof="mw:Nowiki">
2468 </pre> inside nowiki
2470 <nowiki></pre></nowiki>
2477 Empty pre; pre inside other HTML tags (T56946)
2494 <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
2496 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2500 HTML pre followed by indent-pre
2513 <p><pre>foo</pre></p>
2515 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2517 <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>
2521 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2529 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2539 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2551 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2572 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2576 {{echo| foo}}{{echo| bar}}
2581 {{echo|<!--cmt--> foo}}
2583 <!--cmt-->{{echo| foo}}
2585 {{echo|{{echo| }}bar}}
2603 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2639 ## Hmm, should Parsoid rt this?
2641 Pres with newline attributes
2643 parsoid=wt2html,html2html
2648 <pre class="one two">hi</pre>
2651 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2655 Things that look like <pre> tags aren't treated as such
2657 Barack Obama <President> of the United States
2658 <President></President>
2660 <p>Barack Obama <President> of the United States
2661 <President></President>
2666 Handle broken pre-like tags (T66025)
2670 {{echo|<pre <pre>x</pre>}}
2672 <table><pre </table>
2675 <table><pre </table>
2679 <pre <table></table>
2681 <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>
2690 Parsoid: handle pre with space after attribute
2694 <pre style="width:50%;" >{{echo|foo}}</pre>
2696 <pre style="width:50%;">{{echo|foo}}</pre>
2699 <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>
2702 # TODO / maybe: fix wt2wt for this
2704 Parsoid: Don't paragraph-wrap fosterable content
2737 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2741 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2769 #--------------------------------------------------------------------
2770 # Transclusion parameter whitespace stripping tests
2771 # Behavior is different for positional and named parameters
2772 #--------------------------------------------------------------------
2774 Templates: Strip leading and trailing whitespace from named-param values
2778 {{echo|1= {{echo|b}} }}
2796 Templates: Don't strip whitespace from positional-param values
2800 {{echo|{{echo|b}} }}
2840 Templates: Don't recognize targets split by newlines
2856 Templates: Recognize targets when newlines and comments don't split the target
2861 <!--X--> ech<!--X-->o<!--X-->
2869 <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>
2873 Templates: Handle empty comment-and-ws-only lines correctly
2876 <!--should be ignored-->
2877 <!--should be ignored as well-->
2884 <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>
2888 Templates: Handle comments in the target
2891 <!-- should be ignored -->
2895 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2898 {{echo<!-- should be ignored -->
2901 {{echo<!-- should be ignored -->|foo}}
2903 {{<!-- should be ignored -->echo|foo}}
2912 <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>
2914 <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>
2916 <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>
2918 <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>
2920 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2924 Templates: Handle comments in parameter names (T69657)
2927 <!-- should be ignored -->
2931 <!-- should be ignored -->
2934 {{echo|1<!-- should be ignored -->=foo}}
2936 {{echo|<!-- should be ignored -->1=foo}}
2944 <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>
2946 <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>
2948 <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>
2950 <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>
2954 Templates: Other wikitext in parameter names (T69657)
2961 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2965 Templates: With colons
2969 <p>Template with colon
2972 <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>
2975 #--------------------------------------------------------------------
2976 # Transclusion parameter escaping tests
2977 #--------------------------------------------------------------------
2980 Templates: Parsoid parameter escaping test 1
2982 {{echo|[foo]|{{echo|[bar]}}}}
2987 <p about="#mwt1" typeof="mw:Transclusion"
2988 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2992 Parsoid: Pipes in external links in template parameter
2994 {{echo|[{{echo|http://example.com}} link]}}
2996 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
2999 <p><a rel="mw:ExtLink" class="external text" 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>
3003 Parsoid: pipe in transclusion parameter
3005 {{echo|http://foo.com/a|b}}
3007 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3010 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" 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>
3014 Parsoid: Pipe in external link target and content in template parameter
3016 parsoid=html2wt,wt2wt
3018 {{echo|[http://foo.com/a|b a|b]}}
3020 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3023 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3024 typeof="mw:Transclusion"
3025 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3026 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3030 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3034 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3036 <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>
3040 Templates: Don't escape already nowiki-escaped text in template parameters
3042 parsoid=html2wt,wt2wt
3044 {{echo|foo<nowiki>|</nowiki>bar}}
3045 {{echo|<nowiki><div></nowiki>}}
3046 {{echo|<nowiki></nowiki>}}
3053 <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>
3054 <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>
3055 <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>
3061 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3063 parsoid=html2wt,wt2wt
3065 {{echo|{{echo|1=bar}}}}
3070 <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>
3075 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3082 <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>
3087 Templates: Preserve blank parameter names
3094 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3098 Templates: Preserve blank parameter names in other positions
3100 {{blank_param|bar|=foo}}
3106 <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
3111 ### Parsoid-centric tests for testing RT edge cases for pre
3115 1a. Indent-Pre and Comments
3128 1b. Indent-Pre and Comments
3141 1c. Indent-Pre and Comments
3154 1d. Indent-Pre and Comments
3155 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3168 2a. Indent-Pre and tables
3189 2b. Indent-Pre and tables
3205 2c. Indent-Pre and tables (T44252)
3222 2d. Indent-Pre and tables
3239 <tbody><tr><td> b</td></tr>
3244 2e. Indent-Pre and table-line syntax
3257 2f. Indent-pre started by table-line syntax
3276 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3281 Text that should be rendered preformatted
3289 <pre>Text that should be rendered preformatted
3298 3a. Indent-Pre and block tags (single-line html)
3302 c <blockquote> foo </blockquote>
3307 c <blockquote> foo </blockquote>
3308 <pre><span> foo </span>
3311 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3312 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3313 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3314 <pre><span> foo </span>
3317 <p> a </p><p> foo </p><p>
3318 b </p><div> foo </div><p>
3319 c </p><blockquote><p> foo </p></blockquote>
3320 <pre><span> foo </span>
3325 3b. Indent-Pre and block tags (multi-line html)
3330 <pre>a <span>foo</span>
3335 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3336 b <div data-parsoid='{"stx":"html"}'> foo </div>
3338 <pre>a <span>foo</span>
3340 b </p><div> foo </div>
3344 3c. Indent-Pre and block tags (pre-content on separate line)
3408 4. Indent-Pre and extension tags
3419 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3423 5. Indent-Pre and html pre
3425 <pre class="123">hi</pre>
3427 <pre class="123">hi</pre>
3430 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3434 Render paragraphs when indent-pre is suppressed in blocklevels
3451 4. Multiple spaces at start-of-line
3469 ## NOTE: the leading white-space chars on empty line are significant
3471 5a. White-space in indent-pre
3483 ## NOTE: the leading white-space chars on empty line are significant
3485 5b. White-space in indent-pre
3504 5c. White-space in indent-pre
3517 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3540 7a. Indent-pre and category links
3542 parsoid=wt2html,wt2wt
3544 [[Category:foo]] <!-- No pre-wrapping -->
3545 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3548 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3549 <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 -->
3552 ## We used to, but no longer wt2wt this test since the default serializer
3553 ## will normalize all categories to serialize on their own line.
3554 ## This wikitext usage is going to be fairly uncommon in production and
3555 ## selser will take care of preserving formatting in those scenarios.
3557 7b. Indent-pre and category links
3562 [[Category:foo]] {{echo|b}}
3564 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3565 <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>
3569 Indent-Pre: Newlines in comments shouldn't affect sol state
3584 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3588 HTML-pre: 1. embedded newlines
3620 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3622 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3625 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3630 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3638 HTML-pre: big spaces
3674 <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"}}'>
3693 HTML-pre: 2: indented text
3706 HTML-pre: 3: other wikitext
3725 <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
3734 ### Definition lists
3741 <dl><dt>name </dt>
3742 <dd>Definition</dd></dl>
3747 Definition list for indentation only
3751 <dl><dd>Indented text</dd></dl>
3756 Definition list with no space
3761 <dd>Definition</dd></dl>
3766 Definition list with URL link
3768 ;http://example.com/ :definition
3770 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3771 <dd>definition</dd></dl>
3776 Definition list with bracketed URL link
3778 ;[http://www.example.com/ Example]:Something about it
3780 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3781 <dd>Something about it</dd></dl>
3786 Definition list with wikilink containing colon
3788 ; [[Help:FAQ]]:The least-read page on Wikipedia
3790 <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>
3791 <dd>The least-read page on Wikipedia</dd></dl>
3795 # At Brion's and JeLuF's insistence... :)
3797 Definition list with news link containing colon
3799 ;news:alt.wikipedia.rox: This isn't even a real newsgroup!
3801 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3802 <dd>This isn't even a real newsgroup!</dd></dl>
3805 <dl><dt> <a rel="mw:ExtLink" class="external free" 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>
3809 Malformed definition list with colon
3811 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3813 <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>
3818 Definition lists: colon in external link text
3820 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
3822 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
3823 <dd>OK, I made that up</dd></dl>
3828 Definition lists: colon in HTML attribute
3830 ;<b style="display: inline">bold</b>
3832 <dl><dt><b style="display: inline">bold</b></dt></dl>
3837 Definition lists: self-closed tag
3839 ;one<br/>two :two-line fun
3841 <dl><dt>one<br />two </dt>
3842 <dd>two-line fun</dd></dl>
3847 Definition lists: ignore colons inside tags
3849 ;one <b>two : tag <i>fun:</i>:</b>:def
3851 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3857 Definition lists: excess closed tags
3859 ;one</b>two :bad tag fun
3861 <dl><dt>onetwo </dt>
3862 <dd>bad tag fun</dd></dl>
3866 <dd>bad tag fun</dd>
3871 T13748: Literal closing tags
3875 <dd>test test test test test</dd>
3877 <dd>test test test test test</dd>
3882 <dd>test test test test test</dd>
3884 <dd>test test test test test</dd>
3890 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3898 <dl><dt>term </dt>
3899 <dd>description</dd></dl>
3900 <ul><li>unordered</li></ul>
3906 Definition list with empty definition and following paragraph
3919 Nested definition lists using html syntax
3932 Definition Lists: No nesting: Multiple dd's
3945 Definition Lists: Indentation: Regular
3953 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3958 Definition Lists: Indentation: Missing 1st level
3964 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3969 Definition Lists: Indentation: Multi-level indent
3973 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3978 Definition Lists: Hacky use to indent tables
3985 should be left alone
3987 <dl><dd><dl><dd><table>
3992 </td></tr></table></dd></dl></dd></dl>
3994 should be left alone
3999 Definition Lists: Hacky use to indent tables (with content following table)
4004 |} <!--c1--> this text should be part of the dl
4011 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4018 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4022 Definition Lists: Hacky use to indent tables, with comments (T65979)
4030 should be left alone
4033 <dl><dd><dl><dd><table><tr>
4036 </tr></table><!-- bar --></dd></dl></dd></dl>
4038 should be left alone</p>
4042 Definition Lists: Hacky use to indent tables, with comment before table
4048 <dl><dd><dl><dd><!-- foo --><table><tr>
4050 </tr></table></dd></dl></dd></dl>
4053 # The trailing whitespace in this test is to catch a regression in
4054 # Parsoid after T54473.
4056 Definition Lists: Hacky use to indent tables (WS-insensitive)
4065 </td></tr></table></dd></dl>
4069 <tbody><tr><td>a</td></tr>
4070 </tbody></table> </dd></dl>
4073 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4074 ## as an empty dt item. It also ignores all but the last ";" when followed
4075 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4076 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4079 ## Ex: ";;t2 ::d2" is transformed into:
4091 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4092 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4103 ## All Parsoid only definition list tests have this difference.
4105 ## See also: https://phabricator.wikimedia.org/T8569
4106 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4109 Table / list interaction: indented table with lists in table contents
4131 </td></tr></table></dd></dl>
4136 Table / list interaction: lists nested in tables nested in indented lists
4159 </td></tr></table></dd></dl>
4166 Definition Lists: Nesting: Multi-level (Parsoid only)
4194 Definition Lists: Nesting: Test 2
4201 <dl><dd>d2</dd></dl></dd></dl>
4206 Definition Lists: Nesting: Test 3
4211 <dl><dd><dl><dt>t1</dt>
4213 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4218 Definition Lists: Nesting: Test 4
4223 <dl><dd><dl><dd><dl><dt>t3</dt>
4224 <dd>d3</dd></dl></dd></dl></dd></dl>
4229 ## The Parsoid team believes the following three test exposes a
4230 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4231 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4232 ## It also exposes a "misfeature" in tidy, which doesn't like
4233 ## <dl> tags with a single <dt> child; it converts the <dt> into
4234 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4236 Definition Lists: Mixed Lists: Test 1
4242 <dl><dd><dl><dt><ul><li>foo</li>
4243 <li>bar</li></ul></dt></dl>
4244 <dl><dt>baz</dt></dl></dd></dl>
4247 <dl><dd><dl><dt><ul><li>foo</li>
4248 <li>bar</li></ul></dt></dl>
4249 <dl><dt>baz</dt></dl></dd></dl>
4267 Definition Lists: Mixed Lists: Test 2
4272 <ul><li><dl><dd>d1</dd>
4273 <dd>d2</dd></dl></li></ul>
4279 Definition Lists: Mixed Lists: Test 3
4284 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4285 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4291 Definition Lists: Mixed Lists: Test 4
4296 <ul><li><dl><dt>d1 </dt>
4299 <dd>d4</dd></dl></li></ul>
4305 Definition Lists: Mixed Lists: Test 5
4311 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4317 Definition Lists: Mixed Lists: Test 6
4322 <ol><li><ul><li><dl><dd>d1
4323 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4329 Definition Lists: Mixed Lists: Test 7
4334 <dl><dd><ul><li>d1</li>
4335 <li>d2</li></ul></dd></dl>
4341 Definition Lists: Mixed Lists: Test 8
4346 <dl><dd><ul><li>d1</li></ul>
4347 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4353 Definition Lists: Mixed Lists: Test 9
4357 <ul><li><dl><dt>foo </dt>
4358 <dd>bar</dd></dl></li></ul>
4364 Definition Lists: Mixed Lists: Test 10
4368 <ul><li><ol><li><dl><dt>foo </dt>
4369 <dd>bar</dd></dl></li></ol></li></ul>
4373 # The Parsoid team disagrees with the PHP parser's seemingly-random
4374 # rules regarding dd/dt on the next few tests. Parsoid is more
4375 # consistent, and recognizes the shared nesting and keeps the
4376 # still-open tags around until the nesting is complete.
4378 # This is a regression test for T175099
4380 Definition Lists: Mixed Lists: Test 11
4387 <ul><li>b</li></ul></dd></dl>
4391 <dd><ul><li>b</li></ul></dd></dl>
4394 # FIXME: Maybe get rid of this test?
4396 Definition Lists: Mixed Lists: Test 12
4401 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4402 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4403 <dl><dt>boo </dt>
4404 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4407 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4408 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4409 <dl><dt>boo </dt>
4410 <dd>baz</dd></dl></li></ol></li></ul>
4427 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4428 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4432 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4433 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4441 # FIXME: Maybe get rid of this test?
4443 # * The test is wrong, there are two colons where there should be :;
4444 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4446 Definition Lists: Weird Ones: Test 1
4448 *#;*::;;foo :bar (who uses this?)
4450 <ul><li><ol><li><dl><dt>foo </dt>
4451 <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>
4468 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4469 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4481 Definition Lists: colons occurring in tags
4498 <dt><span>a:b</span></dt>
4499 <dt><div>a:b</div></dt>
4500 <dt><div>a</div></dt>
4504 <dt><i>a:b</i></dt></dl>
4505 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4507 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4509 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4510 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4511 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4512 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4514 <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>
4515 <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>
4516 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4519 # Parsoid's output differs here again because it shares
4520 # nesting between the two lists unlike the PHP parser.
4521 # Unsure which is more desirable.
4523 Definition Lists: colons and tables 1
4535 </td></tr></table></dd></dl>
4539 </td></tr></table></dd></dl>
4545 </td></tr></table></dd>
4549 </td></tr></table></dd></dl>
4552 # FIXME: Does this need a html/php section?
4554 Definition Lists: template interaction
4556 ::{{definition_list}}
4559 ::{{definition_list}}
4564 <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">
4565 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4567 <dl><dd data-parsoid='{}'>one
4568 <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">
4569 </span><dd about="#mwt2">two
4571 <dd>three</dd></dl></dd>
4572 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4580 External links: non-bracketed
4582 Non-bracketed: http://example.com
4584 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4588 # parsoid doesn't explicitly mark autonumbered links, see T55505
4590 External links: numbered
4592 Numbered: [http://example.com]
4593 Numbered: [http://example.net]
4594 Numbered: [http://example.com]
4596 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4597 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4598 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4601 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4602 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4603 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4607 External links: specified text
4609 Specified text: [http://example.com link]
4611 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4616 External links: trail
4618 Linktrails should not work for external links: [http://example.com link]s
4620 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4625 External links: dollar sign in URL
4627 http://example.com/1$2345
4629 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4633 # parsoid doesn't explicitly mark autonumbered links, see T55505
4635 External links: dollar sign in URL (autonumber)
4637 [http://example.com/1$2345]
4639 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4642 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4646 External links: open square bracket forbidden in URL (T6377)
4648 parsoid=wt2html,wt2wt,html2html
4650 http://example.com/1[2345
4652 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4655 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4659 External links: open square bracket forbidden in URL (named) (T6377)
4661 parsoid=wt2html,html2html
4663 [http://example.com/1[2345]
4665 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4668 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4671 # parsoid adds a space before the link name
4673 External links: open square bracket forbidden in URL (named) (T6377)
4676 [http://example.com/1 [2345]
4678 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4683 External links: nowiki in URL link text (T8230)
4685 [http://example.com/ <nowiki>''example site''</nowiki>]
4687 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4692 External links: newline forbidden in text (T8230 regression check)
4694 [http://example.com/ first
4697 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4703 External links: Pipe char between url and text
4705 [http://example.com | link]
4707 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4712 External links: protocol-relative URL in brackets
4714 [//example.com/ Test]
4716 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4720 # parsoid doesn't explicitly mark autonumbered links, see T55505
4722 External links: protocol-relative URL in brackets without text
4726 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4729 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4733 External links: protocol-relative URL in free text is left alone
4737 <p>//example.com/Foo
4742 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4744 foo//example.com/Foo
4746 <p>foo//example.com/Foo
4750 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4752 External links: with no contents
4754 parsoid=wt2html,wt2wt
4756 [http://en.wikipedia.org/wiki/Foo]
4758 [[wikipedia:Foo|Bar]]
4760 [[wikipedia:Foo|<span>Bar</span>]]
4762 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4763 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4764 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4767 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4768 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4769 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4773 External links: Free with trailing punctuation
4783 http://example.com/url_with_(brackets)
4784 (http://example.com/url_without_brackets)
4785 http://example.com/url_with_entity&
4786 http://example.com/url_with_entity&
4787 http://example.com/url_with_entity&
4788 http://example.com/url_with_entity
4789 http://example.com/url_with_entity 
4790 http://example.com/url_with_entity 
4791 http://example.com/url_with_entity<
4792 http://example.com/url_with_entity<
4793 http://example.com/url_with_entity<
4795 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4796 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4797 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4798 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4799 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4800 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4801 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4802 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4803 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4804 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4805 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4806 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4807 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4808 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4809 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4810 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4811 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4812 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4813 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4816 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
4817 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
4818 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
4819 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
4820 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
4821 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
4822 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
4823 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
4824 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4825 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4826 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4827 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4828 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4829 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4830 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4831 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4832 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4833 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4834 <a rel="mw:ExtLink" class="external free" 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>
4838 External links: tricky Parsoid html2html case
4840 parsoid=wt2html,wt2wt,html2html
4842 http://example.com/url_with_entity&amp;
4844 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4847 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4851 External links: Free with trailing quotes (T113666)
4853 '''News:''' Stuff here
4857 <p><b>News:</b> Stuff here
4858 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4861 <p><b>News:</b> Stuff here</p>
4862 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4866 External links: with entity
4868 [http:// www.librarieswithoutborders.org Libraries without borders]
4870 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4873 <p><a rel="mw:ExtLink" class="external text" 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>
4877 External links: Lone protocols are never linked (T105697)
4896 External links: No preceding word characters allowed (T67278)
4898 NOPEhttp://example.com
4899 N0http://example.com
4900 ok:http://example.com
4901 ok-http://example.com
4903 <p>NOPEhttp://example.com
4904 N0http://example.com
4905 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4906 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4911 External links: nofollow domain exception
4913 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4915 <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>.
4922 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4924 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4929 External image from https
4931 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4933 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4938 External image (when not allowed)
4940 wgAllowExternalImages=0
4942 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4944 <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>
4949 Link to non-http image, no img tag
4951 Link to non-http image, no img tag: ftp://example.com/test.jpg
4953 <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>
4958 External links: terminating separator
4960 Terminating separator: http://example.com/thing,
4962 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4967 External links: intervening separator
4969 Intervening separator: http://example.com/1,2,3
4971 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4976 External links: old bug with URL in query
4978 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4980 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4985 External links: old URL-in-URL bug, mixed protocols
4987 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4989 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4993 # Since Parsoid is starting to emit canonical wikitext for links,
4994 # [http://example.com http://example.com] will not RT back to that
4997 External links: URL in text
5001 URL in text: [http://example.com http://example.com]
5003 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5006 <p>URL in text: <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5010 External links: Clickable images
5012 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5014 <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>
5017 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
5021 External links: raw ampersand
5023 Old & use: http://x&y
5025 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5030 External links: encoded ampersand
5032 Old & use: http://x&y
5034 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5037 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5041 External links: encoded equals (T8102)
5043 http://example.com/?foo=bar
5045 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5048 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5052 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5053 ## does it number them. As discussed in T55505, we can identify
5054 ## autonumbered links via CSS.
5058 External links: [raw ampersand]
5060 Old & use: [http://x&y]
5062 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5065 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5068 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5069 # mode will return the [raw ampersand] wikitext
5071 External links: [encoded ampersand]
5073 parsoid=wt2html,wt2wt,html2html
5075 Old & use: [http://x&y]
5077 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5080 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5084 External links: [raw equals]
5086 [http://example.com/?foo=bar]
5088 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5091 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5094 # note that parsoid html is identical to [raw equals] case; so html2wt
5095 # mode will return the [raw equals] wikitext
5097 External links: [encoded equals] (T8102)
5099 parsoid=wt2html,wt2wt,html2html
5101 [http://example.com/?foo=bar]
5103 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5106 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5109 # xxx parsoid strips the IDN character, so the round-trip tests will
5110 # obviously fail and are disabled. --cscott
5112 External links: [IDN ignored character reference in hostname; strip it right off]
5114 parsoid=wt2html,wt2wt,html2html
5116 [http://e‌xample.com/]
5118 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5121 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5124 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5125 # Where an external link could easily circumvent the sanitization of the text of
5126 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5127 # test demands a higher standard. That's a bit strange.
5131 # http://example.com -> [http://example.com|http://example.com]
5132 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5134 # The first example is sanitized, but the second is not. Any security benefits
5135 # from this production are trivial to circumvent. Either remove this test and
5136 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5137 # the test accordingly.
5141 # xxx parsoid strips the IDN character, so the round-trip tests will
5142 # obviously fail and are disabled. --cscott
5144 External links: IDN ignored character reference in hostname; strip it right off
5146 parsoid=wt2html,html2html
5148 http://e‌xample.com/
5150 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5153 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5157 External links: www.jpeg.org (T2554)
5161 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5165 # parsoid doesn't explicitly mark autonumbered links, see T55505
5167 External links: URL within URL (T2002)
5169 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5171 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5174 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5178 T2361: URL inside bracketed URL
5180 [http://www.example.com/foo http://www.example.com/bar]
5182 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5187 T2361: URL within URL, not bracketed
5189 http://www.example.com/foo?=http://www.example.com/bar
5191 <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>
5196 T2289: ">"-token in URL-tail
5198 http://www.example.com/<hello>
5200 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5205 T2289: literal ">"-token in URL-tail
5207 http://www.example.com/<b>html</b>
5209 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5212 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5216 T2289: ">"-token in bracketed URL
5218 [http://www.example.com/<hello> stuff]
5220 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5225 T2289: literal ">"-token in bracketed URL
5227 [http://www.example.com/<b>html</b> stuff]
5229 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5234 T2289: literal double quote at end of URL
5236 http://www.example.com/"hello"
5238 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5243 T2289: literal double quote in bracketed URL
5245 [http://www.example.com/"hello" stuff]
5247 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5252 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5254 [http://www.example.com test]
5256 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5261 External links: link text with spaces
5263 [http://www.example.com a b c]
5264 [http://www.example.com ''a'' ''b'']
5266 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5267 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5271 # Note edge case difference between PHP and Parsoid here.
5273 External links: wiki links within external link (T5695)
5275 parsoid=wt2html,html2html
5277 [http://example.com [[wikilink]] embedded in ext link]
5279 [http://example.com test [[wikilink]] embedded in ext link]
5281 <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>
5282 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </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>
5285 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5286 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5290 T2787: Links with one slash after the url protocol are invalid
5294 [http:/example.com title]
5296 <p>http:/example.com
5297 </p><p>[http:/example.com title]
5302 Bracketed external links with template-generated invalid target
5304 [{{echo|http:/example.com}} title]
5306 <p>[http:/example.com title]
5310 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5312 Broken wikilinks (but not external links) prevent templates from closing
5316 [http://example.com x
5318 {{echo|[http://example.com x}}
5324 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5325 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5327 </p><p>{{echo|[[Foo}}
5330 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5331 <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" class="external free" href="http://example.com">http://example.com</a> x</p>
5333 <p>{{echo|[[Foo}}</p>
5337 Wikilinks with embedded newlines are not broken
5348 <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>
5360 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5364 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5365 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5369 T4702: Mismatched <i>, <b> and <a> tags are invalid
5371 ''[http://example.com text'']
5372 [http://example.com '''text]'''
5373 ''Something [http://example.com in italic'']
5374 ''Something [http://example.com mixed''''', even bold]'''
5375 '''''Now [http://example.com both''''']
5377 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5378 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5379 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5380 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5381 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5389 http://www.example.com/?title=AT%26T
5391 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5394 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5397 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5398 # % is actually legal in HTML5. Any change in output would need testing though.
5400 T6781, T7267: %25 in URL
5402 http://www.example.com/?title=100%25_Bran
5404 <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>
5407 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5411 T6781, T7267: %28, %29 in URL
5413 http://www.example.com/?title=Ben-Hur_%281959_film%29
5415 <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>
5418 <p><a rel="mw:ExtLink" 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></p>
5423 T6781: %26 in autonumber URL
5425 [http://www.example.com/?title=AT%26T]
5427 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5430 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5434 T6781, T7267: %26 in autonumber URL
5436 [http://www.example.com/?title=100%25_Bran]
5438 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5441 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5445 T6781, T7267: %28, %29 in autonumber URL
5447 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5449 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5452 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5457 T6781: %26 in bracketed URL
5459 [http://www.example.com/?title=AT%26T link]
5461 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5464 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5468 T6781, T7267: %25 in bracketed URL
5470 [http://www.example.com/?title=100%25_Bran link]
5472 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5477 T6781, T7267: %28, %29 in bracketed URL
5479 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5481 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5484 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5488 External link containing a period in the anchor. (T65947)
5490 [//foo.org/bar#baz. bang]
5492 [//foo.org/bar. bang]
5494 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5495 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5498 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5499 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5503 External link containing a single quote. (T65947)
5507 [//foo.org/bar'baz bang]
5509 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5510 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5513 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5514 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5518 External link containing double-single-quotes in text '' (T6598 sanity check)
5520 Some [http://example.com/ pretty ''italics'' and stuff]!
5522 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5527 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5529 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5531 <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>
5535 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5537 External link containing double-single-quotes with no space separating the url from text in italics
5539 [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]].]
5541 <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>.
5544 <p><a rel="mw:ExtLink" 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 rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5548 External link with comments in link text
5550 [http://www.google.com Google <!-- comment -->]
5552 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5555 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5559 External link to bare IPv4 address
5561 [http://192.168.0.1 Link]
5563 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5566 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5570 URL-encoding in URL functions (single parameter)
5572 {{localurl:Some page|amp=&}}
5574 <p>/index.php?title=Some_page&amp=&
5579 URL-encoding in URL functions (multiple parameters)
5581 {{localurl:Some page|q=?&=&}}
5583 <p>/index.php?title=Some_page&q=?&amp=&
5590 http://example.com/index.php?foozoid%5B%5D=bar
5592 http://example.com/index.php?foozoid[]=bar
5594 <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>
5595 </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>
5598 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5600 <p><a rel="mw:ExtLink" class="external free" 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>
5604 IPv6 urls, autolink format (T23261)
5606 http://[2404:130:0:1000::187:2]/index.php
5608 Examples from RFC 2373, section 2.2:
5610 *http://[1080::8:800:200C:417A]/unicast
5611 *http://[FF01::101]/multicast
5612 *http://[::1]/loopback
5613 *http://[::]/unspecified
5614 *http://[::13.1.68.3]/ipv4compat
5615 *http://[::FFFF:129.144.52.38]/ipv4compat
5617 Examples from RFC 2732, section 2:
5619 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5620 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5621 *http://[3ffe:2a00:100:7031::1]
5622 *http://[1080::8:800:200C:417A]/foo
5623 *http://[::192.9.5.5]/ipng
5624 *http://[::FFFF:129.144.52.38]:80/index.html
5625 *http://[2010:836B:4179::836B:4179]
5627 <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>
5628 </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:
5630 <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>
5631 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5632 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5633 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5634 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5635 <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>
5636 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5638 <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>
5639 <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>
5640 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5641 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5642 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5643 <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>
5644 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5647 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5649 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5650 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5651 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5652 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5653 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5654 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5655 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5657 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5658 <ul><li><a rel="mw:ExtLink" 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>
5659 <li><a rel="mw:ExtLink" 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>
5660 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5661 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5662 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5663 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5664 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5668 IPv6 urls, bracketed format (T23261)
5670 [http://[2404:130:0:1000::187:2]/index.php test]
5672 Examples from RFC 2373, section 2.2:
5674 *[http://[1080::8:800:200C:417A] unicast]
5675 *[http://[FF01::101] multicast]
5676 *[http://[::1]/ loopback]
5677 *[http://[::] unspecified]
5678 *[http://[::13.1.68.3] ipv4compat]
5679 *[http://[::FFFF:129.144.52.38] ipv4compat]
5681 Examples from RFC 2732, section 2:
5683 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5684 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5685 *[http://[3ffe:2a00:100:7031::1] 3]
5686 *[http://[1080::8:800:200C:417A]/foo 4]
5687 *[http://[::192.9.5.5]/ipng 5]
5688 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5689 *[http://[2010:836B:4179::836B:4179] 7]
5691 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5692 </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:
5694 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5695 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5696 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5697 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5698 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5699 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5700 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5702 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5703 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5704 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5705 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5706 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5707 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5708 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5711 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5713 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5714 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5715 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5716 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5717 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5718 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5719 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5721 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5722 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5723 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5724 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5725 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5726 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5727 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5728 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5732 Non-extlinks in brackets
5741 [{{echo|foo}} ''bar'']
5742 [{{echo|foo}}l's] errand
5743 [{{echo|foo}}l's errand]
5745 [url=http://example.com]
5746 [http:// bare protocols don't count]
5759 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5760 [http:// bare protocols don't count]
5768 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5769 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
5770 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
5771 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
5772 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
5773 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5774 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5775 [http:// bare protocols don't count]</p>
5779 Percent encoding in external links
5781 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5783 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5786 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5790 Use url link syntax for links where the content is equal the link target
5794 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5797 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5801 Parenthesis in external links, especially URL links
5805 http://example.com/test)
5807 http://example.com/(test)
5809 http://example.com/((test)
5811 (http://example.com/(test))
5813 (http://example.com/(test)))))
5815 http://example.com/a)b
5817 [http://example.com) foo]
5819 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5820 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5821 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5822 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5823 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5824 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5825 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5826 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5829 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
5830 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
5831 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
5832 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
5833 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
5834 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5835 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
5836 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
5840 Parenthesis in external links, w/ transclusion or comment
5842 (http://example.com/{{echo|hi}})
5844 (http://example.com<!-- hi -->)
5846 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5847 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5850 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" 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>
5852 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
5856 Serialize <a> tags with invalid link targets as plain text
5858 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5860 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5861 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5862 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5863 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5866 <nowiki>*</nowiki>text
5867 <nowiki>[[foo]]</nowiki>
5868 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5872 mw:ExtLink -vs- mw:WikiLink (T94723)
5876 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5877 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5878 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5879 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5881 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5882 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5890 [[:en:European_Robin|European Robin]]
5891 [[:en:European_Robin|European Robin]]
5895 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5899 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5901 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5912 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5914 Normal text. '''''Bold italic text.''''' Normal text.
5916 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5917 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5922 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5923 # parser strips. The wikitext contains just the first half of the bold
5926 Unclosed and unmatched quotes
5928 '''''Bold italic text '''with bold deactivated''' in between.'''''
5930 '''''Bold italic text ''with italic deactivated'' in between.'''''
5934 ..spanning two paragraphs (should not work).'''
5936 '''Bold tag left open
5938 ''Italic tag left open
5942 <!-- Unmatching number of opening, closing tags: -->
5943 '''This year''''s election ''should'' beat '''last year''''s.
5945 ''Tom'''s car is bigger than ''Susan'''s.
5947 Plain ''italic'''s plain
5949 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5950 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5951 </p><p><b>Bold text..</b>
5952 </p><p>..spanning two paragraphs (should not work).
5953 </p><p><b>Bold tag left open</b>
5954 </p><p><i>Italic tag left open</i>
5956 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5957 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5958 </p><p>Plain <i>italic'</i>s plain
5961 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5962 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5963 </p><p><b>Bold text..</b>
5964 </p><p>..spanning two paragraphs (should not work).<b></b>
5965 </p><p><b>Bold tag left open</b>
5966 </p><p><i>Italic tag left open</i>
5969 <!-- Unmatching number of opening, closing tags: -->
5970 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5971 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5972 </p><p>Plain <i>italic'</i>s plain
5979 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5982 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5983 # is the bare minimum required by the spec, see:
5984 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5985 # Parsoid team replies: empty table tags are legal in HTML5
5987 A table with no data.
6000 A table with stray table end tags on start tag line (wt2html)
6004 {|style="color: red;"|}
6006 {|style="color: red;" |}
6010 {|style="color: red;"|} id="foo"
6014 {|style="color: red;" |} id="foo"
6018 <table style="color: red;"></table>
6020 <table style="color: red;">
6026 <table style="color: red;" id="foo">
6032 <table style="color: red;" id="foo">
6041 A table with no data (take 2)
6049 # A table with nothing but a caption is invalid XHTML, we might want to render
6050 # this as <p>caption</p>
6051 # Parsoid team replies: table with only a caption is legal in HTML5
6053 A table with nothing but a caption
6061 </caption><tr><td></td></tr></table>
6064 <table><caption>caption</caption></table>
6068 A table with caption with default-spaced attributes and a table row
6071 |+ style="color: red;" | caption1
6077 <caption style="color: red;">caption1
6086 A table with captions with non-default spaced attributes and a table row
6089 |+style="color: red;"|caption2
6090 |+ style="color: red;"|caption3
6096 <caption style="color: red;">caption2
6098 <caption style="color: red;">caption3
6107 Table td-cell syntax variations
6112 |style='color:red;'|baz
6113 |style='color:red;'||baz
6120 <td>foo bar foo</td>
6123 <td style="color:red;">baz
6125 <td>style='color:red;'</td>
6153 Simple table but with multiple dashes for row wikitext
6172 Multiplication table
6174 {| border="1" cellpadding="2"
6175 |+Multiplication table
6195 <table border="1" cellpadding="2">
6196 <caption>Multiplication table
6243 Accept "||" in table headings
6258 Accept "!!" in table data
6272 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6277 Accept "||" in indented table headings
6287 </th></tr></table></dd></dl>
6292 Accept "!!" in templates
6306 <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>
6310 Accept "!!" in table headings after newline
6327 <p>b!!c</p></th></tr>
6332 Accept "!!" in table data of mixed wikitext / html syntax
6336 <tr><td>b!!c</td></tr>
6342 </th></tr><tr><td>b!!c</td></tr>
6346 <tbody><tr><th>a</th></tr>
6347 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6352 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6369 Accept "| !" at start of line in tables (ignore !-attribute)
6373 |!style="color:red"|bar
6385 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 +/-
6389 |style='color:red;'|+1
6390 |style='color:blue;'|-1
6402 <td style="color:red;">+1
6404 <td style="color:blue;">-1
6428 |rowspan=2|Cell 2, row 1 (and 2)
6439 <td rowspan="2">Cell 2, row 1 (and 2)
6457 {| bgcolor=#ABCDEF border=2
6462 |the original table again
6470 <table bgcolor="#ABCDEF" border="2">
6478 <td>the original table again
6484 Invalid attributes in table cell (T3830)
6498 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6502 | title="foo<nowiki>|</nowiki>" |bar
6503 | title="foo<nowiki>|</nowiki>" bar
6510 <td title="foo|">bar
6512 <td>title="foo|" bar
6517 <tbody><tr><td title="foo">bar</td>
6518 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6519 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6523 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6524 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6525 # *2wt modes will fail.
6527 Table security: embedded pipes
6529 parsoid=wt2html,html2html
6532 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6536 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6537 <td>]" onmouseover="alert(document.cookie)">test
6545 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" 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>
6549 Element attributes with double ! should not be broken up by <th>
6552 !hi <div class="!!">ha</div> ho
6557 <th>hi <div class="!!">ha</div> ho
6562 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6567 ! and || in element attributes should not be parsed as <th>/<td>
6570 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6575 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6580 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6584 # FIXME: The output seems broken. Filed as T110268.
6586 ! and || in td attributes should not be parsed as <th>/<td>
6591 |style="color: red !important;" data-contrived="put this here ||"|foo
6596 <td>style="color: red !important;" data-contrived="put this here</td>
6602 <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>
6607 Break on | in element attribute in template
6609 parsoid=wt2html,html2html
6611 {{echo|1=<div class="hi|ho">ha</div>}}
6613 <p>ho">ha</div>
6616 <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>
6620 Break on | in element attribute name in template
6622 {{echo|<div cla|ss="hiho">ha</div>}}
6624 <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>
6628 Don't break on | in extension attribute in template
6630 {{echo|<ref name="hi|ho">ha</ref>}}
6634 <p><sup 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></sup></p>
6636 <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>
6639 ## We don't support roundtripping of these attributes in Parsoid.
6640 ## Selective serialization takes care of preventing dirty diffs.
6641 ## But, on edits, we dirty-diff the invalid attribute text.
6643 Invalid text in table attributes should be discarded
6647 {| <span>boo</span> style='border:1px solid black'
6648 | <span>boo</span> style='color:blue' |1
6649 |<span>boo</span> style='color:blue'|2
6652 <table style="border:1px solid black">
6654 <td style="color:blue">1
6656 <td style="color:blue">2
6660 <table style="border:1px solid black">
6662 <td style="color:blue">1</td>
6663 <td style="color:blue">2</td>
6669 Invalid text in table attributes should be preserved by selective serializer
6672 "modes": ["selser"],
6674 ["td:first-child", "text", "abc"],
6675 ["td + td", "text", "xyz"]
6679 {| <span>boo</span> style='border:1px solid black'
6680 | <span>boo</span> style='color:blue' | 1
6681 |<span>boo</span> style='color:blue'| 2
6684 {| <span>boo</span> style='border:1px solid black'
6685 | <span>boo</span> style='color:blue' |abc
6686 |<span>boo</span> style='color:blue'|xyz
6691 1. Template-generated table cell attributes and cell content
6696 || {{table_attribs_5}}
6697 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6698 |align=center {{table_attribs}}
6699 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6704 <td style="color:red;">Foo
6706 <td style="color:red;">Foo
6708 <td>style="color:red;"</td>
6711 <td style="color:red;">Foo
6713 <td align="center" style="color:red;">Foo
6715 <td align="center" style="color:red;">Foo
6721 2. Template-generated table cell attributes and cell content
6724 |{{table_attribs_2}}
6729 <td style="color:red;">Foo
6737 <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>
6738 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6743 3. Template-generated table cell attributes and cell content
6746 !align=center {{table_header_cells}}
6748 |align=center {{table_cells}}
6753 <th align="center" style="color:red;">Foo</th>
6754 <th style="color:red;"><i>Bar</i></th>
6755 <th style="color:brown;"><i>Foo</i> and Baz
6758 <td align="center" style="color:red;">Foo</td>
6759 <td style="color:red;"><i>Bar</i></td>
6760 <td style="color:brown;"><i>Foo</i> and Baz
6765 <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>
6766 <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>
6771 4. Template-generated table cell attributes and cell content inside a templated table
6774 !align=center {{table_header_cells}}
6776 |align=center {{table_cells}}
6781 <th align="center" style="color:red;">Foo</th>
6782 <th style="color:red;"><i>Bar</i></th>
6783 <th style="color:brown;"><i>Foo</i> and Baz
6786 <td align="center" style="color:red;">Foo</td>
6787 <td style="color:red;"><i>Bar</i></td>
6788 <td style="color:brown;"><i>Foo</i> and Baz
6792 <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}}]}'>
6793 <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>
6795 <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>
6799 ## Edge case fix to prevent future regressions
6801 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6804 |{{table_attribs_7}}
6809 <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<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
6811 <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>
6815 Table with row followed by newlines and table heading
6817 parsoid=wt2html,html2html
6835 Table with empty line following the start tag
6837 parsoid=wt2html,html2html
6855 Table attributes with empty value
6857 parsoid=wt2html,html2html
6870 <tbody><tr><td style="">hello</td></tr>
6875 Wikitext table with a lot of comments
6898 Wikitext table comments represented in parsoid dom
6900 {|<!--c1--><!--c2-->
6909 </td></tr></tbody></table>
6911 <table><!--c1--><!--c2-->
6912 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6913 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
6918 Wikitext table with double-line table cell
6935 Table cell with a single comment
6952 Table-cell after a comment-only-empty-line
6969 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6971 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
6977 Build table with {{!}}
6979 {{{!}} class="wikitable"
6982 {{!}}- style="color:red;"
6983 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
6986 <table class="wikitable">
6992 <tr style="color:red;">
6994 <td style="color:red;">second data
7000 Build table with pipe as data
7002 {| class="wikitable"
7005 |- style="color:red;"
7006 |data|| style="color:red;" |second data
7008 | style="color:red;" |data with | || style="color:red;" | second data with |
7010 ||data with | |||second data with |
7013 <table class="wikitable">
7019 <tr style="color:red;">
7021 <td style="color:red;">second data
7024 <td style="color:red;">data with |</td>
7025 <td style="color:red;">second data with |
7028 <td>data with |</td>
7029 <td>second data with |
7035 Build table with wikilink
7037 {| class="wikitable"
7038 !header||second header
7039 |- style="color:red;"
7040 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7042 |data||second data [[Main Page|link|text with pipe]]
7045 <table class="wikitable">
7050 <tr style="color:red;">
7051 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7052 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7056 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7061 # The expected HTML structure in this test is debatable. The PHP parser does
7062 # not parse this kind of table at all. The main focus for Parsoid is on
7063 # round-tripping, so this output is ok for now. TODO: revisit!
7065 Wikitext table with html-syntax row
7075 <td>foo</td></tr></tbody></table>
7079 Fostered content in tables: Plain text
7081 parsoid=wt2html,html2html
7099 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7100 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7102 </tr></tbody></table>
7106 Fostered content in tables: Lists
7108 parsoid=wt2html,html2html
7121 <ul><li>a</li></ul><table>
7126 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7127 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7129 </tr></tbody></table>
7133 Template generated table cell with attributes
7137 {{table_attribs_4}} ||a||b
7143 <td style="background-color:#DC241f;" width="10px"></td>
7146 </td></tr></tbody></table>
7149 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7150 <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>
7154 Parsoid: Round-trip tables directly followed by content (T53219)
7156 parsoid=wt2html,wt2wt
7169 </td></tr></tbody></table><p> bar
7173 </td></tr></tbody></table><p><b>quux</b>
7178 Parsoid: Default to a newline after tables in new content (T53219)
7183 <tr><td>foo</td></tr></tbody></table> bar
7185 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7190 <nowiki> </nowiki>bar
7198 Parsoid: newline inducing block nodes don't suppress <nowiki>
7210 Parsoid: Row-syntax table headings followed by comment & table cells
7212 parsoid=wt2html,wt2wt
7216 <!-- foo --> ||baz||quux
7230 <tbody><tr><th> foo </th><th> bar
7231 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7236 Parsoid: Recover better from broken table attributes
7250 </td></tr></tbody></table>
7255 <p>foo</p></td></tr>
7260 Tables: Digest broken attributes on table and tr tag
7271 <tr class='mw-empty-elt'></tr>
7272 <tr class='mw-empty-elt'></tr>
7276 # T137406: Whitespace in the HTML
7278 1. Generate correct wikitext for tables with thead/tbody/tfoot
7283 <caption>Test</caption>
7345 </td></tr></tbody></table>
7348 # T137406: No whitespace in the HTML
7350 2. Generate correct wikitext for tables with thead/tbody/tfoot
7354 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7364 Testing serialization after deletion in references
7373 hi <ref><div id="x">ho</div></ref>
7383 Testing serialization after deletion of table cells
7386 "modes": ["wt2wt", "selser"],
7394 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7404 Testing selser after addition of new row before first row (T125419)
7407 "modes": ["wt2wt", "selser"],
7409 [ "tr", "before", "<tr><td>X</td></tr>" ]
7425 Serialize new table rows in a HTML table using HTML tags
7428 "modes": ["wt2wt", "selser"],
7430 [ "tr", "before", "<tr><td>X</td></tr>" ]
7434 <table><tr><td>a</td></tr></table>
7436 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7440 Serialize new table cells in a HTML row using HTML tags
7443 "modes": ["wt2wt", "selser"],
7445 [ "td", "before", "<td>X</td>" ]
7449 <table><tr><td>a</td></tr></table>
7451 <table><tr><td>X</td><td>a</td></tr></table>
7455 Wikitext tables can be nested inside HTML tables
7459 <table data-parsoid='{"stx":"html"}'>
7462 <tr><td>foo</td></tr>
7477 Serialize wikitext list items as HTML list items when embedded in a HTML list
7481 <ul data-parsoid='{"stx": "html"}'>
7482 <li data-parsoid='{}'>a</li>
7492 # SSS FIXME: Is this actually a good thing given the
7493 # odd nested list output that is generated by MW?
7494 # <ul><li>foo<ul>..</ul></li></ul> instead of
7495 # <ul><li>foo</li><ul>..</ul></ul>
7497 Wikitext lists can be nested inside HTML lists
7501 <ul data-parsoid='{"stx": "html"}'>
7502 <li data-parsoid='{"stx": "html"}'>a
7507 <ul data-parsoid='{"stx": "html"}'>
7530 Plain link, capitalized
7534 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7539 Plain link, uncapitalized
7543 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7550 [[Main Page|The Main Page]]
7552 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7557 Piped link with comment in link text
7559 [[Main Page|The Main<!--front--> Page]]
7561 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7566 Piped link with multiple pipe characters in link text
7568 [[Main Page||The|Main|Page|]]
7570 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7573 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7577 Piped link with no link text
7579 [[Thomas Bek (bishop of St David's)|]]
7581 <p>[[Thomas Bek (bishop of St David's)|]]
7584 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7588 Piped link with empty link text
7590 [[Main Page|<nowiki/>]] - empty nowiki
7591 [[Main Page| ]] - empty space
7592 [[Main Page| ]] - empty non breaking space
7594 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7595 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7596 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7599 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7600 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7601 <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>
7609 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7614 Broken link with fragment
7616 [[Zigzagzogzagzig#zug]]
7618 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7623 Special page link with fragment
7625 [[Special:Version#anchor]]
7627 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7632 Nonexistent special page link with fragment
7634 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7636 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7643 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7645 <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>
7652 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7654 <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>!!!
7665 T45661: Piped links with identical prefixes
7667 [[prefixed article|prefixed articles with spaces]]
7669 [[prefixed article|prefixed articlesaoeu]]
7671 [[Main Page|Main Page test]]
7673 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7674 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7675 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7681 Link with HTML entity in suffix / tail
7683 [[Main Page]]", [[Main Page]]a
7685 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7688 <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>
7692 Link with 3 brackets
7703 Link with 4 brackets
7707 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7712 Piped link with 3 brackets
7714 [[[main page|the main page]]]
7716 <p>[[[main page|the main page]]]
7721 Piped link with extlink-like text
7724 [[Main Page|This is a [bar]]]
7727 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7728 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7729 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7732 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7733 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7734 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7738 Link with multiple pipes
7740 [[Main Page|The|Main|Page]]
7742 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7747 Anchor containing a #. (T65430)
7749 wgFragmentMode=[ 'html5', 'legacy' ]
7751 [[Main Page#And#Link]]
7753 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7756 <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>
7762 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7764 <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>
7769 Link with space in namespace
7771 [[User talk:Foo bar]]
7773 <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>
7778 MemoryAlpha:AlphaTest
7780 This is an article in the MemoryAlpha namespace
7781 (which shadows the memoryalpha interwiki link).
7785 Namespace takes precedence over interwiki link (T53680)
7787 [[MemoryAlpha:AlphaTest]]
7789 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7793 # The previous test doesn't work correctly in html2*, due to not recognizing the
7794 # link as an internal one. This one checks for the correct behavior.
7796 Link to namespace preferred over interwiki with correct rel attribute
7798 parsoid=html2wt,html2html
7800 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7802 [[MemoryAlpha:AlphaTest]]
7806 Piped link to namespace
7808 [[Meta:Disclaimers|The disclaimers]]
7810 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7817 [[Usually caused by a typo (oops}]]
7819 <p>[[Usually caused by a typo (oops}]]
7826 Just a test of an article title containing a percent.
7830 Link containing % (not as a hex sequence)
7833 [[7% Solution|7%25 Solution]]
7835 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7836 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7839 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7840 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7843 # note that the parsoid HTML is identical to the previous test output,
7844 # so the previous test ensures that the html2wt mode will generate the
7845 # "not as a hex sequence" wikitext.
7847 Link containing % as a single hex sequence interpreted to char
7849 parsoid=wt2wt,wt2html,html2html
7852 [[7%25 Solution|7%25 Solution]]
7854 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7855 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7858 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7859 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7863 Link containing % as a double hex sequence interpreted to hex sequence
7867 <p>[[7%2525 Solution]]
7871 ## Example for such a section: == < ==
7873 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7875 wgFragmentMode=[ 'html5', 'legacy' ]
7877 [[%23%3c]][[%23%3e]]
7879 <p><a href="#<">#<</a><a href="#>">#></a>
7882 <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>
7885 ## Example for such a section: == < ==
7887 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7889 wgFragmentMode=[ 'legacy' ]
7891 [[%23%3c]][[%23%3e]]
7893 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7898 Link containing "<#" and ">#" as a hex sequences
7900 [[%3c%23]][[%3e%23]]
7902 <p>[[%3c%23]][[%3e%23]]
7907 Link containing an equals sign
7909 [[Special:BookSources/isbn=4-00-026157-6]]
7911 <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>
7914 <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>
7920 Just a test of an article title containing a tilde.
7923 # note that links containing signatures, like [[Foo~~~~]], are
7924 # massaged by the pre-save transform (PST) and so the tildes are never
7925 # seen by the parser.
7927 Link containing a tilde
7931 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7934 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7938 Link containing double-single-quotes '' (T6598)
7940 [[Lista d''e paise d''o munno]]
7942 <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>
7945 <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>
7949 Link containing double quotes and spaces
7953 <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>
7956 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7960 File containing double quotes and spaces
7962 [[File:Cool "Gator".png]]
7964 <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>
7968 Redirect containing double quotes and spaces
7970 #REDIRECT [[Cool "Gator"]]
7972 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7976 Link containing double-single-quotes '' in text (T6598 sanity check)
7978 Some [[Link|pretty ''italics'' and stuff]]!
7980 <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>!
7983 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7987 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7989 ''Some [[Link|pretty ''italics'' and stuff]]!''
7991 <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>
7996 Link with double quotes in title part (literal) and alternate part (interpreted)
7998 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8002 [[''Pentecoste''|Pentecoste]]
8004 [[''Pentecoste''|''Pentecoste'']]
8006 <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>
8007 </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>
8008 </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>
8009 </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>
8012 <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>
8013 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8014 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8015 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8019 Broken image links with HTML captions (T41700)
8021 [[File:Nonexistent|<script></script>]]
8022 [[File:Nonexistent|100x100px|<script></script>]]
8023 [[File:Nonexistent|<]]
8024 [[File:Nonexistent|a<i>b</i>c]]
8026 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8027 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8028 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8029 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8032 <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>
8033 <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>
8034 <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>
8035 <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>
8041 [[http://www.example.com]]
8043 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8046 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8050 Plain link to URL with link text
8052 [[http://www.example.com Link text]]
8054 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8059 Plain link to protocol-relative URL
8061 [[//www.example.com]]
8063 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8066 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8070 Plain link to protocol-relative URL with link text
8072 [[//www.example.com Link text]]
8074 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8079 Plain link to page with question mark in title
8085 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8086 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8090 # I'm fairly sure the expected result here is wrong.
8091 # We want these to be URL links, not pseudo-pages with URLs for titles....
8092 # However the current output is also pretty screwy.
8095 # I'm changing it to match the current output--it arguably makes more
8096 # sense in the light of the test above. Old expected result was:
8097 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8099 # But I think this test is bordering on "garbage in, garbage out" anyway.
8104 Piped link to URL: [[http://www.example.com|an example URL]]
8106 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8109 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" 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>
8113 Plain link in template argument
8117 {{echo|[http://www.example.com |123]}}
8119 {{echo|[[http://www.example.com |123]]}}
8121 {{echo|[[http://www.example.com |123]}}
8123 {{echo|[http://www.example.com |123]]}}
8125 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8126 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8127 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8128 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8131 <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" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8133 <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" class="external text" href="http://www.example.com">|123</a>]</p>
8135 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8137 <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" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8141 T2002: [[page|http://url/]] should link to page, not http://url/
8143 [[Main Page|http://url/]]
8145 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8148 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8151 # Parsoid does not mark self-links, by design.
8153 T2337: Escaped self-links should be bold
8157 [[Bug462]] [[Bug462]]
8159 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8162 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8166 Self-link to section should not be bold
8170 [[Main Page#section]]
8172 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8183 Self-link to numeric title
8189 <p><a class="mw-selflink selflink">0</a>
8194 Link to numeric-equivalent title
8200 <p><a href="/wiki/00" title="00">00</a>
8205 <nowiki> inside a link
8207 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8209 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8214 Non-breaking spaces in title
8216 [[ Main Page ]]
8218 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8222 # Add new article for the test below so that it doesn't red-link
8230 Multiple spaces in titles should normalize to a single underscore
8232 parsoid=wt2html,wt2wt
8238 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8239 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8240 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8243 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8244 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8245 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8250 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8256 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8261 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8267 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8272 Internal link with en linktrail: no apostrophes (T29473)
8278 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8283 Internal link with ca linktrail with apostrophes (T29473)
8289 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8294 Internal link with kaa linktrail with apostrophes (T29473)
8300 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8305 Link with multiple ":" in a subpage-supporting namespace (T65636)
8307 [[User:Foo/Test/63636:Bar|Test]]
8309 <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>
8312 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8315 ## Mainly a sanity check for Parsoid
8317 Handle title parsing for subpages
8337 Link to a subpage from a namespace other than main
8344 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8347 <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>
8351 Ensure that transclusion titles are not url-decoded
8353 subpage title=[[Test]]
8356 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8358 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8361 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8365 Purely hash wikilink
8367 title=[[User:Test/123]]
8372 <p><a href="#a">b</a>
8375 <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>
8379 Serialization of purely hash wikilink
8381 title=[[User:Test/123]]
8385 <p><a href="#a">[[</a></p>
8387 [[#a|<nowiki>[[</nowiki>]]
8389 <p><a href="#a">[[</a>
8394 1. Interaction of linktrail and template encapsulation
8398 <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>
8402 2. Interaction of linktrail and template encapsulation
8406 {{echo|Some [[Fool]]}}s
8408 <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>
8412 3. Interaction of linktrail and template encapsulation
8416 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8418 <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>
8428 Internal link with is link prefix
8432 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8434 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8445 Internal link with is link trail and link prefix
8449 [[mótmælendatrú|xxx]]ar
8451 mótmælenda[[söfnuður]]
8452 mótmælenda[[söfnuður|söfnuðir]]
8453 mótmælenda[[söfnuður|söfnuðir]]xxx
8455 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8456 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8457 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8458 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8459 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8464 Parsoid link trail escaping
8466 parsoid=html2wt,html2html
8468 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8474 Parsoid link prefix escaping
8477 parsoid=html2wt,html2html
8479 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8481 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8485 Parsoid link bracket escaping
8487 parsoid=html2wt,html2html
8489 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8490 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8491 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8492 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8493 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8494 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8502 [[[<nowiki/>[[Test]]]]]
8506 [[[[[<nowiki/>[[Test]]]]]]]
8510 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8518 [http://wp.org ''foo'']
8520 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8521 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8522 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8523 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8528 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8530 [[Foo|{{echo|a}} b {{echo|c}}]]
8532 <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>
8536 Link with angle bracket after anchor
8538 wgFragmentMode=[ 'html5', 'legacy' ]
8542 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8545 <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>
8549 Link with angle bracket after anchor (legacy)
8551 wgFragmentMode=[ 'legacy' ]
8555 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8560 ### Interwiki links (see maintenance/interwiki.sql)
8564 Inline interwiki link
8566 parsoid=wt2html,wt2wt,html2html
8568 [[MeatBall:SoftSecurity]]
8570 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8573 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8577 Inline interwiki link with empty title (T4372)
8579 parsoid=wt2html,wt2wt,html2html
8583 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8586 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8589 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8591 Interwiki link encoding conversion (T3636)
8593 parsoid=wt2html,wt2wt
8595 *[[Wikipedia:ro:Olteniţa]]
8596 *[[Wikipedia:ro:Olteniţa]]
8598 <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>
8599 <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>
8603 <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>
8604 <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>
8608 <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>
8609 <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>
8614 Interwiki link with fragment (T4130)
8616 [[MeatBall:SoftSecurity#foo]]
8618 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8623 Link scenarios with escaped fragments
8625 wgFragmentMode=[ 'html5', 'legacy' ]
8628 [[Foo#Is this great?]]
8629 [[meatball:Foo#Is this great?]]
8631 <p><a href="#Is_this_great?">#Is this great?</a>
8632 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8633 <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>
8636 <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>
8637 <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>
8638 <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>
8642 Link scenarios with escaped fragments (legacy)
8644 wgFragmentMode=[ 'legacy' ]
8647 [[Foo#Is this great?]]
8648 [[meatball:Foo#Is this great?]]
8650 <p><a href="#Is_this_great.3F">#Is this great?</a>
8651 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8652 <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>
8656 # Ideally the wikipedia: prefix here should be proto-relative too
8657 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8658 # define the 'en' prefix, and originally the test used 'wikipedia',
8659 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8662 Different interwiki prefixes mapping to the same URL
8670 [[:wikipedia:Foo|Foo]]
8672 [[wikipedia:en:Foo]]
8674 [[:wikipedia:en:Foo]]
8678 <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>
8680 <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>
8682 <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>
8684 <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>
8686 <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>
8688 <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>
8690 <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>
8694 Interwiki links that cannot be represented in wiki syntax
8697 [[meatball:ok#foo|ok with fragment]]
8698 [[meatball:ok_as_well?|ok ending with ? mark]]
8699 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8700 [http://de.wikipedia.org/wiki/#foo is just fragment]
8703 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8704 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8705 <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>
8706 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8707 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8710 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8711 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8712 <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>
8713 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8714 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8718 Interwiki links: trail
8720 [[wikipedia:Foo|Ba]]r
8722 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8725 <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>
8729 Local interwiki link
8731 parsoid=wt2html,wt2wt,html2html
8733 [[local:Template:Foo]]
8735 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8738 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8741 # Parsoid does not mark self-links, by design.
8743 Local interwiki link: self-link to current page
8746 parsoid=wt2html,wt2wt,html2html
8750 <p><a class="mw-selflink selflink">local:Main Page</a>
8753 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8757 Local interwiki link: prefix only (T66167)
8759 parsoid=wt2html,wt2wt,html2html
8763 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8766 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8770 Local interwiki link: with additional interwiki prefix (T63357)
8772 parsoid=wt2html,wt2wt,html2html
8774 [[local:meatball:Hello]]
8776 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8779 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8783 Multiple local interwiki link prefixes
8785 [[local:local:local:local:mi:local:Foo]]
8787 parsoid=wt2html,wt2wt,html2html
8789 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8792 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8796 ### Interlanguage links
8797 ### Language links (so that searching for '### language' matches..)
8809 <p>Blah blah blah</p>
8810 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8813 ## parsoid html2wt will lose the space variations
8815 Interlanguage link with spacing
8817 parsoid=wt2html,wt2wt,html2html
8825 <p>Blah blah blah</p>
8826 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8830 Double interlanguage link
8839 <p>Blah blah blah</p>
8840 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8841 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8844 ## parsoid html2wt will lose the space variations
8846 Interlanguage link variations
8848 parsoid=wt2html,wt2wt,html2html
8858 <p>Blah blah blah</p>
8859 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8860 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8861 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8865 Escaping of interlanguage links (T129218, T156308)
8869 [[ : zh : Chinese ]]
8872 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8873 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8877 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8878 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8882 Multiple colons escaping interlanguage links
8890 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8895 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8897 [[:::es:Spanish]]</p>
8900 ## parsoid html2wt will normalize the space to _
8902 Space and question mark encoding in interlanguage links (T95473)
8904 parsoid=wt2html,wt2wt,html2html
8912 <p>Blah blah blah</p>
8913 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8917 Interlanguage link, with prefix links
8927 <p>Blah blah blah</p>
8928 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8932 Double interlanguage link, with prefix links (T10897)
8943 <p>Blah blah blah</p>
8944 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8945 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8949 "Extra" interlanguage links (T34189 / gerrit 111390)
8957 <p>Blah blah blah</p>
8958 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8961 ## PHP parser tests script needs an update
8962 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8964 Language links render as inline links if $wgInterwikiMagic=false
8966 wgInterwikiMagic=false
8967 parsoid=wt2html,wt2wt,html2html
8972 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8975 ## PHP parser tests script needs an update
8976 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8978 Language links render as inline links in the Talk namespace
8981 parsoid=wt2html,wt2wt,html2html
8986 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8990 Parsoid-specific test: Wikilinks with should RT properly
8996 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9001 Parsoid T55221: Wikilinks should be properly entity-escaped
9003 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9005 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9006 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9008 He&nbsp;llo [[Foo|He&nbsp;llo]]
9010 He&nbsp;llo He&nbsp;llo
9012 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9013 </p><p>He&nbsp;llo He&nbsp;llo
9017 # html2wt will fail because of title normalization without data-parsoid
9019 Parsoid: handle constructor well
9021 parsoid=wt2html,wt2wt
9027 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9028 </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>
9031 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9033 <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>
9042 # Note that `ko` isn't a known interlanguage prefix
9044 Parsoid: recognize interlanguage links without a target page
9054 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9056 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9059 # Note that `ko` isn't a known interwiki prefix
9061 Parsoid: recognize interwiki links without a target page
9063 parsoid=wt2html,wt2wt,html2html
9069 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9070 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9073 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9074 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9078 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9082 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9085 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9089 Interlanguage link with preceding local interwiki link (T70085)
9091 parsoid=wt2html,wt2wt,html2html
9094 [[local:es:Spanish]]
9097 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9101 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9105 Looks like an interlanguage link, but is actually a local interwiki
9107 parsoid=wt2html,wt2wt,html2html
9113 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9117 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9121 ### Redirects, Parsoid-only
9125 1. Simple redirect to page
9127 #REDIRECT [[Main Page]]
9129 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9133 2. Other redirect variants
9135 #REDIRECT [[Main_Page]]
9137 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9140 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9141 # This tests the Parsoid bail-out code.
9143 3. Other redirect variants
9147 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9149 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9153 4. Redirect to a templated destination
9155 #REDIRECT [[{{echo|Foo}}bar]]
9157 <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"}]]}'/>
9163 parsoid=wt2html,wt2wt
9168 <li>REDIRECT [[]]</li></ol>
9172 Optional colon in #REDIRECT
9174 # the colon is archaic syntax. we support it for wt2html, but we
9175 # don't care that it roundtrips back to the modern syntax.
9176 parsoid=wt2html,html2html
9178 #REDIRECT:[[Main Page]]
9180 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9184 Whitespace in #REDIRECT with optional colon
9186 # the colon and gratuitous whitespace is archaic syntax. we support
9187 # it for wt2html, but we don't care that it roundtrips back to the
9188 # modern syntax (without extra whitespace)
9189 parsoid=wt2html,html2html
9196 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9200 Piped link in #REDIRECT
9202 # content after piped link is ignored. we support this syntax,
9203 # but don't care that the piped link is lost when we roundtrip this.
9206 #REDIRECT [[Main Page|bar]]
9208 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9212 Redirect to category (T104502)
9214 parsoid=wt2html,wt2wt
9216 #REDIRECT [[Category:Foo]]
9218 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9222 Redirect to category with URL encoding (T104502)
9226 #REDIRECT [[Category%3AFoo]]
9228 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9232 Redirect to category page
9234 #REDIRECT [[:Category:Foo]]
9236 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9240 Redirect to image page (1)
9242 #REDIRECT [[File:Wiki.png]]
9244 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9248 Redirect to image page (2)
9250 #REDIRECT [[Image:Wiki.png]]
9252 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9255 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9256 # Next test confirms this.
9258 Redirect to language (1) (T104918)
9260 parsoid=wt2html,wt2wt,html2html
9262 #REDIRECT [[en:File:Wiki.png]]
9264 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9268 Redirect to language (2) (T104918)
9270 #REDIRECT [[:en:File:Wiki.png]]
9272 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9276 Redirect to interwiki (T104918)
9278 #REDIRECT [[meatball:File:Wiki.png]]
9280 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9284 Non-English #REDIRECT
9288 #TILVÍSUN [[Main Page]]
9290 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9294 Redirect syntax under text isn't considered a redirect
9298 #redirect [[Main Page]]
9301 <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>
9309 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9316 Redirect followed by block on the same line
9320 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9322 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9326 Redirect followed by a newline
9328 #REDIRECT [[Main Page]]
9331 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9336 Redirect followed by multiple newlines
9338 #REDIRECT [[Main Page]]
9343 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9350 Drop duplicate redirects
9354 <link rel="mw:PageProp/redirect" href="./Foo"/>
9355 <link rel="mw:PageProp/redirect" href="./Bar"/>
9356 <link rel="mw:PageProp/redirect" href="./Baz"/>
9375 Broken br tag sanitization
9383 # TODO: Fix html2html mode (T53055)!
9385 Parsoid: Broken br tag recognition
9399 Incorrecly removing closing slashes from correctly formed XHTML
9401 <br style="clear:both;" />
9403 <p><br style="clear:both;" />
9408 Failing to transform badly formed HTML into correct XHTML
9410 <br style="clear: left;">
9411 <br style="clear: right;">
9412 <br style="clear: both;">
9414 <p><br style="clear: left;" />
9415 <br style="clear: right;" />
9416 <br style="clear: both;" />
9420 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9421 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9423 Handling html with a div self-closing tag
9432 <p><div title />
9436 <p><div title=bar />
9437 <div title=bar/>
9439 <div title="bar/"></div>
9443 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9444 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9445 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9446 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9447 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9448 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9452 Handling html with a br self-closing tag
9479 Horizontal ruler (should it add that extra space?)
9488 foo </p><hr /><p> bar
9493 Horizontal ruler -- 4+ dashes render hr
9502 Horizontal ruler -- eats additional dashes on the same line
9511 Horizontal ruler -- does not collapse dashes on consecutive lines
9522 Horizontal ruler -- <4 dashes render as plain text
9531 Horizontal ruler -- Supports content following dashes on same line
9543 ### Block-level elements
9552 <ul><li>Common list</li>
9554 <li>item 3</li></ul>
9565 <ol><li>Numbered list</li>
9567 <li>item 3</li></ol>
9571 # the switch from level 3 to ordered should not introduce a newline between
9582 ***#Number on level 4
9584 **#Number on level 3
9585 **#Number on level 3
9589 #**Level 3, but ordered
9592 <ol><li>with numbers</li></ol>
9593 <ul><li>and bullets</li></ul>
9594 <ol><li>and numbers</li></ol></li>
9596 <ul><li>bullet level 2
9597 <ul><li>bullet level 3
9598 <ol><li>Number on level 4</li></ol></li></ul></li>
9600 <ol><li>Number on level 3</li>
9601 <li>Number on level 3</li></ol></li></ul>
9602 <ol><li>number level 2</li></ol></li>
9604 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9605 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9610 1. Nested mixed wikitext and html list
9613 *<ul><li>ho</li></ul>
9618 <li><ul><li>ho</li></ul></li>
9620 <ul><li>ho</li></ul></li></ul>
9624 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9626 <ul><li>ho</li></ul></li></ul>
9630 2. Nested mixed wikitext and html list (incompatible)
9633 :{{echo|<li>ho</li>}}
9636 <dd><li>ho</li></dd></dl>
9640 <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>
9650 <ul><li>bar</li></ul></li></ul>
9660 <ul><li><ul><li>foo</li></ul></li>
9666 Nested lists 3 (first element empty)
9672 <ul><li>bar</li></ul></li></ul>
9677 Nested lists 4 (first element empty)
9682 <ul><li><ul><li></li></ul></li>
9688 Nested lists 5 (both elements empty)
9693 <ul><li><ul><li></li></ul></li>
9699 Nested lists 6 (both elements empty)
9705 <ul><li></li></ul></li></ul>
9710 Nested lists 7 (skip initial nesting levels)
9714 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9719 Nested lists 8 (multiple nesting transitions)
9727 <ul><li><ul><li>bar</li></ul></li>
9728 <li>baz</li></ul></li>
9734 Nested lists 9 (extension interaction)
9740 <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>
9744 1. Lists with start-of-line-transparent tokens before bullets: Comments
9757 2. Lists with start-of-line-transparent tokens before bullets: Template close
9762 <ul><li>foo bar</li>
9768 List items are not parsed correctly following a <pre> block (T2785)
9774 <ul><li><pre>foo</pre></li>
9775 <li><pre>bar</pre></li>
9779 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9780 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9784 # FIXME: Might benefit from a html/parsoid since this has a template
9786 List items from template
9797 *notSOL{{inner list}}
9801 <li>item 2</li></ul>
9804 <li>item 2</li></ul>
9808 <li>item 2</li></ul>
9813 List interrupted by empty line or heading
9821 <ul><li>foo</li></ul>
9822 <ul><li><ul><li>bar</li></ul></li></ul>
9823 <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>
9824 <ul><li>Another list item</li></ul>
9829 Multiple list tags generated by templates
9847 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[0,44,null,null],"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":1}},"b\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":2}},"c"]}'>a
9848 </li><li about="#mwt1">b
9849 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9853 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9856 <!--This line will NOT split the list-->
9858 <!--This line will NOT split the list either-->
9860 <!--foo--> <!----> <!--This line NOT split the list either-->
9871 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9874 <!--This line will NOT split the list-->
9876 <!--This line will NOT split the list either-->
9878 <!--foo--> <!----> <!--This line NOT split the list
9889 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9890 # That pass could possibly be removed.
9892 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9894 parsoid=wt2html,wt2wt
9898 *{{echo|<li>templated li-hack}}
9899 *<!--foo--><li> unsupported li-hack with preceding comments
9902 <li><li>not a li-hack
9907 <li class="mw-empty-elt"></li><li>li-hack</li>
9908 <li class="mw-empty-elt"></li><li>templated li-hack</li>
9909 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
9911 <li class="mw-empty-elt"></li><li>not a li-hack
9916 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
9917 <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>
9918 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
9920 <ul data-parsoid='{"stx":"html"}'>
9921 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9928 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9957 Parsoid: Test of whitespace serialization with Templated bullets
9964 <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>
9968 # ------------------------------------------------------------------------
9969 # The next set of tests are about Parsoid's ability to handle badly nested
9970 # tags (parse, minimize scope of fixup, and roundtrip back)
9971 # ------------------------------------------------------------------------
9973 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
9974 # Parsoid's list handling is more aware of block structure.
9976 Unbalanced closing block tags break a list
9983 <ul><li>a</li></ul></div><div>
9995 Unbalanced closing non-block tags don't break a list
10003 <ul><li>a<span></span></li>
10008 <li>a<span></span></li>
10014 # Parsoid does some post-dom-building cleanup
10015 # which is why its output differs from Remex.
10017 Unclosed formatting tags that straddle lists are closed and reopened
10019 parsoid=wt2html,wt2wt,html2html
10024 <ol><li><s> a</s></li><s>
10025 </s><li><s>b </s></li></ol>
10027 <ol><li><s> a</s></li>
10028 <li><s>b </s></li></ol>
10031 # Output is ugly because of all the misnested tag fixups.
10032 # Remex is wrapping p-tags around empty elements.
10033 # Parsoid has special-case handling of this pattern of
10034 # wrapping lists in formatting tags.
10035 # FIXME: Should we remove this code from Parsoid? Or add
10036 # special support in Remex? If the latter, maybe just wait
10037 # for Parsoid to become the default parser.
10040 1. List embedded in a formatting tag
10047 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10057 # Output is ugly because of all the misnested tag fixups
10058 # Remex is wrapping p-tags around empty elements.
10059 # Parsoid has code that strips useless p-tags.
10061 2. List embedded in a formatting tag in a misnested way
10068 </small></p><small></small><ul><small><li>a</li>
10069 </small><li><small>b</small></li></ul>
10075 <li><small>b</small></li>
10080 Table with missing opening <tr> tag
10082 parsoid=wt2html,wt2wt
10090 <tbody><tr><td>foo</td>
10099 # Note that the current date is hard-coded as
10100 # 1970-01-01T00:02:03Z (a Thursday)
10101 # when running parser tests. The timezone is also fixed to GMT, so
10102 # local date will be identical to current date.
10105 Magic Word: {{CURRENTDAY}}
10114 Magic Word: {{CURRENTDAY2}}
10123 Magic Word: {{CURRENTDAYNAME}}
10132 Magic Word: {{CURRENTDOW}}
10141 Magic Word: {{CURRENTMONTH}}
10150 Magic Word: {{CURRENTMONTH1}}
10159 Magic Word: {{CURRENTMONTHABBREV}}
10161 {{CURRENTMONTHABBREV}}
10168 Magic Word: {{CURRENTMONTHNAME}}
10170 {{CURRENTMONTHNAME}}
10177 Magic Word: {{CURRENTMONTHNAMEGEN}}
10179 {{CURRENTMONTHNAMEGEN}}
10186 Magic Word: {{CURRENTTIME}}
10195 Magic Word: {{CURRENTHOUR}}
10204 Magic Word: {{CURRENTWEEK}} (T6594)
10213 Magic Word: {{CURRENTYEAR}}
10222 Magic Word: {{CURRENTTIMESTAMP}}
10224 {{CURRENTTIMESTAMP}}
10231 Magic Words LOCAL (UTC)
10235 *{{LOCALMONTHNAME}}
10236 *{{LOCALMONTHNAMEGEN}}
10237 *{{LOCALMONTHABBREV}}
10246 *{{LOCALTIMESTAMP}}
10261 <li>19700101000203</li></ul>
10266 Magic Word: {{FULLPAGENAME}}
10268 title=[[User:Ævar Arnfjörð Bjarmason]]
10269 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10273 <p>User:Ævar Arnfjörð Bjarmason
10278 Magic Word: {{FULLPAGENAMEE}}
10280 title=[[User:Ævar Arnfjörð Bjarmason]]
10281 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10285 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10290 Magic Word: {{TALKSPACE}}
10292 title=[[User:Ævar Arnfjörð Bjarmason]]
10293 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10302 Magic Word: {{TALKSPACE}}, same namespace
10304 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10305 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10314 Magic Word: {{TALKSPACE}}, main namespace
10316 title=[[Parser Test]]
10317 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10326 Magic Word: {{TALKSPACEE}}
10328 title=[[User:Ævar Arnfjörð Bjarmason]]
10329 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10338 Magic Word: {{SUBJECTSPACE}}
10340 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10341 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10350 Magic Word: {{SUBJECTSPACE}}, same namespace
10352 title=[[User:Ævar Arnfjörð Bjarmason]]
10353 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10362 Magic Word: {{SUBJECTSPACE}}, main namespace
10364 title=[[Parser Test]]
10365 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10373 Magic Word: {{SUBJECTSPACEE}}
10375 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10376 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10385 Magic Word: {{NAMESPACE}}
10387 title=[[User:Ævar Arnfjörð Bjarmason]]
10388 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10397 Magic Word: {{NAMESPACEE}}
10399 title=[[User:Ævar Arnfjörð Bjarmason]]
10400 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10409 Magic Word: {{NAMESPACENUMBER}}
10411 title=[[User:Ævar Arnfjörð Bjarmason]]
10412 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10414 {{NAMESPACENUMBER}}
10421 Magic Word: {{SUBPAGENAME}}
10423 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10424 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10433 Magic Word: {{SUBPAGENAMEE}}
10435 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10436 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10445 Magic Word: {{ROOTPAGENAME}}
10447 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10448 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10452 <p>Ævar Arnfjörð Bjarmason
10457 Magic Word: {{ROOTPAGENAMEE}}
10459 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10460 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10464 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10469 Magic Word: {{BASEPAGENAME}}
10471 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10472 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10476 <p>Ævar Arnfjörð Bjarmason
10481 Magic Word: {{BASEPAGENAMEE}}
10483 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10484 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10488 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10493 Magic Word: {{TALKPAGENAME}}
10495 title=[[User:Ævar Arnfjörð Bjarmason]]
10496 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10500 <p>User talk:Ævar Arnfjörð Bjarmason
10505 Magic Word: {{TALKPAGENAMEE}}
10507 title=[[User:Ævar Arnfjörð Bjarmason]]
10508 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10512 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10517 Magic Word: {{SUBJECTPAGENAME}}
10519 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10520 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10522 {{SUBJECTPAGENAME}}
10524 <p>User:Ævar Arnfjörð Bjarmason
10529 Magic Word: {{SUBJECTPAGENAMEE}}
10531 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10532 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10534 {{SUBJECTPAGENAMEE}}
10536 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10541 Magic Word: {{NUMBEROFFILES}}
10543 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10552 Magic Word: {{PAGENAME}}
10554 title=[[User:Ævar Arnfjörð Bjarmason]]
10555 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10559 <p>Ævar Arnfjörð Bjarmason
10564 Magic Word: {{PAGENAME}} with metacharacters
10566 title=[['foo & bar = baz']]
10567 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10571 <p><i>'foo & bar = baz'</i>
10576 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10578 title=[[*RFC 1234 http://example.com/]]
10579 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10583 <p>*RFC 1234 http://example.com/
10588 Magic Word: {{PAGENAMEE}}
10590 title=[[User:Ævar Arnfjörð Bjarmason]]
10591 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10595 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10600 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10602 title=[[*RFC 1234 http://example.com/]]
10603 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10607 <p>*RFC_1234_http://example.com/
10612 Magic Word: {{REVISIONID}}
10614 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10621 flags=vary-revision-id
10625 Magic Word: {{SCRIPTPATH}}
10627 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10635 Magic Word: {{STYLEPATH}}
10637 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10646 Magic Word: {{SERVER}}
10648 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10652 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10657 Magic Word: {{SERVERNAME}}
10659 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10668 Magic Word: {{SITENAME}}
10670 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10679 Magic Word: {{PAGELANGUAGE}}
10682 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10691 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10693 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10702 Case-sensitive magic words, when cased differently, should just be template transclusions
10709 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10710 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10711 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10712 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10717 Case-insensitive magic words should still work with weird casing.
10727 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10731 # From plwiki:PLOS_ONE
10733 Parsoid: Page property magic word with magic word contents
10735 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10737 <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>"}]]}'/>
10740 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10741 # But, this is a limitation of our representation and is documented in
10742 # TemplateHandler.js in processSpecialMagicWord
10744 Parsoid: Template-generated DISPLAYTITLE
10746 {{{{echo|DISPLAYTITLE}}:Foo}}
10750 wgAllowDisplayTitle=true
10751 wgRestrictDisplayTitle=false
10756 <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"}]]}'/>
10760 Namespace 1 {{ns:1}}
10769 Namespace 1 {{ns:01}}
10778 Namespace 0 {{ns:0}} (T6783)
10786 Namespace 0 {{ns:00}} (T6783)
10794 Namespace -1 {{ns:-1}}
10803 Namespace User {{ns:User}}
10812 Namespace User talk {{ns:User_talk}}
10821 Namespace User talk {{ns:uSeR tAlK}}
10830 Namespace File {{ns:File}}
10839 Namespace File {{ns:Image}}
10848 Namespace (lang=de) Benutzer {{ns:User}}
10859 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10865 <p>Benutzer Diskussion
10872 {{urlencode:hi world?!}}
10873 {{urlencode:hi world?!|WIKI}}
10874 {{urlencode:hi world?!|PATH}}
10875 {{urlencode:hi world?!|QUERY}}
10885 Magic Word: prioritize type info over data-parsoid
10889 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10895 Magic Word: serialize on separate line (parsoid)
10897 parsoid=wt2wt,html2wt
10903 foo<meta property="mw:PageProp/notoc"/>bar
10907 Magic Word: rt non-english wikis
10914 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10918 __proto__ is treated as normal wikitext (T105997)
10930 Magic links: internal link to RFC (T2479)
10934 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10937 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10941 Magic links: RFC (T2479)
10945 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10948 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a></p>
10952 Magic links: RFC (T67278)
10954 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10956 <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.
10959 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10963 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10965 RFC      822
10969 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10974 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">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>
10980 Magic links: ISBN (T3937)
10984 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10987 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10991 Magic links: ISBN (T67278)
10993 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10995 <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.
10998 <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>
11002 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11004 ISBN      978 0 316 09811 3
11010 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11017 <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>
11025 Magic links: PMID incorrectly converts space to underscore
11029 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11032 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></p>
11036 Magic links: PMID (T67278)
11038 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11040 <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.
11043 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
11047 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11049 PMID      1234
11053 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11058 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">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>
11063 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11064 # since these are ExtLinkText, not MagicLinkText
11066 Magic links: use appropriate serialization for "almost" magic links.
11068 X[[Special:BookSources/0978739256|foo]]
11070 X[https://tools.ietf.org/html/rfc1234 foo]
11072 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11073 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11076 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11077 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11081 Magic links: All disabled (T47942)
11083 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11089 <p>ISBN 0-306-40615-2
11100 Nonexistent template
11102 {{thistemplatedoesnotexist}}
11104 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11109 Template with invalid target containing tags
11111 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11113 <p>{{a<b>b</b>|foo|a=b|a = b}}
11118 Template with invalid target containing unclosed tag
11120 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11122 <p>{{a<b>|foo|a=b|a = b}}</b>
11127 Template with invalid target containing wikilink
11131 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11134 <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>
11138 Template with just whitespace in it, T70421
11142 <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>
11148 This is a test template
11156 <p>This is a test template
11161 Template with explicit namespace
11165 <p>This is a test template
11173 This is a test template with parameter {{{param}}}
11179 {{paramtest|param=foo}}
11181 <p>This is a test template with parameter foo
11186 Template:paramtestnum
11188 [[{{{1}}}|{{{2}}}]]
11192 Template unnamed parameter
11194 {{paramtestnum|Main Page|the main page}}
11196 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11201 Template:templatesimple
11207 Template:templateredirect
11209 #redirect [[Template:templatesimple]]
11213 Template:templateasargtestnum
11219 Template:templateasargtest
11221 {{template{{{templ}}}}}
11225 Template:templateasargtest2
11231 Template with template name as unnamed argument
11233 {{templateasargtestnum|templatesimple}}
11240 Template with template name as argument
11242 {{templateasargtest|templ=simple}}
11249 Template with template name as argument (2)
11251 {{templateasargtest2|templ=templatesimple}}
11258 Template:templateasargtestdefault
11260 {{{{{templ|templatesimple}}}}}
11270 Template with default value
11272 {{templateasargtestdefault}}
11279 Template with default value (value set)
11281 {{templateasargtestdefault|templ=templa}}
11290 {{templateredirect}}
11295 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11299 Template with argument in separate line
11301 {{ templateasargtest |
11309 Template with complex template as argument
11312 param ={{ templateasargtest |
11313 templ = simple }}}}
11315 <p>This is a test template with parameter (test)
11320 Templates with templated name
11322 {{{{echo|echo}}|foo}}
11323 {{{{echo|inner list}} }}
11327 <ul><li>item 1</li></ul>
11330 <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>
11331 <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>
11334 ## Regression test; the output here isn't really that interesting.
11336 Templates with templated name and top level template args
11338 {{1{{2{{{3}}}|4=5}}}}
11340 <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>
11343 # Parsoid markup is deliberate "broken". This is an edge case.
11344 # See long comment in TemplateHandler.js:convertAttribsToString.
11346 Templates with invalid templated targets
11357 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11362 Template with thumb image (with link in description)
11364 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11366 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>
11369 <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>
11371 <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>
11375 Template:complextemplate
11377 {{{1}}} {{paramtest|
11378 param ={{{param}}}}}
11382 Template with complex arguments
11385 param ={{ templateasargtest |
11386 templ = simple }}|[[Template:complextemplate|link]]}}
11388 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11393 T2553: link with two variables in a piped link
11396 |[[{{{1}}}|{{{2}}}]]
11401 <td>[[{{{1}}}|{{{2}}}]]
11406 <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>
11412 Abort table cell attribute parsing on wikilink
11415 |testing [[one|two]] |three||four
11416 |testing one two |three||four
11417 |testing="[[one|two]]" |three||four
11422 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11428 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11434 <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>
11435 <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>
11436 <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>
11441 Don't abort table cell attribute parsing if wikilink is found in template arg
11444 |Test {{#tag:ref|One two "[[three]]" four}}
11448 <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>
11453 Magic variable as template parameter
11455 {{paramtest|param={{SITENAME}}}}
11457 <p>This is a test template with parameter MediaWiki
11464 [[{{{param}}}|link]]
11468 Template parameter as link source
11470 {{linktest|param=Main Page}}
11472 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11477 Template:paramtest2
11479 including another template, {{paramtest|param={{{arg}}}}}
11483 Template passing argument to another template
11485 {{paramtest2|arg='hmm'}}
11487 <p>including another template, This is a test template with parameter 'hmm'
11498 Template as link source
11502 [[{{linktest2}}|Main Page]]
11504 [[{{linktest2}}]]Page
11506 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11507 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11508 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11526 Template infinite loop
11530 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11535 Template from main namespace
11544 Template from non-includable namespace
11546 wgNonincludableNamespaces=10
11550 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11565 T2529: Template with table, not included at beginning of line
11584 T2523: Template shouldn't eat newline (or add an extra one before table)
11604 T2041: Template parameters shown as broken links
11613 Template with targets containing wikilinks
11619 {{[[{{echo|foo}}]]}}
11621 {{{{echo|[[foo}}]]}}
11623 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11624 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11628 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11629 <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>
11630 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11640 Templates: Double quotes as template target
11647 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11651 ## This test is about making sure Parsoid's data-mw is well formed in the
11652 ## face of multiple templates with intersecting and overlapping ranges. The
11653 ## wikitext itself is wretched.
11655 Templates with intersecting and overlapping ranges
11666 </table><p>ho</p><table>
11670 </td></tr></tbody></table>
11672 <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":""}]]}'>
11674 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11676 <tbody><tr><td>hi</td></tr>
11681 Template:MSGNW test
11683 ''None'' of '''this''' should be
11685 but rather passed unmodified
11693 # hmm, fix this or just deprecate msgnw and document its behavior?
11697 {{msgnw:MSGNW test}}
11699 <p>''None'' of '''this''' should be
11701  but rather passed unmodified
11702 {{test}}
11706 <!-- comment -->
11713 {{int:youhavenewmessages|lots of money|not!}}
11715 <p>You have lots of money (not!).
11720 int keyword - non-existing message
11731 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11735 <includeonly> and <noinclude> being included
11746 <onlyinclude>Foo</onlyinclude>bar
11750 <onlyinclude> being included
11762 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11766 <onlyinclude> and <includeonly> being included
11775 <includeonly> and <noinclude> on a page
11777 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11784 Un-closed <noinclude>
11791 <onlyinclude> on a page
11793 <onlyinclude>Foo</onlyinclude>bar
11800 Un-closed <onlyinclude>
11807 Self-closed noinclude, includeonly, onlyinclude tags
11818 Unbalanced includeonly and noinclude tags
11822 |b</noinclude></noinclude>
11823 |c</noinclude></includeonly>
11824 |d</includeonly></includeonly>
11833 <td>c</includeonly>
11835 <td>d</includeonly></includeonly>
11841 Template:Includeonly section
11844 ==Includeonly section==
11850 T8563: Edit link generation for section shown by <includeonly>
11852 {{includeonly section}}
11854 <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>
11855 <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>
11859 # Uses same input as the contents of [[Template:Includeonly section]]
11861 T8563: Section extraction for section shown by <includeonly>
11866 ==Includeonly section==
11874 T8563: Edit link generation for section suppressed by <includeonly>
11877 ==Includeonly section==
11881 <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>
11886 T8563: Section extraction for section suppressed by <includeonly>
11891 ==Includeonly section==
11899 Un-closed <includeonly>
11904 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11907 ## We used to, but no longer wt2wt this test since the default serializer
11908 ## will normalize the include directives to serialize on their own line.
11909 ## Selser will take care of preserving formatting in scenarios where they
11910 ## intermingled with other wikitext.
11912 Includes and comments at SOL
11914 parsoid=wt2html,html2html
11916 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
11923 <includeonly>can have stuff</includeonly>===here===
11926 <h2><span class="mw-headline" id="hu">hu</span></h2>
11931 <h3><span class="mw-headline" id="here">here</span></h3>
11934 <!-- 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>
11936 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11938 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
11941 <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>
11945 # TODO: test with DOM fragment reuse!
11947 Parsoid: DOM fragment reuse
11949 parsoid=wt2wt,wt2html
11951 a{{echo|b<table></table>c}}d
11963 <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>
11965 <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">
11966 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11967 </span><p about="#mwt2">cd</p>
11969 <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">
11971 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11973 </span><p about="#mwt3">b</p>
11977 Parsoid: Merge double tds (T52603)
11982 |{{echo|{{!}} foo}}
11986 <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>
11991 Parsoid: Merge double tds in nested transclusion content (T52603)
11997 |{{echo|{{!}} foo}}
12001 <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}}]}'>
12003 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12009 ### <includeonly> and <noinclude> in attributes
12012 0. includeonly around the entire attribute
12014 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12016 <p><span id="v2">bar</span>
12021 1. includeonly in html attr key
12023 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12025 <p><span id="foo">bar</span>
12030 2. includeonly in html attr value
12032 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12033 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12035 <p><span id="v1">bar</span>
12036 <span id="v1">bar</span>
12041 3. includeonly in part of an attr value
12043 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12045 <p><span style="color:red;">bar</span>
12050 4. includeonly in table attributes
12074 ### Preprocessor precedence tests
12075 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12077 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12079 Preprocessor precedence 1: link is rightmost opening
12085 But close-brace is not a valid character in a link title:
12088 However, we can still tell this was handled as a link in the preprocessor:
12089 {{echo|[[Foo}}|bar]]|bat}}
12091 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12092 </p><p>But close-brace is not a valid character in a link title:
12094 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12098 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12099 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12100 <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>
12104 Preprocessor precedence 2: template is rightmost opening
12113 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12117 Preprocessor precedence 3: language converter is rightmost opening
12133 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12134 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12135 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12139 Preprocessor precedence 4: left-most angle bracket
12150 Template:Precedence5
12156 Preprocessor precedence 5: tplarg takes precedence over template
12158 {{Precedence5|Bullet}}
12160 <ul><li>Bar</li></ul>
12163 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12167 Preprocessor precedence 6: broken link is rightmost opening
12173 {{echo|[[Foo|bar|bat=baz}}
12176 </p><p>{{echo|[[Foo|bar|bat=baz}}
12179 <p>{{echo|[[Foo}}</p>
12180 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12183 # This next test exposes a difference between PHP and Parsoid:
12184 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12185 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12186 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12187 # outer `[[Foo` extends until the `y]]`
12188 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12189 # intermediate result (after template expansion), and link processing
12190 # happens on this intermediate result, which moves the wikilink
12191 # boundary leftward to `[[Foo|Bar]]`
12192 # 2b) Parsoid works in a single step, so it's going to keep the
12193 # wikilink as extending to the `y]]`
12194 # 3a) Then PHP does linktrail processing which slurps up the trailing
12195 # `xy` inside the link.
12196 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12197 # `z` inside the link.
12198 # This is "correct" behavior. Parsoid's basic worldview is that the
12199 # `]]` inside the template shouldn't be allowed to leak out to affect
12200 # the surrounding wikilink. PHP may match Parsoid (in the future)
12201 # if you use {{#balance}} (T114445).
12204 Preprocessor precedence 7: broken template is rightmost opening
12210 [[Foo|{{echo|Bar]]-x}}-y]]-z
12212 Careful: linktrails can move the end of the wikilink:
12213 [[Foo|{{echo|y']]a}}l]]l
12215 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12216 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12217 </p><p>Careful: linktrails can move the end of the wikilink:
12218 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12221 <p>[[Foo|{{echo|Bar]]</p>
12222 <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>
12223 <p>Careful: linktrails can move the end of the wikilink:
12224 <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>
12228 Preprocessor precedence 8: broken language converter is rightmost opening
12239 Template:Preprocessor_precedence_9
12244 ;7: {{{{{{{4}}}}}}}
12248 Preprocessor precedence 9: groups of braces
12250 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12256 <ul><li>Bar</li></ul>
12260 <dd>{Bullet}</dd></dl>
12263 <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}}]}'>
12268 </dl><ul about="#mwt1">
12270 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12279 Template:Preprocessor_precedence_10
12286 ;6: -{{{{{{4}}}}}}-
12287 ;7: -{{{{{{{5}}}}}}}-
12291 Preprocessor precedence 10: groups of braces with leading dash
12295 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12301 <ul><li>Bar-</li></ul>
12308 <ul><li>Bar-</li></ul>
12315 <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}}]}'>
12317 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12320 </dl><ul about="#mwt1">
12322 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12326 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12329 </dl><ul about="#mwt1">
12331 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12335 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12340 Preprocessor precedence 11: found during visual diff testing
12342 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12344 {{echo|-{{echo|-{{echo|x}}}}}}
12346 {{echo|-{{echo|x}}}}
12348 <p><span>-<span>-x</span></span>
12353 <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>
12355 <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>
12357 <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>
12361 Preprocessor precedence 12: broken language converter closed by brace.
12365 This form breaks the template, which is unfortunate:
12366 *{{echo|foo-{bar}bat}}
12368 But if the broken language converter markup is inside an extension
12369 tag, nothing bad happens:
12370 *<nowiki>foo-{bar}bat</nowiki>
12371 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12372 *<pre>foo-{bar}bat</pre>
12373 *{{echo|<pre>foo-{bar}bat</pre>}}
12375 <tag>foo-{bar}bat</tag>
12376 {{echo|<tag>foo-{bar}bat</tag>}}
12379 <p>This form breaks the template, which is unfortunate:
12381 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12382 <p>But if the broken language converter markup is inside an extension
12383 tag, nothing bad happens:
12385 <ul><li>foo-{bar}bat</li>
12386 <li>foo-{bar}bat</li>
12387 <li><pre>foo-{bar}bat</pre></li>
12388 <li><pre>foo-{bar}bat</pre></li></ul>
12389 <pre>'foo-{bar}bat'
12393 <pre>'foo-{bar}bat'
12398 <p>This form breaks the template, which is unfortunate:</p>
12400 <li>{{echo|foo-{bar}bat}}</li>
12402 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12404 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12405 <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>
12406 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12407 <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>
12409 <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>
12413 Preprocessor precedence 13: broken language converter in external link
12417 *[http://example.com/-{foo Example in URL]
12418 *[http://example.com Example in -{link} description]
12419 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12421 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12422 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12423 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12426 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12427 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12428 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12433 Preprocessor precedence 14: broken language converter in comment
12435 *<!--{{foo}}-->...should be ok
12436 *<!---{{foo}}-->...extra dashes
12437 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12439 <ul><li>...should be ok</li>
12440 <li>...extra dashes</li>
12441 <li>foobat...should be ok</li></ul>
12444 <li><!--{{foo}}-->...should be ok</li>
12445 <li><!---{{foo}}-->...extra dashes</li>
12446 <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>
12451 Preprocessor precedence 15: broken brace markup in headings
12453 wgFragmentMode=[ 'html5', 'legacy' ]
12457 __NOTOC__ __NOEDITSECTION__
12466 ===5 foo{{{bar 5===
12471 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12474 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12477 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12480 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12483 <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>
12486 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12490 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12491 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12493 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12495 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12497 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12499 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12501 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12506 Preprocessor precedence 16: matching closing braces to opening braces
12511 -{{{echo|foo}}bar}-
12516 <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>
12520 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12529 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12533 Preprocessor precedence 18: another rightmost wins scenario
12537 {{ -{{{{1|tplarg}}} }} }-
12539 <p>{{ -{tplarg }} }-
12542 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12546 Preprocessor precedence 19: break syntax
12559 ### Token Stream Patcher tests
12561 ### These tests won't always pass wt2wt and other modes because
12562 ### on serialization, the table will be output on a new line.
12563 ### For now, we are blacklisting them, and using this to test selser.
12567 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12569 parsoid=wt2html,wt2wt
12571 {{echo|}}{| width = '100%'
12575 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12576 <tbody><tr><td>foo</td></tr>
12580 ## We used to, but no longer wt2wt this test since the default serializer
12581 ## will normalize the include directives to serialize on their own line.
12582 ## Selser will take care of preserving formatting in scenarios where they
12583 ## intermingled with other wikitext.
12585 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12589 <includeonly>a</includeonly>{| {{{b}}}
12593 <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":""}]]}'>
12594 <tbody><tr><td>c</td></tr>
12599 Table wikitext syntax outside wiki-tables
12603 ! not a table heading
12606 | class="foo bar" | baz
12614 ! not a table heading
12617 | class="foo bar" | baz
12626 ### Testing parsing of templates where a template arg
12627 ### has the same name as the template itself.
12633 {{{quote|{{{1}}}}}}
12637 Templates: Template Name/Arg clash: 1. Use of positional param
12646 Templates: Template Name/Arg clash: 2. Use of named param
12648 {{quote|quote=foo}}
12655 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12664 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12668 Templates: 1. Simple use
12677 Templates: 2. Inside a block tag
12679 <div>{{echo|Foo}}</div>
12680 <blockquote>{{echo|Foo}}</blockquote>
12683 <blockquote>Foo</blockquote>
12687 <blockquote><p>Foo</p></blockquote>
12691 Templates: P-wrapping: 1a. Templates on consecutive lines
12702 Templates: P-wrapping: 1b. Templates on consecutive lines
12716 Templates: P-wrapping: 1c. Templates on consecutive lines
12719 {{echo|bar}} <div>baz</div>
12728 bar </p><div>baz</div>
12732 Templates: P-wrapping: 1d. Template preceded by comment-only line
12741 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12745 Templates: Inline Text: 1. Multiple template uses
12747 {{echo|Foo}}bar{{echo|baz}}
12754 Templates: Inline Text: 2. Back-to-back template uses
12756 {{echo|Foo}}{{echo|bar}}
12763 Templates: Block Tags: 1. Multiple template uses
12765 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12767 <div>Foo</div><div>bar</div><div>baz</div>
12772 Templates: Block Tags: 2. Back-to-back template uses
12774 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12776 <div>Foo</div><div>bar</div>
12780 # This is an edge case relating to paragraph wrapping.
12782 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12787 <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
12792 Templates: Links: 1. Simple example
12794 {{echo|[[Foo|bar]]}}
12796 <p><a href="/wiki/Foo" title="Foo">bar</a>
12801 Templates: Links: 2. Generation of link href
12803 [[{{echo|Foo}}|bar]]
12805 <p><a href="/wiki/Foo" title="Foo">bar</a>
12810 Templates: Links: 3. Generation of part of a link href
12812 [[Fo{{echo|o}}|bar]]
12814 [[Foo{{echo|bar}}]]
12816 [[Foo{{echo|bar}}baz]]
12818 [[Foo{{echo|bar}}|bar]]
12820 [[:Foo{{echo|bar}}]]
12822 [[:Foo{{echo|bar}}|bar]]
12824 <p><a href="/wiki/Foo" title="Foo">bar</a>
12825 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12826 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12827 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12828 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12829 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12834 Templates: Links: 4. Multiple templates generating link href
12836 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12838 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12843 Templates: Links: 5. Generation of link text
12845 [[Foo|{{echo|bar}}]]
12847 <p><a href="/wiki/Foo" title="Foo">bar</a>
12852 Templates: Links: 5. Nested templates (only outermost template should be marked)
12854 {{echo|[[{{echo|Foo}}|bar]]}}
12856 <p><a href="/wiki/Foo" title="Foo">bar</a>
12861 Templates: HTML Tag: 1. Generation of HTML attr. key
12863 <div {{echo|style}}="color:red;">foo</div>
12865 <div style="color:red;">foo</div>
12870 Templates: HTML Tag: 2. Generation of HTML attr. value
12872 <div style={{echo|'color:red;'}}>foo</div>
12874 <div style="color:red;">foo</div>
12879 Templates: HTML Tag: 3. Generation of HTML attr key and value
12881 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12883 <div style="color:red;">foo</div>
12888 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12890 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12892 <div title="This is a long title with just one piece templated">foo</div>
12897 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12899 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12901 <div title="This is a long title with just one piece templated">foo</div>
12906 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12908 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12910 <div title="This is a long title with just one piece templated">foo</div>
12914 # SSS FIXME: While it is great we added support for all this,
12915 # do we want to make this part of the spec? Maybe we want to
12916 # deprecate this kind of usage in the future?
12918 Templates: HTML Tag: 7. Generation of partial attribute key string
12920 <div st{{echo|yle}}="color:red;">foo</div>
12922 <div style="color:red;">foo</div>
12927 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12929 <div {{echo|1=id="v1"}}>bar</div>
12931 <div id="v1">bar</div>
12936 Templates: HTML Tag: 9. Multiple template-generated attributes
12938 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12940 <div id="v1" title="foo">bar</div>
12945 Templates: Support for templates generating attributes and content
12947 {| {{mixed_attr_content_template}}
12952 <table style="color:red;" title="T48811">
12962 <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|}"]}'>
12971 1. Entities and nowikis inside templated attributes should be handled correctly
12973 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12975 <div style="background:#f9f9f9;">foo</div>
12978 <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>
12982 2. Entities and nowikis inside templated attributes should be handled correctly
12985 |{{table_attribs_3}}
12990 <td style="background:#f9f9f9;">Foo
12995 <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>
13000 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13003 |{{table_attribs_3}}
13008 <td style="background:#f9f9f9;">Foo
13012 <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}}]}'>
13013 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13019 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13022 |{{table_attribs_6}} hi
13027 <td style="background: red;">hi
13032 <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>
13037 Templates: HTML Tables: 1. Generating start of a HTML table
13039 {{echo|<table><tr><td>foo</td>}}</tr></table>
13041 <table><tr><td>foo</td></tr></table>
13046 Templates: HTML Tables: 2a. Generating middle of a HTML table
13048 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13050 <table><tr><td>foo</td></tr></table>
13055 Templates: HTML Tables: 2b. Generating middle of a HTML table
13057 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13059 <table><tr><td>foo</td></tr></table>
13064 Templates: HTML Tables: 3. Generating end of a HTML table
13066 <table><tr>{{echo|<td>foo</td></tr></table>}}
13068 <table><tr><td>foo</td></tr></table>
13073 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13075 {{echo|<table>}}<tr><td>foo</td></tr></table>
13077 <table><tr><td>foo</td></tr></table>
13082 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13084 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13086 <table><tr><td>foo</td></tr></table>
13091 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13093 <table><tr>{{echo|<td>}}foo</td></tr></table>
13095 <table><tr><td>foo</td></tr></table>
13100 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13102 <table><tr><td>foo{{echo|</td>}}</tr></table>
13104 <table><tr><td>foo</td></tr></table>
13109 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13111 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13113 <table><tr><td>foo</td></tr></table>
13118 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13120 <table><tr><td>foo</td></tr>{{echo|</table>}}
13122 <table><tr><td>foo</td></tr></table>
13127 Templates: HTML Tables: 5. Proper fostering of categories from inside
13129 parsoid=wt2html,wt2wt
13131 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13132 <!--Two categories (T52330)-->
13133 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13135 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13136 <!--Two categories (T52330)-->
13137 <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>
13141 Templates: Wiki Tables: 1a. Fostering of entire template content
13149 <tr><td></td></tr></table>
13154 <table><tbody><tr><td></td></tr></tbody></table>
13156 <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"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13162 Templates: Wiki Tables: 1b. Fostering of entire template content
13175 <tr><td></td></tr></table>
13183 <tbody><tr><td></td></tr></tbody></table>
13185 <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|}"]}'>
13187 </div><table about="#mwt3">
13193 Templates: Wiki Tables: 2. Fostering of partial template content
13203 <tr><td></td></tr></table>
13208 <div>b</div><table>
13209 <tbody><tr><td></td></tr></tbody></table>
13211 <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">
13218 Templates: Wiki Tables: 3. td-content via multiple templates
13221 {{echo|{{pipe}}a}}{{echo|b}}
13232 Templates: Wiki Tables: 4. Templated tags, no content
13238 <tr><td></td></tr></table>
13243 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13257 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13270 ## This test case is very specific to Parsoid's internals
13271 ## and is hence only tested for Parsoid's code. Parsoid uses
13272 ## a <meta> marker tag for <ref> tags and they are expanded
13273 ## much later. We are verifying that this <meta> tag usage
13274 ## doesn't prevent foster parenting.
13276 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13278 {{PartialTable}}<ref>foo</ref>
13283 <sup 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></sup><table about="#mwt2">
13287 <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>
13291 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13301 <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{{!}}}"]}'>
13302 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13306 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13311 Templates: Lists: Multi-line list-items via templates
13313 *{{echo|a {{nonexistent|
13315 *{{echo|b {{nonexistent|
13318 <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>
13319 <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>
13324 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13326 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13328 <p><i>ab</i>c<i>d</i>e
13333 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13334 (PHP parser generates misnested html)
13336 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13338 <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>
13342 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13343 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13345 parsoid=wt2html,wt2wt
13347 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13349 <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>
13350 <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>
13351 <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>
13355 Templates: Ugly nesting: 4. Divs opened/closed across templates
13357 a<div>b{{echo|c</div>d}}e
13362 <p>a</p><div>bc</div><p>de
13367 Templates: Ugly templates: 3. newline-only template parameter
13376 # This looks like a bug: a single newline triggers p/br for some reason.
13378 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13387 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13388 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13390 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13396 <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
13397 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13401 # T66017 -- ugly wikitext with fostered content generates two template ranges
13402 # that are "identical" and generate nesting cycles in the algorithm
13404 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13406 {{echo|<table><tr><td><table>}}
13410 <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"}'>
13411 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13412 </table></td></tr></tbody></table>
13416 Templates: Parameters substituted at the top-level
13418 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13422 <p><i>who</i> me? <b>never!</b>
13426 <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>
13428 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13432 Templates: Param with empty arg in the final position
13436 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13440 Parser Functions: 1. Simple example
13449 Parser Functions: 2. Nested use (only outermost should be marked up)
13458 ### Pre-save transform tests
13461 pre-save transform: subst:
13467 This is a test template
13471 pre-save transform: normal template
13481 pre-save transform: nonexistent template
13485 {{thistemplatedoesnotexist}}
13487 {{thistemplatedoesnotexist}}
13491 pre-save transform: subst magic variables
13500 # This is T2089, which I fixed. -- wtm
13502 pre-save transform: subst: templates with parameters
13506 {{subst:paramtest|param="something else"}}
13508 This is a test template with parameter "something else"
13512 Template:nowikitest
13514 <nowiki>'''not wiki'''</nowiki>
13518 pre-save transform: nowiki in subst (T3188)
13522 {{subst:nowikitest}}
13524 <nowiki>'''not wiki'''</nowiki>
13528 Template:commenttest
13530 This template has <!-- a comment --> in it.
13534 pre-save transform: comment in subst (T3936)
13538 {{subst:commenttest}}
13540 This template has <!-- a comment --> in it.
13544 pre-save transform: unclosed tag
13548 <nowiki>'''not wiki'''
13550 <nowiki>'''not wiki'''
13554 pre-save transform: mixed tag case
13558 <NOwiki>'''not wiki'''</noWIKI>
13560 <NOwiki>'''not wiki'''</noWIKI>
13564 pre-save transform: unclosed comment in <nowiki>
13568 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13570 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13573 # Leading @ in this template definition works around a limitation
13574 # in parsoid's parserTests which otherwise strips the <span> from the
13575 # result (confusing it for a template wrapper)
13579 @<span onmouseover="alert('crap')">Oh no</span>
13583 (confirming safety of fix for subst T3936)
13585 {{Template:dangerous}}
13587 <p>@<span>Oh no</span>
13592 pre-save transform: comment containing gallery (T7024)
13596 <!-- <gallery>data</gallery> -->
13598 <!-- <gallery>data</gallery> -->
13602 pre-save transform: comment containing extension
13606 <!-- <tag>data</tag> -->
13608 <!-- <tag>data</tag> -->
13612 pre-save transform: comment containing nowiki
13616 <!-- <nowiki>data</nowiki> -->
13618 <!-- <nowiki>data</nowiki> -->
13622 pre-save transform: <noinclude> in subst (T5298)
13632 pre-save transform: <onlyinclude> in subst (T5298)
13636 {{subst:Includes2}}
13644 {{<includeonly>subst:</includeonly>Includes}}
13648 Template:SafeSubstTest
13650 {{<includeonly>safesubst:</includeonly>Includes}}
13654 T24297: safesubst: works during PST
13658 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13664 T24297: safesubst: works during normal parse
13673 subst: does not work during normal parse
13677 <p>{{subst:Includes}}
13682 pre-save transform: context links ("pipe trick")
13686 [[Article (context)|]]
13689 [[Bar:Article (context)|]]
13690 [[:Bar:Article (context)|]]
13692 [[|Article (context)]]
13696 [[Article (context)|Article]]
13697 [[Bar:Article|Article]]
13698 [[:Bar:Article|Article]]
13699 [[Bar:Article (context)|Article]]
13700 [[:Bar:Article (context)|Article]]
13702 [[Article (context)]]
13703 [[Bar:X (Y) Z|X (Y) Z]]
13704 [[:Bar:X (Y) Z|X (Y) Z]]
13708 pre-save transform: context links ("pipe trick") with interwiki prefix
13712 [[interwiki:Article|]]
13713 [[:interwiki:Article|]]
13714 [[interwiki:Bar:Article|]]
13715 [[:interwiki:Bar:Article|]]
13717 [[interwiki:Article|Article]]
13718 [[:interwiki:Article|Article]]
13719 [[interwiki:Bar:Article|Bar:Article]]
13720 [[:interwiki:Bar:Article|Bar:Article]]
13724 pre-save transform: context links ("pipe trick") with parens in title
13726 pst title=[[Somearticle (context)]]
13730 [[Article (context)|Article]]
13734 pre-save transform: context links ("pipe trick") with comma in title
13736 pst title=[[Someplace, Somewhere]]
13739 [[Otherplace, Elsewhere|]]
13740 [[Otherplace, Elsewhere, Anywhere|]]
13742 [[Otherplace, Somewhere|Otherplace]]
13743 [[Otherplace, Elsewhere|Otherplace]]
13744 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13748 pre-save transform: context links ("pipe trick") with parens and comma
13750 pst title=[[Someplace (IGNORED), Somewhere]]
13753 [[Otherplace (place), Elsewhere|]]
13755 [[Otherplace, Somewhere|Otherplace]]
13756 [[Otherplace (place), Elsewhere|Otherplace]]
13760 pre-save transform: context links ("pipe trick") with comma and parens
13762 pst title=[[Who, me? (context)]]
13765 [[Me, Myself, and I (1937 song)|]]
13767 [[Yes, you. (context)|Yes, you.]]
13768 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13772 pre-save transform: context links ("pipe trick") with namespace
13774 pst title=[[Ns:Somearticle]]
13778 [[Ns:Article|Article]]
13782 pre-save transform: context links ("pipe trick") with namespace and parens
13784 pst title=[[Ns:Somearticle (context)]]
13788 [[Ns:Article (context)|Article]]
13792 pre-save transform: context links ("pipe trick") with namespace and comma
13794 pst title=[[Ns:Somearticle, Context, Whatever]]
13798 [[Ns:Article, Context, Whatever|Article]]
13802 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13804 pst title=[[Ns:Somearticle, Context (context)]]
13808 [[Ns:Article (context)|Article]]
13812 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13814 pst title=[[Ns:Somearticle (IGNORED), Context]]
13818 [[Ns:Article, Context|Article]]
13822 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13826 [[Article(context)|]]
13827 [[Bar:Article(context)|]]
13828 [[:Bar:Article(context)|]]
13829 [[|Article(context)]]
13833 [[Article(context)|Article]]
13834 [[Bar:Article(context)|Article]]
13835 [[:Bar:Article(context)|Article]]
13836 [[Article(context)]]
13837 [[Bar:X(Y)Z|X(Y)Z]]
13838 [[:Bar:X(Y)Z|X(Y)Z]]
13842 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13846 [[Article (context)|]]
13847 [[Bar:Article (context)|]]
13848 [[:Bar:Article (context)|]]
13849 [[|Article (context)]]
13853 [[Article (context)|Article]]
13854 [[Bar:Article (context)|Article]]
13855 [[:Bar:Article (context)|Article]]
13856 [[Article (context)]]
13857 [[Bar:X (Y) Z|X (Y) Z]]
13858 [[:Bar:X (Y) Z|X (Y) Z]]
13862 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13866 [[Article(context)|]]
13867 [[Bar:Article(context)|]]
13868 [[:Bar:Article(context)|]]
13869 [[|Article(context)]]
13873 [[Article(context)|Article]]
13874 [[Bar:Article(context)|Article]]
13875 [[:Bar:Article(context)|Article]]
13876 [[Article(context)]]
13877 [[Bar:X(Y)Z|X(Y)Z]]
13878 [[:Bar:X(Y)Z|X(Y)Z]]
13882 pre-save transform: context links ("pipe trick") with commas (T23660)
13886 [[Article (context), context|]]
13887 [[Article (context),context|]]
13888 [[Bar:Article (context), context|]]
13889 [[Bar:Article (context),context|]]
13890 [[:Bar:Article (context), context|]]
13891 [[:Bar:Article (context),context|]]
13893 [[Article (context), context|Article]]
13894 [[Article (context),context|Article]]
13895 [[Bar:Article (context), context|Article]]
13896 [[Bar:Article (context),context|Article]]
13897 [[:Bar:Article (context), context|Article]]
13898 [[:Bar:Article (context),context|Article]]
13902 Parsoid: backwards pipe trick
13909 <p>[[|<b>bar</b>]]</p>
13913 pre-save transform: trim trailing empty lines
13917 Empty lines are trimmed
13923 Empty lines are trimmed
13927 pre-save transform: Signature expansion
13934 * <noinclude>~~~</noinclude>
13935 * <includeonly>~~~</includeonly>
13936 * <onlyinclude>~~~</onlyinclude>
13938 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13939 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13940 * 00:02, 1 January 1970 (UTC)
13941 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13942 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13943 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13948 ParserOutput flags from signature expansion (T84843)
13955 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13956 flags=user-signature
13961 pre-save transform: Signature expansion in nowiki tags (T2093)
13967 <nowiki>~~~~</nowiki>
13969 <includeonly><nowiki>~~~~</nowiki></includeonly>
13971 <noinclude><nowiki>~~~~</nowiki></noinclude>
13973 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13975 {{subst:Foo}} shall be converted to FOO
13977 As well as inside noinclude/onlyinclude
13978 <noinclude>{{subst:Foo}}</noinclude>
13979 <onlyinclude>{{subst:Foo}}</onlyinclude>
13981 But not inside includeonly
13982 <includeonly>{{subst:Foo}}</includeonly>
13986 <nowiki>~~~~</nowiki>
13988 <includeonly><nowiki>~~~~</nowiki></includeonly>
13990 <noinclude><nowiki>~~~~</nowiki></noinclude>
13992 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13994 FOO shall be converted to FOO
13996 As well as inside noinclude/onlyinclude
13997 <noinclude>FOO</noinclude>
13998 <onlyinclude>FOO</onlyinclude>
14000 But not inside includeonly
14001 <includeonly>{{subst:Foo}}</includeonly>
14005 Parsoid: Recognize nowiki with trailing space in tags
14009 <nowiki ><div>[[foo]]</nowiki >
14017 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14024 Parsoid: Recognize nowiki with odd capitalization
14028 <noWikI ><div>[[foo]]</Nowiki >
14030 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14035 Parsoid: Escape nowiki with trailing space in tags
14039 <p><nowiki > foo </nowiki ></p>
14040 <p>a<nowiki />b</p>
14041 <p>c<nowiki/ >d</p>
14043 <nowiki > foo </nowiki >
14051 Parsoid: Escape weird noWikI capitalizations
14055 <p><noWikI > foo </NoWikI ></p>
14057 <noWikI > foo </NoWikI >
14061 ### Message transform tests
14064 message transform: magic variables
14074 message transform: should not transform wiki markup
14084 message transform: <noinclude> in transcluded template (T6926)
14094 message transform: <onlyinclude> in transcluded template (T6926)
14104 {{#special:}} page name, known
14108 {{#special:Recentchanges}}
14110 Special:RecentChanges
14114 {{#special:}} page name with subpage, known
14118 {{#special:Recentchanges/param}}
14120 Special:RecentChanges/param
14124 {{#special:}} page name, unknown
14128 {{#special:foobar nonexistent}}
14130 Special:Foobar nonexistent
14134 {{#speciale:}} page name, known
14138 {{#speciale:Recentchanges}}
14140 Special:RecentChanges
14144 {{#speciale:}} page name with subpage, known
14148 {{#speciale:Recentchanges/param}}
14150 Special:RecentChanges/param
14154 {{#speciale:}} page name, unknown
14158 {{#speciale:foobar nonexistent}}
14160 Special:Foobar_nonexistent
14166 ### For Parsoid-specific tests, see
14167 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14172 parsoid=wt2html,wt2wt,html2html
14174 [[Image:foobar.jpg]]
14176 <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>
14179 <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>
14183 Serialize simple image with span wrapper
14187 <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>
14189 [[File:Foobar.jpg]]
14193 Simple image (using File: namespace, now canonical)
14195 [[File:Foobar.jpg]]
14197 <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>
14200 <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>
14204 Right-aligned image
14206 [[File:Foobar.jpg|right]]
14208 <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>
14211 <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>
14217 [[File:Foobar.jpg|right|Caption text]]
14219 <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>
14222 <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>
14226 Image with caption, T55312 #1
14228 [[File:Foobar.jpg|right|Caption page stuff]]
14230 <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>
14233 <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>
14237 Image with caption, T55312 #2
14239 [[File:Foobar.jpg|right|Caption page=]]
14241 <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>
14244 <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>
14248 Image with caption, T55312 #3
14250 [[File:Foobar.jpg|right|Caption page=stuff]]
14252 <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>
14255 <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>
14259 Image caption with pipe entity
14261 [[File:Foobar.jpg|thumb|one | two]]
14262 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14264 <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>
14265 <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>
14268 <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>
14269 <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>
14273 Allow empty links in image captions (T62753)
14277 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14282 <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>
14285 <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>
14287 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14288 </figcaption></figure>
14292 Titles in unlinked images (T23454)
14294 [[File:Foobar.jpg|link=|stuff]]
14296 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14299 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"stuff"}'><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>
14303 Link with empty target
14312 Image with link trail
14314 Linktrails should not work for images: [[File:Foobar.jpg]]s
14316 <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
14319 <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>
14323 Image with empty attribute
14325 parsoid=wt2html,wt2wt,html2html
14327 [[File:Foobar.jpg|right||Caption text]]
14329 <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>
14332 <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>
14336 1. Block image with individual attributes from templates
14338 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14340 <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>
14343 <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>
14347 2. Block Image with individual attributes from templates
14349 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14351 <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>
14354 <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>
14358 3. Inline image with individual attributes from templates
14360 [[File:Foobar.jpg|{{echo|50px}}]]
14362 <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>
14365 <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>
14368 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14369 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14371 Image with multiple attributes from the same template
14373 [[File:Foobar.jpg|{{image_attribs}}]]
14375 <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>
14378 <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>
14382 Image with link tails
14386 123[[File:Foobar.jpg]]456
14387 123[[File:Foobar.jpg|right]]456
14388 123[[File:Foobar.jpg|thumb]]456
14390 <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
14392 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
14393 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
14396 <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
14398 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
14399 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
14402 <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>
14403 <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>
14404 <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>
14408 Image with multiple captions -- only last one is accepted
14410 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14412 <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>
14415 <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>
14419 Image with multiple widths -- use last
14421 [[File:Foobar.jpg|200px|300px|caption]]
14423 <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>
14426 <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>
14430 Image with multiple alignments -- use first (T50664)
14434 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14436 [[File:Foobar.jpg|middle|text-top|caption]]
14438 <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>
14439 <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>
14442 <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>
14443 <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>
14447 Image with width attribute at different positions
14449 [[File:Foobar.jpg|200px|right|Caption]]
14450 [[File:Foobar.jpg|right|200px|Caption]]
14451 [[File:Foobar.jpg|right|Caption|200px]]
14453 <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>
14454 <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>
14455 <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>
14458 <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>
14459 <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>
14460 <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>
14463 # a sad bit of backward-compatibility
14465 Image with size specified with pxpx (T15500, T53628)
14467 parsoid=wt2html,wt2wt,html2html
14469 [[File:Foobar.jpg|20pxpx]]
14470 [[File:Foobar.jpg|200x20pxpx]]
14472 <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>
14473 <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>
14476 <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>
14480 Image with link parameter, wiki target
14482 [[File:Foobar.jpg|link=Main Page]]
14484 <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>
14487 <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>
14490 # parsoid T51293 (part 1)
14492 Image with link parameter, URL target
14494 [[File:Foobar.jpg|link=http://example.com/]]
14496 <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>
14499 <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>
14502 # parsoid T51293 (part 2)
14504 Image with link parameter, protocol-less URL target
14506 [[File:Foobar.jpg|link=//example.com/]]
14508 <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>
14511 <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>
14515 Escaping non-block captions (T107435)
14518 "modes": ["wt2wt"],
14520 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14524 [[Image:Foobar.jpg|caption]]
14526 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14529 # wgExternalLinkTarget not supported by Parsoid
14531 Image with link parameter, wgExternalLinkTarget
14533 [[Image:foobar.jpg|link=http://example.com/]]
14535 wgExternalLinkTarget='foobar'
14537 <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>
14542 Image with link parameter, wgNoFollowLinks set to false
14544 [[Image:foobar.jpg|link=http://example.com/]]
14546 wgNoFollowLinks=false
14548 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14553 Image with link parameter, wgNoFollowDomainExceptions
14555 [[Image:foobar.jpg|link=http://example.com/]]
14557 wgNoFollowDomainExceptions='example.com'
14559 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14563 # wgExternalLinkTarget not supported by Parsoid
14565 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14567 [[Image:foobar.jpg|link=http://example.com/|Title]]
14569 wgExternalLinkTarget='foobar'
14571 <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>
14576 Image with empty link parameter
14578 [[File:Foobar.jpg|link=]]
14580 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14583 <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>
14587 Image with link parameter (wiki target) and unnamed parameter
14589 [[File:Foobar.jpg|link=Main_Page|Title]]
14591 <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>
14594 <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>
14598 Image with link parameter (URL target) and unnamed parameter
14600 [[File:Foobar.jpg|link=http://example.com/|Title]]
14602 <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>
14605 <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>
14609 Thumbnail image with link parameter
14612 parsoid=wt2html,wt2wt,html2html
14614 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14616 <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>
14619 <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>
14623 Manually-specified thumbnail image
14627 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14629 <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>
14632 <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>
14636 Manually-specified thumbnail image with explicit link to wiki page
14639 parsoid=wt2html,wt2wt,html2html
14641 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14643 <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>
14646 <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>
14650 Manually-specified thumbnail image with explicit link to url
14653 parsoid=wt2html,wt2wt,html2html
14655 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14657 <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>
14660 <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>
14664 Manually-specified thumbnail image with explicit no link
14667 parsoid=wt2html,wt2wt,html2html
14669 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14671 <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>
14674 <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>
14678 Manually-specified thumbnail image with explicit link and alt text
14681 parsoid=wt2html,wt2wt,html2html
14683 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14685 <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>
14688 <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>
14692 Image with frame and link
14694 parsoid=wt2html,wt2wt,html2html
14696 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14698 <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>
14701 <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>
14705 Image with frame and link and explicit alt
14707 parsoid=wt2html,wt2wt,html2html
14709 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14711 <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>
14714 <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>
14718 Image with wiki markup in implicit alt
14720 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14722 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14724 <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>
14725 </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>
14728 <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>
14730 <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>
14734 Alt image option should handle most kinds of wikitext without barfing
14736 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14738 <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>
14741 <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>
14745 Image with table with attributes in caption
14747 parsoid=wt2html,html2html
14749 [[File:Foobar.jpg|thumb|
14756 <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>
14757 <table class="123">
14758 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14761 </figcaption></figure>
14765 Image with table with rows from templates in caption
14767 [[File:Foobar.jpg|thumb|
14773 <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>
14775 <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>
14777 </figcaption></figure>
14781 Image with nested tables in caption
14783 [[File:Foobar.jpg|thumb|Foo<br />
14792 <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}'/>
14796 <tbody><tr><td>z</td></tr>
14797 </tbody></table></td></tr>
14799 </figcaption></figure>
14802 ###################
14803 # Conflicting image format options.
14804 # First option specified should 'win'.
14805 # All three cases in each test should be identical.
14808 Image with 'frameless' first.
14810 parsoid=wt2html,wt2wt,html2html
14812 [[File:Foobar.jpg|frameless|caption]]
14814 [[File:Foobar.jpg|frameless|frame|caption]]
14816 [[File:Foobar.jpg|frameless|thumb|caption]]
14818 <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>
14819 </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>
14820 </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>
14823 <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>
14824 <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>
14825 <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>
14829 Image with 'frame' first.
14831 parsoid=wt2html,wt2wt,html2html
14833 [[File:Foobar.jpg|frame|caption]]
14834 [[File:Foobar.jpg|frame|frameless|caption]]
14835 [[File:Foobar.jpg|frame|thumb|caption]]
14837 <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>
14838 <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>
14839 <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>
14842 <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>
14843 <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>
14844 <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>
14848 Image with 'thumb' first.
14850 parsoid=wt2html,wt2wt,html2html
14852 [[File:Foobar.jpg|thumb|caption]]
14853 [[File:Foobar.jpg|thumb|frameless|caption]]
14854 [[File:Foobar.jpg|thumb|frame|caption]]
14856 <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>
14857 <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>
14858 <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>
14861 <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>
14862 <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>
14863 <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>
14866 ###################
14868 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14869 # and https://phabricator.wikimedia.org/T64258
14870 # Foobar has actual size of 1941x220
14871 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14872 # a scalable format.
14873 # 2. Framed images always ignore size options; always render at default size.
14874 # 3. "Unspecified format" and border are the only types which can be
14878 Image: unspecified format and border enlarge
14880 parsoid=wt2html,wt2wt,html2html
14882 [[File:Foobar.jpg|2000px]]
14884 [[File:Foobar.jpg|border|2000px]]
14886 <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>
14887 </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>
14890 <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>
14891 <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>
14895 Image: "unspecified format" and border reduce
14897 parsoid=wt2html,wt2wt,html2html
14899 [[File:Foobar.jpg|1000px]]
14901 [[File:Foobar.jpg|border|1000px]]
14903 <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>
14904 </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>
14907 <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>
14908 <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>
14912 Image: thumbs reduce
14914 parsoid=wt2html,wt2wt,html2html
14916 [[File:Foobar.jpg|thumb|50px]]
14918 <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>
14921 <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>
14925 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14927 parsoid=wt2html,wt2wt,html2html
14929 [[File:Foobar.jpg|thumb|2000px]]
14931 [[File:Foobar.svg|thumb|2000px]]
14933 <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>
14934 <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>
14937 <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>
14938 <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>
14942 Image: frameless can reduce in size
14944 parsoid=wt2html,wt2wt,html2html
14946 [[File:Foobar.jpg|frameless|50px]]
14948 <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>
14951 <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>
14955 Image: bitmap frameless can't be enlarged past original size, but vector can
14957 parsoid=wt2html,wt2wt,html2html
14959 [[File:Foobar.jpg|frameless|2000px]]
14961 [[File:Foobar.svg|frameless|2000px]]
14963 <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>
14964 </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>
14967 <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>
14968 <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>
14972 Image: framed images are always unscaled.
14974 parsoid=wt2html,wt2wt,html2html
14976 [[File:Foobar.jpg|frame]]
14978 [[File:Foobar.jpg|frame|50px]]
14980 [[File:Foobar.jpg|frame|50x50px]]
14982 [[File:Foobar.jpg|frame|2000px]]
14984 <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>
14985 <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>
14986 <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>
14987 <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>
14990 <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>
14991 <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>
14992 <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>
14993 <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>
14996 ###################
14999 Link to image page- image page normally doesn't exists, hence edit link
15000 Add test with existing image page
15001 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15005 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15010 T20784 Link to non-existent image page with caption should use caption as link text
15012 [[:Image:test|caption]]
15014 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15019 Frameless image caption with a free URL
15021 [[File:Foobar.jpg|http://example.com]]
15023 <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>
15026 <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>
15030 Thumbnail image caption with a free URL
15034 [[File:Foobar.jpg|thumb|http://example.com]]
15036 <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>
15039 <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" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15043 Thumbnail image caption with a free URL and explicit alt
15046 parsoid=wt2html,wt2wt,html2html
15048 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15050 <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>
15053 <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" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15057 SVG thumbnails with no language set
15060 [[File:Foobar.svg|thumb|caption]]
15062 <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>
15065 <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>
15069 SVG thumbnails with language de
15071 parsoid=wt2html,wt2wt,html2html
15073 [[File:Foobar.svg|thumb|caption|lang=de]]
15075 <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>
15078 <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>
15082 SVG thumbnails with invalid language code
15084 parsoid=wt2html,wt2wt,html2html
15086 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15088 <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>
15091 <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>
15095 T3887: A ISBN with a thumbnail
15097 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15099 <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>
15102 <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>
15106 T3887: A RFC with a thumbnail
15108 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15110 <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>
15113 <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" class="external text">RFC 12354</a></figcaption></figure>
15117 T3887: A mailto link with a thumbnail
15119 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15121 <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>
15124 <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" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
15127 # Pending resolution to T2368
15129 T2648: Frameless image caption with a link
15131 [[File:Foobar.jpg|text with a [[link]] in it]]
15133 <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>
15136 <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>
15140 T2648: Frameless image caption with a link (suffix)
15142 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15144 <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>
15147 <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>
15151 T2648: Frameless image caption with an interwiki link
15153 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15155 <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>
15158 <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>
15162 T2648: Frameless image caption with a piped interwiki link
15164 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15166 <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>
15169 <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>
15173 T107474: Frameless image caption with <nowiki>
15175 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15177 <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>
15181 Escape HTML special chars in image alt text
15183 [[File:Foobar.jpg|& < > "]]
15185 <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>
15188 <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>
15192 Escape HTML special chars in image alt text with LanguageConverter
15196 [[File:Foobar.jpg|& < > "]]
15198 <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>
15201 <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>
15205 Entities in file name and attributes
15207 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15209 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15212 <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>
15216 T2499: Alt text should have Ӓ, not &1234;
15218 [[File:Foobar.jpg|♀]]
15220 <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>
15223 <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>
15227 Broken image caption with link
15229 parsoid=wt2html,wt2wt,html2html
15231 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15233 <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.
15236 <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>
15240 Image caption containing another image
15242 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15244 <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>
15247 <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>
15251 Image: caption containing a newline
15253 [[File:Foobar.jpg|This
15256 <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>
15259 <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>
15263 Image: caption containing leading space
15264 (The leading space should not trigger nowiki escaping in wt2wt mode)
15266 [[File:Foobar.jpg|thumb| bar]]
15268 <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>
15271 <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>
15274 # html/php output not have newlines after table, td, th, etc. because
15275 # Linker::makeThumbLink2() replaces the newlines with spaces since
15276 # the table is inside a caption.
15277 # FIXME: Verify if that circa 2004 fix is still required.
15279 Image: caption containing a table
15281 parsoid=wt2html,wt2wt,html2html
15283 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15289 and some more text.]]
15291 <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>
15294 <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
15297 <tr><th>Foo</th><th>Bar</th></tr>
15300 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15304 T5090: External links other than http: in image captions
15306 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15308 <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>
15311 <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" class="external text" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" class="external text" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
15317 parsoid=wt2html,wt2wt,html2html
15319 [[Image:foobar.jpg|a|class=b]]
15321 <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>
15324 <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>
15328 Localized image handling (1).
15330 parsoid=wt2html,wt2wt,html2html
15333 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15335 <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>
15338 <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>
15342 Localized image handling (2).
15345 parsoid=wt2html,wt2wt,html2html
15348 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15350 <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>
15353 <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>
15357 Localized image handling (3).
15362 <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>
15364 [[File:Foobar.jpg|بندانگشتی]]
15368 "border", "frameless" and "class" attributes on an image.
15371 parsoid=wt2html,wt2wt,html2html
15373 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15375 <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>
15378 <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>
15381 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15383 Invalid image attributes (T64500)
15386 parsoid=wt2html,wt2wt,html2html
15388 [[File:Foobar.jpg|thumb|float|left|caption]]
15390 [[File:Foobar.jpg|thumb|righ|caption]]
15392 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15394 <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>
15395 <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>
15396 <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>
15399 <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>
15400 <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>
15401 <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>
15407 #REDIRECT [[File:Barfoo.jpg]]
15410 # FIXME: Parsoid should run this test -- but we'd need to teach the
15411 # mockAPI about the redirected Barfoo.jpg image.
15415 [[Image:Barfoo.jpg]]
15417 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15422 Missing image with uploads disabled
15426 [[File:Foobaz.jpg]]
15428 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15431 <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>
15434 # Parsoid-specific testing for images
15435 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15436 # Currently imperfect due to a flaw in the Parsoid testrunner
15438 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15442 Parsoid-specific image handling - simple image with size and middle alignment
15444 [[File:Foobar.jpg|middle|50px]]
15446 <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>
15450 Parsoid-specific image handling - simple image with size, middle alignment,
15451 non-standard namespace alias
15453 parsoid=wt2wt,wt2html,html2html
15455 [[Image:Foobar.jpg|middle|50px]]
15457 <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>
15461 Parsoid-specific image handling - simple image with size and middle alignment
15464 [[File:Foobar.jpg|50px|middle]]
15466 <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>
15470 Parsoid-specific image handling - simple image with size and middle alignment
15471 and non-standard namespace name
15473 parsoid=wt2html,wt2wt,html2html
15475 [[Image:Foobar.jpg|50px|middle]]
15477 <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>
15481 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15483 [[File:Foobar.jpg|500x10px|baseline|caption]]
15485 <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>
15489 Parsoid-specific image handling - simple image with border and size spec
15491 [[File:Foobar.jpg|50px|border|caption]]
15493 <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>
15497 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15499 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15501 <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>
15505 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15508 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15510 <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>
15514 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15516 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15518 <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>
15522 Parsoid-specific image handling - thumbnail with specific size, halign,
15523 valign, and caption (existing content)
15525 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15527 <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>
15531 Parsoid-specific image handling - framed image with specific size and caption
15534 parsoid=wt2html,wt2wt,html2html
15536 [[File:Foobar.jpg|frame|500x50px|caption]]
15538 <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>
15542 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15545 parsoid=wt2html,wt2wt,html2html
15547 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15549 <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>
15553 Parsoid-specific image handling - frameless image with specific size, border, and caption
15555 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15557 <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>
15561 Parsoid-specific image handling - simple image with a formatted caption
15563 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15565 <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>
15569 Parsoid-specific image handling - caption with a template in it
15571 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15573 <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>
15577 Parsoid-specific image handling - caption with unbalanced tags in it
15579 parsoid=wt2html,wt2wt,html2html
15582 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15586 <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>
15591 Parsoid-specific image handling - empty caption (1)
15593 parsoid=wt2html,wt2wt
15595 [[File:Foobar.jpg|thumb|]]
15597 <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>
15600 # empty captions don't get serialized unless we're in the "round trip" case
15602 Parsoid-specific image handling - empty caption (2)
15606 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15607 <a href="./File:Foobar.jpg">
15608 <img resource="./File:Foobar.jpg"
15609 src="//example.com/images/3/3a/Foobar.jpg"
15610 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15611 height="25" width="220"/>
15613 <figcaption></figcaption>
15616 [[File:Foobar.jpg|thumb]]
15620 Parsoid-specific image handling - whitespace caption
15622 [[File:Foobar.jpg|thumb| ]]
15624 <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>
15628 Parsoid-specific image handling - lang option
15631 [[File:Foobar.svg|lang=de|caption]]
15635 <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>
15639 ## Edge case bugs in Parsoid from T93580
15641 T93580: 1. Templated <ref> inside block images
15643 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15647 <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: <sup 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></sup></figcaption></figure>
15649 <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>
15653 T93580: 2. <ref> inside inline images
15655 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15659 <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: <sup 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></sup>"}'><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>
15661 <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>
15665 T93580: 3. Templated <ref> inside inline images
15667 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15671 <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: <sup 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></sup>"}'><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>
15673 <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>
15680 Subpage test/subpage
15688 subpage title=[[Subpage test]]
15692 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15697 Subpage noslash link
15699 subpage title=[[Subpage test]]
15703 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15708 Subpage test/1/2/subpage
15714 Relative subpage noslash link
15716 parsoid=wt2wt,wt2html,html2html
15717 subpage title=[[Subpage test/1/2/3/4]]
15723 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15724 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15727 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15728 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15732 Parsoid: dot-slash prefixed wikilinks
15742 </p><p>[[././baz/]]
15747 </p><p>[[././baz/]]
15752 Render invalid page names as plain text (T53090)
15764 [[foo[http://example.com]xyz]]
15766 [[{{echo|./../foo}}|bar]]
15767 [[{{echo|foo/.}}|bar]]
15768 [[{{echo|foo/..}}|bar]]
15769 [[{{echo|foo~~~~bar}}]]
15770 [[{{echo|foo>bar}}]]
15771 [[{{echo|foo././bar}}]]
15772 [[{{echo|foo{bar}}]]
15773 [[{{echo|foo}bar}}]]
15774 [[{{echo|foo[bar}}]]
15775 [[{{echo|foo]bar}}]]
15776 [[{{echo|foo<bar}}]]
15778 <p>[[./../foo|bar]]
15788 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15789 </p><p>[[./../foo|bar]]
15802 <p>[[./../foo|bar]]
15812 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15814 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15815 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15816 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15817 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15818 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15819 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15820 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15821 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15822 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15823 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15824 [[<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>
15832 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15837 T2561: {{/Subpage}}
15839 subpage title=[[Page]]
15843 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15851 Category:MediaWiki User's Guide
15859 [[:Category:MediaWiki User's Guide]]
15861 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15870 [[Category:MediaWiki User's Guide]]
15872 cat=MediaWiki_User's_Guide sort=
15874 <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"}}'/>
15878 PAGESINCATEGORY invalid title fatal (r33546 fix)
15880 {{PAGESINCATEGORY:<bogus>}}
15887 Category with different sort key
15891 [[Category:MediaWiki User's Guide|Foo]]
15893 cat=MediaWiki_User's_Guide sort=Foo
15895 <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"}}'/>
15899 Category with identical sort key
15903 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15905 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15907 <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"}}'/>
15911 Category with empty sort key
15916 [[Category:MediaWiki User's Guide|]]
15918 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15922 Category with empty sort key and parentheses
15927 [[Category:Foo (bar)|]]
15929 [[Category:Foo (bar)|Foo]]
15933 Category with link tail
15938 123[[Category:Foo]]456
15940 123[[Category:Foo]]456
15944 Category with template
15949 [[Category:{{echo|Foo}}]]
15951 [[Category:{{echo|Foo}}]]
15955 Category with template in sort key
15960 [[Category:Foo|{{echo|Bar}}]]
15962 [[Category:Foo|{{echo|Bar}}]]
15966 Category with template in sort key and title
15971 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15973 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15976 ## We used to, but no longer wt2wt this test since the default serializer
15977 ## will normalize all categories to serialize on their own line.
15978 ## This wikitext usage is going to be fairly uncommon in production and
15979 ## selser will take care of preserving formatting in those scenarios.
15981 Category / paragraph interactions
15985 Foo [[Category:Baz]] Bar
15987 Foo [[Category:Baz]]
15995 [[Category:Baz]] Bar
16008 {{echo|[[Category:Baz]]}}
16021 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16022 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16023 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16024 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16025 <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</p>
16026 <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}}]}'/>
16027 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16030 ## We used to, but no longer wt2wt this test since the default serializer
16031 ## will normalize all categories to serialize on their own line.
16032 ## This wikitext usage is going to be fairly uncommon in production and
16033 ## selser will take care of preserving formatting in those scenarios.
16035 ## The whitespace on the empty line is part of the test. Please do not delete
16037 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16043 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16045 {{echo|[[Category:Foo]] and so should this!}}
16047 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16052 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16054 <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>
16057 ## Parsoid will not try to wt2wt this while preserving newlines because
16058 ## it suppresses excess newlines within list items -- and we don't want to
16059 ## introduce a special case just for categories, which is, in reality somewhat
16060 ## odd behavior -- categories are unlikely to be used in list items like this
16061 ## in top-level pages and are only likely to show up in template-generated
16062 ## list items where this RT-ing is a non-issue.
16064 ## The whitespace on the empty line is part of the test. Please do not delete
16066 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16072 [[Category:Foo]] and this should be part of the same list item
16075 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16077 <ul><li>This and this should be part of the same list item</li>
16078 <li>So should this and this should be part of the same list item</li></ul>
16081 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16082 <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>
16086 ## Newlines and categories that follow the last item of a list
16087 ## are treated differently because this (list followed by categories)
16088 ## is an extremely common pattern on wikis.
16090 3. Categories and newlines: newline suppression for last list item should RT properly
16103 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16105 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16106 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16110 4. Categories and newlines: newline suppression for last list item should RT properly
16118 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16120 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16123 ## only wt2html for this to make sure the algo only applies to the rightmost path
16125 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16138 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16140 <ul><li> d</li></ul></li></ul>
16141 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16144 ## We used to, but no longer wt2wt this test since the default serializer
16145 ## will normalize all categories to serialize on their own line.
16146 ## This wikitext usage is going to be fairly uncommon in production and
16147 ## selser will take care of preserving formatting in those scenarios.
16149 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16153 * a [[Category:Foo]]
16155 <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>
16158 # This test also demonstrates because of newline+category tunneling
16159 # through the list hander, template wrapping doesn't expand to the
16160 # containing list when the list item swallows the category.
16162 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16167 <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
16168 </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>
16172 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16176 {{echo|[[Category:Foo]]
16180 <ul><li> a</li></ul>
16182 <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">
16183 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16184 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16188 9. Categories and newlines: should behave properly with linkprefix (T87753)
16203 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16204 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16208 10. No regressions on internal links following category (T174639)
16210 parsoid=wt2html,html2html
16212 [[Category:Foo]]<div>a
16217 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16220 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16222 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16225 # Note that Parsoid differs slightly from PHP due to T175421
16227 11. Special case where only newlines separate links (T175416)
16229 parsoid=wt2html,html2html
16233 [[Foo]][[es:Alimento]]
16238 <a href="/wiki/Foo" title="Foo">Foo</a>
16239 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16242 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16244 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16246 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16250 Category links with multiple namespaces
16252 [[Category:Project:Foo]]
16254 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16258 Parsoid: Serialize link to category page with colon escape
16264 [[:Category:Foo|Bar]]
16267 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16268 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16272 # We used to, but no longer wt2wt this test since the default serializer
16273 # will normalize all categories to serialize on their own line.
16274 # This wikitext usage is going to be fairly uncommon in production and
16275 # selser will take care of preventing whitespace insertion if this
16276 # occurs in an article.
16278 # html2html disabled for the same reason (whitespace insertion between
16281 # html2wt disabled because it localizes the "Category" namespace.
16283 Link prefix/suffixes aren't applied to category links
16293 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16297 Link prefix/suffixes aren't applied to language links
16307 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16311 Parsoid: Serialize link to file page with colon escape
16317 [[:File:Foo.png|Bar]]
16320 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16321 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16326 Parsoid: Serialize a genuine category link without colon escape
16331 [[Category:Foo|Bar]]
16333 <link rel="mw:PageProp/Category" href="./Category:Foo">
16334 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16338 Normalize hrefs properly before testing for invalid link targets (T72894)
16342 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16344 [[Category:Toxine bactérienne]]
16348 Parsoid: Defaultsort
16350 {{DEFAULTSORT:Foo}}
16352 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16355 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16356 # But, this is a limitation of our representation and is documented in
16357 # TemplateHandler.js in processSpecialMagicWord
16359 Parsoid: Defaultsort (template-generated)
16361 {{{{echo|DEFAULTSORT}}:Foo}}
16363 <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"}]]}'/>
16367 ### Inter-language links
16370 Interlanguage links
16378 es:Alimento fr:Nourriture zh:食品
16380 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16381 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16382 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16386 Duplicate interlanguage links (T26502)
16397 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16398 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16399 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16400 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16407 Basic section headings
16414 ===Smaller headline===
16417 <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>
16420 <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>
16423 <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>
16429 Section headings with TOC
16432 ===Subheadline 1===
16433 =====Skipping a level=====
16434 ======Skipping a level======
16438 ===Another headline===
16440 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16442 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16444 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16446 <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>
16448 <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>
16455 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16457 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16463 <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>
16464 <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>
16465 <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>
16466 <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>
16467 <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>
16470 <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>
16475 TOC anchors don't collide
16483 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16485 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16486 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16487 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16488 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16492 <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>
16493 <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>
16494 <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>
16495 <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>
16499 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16500 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16502 Handling of sections up to level 6 and beyond
16507 ==Level 2 Heading==
16508 ===Level 3 Heading===
16509 ====Level 4 Heading====
16510 =====Level 5 Heading=====
16511 ======Level 6 Heading======
16512 =======Level 7 Heading=======
16513 ========Level 8 Heading========
16514 =========Level 9 Heading=========
16515 ==========Level 10 Heading==========
16517 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16519 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16521 <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>
16523 <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>
16525 <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>
16527 <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>
16529 <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>
16530 <li class="toclevel-6 tocsection-7"><a href="#.3DLevel_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">=Level 7 Heading=</span></a></li>
16531 <li class="toclevel-6 tocsection-8"><a href="#.3D.3DLevel_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">==Level 8 Heading==</span></a></li>
16532 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3DLevel_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">===Level 9 Heading===</span></a></li>
16533 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3DLevel_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>
16547 <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>
16548 <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>
16549 <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>
16550 <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>
16551 <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>
16552 <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>
16553 <h6><span class="mw-headline" id=".3DLevel_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>
16554 <h6><span class="mw-headline" id=".3D.3DLevel_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>
16555 <h6><span class="mw-headline" id=".3D.3D.3DLevel_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>
16556 <h6><span class="mw-headline" id=".3D.3D.3D.3DLevel_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>
16559 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16560 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16561 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16562 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16563 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16564 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16565 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16566 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16567 <h6 id="===Level_9_Heading===" data-parsoid='{}'><span id=".3D.3D.3DLevel_9_Heading.3D.3D.3D" typeof="mw:FallbackId"></span>===Level 9 Heading===</h6>
16568 <h6 id="====Level_10_Heading====" data-parsoid='{}'><span id=".3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D" typeof="mw:FallbackId"></span>====Level 10 Heading====</h6>
16572 TOC regression (T11764)
16576 ====title 1.1.1====
16581 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16583 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16585 <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>
16587 <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>
16590 <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>
16593 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16595 <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>
16601 <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>
16602 <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>
16603 <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>
16604 <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>
16605 <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>
16606 <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>
16611 TOC for heading containing <span id="..."></span> (T96153)
16614 ==<span id="old-anchor"></span>New title==
16616 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16618 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16622 <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>
16627 TOC with wgMaxTocLevel=3 (T8204)
16633 ====title 1.1.1====
16638 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16640 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16642 <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>
16643 <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>
16646 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16648 <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>
16654 <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>
16655 <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>
16656 <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>
16657 <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>
16658 <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>
16659 <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>
16664 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16670 ====Section 1.1.1====
16671 ====Section 1.1.1.1====
16674 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16676 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16678 <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>
16681 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16685 <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>
16686 <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>
16687 <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>
16688 <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>
16689 <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>
16695 Resolving duplicate section names
16700 <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>
16701 <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>
16706 Resolving duplicate section names with differing case (T12721)
16711 <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>
16712 <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>
16724 Template with sections, __NOTOC__
16731 <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>
16732 <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>
16733 <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>
16734 <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>
16739 __NOEDITSECTION__ keyword
16745 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16746 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16751 Link inside a section heading
16753 ==Section with a [[Main Page|link]] in it==
16755 <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>
16760 TOC regression (T14077)
16767 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16769 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16771 <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>
16774 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16778 <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>
16779 <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>
16780 <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>
16785 T3219 URL next to image (good)
16787 http://example.com [[File:Foobar.jpg]]
16789 <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>
16792 <p><a rel="mw:ExtLink" class="external free" 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>
16795 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16797 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16799 parsoid=wt2html,html2html
16802 The line above must have a trailing space!
16805 But just in case it doesn't...
16807 <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>
16808 <p>The line above must have a trailing space!
16810 <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>
16811 <p>But just in case it doesn't...
16814 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16815 <p>The line above must have a trailing space!</p>
16816 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16818 <p>But just in case it doesn't...</p>
16822 Header with special characters (T27462)
16824 The tooltips shall not show entities to the user (ie. be double escaped)
16841 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16843 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16845 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16846 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16847 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16848 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16849 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16853 <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>
16856 <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>
16859 <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>
16862 <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>
16865 <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>
16869 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16871 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
16874 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
16877 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
16880 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
16883 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
16888 Header with space, plus and underscore as entity
16890 Id should not contain + for spaces
16892 ==Space between Text==
16895 ==Space-Entity between Text==
16898 ==Plus+between+Text==
16901 ==Plus-Entity+between+Text==
16904 ==Underscore_between_Text==
16907 ==Underscore-Entity_between_Text==
16910 [[#Space between Text]]
16911 [[#Space-Entity between Text]]
16912 [[#Plus+between+Text]]
16913 [[#Plus-Entity+between+Text]]
16914 [[#Underscore_between_Text]]
16915 [[#Underscore-Entity_between_Text]]
16917 <p>Id should not contain + for spaces
16919 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16921 <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>
16922 <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>
16923 <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>
16924 <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>
16925 <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>
16926 <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>
16930 <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>
16933 <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>
16936 <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>
16939 <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>
16942 <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>
16945 <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>
16947 </p><p><a href="#Space_between_Text">#Space between Text</a>
16948 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16949 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16950 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16951 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16952 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16955 <p>Id should not contain + for spaces</p>
16957 <h2 id="Space_between_Text">Space between Text</h2>
16960 <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>
16963 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
16966 <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>
16969 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
16972 <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>
16975 <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>
16976 <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>
16977 <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>
16978 <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>
16979 <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>
16980 <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>
16983 # Parsoid html2wt disabled because it adds padding spaces around =
16985 Headers with excess '=' characters
16986 (Are similar tests necessary beyond the 1st level?)
16988 parsoid=wt2html,wt2wt,html2html
16992 =''italic'' heading==
16993 ==''italic'' heading=
16995 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16997 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16998 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16999 <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>
17000 <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>
17004 <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>
17005 <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>
17006 <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>
17007 <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>
17010 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17011 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17012 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17013 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17017 HTML headers vs TOC (T25393)
17018 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17030 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17032 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17034 <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>
17035 <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>
17038 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17040 <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>
17041 <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>
17047 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17048 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17049 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17050 <h1><span class="mw-headline" id="Header_2">Header 2
17052 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17053 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17056 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17057 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17058 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17060 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17062 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17063 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17064 <meta property="mw:PageProp/noeditsection"/>
17068 Single-line or multiline-comments can follow headings
17070 parsoid=wt2html,wt2wt
17078 <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>
17079 <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>
17080 <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>
17083 <h2 id="foo">foo</h2><!---->
17084 <h2 id="bar">bar</h2><!--c1-->
17085 <h2 id="baz">baz</h2><!--
17091 T3219 URL next to image (broken)
17093 http://example.com[[File:Foobar.jpg]]
17095 <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>
17098 <p><a rel="mw:ExtLink" class="external free" 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>
17102 T3186 news: in the middle of text
17104 http://en.wikinews.org/wiki/Wikinews:Workplace
17106 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17112 Namespaced link must have a title
17121 Namespaced link must have a title (bad fragment version)
17123 [[Project:#fragment]]
17125 <p>[[Project:#fragment]]
17131 ### HTML tags and HTML attributes
17135 div with no attributes
17137 <div>HTML rocks</div>
17139 <div>HTML rocks</div>
17144 div with double-quoted attribute
17146 <div id="rock">HTML rocks</div>
17148 <div id="rock">HTML rocks</div>
17153 div with single-quoted attribute
17155 <div id='rock'>HTML rocks</div>
17157 <div id="rock">HTML rocks</div>
17162 div with unquoted attribute
17164 <div id=rock>HTML rocks</div>
17166 <div id="rock">HTML rocks</div>
17171 div with illegal double attributes
17173 <div id="a" id="b">HTML rocks</div>
17175 <div id="b">HTML rocks</div>
17180 div with empty attribute value, space before equals
17182 parsoid=wt2html,html2html
17184 <div class =>HTML rocks</div>
17186 <div class="">HTML rocks</div>
17189 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17193 div with multiple empty attribute values
17195 wgFragmentMode=[ 'html5', 'legacy' ]
17197 parsoid=wt2html,html2html
17199 <div id= title=>HTML rocks</div>
17201 <div id="title=">HTML rocks</div>
17204 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17207 # FIXME Parsoid doesn't actually match PHP here.
17208 # Probably we should use the synthetic <foo /> or <indicator>
17209 # extensions for this test, which are enabled when running parser tests.
17211 Extension tag in attribute value
17213 <span title="<translate>123</translate>">ok</span>
17214 !! html/php+disabled
17215 <p><span title="<translate>123</translate>">ok</span>
17218 <p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"<translate>123</translate>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<translate typeof=\"mw:Extension/translate\" about=\"#mwt3\" data-parsoid='{\"dsr\":[13,39,2,2]}' data-mw='{\"name\":\"translate\",\"attrs\":{},\"body\":{\"extsrc\":\"123\"}}'>123</translate>"}]]}'>ok</span></p>
17222 table with multiple empty attribute values
17224 parsoid=wt2html,html2html
17230 <table title="id=">
17236 <table title="id=">
17237 <tbody><tr><td>hi</td></tr>
17242 div with braces in attribute value
17244 <div title="{}">Foo</div>
17246 <div title="{}">Foo</div>
17249 <div title="{}">Foo</div>
17253 div with empty attribute value, no space before equals
17255 parsoid=wt2html,html2html
17257 <div class=>HTML rocks</div>
17259 <div class="">HTML rocks</div>
17262 <div class="">HTML rocks</div>
17266 HTML multiple attributes correction
17268 <p class="error" class="awesome">Awesome!</p>
17270 <p class="awesome">Awesome!</p>
17275 Table multiple attributes correction
17278 !+ class="error" class="awesome"|status
17283 <th class="awesome">status
17291 <DIV ID="x">HTML ROCKS</DIV>
17293 <div id="x">HTML ROCKS</div>
17298 Non-ASCII pseudo-tags are rendered as text
17307 Pseudo-tag with URL 'name' renders as url link
17309 <http://example.com/>
17311 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17316 text with amp in the middle of nowhere
17320 <p>Remember AT&T?
17325 text with character entity: eacute
17327 I always thought é was a cute letter.
17329 <p>I always thought é was a cute letter.
17334 text with entity-escaped character entity-like string: eacute
17336 I always thought &eacute; was a cute letter.
17338 <p>I always thought &eacute; was a cute letter.
17343 text with undefined character entity: xacute
17345 I always thought &xacute; was a cute letter.
17347 <p>I always thought &xacute; was a cute letter.
17354 <data value="5">five</data>
17355 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17356 <mark>This highlighted text</mark>
17358 <p><data value="5">five</data>
17359 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17360 <mark>This highlighted text</mark>
17365 HTML tag with leading space is parsed as text
17369 <p>< div>foo< /div>
17373 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17374 ## the HTML5 parsing spec.
17376 Element with broken attribute syntax
17380 <div style=" style="123">hi</div>
17383 <div style="123">hi</div>
17387 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17388 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17392 ### Nesting tests (see T43545, T52604, T53081)
17395 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17396 # Note that html2wt is considerably more difficult if we use <b> in
17397 # the test case, instead of <small>
17399 Ensure that HTML adoption agency algorithm is properly implemented.
17401 <small>X<small>Y</small>Z</small>
17403 <p><small>X<small>Y</small>Z</small>
17407 # This was T43545 in the PHP parser.
17411 <kbd>X<kbd>Y</kbd>Z</kbd>
17413 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17417 # The following cases were T53081 in the PHP parser.
17418 # Note that there are some other nestable tags (b, i, etc) which are
17419 # not covered; see T53081 for discussion.
17424 <em>X<em>Y</em>Z</em>
17426 <p><em>X<em>Y</em>Z</em>
17431 Nesting of <strong>
17433 <strong>X<strong>Y</strong>Z</strong>
17435 <p><strong>X<strong>Y</strong>Z</strong>
17444 <p><q>X<q>Y</q>Z</q>
17451 <ruby>X<ruby>Y</ruby>Z</ruby>
17453 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17460 <bdo>X<bdo>Y</bdo>Z</bdo>
17462 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17474 [[Media:Foobar.jpg]]
17475 [[Media:Video.ogv]]
17476 [[:Media:Video.ogv]]
17478 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17479 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17480 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17483 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17484 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17485 <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>
17489 Media link with text
17491 [[Media:Foobar.jpg|A neat file to look at]]
17493 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17496 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17499 # FIXME: this is still bad HTML tag nesting
17500 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17501 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17503 Media link with nasty text
17505 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17507 <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>
17510 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg"><div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
17512 <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>
17517 Media link to nonexistent file (T3702)
17519 [[Media:No such.jpg]]
17520 [[Media:No_such file.jpg]]
17522 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17523 <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>
17526 <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>
17527 <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>
17531 Image link to nonexistent file (T3850 - good)
17533 [[File:No_such.jpg]]
17535 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17538 <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>
17542 :Image link to nonexistent file (T3850 - bad)
17544 [[:Image:No such.jpg]]
17546 <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>
17549 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17553 Character reference normalization in link text (T3938)
17555 [[Main Page|this&that]]
17557 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17564 Test for unicode normalization
17566 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17570 (T21451) Links should refer to the normalized form.
17578 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17579 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17580 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17581 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17582 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17587 Empty attribute crash test (T4067)
17589 <font color="">foo</font>
17591 <p><font color="">foo</font>
17596 Empty attribute crash test single-quotes (T4067)
17598 <font color=''>foo</font>
17600 <p><font color="">foo</font>
17605 Attribute test: equals, then nothing
17607 parsoid=wt2html,html2html
17609 <font color=>foo</font>
17611 <p><font color="">foo</font>
17614 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17618 Attribute test: unquoted value
17620 parsoid=wt2html,html2html
17622 <font color=x>foo</font>
17624 <p><font color="x">foo</font>
17627 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17631 Attribute test: unquoted but illegal value (hash)
17633 <font color=#x>foo</font>
17635 <p><font color="#x">foo</font>
17639 # Parsoid does not serialize to empty attribute syntax,
17640 # so wt2wt and html2wt cases are skipped
17642 Attribute test: no value (T54330)
17644 parsoid=wt2html,html2html
17646 <font color>foo</font>
17648 <p><font color="">foo</font>
17651 <p><font color="">foo</font></p>
17655 T4095: link with three closing brackets
17659 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17662 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17666 T4095: link with pipe and three closing brackets
17668 [[Main Page|link]]]
17670 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17673 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17677 T4095: link with pipe and three closing brackets, version 2
17679 [[Main Page|[http://example.com/]]]
17681 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17684 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17693 Template:Dangerous attribute
17695 " onmouseover="alert(document.cookie)
17699 Template:Dangerous style attribute
17701 border-size: expression(alert(document.cookie))
17707 <div style="float: right; {{{1}}}">Magic div</div>
17711 T4304: HTML attribute safety (safe template; regression T4309)
17713 <div title="{{test}}"></div>
17715 <div title="This is a test template"></div>
17718 <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>
17721 # Parsoid has enough context to handle this case
17723 T4304: HTML attribute safety (dangerous template; 2309)
17725 <div title="{{dangerous attribute}}"></div>
17727 <div title=""></div>
17730 <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>
17734 T4304: HTML attribute safety (dangerous style template; 2309)
17736 <div style="{{dangerous style attribute}}"></div>
17738 <div style="/* insecure input */"></div>
17741 <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>
17745 T4304: HTML attribute safety (safe parameter; 2309)
17747 {{div style|width: 200px}}
17749 <div style="float: right; width: 200px">Magic div</div>
17752 <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>
17756 T4304: HTML attribute safety (unsafe parameter; 2309)
17758 {{div style|width: expression(alert(document.cookie))}}
17760 <div style="/* insecure input */">Magic div</div>
17763 <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>
17766 ## Parsoid output here differs; needs investigation.
17768 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17770 {{div style|"><script>alert(document.cookie)</script>}}
17772 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17776 ## Parsoid output here differs; needs investigation.
17778 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17780 {{div style|" ><script>alert(document.cookie)</script>}}
17782 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17787 T4304: HTML attribute safety (link)
17789 <div title="[[Main Page]]"></div>
17791 <div title="[[Main Page]]"></div>
17794 <div title="[[Main Page]]"></div>
17798 T4304: HTML attribute safety (italics)
17800 <div title="''foobar''"></div>
17802 <div title="''foobar''"></div>
17807 T4304: HTML attribute safety (bold)
17809 <div title="'''foobar'''"></div>
17811 <div title="'''foobar'''"></div>
17816 T4304: HTML attribute safety (ISBN)
17818 <div title="ISBN 1234567890"></div>
17820 <div title="ISBN 1234567890"></div>
17825 T4304: HTML attribute safety (RFC)
17827 <div title="RFC 1234"></div>
17829 <div title="RFC 1234"></div>
17834 T4304: HTML attribute safety (PMID)
17836 <div title="PMID 1234567890"></div>
17838 <div title="PMID 1234567890"></div>
17843 T4304: HTML attribute safety (web link)
17845 <div title="http://example.com/"></div>
17847 <div title="http://example.com/"></div>
17852 T4304: HTML attribute safety (named web link)
17854 <div title="[http://example.com/ link]"></div>
17856 <div title="[http://example.com/ link]"></div>
17859 <div title="[http://example.com/ link]"></div>
17863 T5244: HTML attribute safety (extension; safe)
17865 <div style="<nowiki>background:blue</nowiki>"></div>
17867 <div style="background:blue"></div>
17870 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17874 T5244: HTML attribute safety (extension; unsafe)
17876 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17878 <div style="/* insecure input */"></div>
17881 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17884 # More MSIE fun discovered by Tom Gilder
17887 MSIE CSS safety test: spurious slash
17889 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17891 <div style="/* insecure input */">evil</div>
17894 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17898 MSIE CSS safety test: hex code
17900 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17902 <div style="/* insecure input */">evil</div>
17905 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17909 MSIE CSS safety test: comment in url
17911 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17913 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17916 <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>
17920 MSIE CSS safety test: comment in expression
17922 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17924 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17927 <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>
17931 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17933 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17935 <p style="/* invalid control char */">A</p>
17938 <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>
17942 MSIE 6 CSS safety test: Fullwidth (T57332)
17944 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17945 <div style="top:EXPRESSION(alert())">B</div>
17947 <p style="/* insecure input */">A</p>
17948 <div style="/* insecure input */">B</div>
17951 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17952 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17956 MSIE 6 CSS safety test: IPA extensions (T57332)
17958 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17959 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17961 <div style="/* insecure input */">A</div>
17962 <p style="/* insecure input */">B</p>
17965 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17966 <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>
17970 MSIE 6 CSS safety test: sup/sub script (T57332)
17972 <div style="background-image:url⁽javascript:alert())">A</div>
17973 <div style="background-image:url₍javascript:alert())">B</div>
17974 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17976 <div style="/* insecure input */">A</div>
17977 <div style="/* insecure input */">B</div>
17978 <p style="/* insecure input */">C</p>
17981 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17982 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17983 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17989 parsoid=wt2html,html2html
17992 title="data:text/html,<img src=1 onerror=alert(1)>"
17993 style="-o-link:attr(title);-o-link-source:current">X</div>
17995 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17998 <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>
18002 MSIE 6 CSS safety test: Repetition markers (T57332)
18004 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18005 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18006 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18007 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18008 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18009 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18010 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18012 <p style="/* insecure input */">A</p>
18013 <p style="/* insecure input */">B</p>
18014 <p style="/* insecure input */">C</p>
18015 <p style="/* insecure input */">D</p>
18016 <p style="/* insecure input */">E</p>
18017 <p style="/* insecure input */">F</p>
18018 <p style="/* insecure input */">G</p>
18021 <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>
18022 <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>
18023 <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>
18024 <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>
18025 <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>
18026 <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>
18027 <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>
18031 Table attribute legitimate extension
18034 !+ style="<nowiki>color:blue</nowiki>"|status
18039 <th style="color:blue">status
18045 Table attribute safety
18048 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18053 <th style="/* insecure input */">status
18059 CSS line continuation 1
18061 <div style="background-image: u\ rl(test.jpg);"></div>
18063 <div style="/* insecure input */"></div>
18068 CSS line continuation 2
18070 <div style="background-image: u\ rl(test.jpg); "></div>
18072 <div style="/* invalid control char */"></div>
18083 Expansion of multi-line templates in attribute values (T8255)
18085 <div style="background: {{identity|#00FF00}}">-</div>
18087 <div style="background: #00FF00">-</div>
18092 Expansion of multi-line templates in attribute values (T8255 sanity check)
18094 <div style="background:
18097 <div style="background: #00FF00">-</div>
18100 <div style="background:
18105 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18107 <div style="background: #00FF00">-</div>
18109 <div style="background: #00FF00">-</div>
18114 Tags which are hidden from tidiers cannot pass through the Sanitizer
18116 <mw:toc><script>alert();</script></mw:toc>
18118 <p><mw:toc><script>alert();</script></mw:toc>
18123 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18127 Parser hook: empty input
18138 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18141 ## Don't expect parsoid to rt this form.
18143 Parser hook: empty input using terminated empty elements
18145 parsoid=wt2html,html2html
18156 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18160 Parser hook: empty input using terminated empty elements (space before)
18171 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18175 Parser hook: basic input
18186 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18189 ## Don't expect parsoid to rt this form.
18191 Parser hook: case insensitive
18193 parsoid=wt2html,html2html
18204 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18207 ## Don't expect parsoid to rt this form.
18209 Parser hook: case insensitive, redux
18211 parsoid=wt2html,html2html
18222 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18226 Parser hook: nested tags
18228 <tag><tag></tag></tag>
18237 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18241 Parser hook: basic arguments
18243 <tag width="200" height="100" depth="50" square=""></tag>
18256 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18259 ## Don't expect parsoid to rt this form.
18261 Parser hook: basic arguments, variations
18263 parsoid=wt2html,html2html
18265 <tag width=200 height = "100" depth = '50' square></tag>
18278 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18282 Parser hook: argument containing a forward slash (T7344)
18284 <tag filename="/tmp/bla"></tag>
18289 'filename' => '/tmp/bla',
18294 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18297 ## Don't expect parsoid to rt this form.
18299 Parser hook: empty input using terminated empty elements (T4374)
18301 parsoid=wt2html,html2html
18313 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18316 ## </tag> should be output literally since there is no matching tag that begins it
18317 ## Don't expect parsoid to rt this form.
18319 Parser hook: basic arguments using terminated empty elements (T4374)
18323 <tag width=200 height = "100" depth = '50' square/>
18340 <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
18344 ## Don't expect parsoid to rt this form.
18346 Parser hook: Don't allow unclosed extension tags
18352 this is a '''test'''
18354 <p>test <tag>123
18355 </p><p>this is a <b>test</b>
18358 <p>test <tag>123</p>
18360 <p>this is a <b>test</b></p>
18364 Parser hook: horizontal rule inside extension tag that outputs <pre>
18385 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18389 Parser hook: static parser hook not inside a comment
18391 <statictag>hello, world</statictag>
18393 <statictag action="flush" />
18399 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18400 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18404 Parser hook: static parser hook inside a comment
18406 <!-- <statictag>hello, world</statictag> -->
18407 <statictag action="flush" />
18412 <!-- <statictag>hello, world</statictag> -->
18413 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18416 # Nested template calls; this case was broken by Parser.php rev 1.506,
18420 Template:One-parameter
18422 (My parameter is: {{{1}}})
18426 Template:Map-one-parameter
18428 {{{{{1}}}|{{{2}}}}}
18432 Nested template calls
18434 {{Map-one-parameter|One-parameter|param}}
18436 <p>(My parameter is: param)
18445 # Remex wraps empty tag runs with p-tags.
18446 # Parsoid strips them out during p-wrapping.
18448 Sanitizer: Closing of open tags
18450 <s></s><table></table>
18452 <p><s></s></p><table></table>
18454 <s></s><table></table>
18458 Sanitizer: Closing of open but not closed tags
18467 Sanitizer: Closing of closed but not open tags
18473 <p class="mw-empty-elt">
18479 Sanitizer: Closing of closed but not open table tags
18483 Table not started</td></tr></table>
18485 <p>Table not started
18490 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18492 wgFragmentMode=[ 'html5', 'legacy' ]
18494 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18496 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18499 <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>
18503 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18505 wgFragmentMode=[ 'legacy' ]
18507 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18509 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18513 # In HTML5, the restrictions are that id must contain at least one character,
18514 # and must not contain any space characters.
18516 Sanitizer: Validating the contents of the id attribute (T6515)
18520 <br id="" /><br id="a space" />
18525 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18527 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18531 <br id="foo" /><br id="foo" />
18533 Something need to be done. foo-2 ?
18537 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18540 <meta itemprop="hello" content="world">
18541 <meta http-equiv="refresh" content="5">
18542 <meta itemprop="hello" http-equiv="refresh" content="5">
18543 <link itemprop="hello" href="{{SERVER}}">
18544 <link rel="stylesheet" href="{{SERVER}}">
18545 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18549 <p> <meta itemprop="hello" content="world" />
18550 <meta http-equiv="refresh" content="5">
18551 <meta itemprop="hello" content="5" />
18552 <link itemprop="hello" href="http://example.org" />
18553 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18554 <link itemprop="hello" href="http://example.org" />
18561 Sanitizer: Strip comments from CSS attributes
18563 parsoid=wt2html,wt2wt
18565 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18567 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18570 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18574 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18576 [[meatball:Soft"Security]]
18578 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18581 <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>
18585 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18587 [[meatball:Foo<Bar]]
18588 [[meatball:Foo>Bar]]
18589 [[meatball:Foo<bar]]
18590 [[meatball:Foo>bar]]
18592 <p>[[meatball:Foo<Bar]]
18593 [[meatball:Foo>Bar]]
18594 [[meatball:Foo<bar]]
18595 [[meatball:Foo>bar]]
18598 <p>[[meatball:Foo<Bar]]
18599 [[meatball:Foo>Bar]]
18600 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18601 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18605 Language converter: output gets cut off unexpectedly (T7757)
18609 this bit is safe: }-
18611 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18613 then we get cut off here: }-
18615 all additional text is vanished
18617 <p>this bit is safe: }-
18618 </p><p>but if we add a conversion instance: xxx
18619 </p><p>then we get cut off here: }-
18620 </p><p>all additional text is vanished
18623 <p>this bit is safe: }-</p>
18624 <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>
18625 <p>then we get cut off here: }-</p>
18626 <p>all additional text is vanished</p>
18630 Language converter glossary rules inside attributes (T119158)
18632 language=sr variant=sr-el
18634 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18636 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18639 </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>
18642 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18644 <p><figure-inline 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></figure-inline></p>
18648 Self closed html pairs (T7487)
18650 <center><font id="bug" />Centered text</center>
18651 <div><font id="bug2" />In div text</div>
18653 <center><font id="bug"></font>Centered text</center>
18654 <div><font id="bug2"></font>In div text</div>
18658 Punctuation: nbsp before exclamation
18662 <p>C'est grave !
18667 Punctuation: CSS !important (T13874)
18669 <div style="width:50% !important">important</div>
18671 <div style="width:50% !important">important</div>
18676 Punctuation: CSS ! important (T13874; with space after)
18678 <div style="width:50% ! important">important</div>
18680 <div style="width:50% ! important">important</div>
18685 HTML bullet list, closed tags (T7497)
18698 <ul data-parsoid='{"stx":"html"}'>
18699 <li data-parsoid='{"stx":"html"}'>One</li>
18700 <li data-parsoid='{"stx":"html"}'>Two</li>
18706 HTML bullet list, unclosed tags (T7497)
18718 <ul data-parsoid='{"stx":"html"}'>
18719 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18720 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18726 HTML ordered list, closed tags (T7497)
18739 <ol data-parsoid='{"stx":"html"}'>
18740 <li data-parsoid='{"stx":"html"}'>One</li>
18741 <li data-parsoid='{"stx":"html"}'>Two</li>
18747 HTML ordered list, unclosed tags (T7497)
18760 <ol data-parsoid='{"stx":"html"}'>
18761 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18762 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18768 HTML nested bullet list, closed tags (T7497)
18791 <ul data-parsoid='{"stx":"html"}'>
18792 <li data-parsoid='{"stx":"html"}'>One</li>
18793 <li data-parsoid='{"stx":"html"}'>Two:
18794 <ul data-parsoid='{"stx":"html"}'>
18795 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18796 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18803 HTML nested bullet list, open tags (T7497)
18825 HTML nested ordered list, closed tags (T7497)
18850 HTML nested ordered list, open tags (T7497)
18887 HTML ordered list item with parameters oddity
18889 <ol><li id="fragment">One</li>
18892 <ol><li id="fragment">One</li>
18897 # parsoid doesn't explicitly mark autonumbered links, see T55505
18899 T7918: autonumbering
18901 [http://first/] [http://second] [ftp://ftp]
18905 [mailto:enclosed@mail.tld With target]
18907 [mailto:enclosed@mail.tld]
18909 mailto:inline@mail.tld
18911 <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>
18912 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18913 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18914 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18915 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18918 <p><a rel="mw:ExtLink" class="external autonumber" href="http://first/"></a> <a rel="mw:ExtLink" class="external autonumber" href="http://second"></a> <a rel="mw:ExtLink" class="external autonumber" href="ftp://ftp"></a></p>
18919 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
18920 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
18921 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
18922 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18927 # Security and HTML correctness
18928 # From Nick Jenkins' fuzz testing
18932 Fuzz testing: Parser13
18946 # Note that Parsoid output differs from the PHP parser here: the PHP
18947 # parser breaks the URL for the magic word, while in Parsoid the URL
18948 # production takes precedence.
18950 Fuzz testing: Parser14
18955 <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>
18956 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18958 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18964 <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>
18965 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18967 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18971 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
18972 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
18976 Fuzz testing: Parser14-table
18978 parsoid=wt2html,html2html
18983 <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>
18984 <table style="__TOC__">
18989 <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>
18990 <table style="__TOC__">
18997 <table style="__TOC__"></table>
19000 # Known to produce bogus xml (extra </td>)
19001 # Don't add the html/php section since it generates broken HTML
19003 Fuzz testing: Parser16
19020 Fuzz testing: Parser21
19023 !irc://{{ftp://a" onmouseover="alert('hello world');"
19028 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19038 Fuzz testing: Parser22
19040 http://===r:::https://b
19044 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19052 # Known to produce bad XML for now
19054 Fuzz testing: Parser24
19061 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19062 <br style="onmouseover='alert(document.cookie);' " />
19064 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19069 <u class="|">}}}} >
19070 <br style="onmouseover='alert(document.cookie);'" />
19072 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19080 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19081 <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>"}'/>}}}} >
19082 <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}'>
19086 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19089 # Note: the current result listed for this is not what the original one was,
19090 # but the original bug was JavaScript injection, which is fixed in any case.
19091 # It's not clear that the original result listed was any more correct than the
19092 # current one. Original result:
19095 # <li class="||">
19096 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19098 Fuzz testing: Parser25 (T8055)
19104 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19106 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19109 <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"]}'>
19110 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19114 Fuzz testing: URL adjacent extension (with space, clean)
19116 http://example.com <nowiki>junk</nowiki>
19118 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19121 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19125 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19127 http://example.com<nowiki>junk</nowiki>
19129 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19132 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19136 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19138 http://example.com<pre>junk</pre>
19140 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19143 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19145 <p><a rel="mw:ExtLink" class="external free" 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>
19149 Fuzz testing: image with bogus manual thumbnail
19151 [[Image:foobar.jpg|thumbnail= ]]
19153 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19156 <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>
19159 # Parsoid will emit the newline literally in wt2wt; see next test case.
19161 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19165 <pre dir=" "></pre>
19167 <pre dir=" "></pre>
19170 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19171 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19175 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19179 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19180 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19190 Templates in extension attributes are not expanded
19192 <pre dir="{{echo|ltr}}"></pre>
19194 <pre dir="{{echo|ltr}}"></pre>
19197 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19201 Parsing optional HTML elements (T8171)
19206 <td> Some tabular data</td>
19207 <td> More tabular data ...
19208 <td> And yet som tabular data</td>
19214 <td> Some tabular data</td>
19215 <td> More tabular data ...
19216 </td><td> And yet som tabular data</td>
19223 Correct handling of <td>, <tr> (T8171)
19228 <td> Some tabular data</td>
19229 <td> More tabular data ...</td>
19230 <td> And yet som tabular data</td>
19236 <td> Some tabular data</td>
19237 <td> More tabular data ...</td>
19238 <td> And yet som tabular data</td>
19246 Parsing crashing regression (fr:JavaScript)
19250 <p></body></x>
19255 Inline wiki vs wiki block nesting
19261 <p><b>Bold paragraph</b>
19262 </p><p>New wiki paragraph
19266 # FIXME: The current php output is documented
19267 # and desired output is the parsoid target.
19269 Inline HTML vs wiki block nesting
19275 <p><b>Bold paragraph
19276 </p><p>New wiki paragraph</b>
19279 <p><b>Bold paragraph</b>
19280 </p><p>New wiki paragraph
19284 # Original result was this:
19285 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19287 # While that might be marginally more intuitive, maybe, the six-apostrophe
19288 # construct is clearly pathological and the result stated here (which is what
19289 # the parser actually does) is about as reasonable as anything.
19291 Mixing markup for italics and bold
19294 '''bold''''''bold''bolditalics'''''
19296 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19304 Article for special page transclusion test
19308 Special page transclusion
19311 {{Special:Prefixindex/Xyzzyx}}
19313 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19319 Special page transclusion twice (T7021)
19322 {{Special:Prefixindex/Xyzzyx}}
19323 {{Special:Prefixindex/Xyzzyx}}
19325 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19327 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19333 Transclusion of default MediaWiki message
19335 {{MediaWiki:Mainpage}}
19342 Transclusion of nonexistent MediaWiki message
19344 {{MediaWiki:Mainpagexxx}}
19346 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19351 Transclusion of MediaWiki message with underscore
19353 {{MediaWiki:history_short}}
19360 Transclusion of MediaWiki message with space
19362 {{MediaWiki:history short}}
19369 Invalid header with following text
19379 Section extraction test (section 0)
19399 Section extraction test (section 1)
19421 Section extraction test (section 2)
19442 Section extraction test (section 3)
19462 Section extraction test (section 4)
19486 Section extraction test (section 5)
19506 Section extraction test (section 6)
19527 Section extraction test (section 7)
19547 Section extraction test (section 8)
19567 Section extraction test (section 9)
19588 Section extraction test (section 10)
19608 Section extraction test (nonexistent section 11)
19627 Section extraction test with bogus heading (section 1)
19632 ==bogus== not a legal section
19636 ==bogus== not a legal section
19640 Section extraction test with bogus heading (section 2)
19645 ==bogus== not a legal section
19652 Section extraction test with comment after heading (section 1)
19664 Section extraction test with comment after heading (section 2)
19676 Section extraction test with bogus <nowiki> heading (section 1)
19681 ==bogus== <nowiki>not a legal section</nowiki>
19685 ==bogus== <nowiki>not a legal section</nowiki>
19689 Section extraction test with bogus <nowiki> heading (section 2)
19694 ==bogus== <nowiki>not a legal section</nowiki>
19700 # Formerly testing for T4587, now resolved by the use of unmarked sections
19701 # instead of respecting commented sections
19703 Section extraction prefixed by comment (section 1)
19714 Section extraction prefixed by comment (section 2)
19724 # Formerly testing for T4607, now resolved by the use of unmarked sections
19725 # instead of respecting HTML-style headings
19727 Section extraction, mixed wiki and html (section 1)
19743 Section extraction, mixed wiki and html (section 2)
19759 # Formerly testing for T5342
19761 Section extraction, heading surrounded by <noinclude>
19765 <noinclude>==unmarked==</noinclude>
19771 # Test behavior of T21910
19773 Sectiion with all-equals
19778 The line above must have a trailing space
19781 But just in case it doesn't...
19785 But just in case it doesn't...
19789 Section replacement test (section 0)
19820 Section replacement test (section 1)
19849 Section replacement test (section 2)
19879 Section replacement test (section 3)
19910 Section replacement test (section 4)
19937 Section replacement test (section 5)
19968 Section replacement test (section 6)
19998 Section replacement test (section 7)
20029 Section replacement test (section 8)
20060 Section replacement test (section 9)
20089 Section replacement test (section 10)
20119 Section replacement test with initial whitespace (T15728)
20123 Preformatted initial line
20127 Preformatted initial line
20134 Section extraction, heading followed by pre with 20 spaces (T8398)
20146 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20159 Section extraction, <pre> around bogus header (T12309)
20176 Section replacement, <pre> around bogus header (T12309)
20197 Handling of 
 in URLs
20201 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20204 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul>
20208 Handling of %0A in URLs
20212 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20215 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20218 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20220 5 quotes, code coverage +1 line
20230 # same html as previous, but wikitext adjusted to match parsoid html2wt
20231 # note that wt2html and html2html will put the <i> before the <b>
20233 5 quotes, code coverage +1 line w/ nowiki (1)
20235 parsoid=wt2wt,html2wt
20237 '''''<nowiki/>'''''
20242 <p><b><i></i></b></p>
20245 # same as previous, just swapping the <i> and <b>
20247 5 quotes, code coverage +1 line w/ nowiki (2)
20249 '''''<nowiki/>'''''
20254 <p><i><b></b></i></p>
20258 Special:Search page linking.
20262 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20267 {{!}} is a magic word
20269 {{!}} is a magic word there and {{!}} is still a magic word here
20270 | is not a magic word here but {{!}} is still a magic word here
20272 <p>| is a magic word there and | is still a magic word here
20273 | is not a magic word here but | is still a magic word here
20276 <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
20277 | 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>
20283 title=[[Parser test]]
20297 *{{SUBJECTPAGENAME}}
20298 *{{SUBJECTPAGENAMEE}}
20301 *{{NAMESPACENUMBER}}
20306 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20308 <ul><li>Parser test</li>
20309 <li>Parser_test</li>
20310 <li>Parser test</li>
20311 <li>Parser_test</li>
20312 <li>Parser test</li>
20313 <li>Parser_test</li>
20314 <li>Parser test</li>
20315 <li>Parser_test</li>
20316 <li>Parser test</li>
20317 <li>Parser_test</li>
20318 <li>Talk:Parser test</li>
20319 <li>Talk:Parser_test</li>
20320 <li>Parser test</li>
20321 <li>Parser_test</li>
20329 <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>
20332 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20335 Gallery with valid attributes
20337 <gallery type="123" summary="345">
20338 File:File:Foobar.jpg
20341 <ul class="gallery mw-gallery-traditional" type="123">
20342 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20343 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20344 <div class="gallerytext">
20350 <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"}}'>
20351 <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>
20355 ## Parsoid thinks the "centre" here is a property, not a caption.
20360 "modes": ["wt2html"],
20361 "nativeGallery": true
20369 image4 |300px| centre
20370 image5.svg| http://///////
20375 <ul class="gallery mw-gallery-traditional">
20376 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20377 <div class="thumb" style="height: 150px;">Image1.png</div>
20378 <div class="gallerytext">
20381 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20382 <div class="thumb" style="height: 150px;">Image2.gif</div>
20383 <div class="gallerytext">
20386 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20387 <div class="thumb" style="height: 150px;">Image3</div>
20388 <div class="gallerytext">
20391 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20392 <div class="thumb" style="height: 150px;">Image4</div>
20393 <div class="gallerytext">
20398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20399 <div class="thumb" style="height: 150px;">Image5.svg</div>
20400 <div class="gallerytext">
20401 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20405 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20406 <div class="thumb" style="height: 150px;">* image6</div>
20407 <div class="gallerytext">
20413 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20414 <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>
20415 <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>
20416 <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>
20417 <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>
20418 <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" class="external free" href="http://///////">http://///////</a></div></li>
20419 <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>
20424 Gallery (with options, html)
20427 "modes": ["wt2html", "html2html"],
20428 "nativeGallery": true
20431 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20432 File:Nonexistent.jpg|caption
20433 File:Nonexistent.jpg
20434 image:foobar.jpg|some '''caption''' [[Main Page]]
20436 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20439 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20440 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20441 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20442 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20443 <div class="gallerytext">
20448 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20449 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20450 <div class="gallerytext">
20453 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20454 <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>
20455 <div class="gallerytext">
20456 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20460 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20461 <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>
20462 <div class="gallerytext">
20465 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20466 <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>
20467 <div class="gallerytext">
20475 <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":{}}'>
20476 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20477 <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>
20478 <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>
20479 <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>
20480 <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>
20481 <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>
20486 Gallery (with options, extsrc)
20489 "nativeGallery": false
20492 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20493 File:Nonexistent.jpg|caption
20494 File:Nonexistent.jpg
20495 image:foobar.jpg|some '''caption''' [[Main Page]]
20497 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20500 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20501 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20502 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20503 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20504 <div class="gallerytext">
20509 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20510 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20511 <div class="gallerytext">
20514 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20515 <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>
20516 <div class="gallerytext">
20517 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20521 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20522 <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>
20523 <div class="gallerytext">
20526 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20527 <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>
20528 <div class="gallerytext">
20536 <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"}}'>
20537 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20538 <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>
20539 <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>
20540 <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>
20541 <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>
20542 <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>
20547 Gallery (without px units)
20549 <gallery widths="70" heights="40">
20553 <ul class="gallery mw-gallery-traditional">
20554 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20555 <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>
20556 <div class="gallerytext">
20562 <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"}}'>
20563 <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>
20568 Gallery (with invalid units)
20570 <gallery widths="70em" heights="40em">
20574 <ul class="gallery mw-gallery-traditional">
20575 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20576 <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>
20577 <div class="gallerytext">
20583 <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"}}'>
20584 <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>
20589 Gallery with link that has fragment
20592 "modes": ["wt2html", "html2html"],
20593 "nativeGallery": true
20597 image:foobar.jpg|link=Main_Page
20598 image:foobar.jpg|link=Main_Page#section
20599 image:foobar.jpg|link=Main Page#section|caption
20602 <ul class="gallery mw-gallery-traditional">
20603 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20604 <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>
20605 <div class="gallerytext">
20608 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20609 <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>
20610 <div class="gallerytext">
20613 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20614 <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>
20615 <div class="gallerytext">
20623 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20624 <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>
20625 <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>
20626 <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>
20630 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20632 Gallery with template inside caption
20635 "nativeGallery": true
20638 <gallery caption="{{echo|hi}}">
20639 File:Foobar.jpg|{{echo|ho}}
20642 <ul class="gallery mw-gallery-traditional">
20643 <li class='gallerycaption'>{{echo|hi}}</li>
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="" 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">
20654 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20655 <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>
20656 <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>
20661 Gallery with wikitext inside caption
20664 "nativeGallery": true
20668 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20669 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20672 <ul class="gallery mw-gallery-traditional">
20673 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20674 <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>
20675 <div class="gallerytext">
20676 <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>
20680 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20681 <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>
20682 <div class="gallerytext">
20683 <p>This is a test template
20690 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20691 <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>
20692 <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>
20697 Gallery (with showfilename option)
20700 "nativeGallery": true
20703 <gallery showfilename="">
20704 File:Nonexistent.jpg|caption
20705 File:Nonexistent.jpg
20706 File:Foobar.jpg|some '''caption''' [[Main Page]]
20710 <ul class="gallery mw-gallery-traditional">
20711 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20712 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20713 <div class="gallerytext">
20714 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20719 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20720 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20721 <div class="gallerytext">
20722 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20726 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20727 <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>
20728 <div class="gallerytext">
20729 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20730 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20734 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20735 <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>
20736 <div class="gallerytext">
20737 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20744 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20745 <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>
20746 <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>
20747 <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>
20748 <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>
20752 ## Should Parsoid be preserving these variations? See T151367
20754 Gallery (with namespace-less filenames)
20757 "modes": ["wt2html", "html2html"],
20758 "nativeGallery": true
20762 File:Nonexistent.jpg
20768 <ul class="gallery mw-gallery-traditional">
20769 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20770 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20771 <div class="gallerytext">
20774 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20775 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20776 <div class="gallerytext">
20779 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20780 <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>
20781 <div class="gallerytext">
20784 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20785 <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>
20786 <div class="gallerytext">
20792 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20793 <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>
20794 <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>
20795 <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>
20796 <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>
20801 Gallery override link with wikilink (T36852)
20804 "nativeGallery": true
20808 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20811 <ul class="gallery mw-gallery-traditional">
20812 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20813 <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>
20814 <div class="gallerytext">
20820 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20821 <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>
20826 Gallery override link with absolute external link (T36852)
20829 "nativeGallery": true
20833 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20836 <ul class="gallery mw-gallery-traditional">
20837 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20838 <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>
20839 <div class="gallerytext">
20845 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20846 <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>
20851 Gallery override link with absolute external link with LanguageConverter
20856 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20859 <ul class="gallery mw-gallery-traditional">
20860 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20861 <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>
20862 <div class="gallerytext">
20870 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\n"}}'>
20871 <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">caption</div></li>
20876 Gallery override link with malicious javascript (T36852)
20879 "modes": ["wt2html", "html2html"],
20880 "nativeGallery": true
20884 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20887 <ul class="gallery mw-gallery-traditional">
20888 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20889 <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>
20890 <div class="gallerytext">
20896 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20897 <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>
20901 # Note that parsoid uses the invalid link as a caption, PHP does not.
20903 Gallery with invalid title as link (T45964)
20906 "modes": ["wt2html", "html2html"],
20907 "nativeGallery": true
20911 File:Foobar.jpg|link=<
20914 <ul class="gallery mw-gallery-traditional">
20915 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20916 <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>
20917 <div class="gallerytext">
20923 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20924 <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>
20929 Serialize gallery without attrs in data-mw
20932 "modes": ["html2wt"],
20933 "nativeGallery": true
20936 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20937 <li class="gallerycaption">123</li>
20938 <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>
20941 <gallery caption="123">
20947 Gallery with class and style attributes
20950 "nativeGallery": true
20953 <gallery class="center" style="text-align: center;">
20957 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20958 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20959 <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>
20960 <div class="gallerytext">
20966 <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":{}}'>
20967 <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>
20972 Gallery in slideshow mode
20975 "nativeGallery": true
20978 <gallery mode="slideshow" showthumbnails="">
20982 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20983 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20984 <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>
20985 <div class="gallerytext">
20991 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20992 <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>
20997 HTML Hex character encoding (spells the word "JavaScript")
20999 parsoid=wt2html,wt2wt,html2html
21001 JavaScript
21003 <p>JavaScript
21006 <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>
21010 HTML Hex character encoding bogus encoding (T28437 regression check)
21014 <p>&#xsee;&#XSEE;
21019 HTML Hex character encoding mixed case
21021 parsoid=wt2html,wt2wt,html2html
21028 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21031 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21032 # Note that U+000C (form feed) is not a valid XML character, so
21033 # it is banned even though allowed in HTML5.
21035 Illegal character references (T106578)
21040 ; Control (low): 
21041 ; Control (high):  Ÿ
21042 ; Surrogate: ��
21043 ; This is an okay astral character: 💩
21051 <dt>Control (low)</dt>
21053 <dt>Control (high)</dt>
21054 <dd>&#x7F; &#x9F;</dd>
21056 <dd>&#xD83D;&#xDCA9;</dd>
21057 <dt>This is an okay astral character</dt>
21058 <dd>💩</dd></dl>
21062 __FORCETOC__ override
21074 ISBN 978-0-1234-56 789
21076 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21079 <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>
21083 ISBN followed by 5 spaces
21094 ISBN ISBN 1234567890
21096 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21099 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21102 # Uppercase X and lowercase x as well
21113 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21114 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21115 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21116 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21117 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21118 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21121 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21122 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21123 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21124 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21125 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21126 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21130 ISBN with empty prefix (parsoid test)
21134 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21137 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21141 T24905: <abbr> followed by ISBN followed by </a>
21143 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21145 <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>
21148 <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" class="external text" href="http://www.example.com">example.com</a></p>
21156 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21161 Double RFC with a wiki link
21165 <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>
21174 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21177 <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>
21181 Centre-aligned image
21183 [[Image:foobar.jpg|centre]]
21185 <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>
21188 <figure class="mw-default-size mw-halign-center" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"center","ak":"centre"}]}'><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>
21194 [[Image:foobar.jpg|none]]
21196 <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>
21199 <figure class="mw-default-size mw-halign-none" 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>
21203 Width + Height sized image (using px) (height is ignored)
21205 [[Image:foobar.jpg|640x480px]]
21207 <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>
21210 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640x480px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21214 Width-sized image (using px, no following whitespace)
21216 [[Image:foobar.jpg|640px]]
21218 <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>
21221 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21225 Width-sized image (using px, with following whitespace - test regression from r39467)
21227 [[Image:foobar.jpg|640px ]]
21229 <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>
21232 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px "}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21236 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21238 [[Image:foobar.jpg| 640px]]
21240 <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>
21243 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":" 640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21247 Image with page parameter
21251 [[File:LoremIpsum.djvu|page=2]]
21253 <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>
21256 <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>
21260 Another italics / bold test
21268 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21274 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21277 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21281 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21283 Images with the "|" character in the comment
21285 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21287 <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>
21290 <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" class="external text" 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>
21294 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21296 <html><script>alert(1);</script></html>
21298 <p><html><script>alert(1);</script></html>
21303 HTML with raw HTML ($wgRawHtml==true)
21307 <html><script>alert(1);</script></html>
21309 <p><script>alert(1);</script>
21314 Parents of subpages, one level up
21316 subpage title=[[Subpage test/L1/L2/L3]]
21320 <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>
21326 Parents of subpages, one level up, not named
21328 subpage title=[[Subpage test/L1/L2/L3]]
21332 <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>
21339 Parents of subpages, two levels up
21341 subpage title=[[Subpage test/L1/L2/L3]]
21347 <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
21348 </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>
21353 Parents of subpages, two levels up, without trailing slash or name.
21355 subpage title=[[Subpage test/L1/L2/L3]]
21364 Parents of subpages, two levels up, with lots of extra trailing slashes.
21366 subpage title=[[Subpage test/L1/L2/L3]]
21370 <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>
21375 Subpage test/L1/L2/L3Sibling
21381 Transclusion of a sibling page (one level up)
21383 subpage title=[[Subpage test/L1/L2/L3]]
21392 Transclusion of a child page
21394 subpage title=[[Subpage test/L1/L2]]
21402 # This is wt2html only in Parsoid because we add <nowiki>
21403 # because of {{..}} and we don't expect to fix that to
21404 # eliminate the nowikis selective for {{..}} markup.
21406 Non-transclusion because of too many up levels
21408 subpage title=[[Subpage test/L1/L2/L3]]
21411 {{../../../../More than parent}}
21413 <p>{{../../../../More than parent}}
21416 <p>{{../../../../More than parent}}</p>
21420 Definition list code coverage
21426 <dl><dt>title  </dt>
21428 <dt>title </dt>
21434 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21435 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21436 <dt>title</dt><dd> def</dd></dl>
21440 Don't fall for the self-closing div
21442 <div>hello world</div/>
21444 <div>hello world</div>
21453 <p>[[:Template:Msg]]
21462 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21466 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21468 Always escape literal '>' in output, not just after '<'
21482 <p>This is a test template
21483 This is a test template
21495 Inclusion of !userCanEdit() content
21499 <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>
21505 Out-of-order TOC heading levels
21514 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21516 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21518 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21519 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21522 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21524 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21525 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21531 <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>
21532 <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>
21533 <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>
21534 <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>
21535 <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>
21536 <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>
21542 ISBN with a dummy number
21552 ISBN with space-delimited number
21556 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21559 <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>
21564 ISBN with multiple spaces, no number
21583 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21584 </p><p>ISBN 12345678901
21587 <p>ISBN 123456789</p>
21589 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21591 <p>ISBN 12345678901</p>
21596 ISBN with trailing year (T9110)
21598 ISBN 1-234-56789-0 - 2006
21600 ISBN 1 234 56789 0 - 2006
21602 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21603 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21606 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21608 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21615 wgFragmentMode=[ 'html5', 'legacy' ]
21617 {{anchorencode:foo bar©#%n}}
21622 <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>
21626 anchorencode (legacy)
21628 wgFragmentMode=[ 'legacy' ]
21630 {{anchorencode:foo bar©#%n}}
21632 <p>foo_bar.C2.A9.23.25n
21637 anchorencode trims spaces
21639 wgFragmentMode=[ 'html5', 'legacy' ]
21641 {{anchorencode: __pretty__please__}}
21646 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21650 anchorencode deals with links
21652 wgFragmentMode=[ 'html5', 'legacy' ]
21654 {{anchorencode: [[hello|world]] [[hi]]}}
21659 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21663 anchorencode deals with templates
21665 wgFragmentMode=[ 'html5', 'legacy' ]
21667 {{anchorencode: {{Foo}} x}}
21672 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21676 anchorencode encodes like the TOC generator: (T20431)
21678 wgFragmentMode=[ 'html5', 'legacy' ]
21680 ===_ +:.3A%3A _ &&]] x===
21681 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21684 <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>
21685 <p>+:.3A%3A_&&]]_x
21688 <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>
21689 <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>
21690 <meta property="mw:PageProp/noeditsection"/>
21694 anchorencode encodes like the TOC generator: (T20431) (legacy)
21696 wgFragmentMode=[ 'legacy' ]
21698 ===_ +:.3A%3A&&]]===
21699 {{anchorencode: _ +:.3A%3A&&]] }}
21702 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21703 <p>.2B:.3A.253A.26.26.5D.5D
21708 T8200: blockquotes and paragraph formatting
21729 T10293: Use of center tag ruins paragraph formatting
21750 Parsing of overlapping (improperly nested) inline html tags
21752 <span><s>x</span></s>
21754 <p><span><s>x</span></s></span>
21757 <p><span><s>x</s></span>
21762 ### Language variants related tests
21765 # Parsoid does not mark self-links.
21766 # Parsoid does not convert links; PHP will do any necessary redirects.
21769 Self-link in language variants
21771 title=[[Dunav]] language=sr
21773 Both [[Dunav]] and [[Дунав]] are names for this river.
21775 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21778 <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>
21788 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21790 title=[[Duna]] language=sr
21792 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21794 <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.
21797 <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>
21801 Link to a section of a variant of this title shouldn't be parsed as self-link
21803 title=[[Duna]] language=sr
21805 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21807 <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.
21810 <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>
21814 Link to pages in language variants
21818 Main Page can be written as [[Маин Паге]]
21820 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21823 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21828 Multiple links to pages in language variants
21832 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21834 <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>.
21837 <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>
21842 Simple template in language variants
21848 <p>This is a test template
21854 Template with explicit namespace in language variants
21860 <p>This is a test template
21866 Basic test for template parameter in language variants
21870 {{парамтест|param=foo}}
21872 <p>This is a test template with parameter foo
21877 Simple category in language variants
21881 [[Category:МедиаWики Усер'с Гуиде]]
21883 cat=МедиаWики_Усер'с_Гуиде sort=
21885 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21900 ## We used to, but no longer wt2wt this test since the default serializer
21901 ## will normalize all categories to serialize on their own line.
21902 ## This wikitext usage is going to be fairly uncommon in production and
21903 ## selser will take care of preserving formatting in those scenarios.
21905 Don't convert blue categorylinks to another variant (T35210)
21911 [[A]][[Category:分类]]
21915 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21916 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21920 Stripping -{}- tags (language variants)
21924 Latin proverb: -{Ne nuntium necare}-
21926 <p>Latin proverb: Ne nuntium necare
21929 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21934 Prevent conversion with -{}- tags (language variants)
21936 language=sr variant=sr-ec
21938 Latinski: -{Ne nuntium necare}-
21940 <p>Латински: Ne nuntium necare
21943 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21948 Prevent conversion of text with -{}- tags (language variants)
21950 language=sr variant=sr-ec
21952 Latinski: -{Ne nuntium necare}-
21954 <p>Латински: Ne nuntium necare
21957 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21962 Prevent conversion of links with -{}- tags (language variants)
21964 language=sr variant=sr-ec
21968 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21971 <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>
21976 -{}- tags within headlines (within html for parserConvert())
21978 wgFragmentMode=[ 'html5', 'legacy' ]
21980 language=sr variant=sr-ec
21984 Note that even an unprotected headline ID is not affected by language
21989 <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>
21990 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21993 <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>
21996 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21998 <p>Note that even an unprotected headline ID is not affected by language
22001 <h2 id="Latinski">Latinski</h2>
22005 Explicit definition of language variant alternatives
22007 language=zh variant=zh-tw
22009 -{zh:China;zh-tw:Taiwan}-, not China
22011 <p>Taiwan, not China
22014 <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>
22018 Filter syntax for language variants
22020 language=zh variant=zh-tw
22022 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22024 <p>fooblog, WEBJOURNAL, WEBLOGquux
22027 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22030 # Note that Parsoid post-processing for language variants needs to
22031 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22033 Conversion around HTML tags
22035 language=sr variant=sr-ec
22037 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22038 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22041 <span title="ЛаCтин">ски</span>
22044 <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"}]}'/>
22045 <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>
22049 Explicit session-wise two-way language variant mapping (A flag and - flag)
22051 language=zh variant=zh-tw
22053 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22055 Taiwan is not China.
22057 But -{A|zh:China; zh-tw:Taiwan}- is China,
22059 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22061 and -{China}- is China.
22063 <p>This is Taiwan, but we'll forget that now.
22064 </p><p>Taiwan is not China.
22065 </p><p>But Taiwan is Taiwan,
22066 </p><p>(This should be stripped!)
22067 </p><p>and China is China.
22070 <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>
22071 <p>Taiwan is not China.</p>
22072 <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>
22073 <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>
22074 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22078 Explicit session-wise one-way language variant mapping (A flag and - flag)
22080 language=zh variant=zh-tw
22082 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22084 COUNTRY is China or Taiwan.
22086 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22088 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22090 and -{COUNTRY}- is COUNTRY.
22092 <p>This is Taiwan, but we'll forget that now.
22093 </p><p>COUNTRY is China or Taiwan.
22094 </p><p>But Taiwan is Taiwan,
22095 </p><p>(This should be stripped!)
22096 </p><p>and COUNTRY is COUNTRY.
22099 <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>
22100 <p>COUNTRY is China or Taiwan.</p>
22101 <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>
22102 <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>
22103 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22107 Explicit session-wise two-way language variant mapping (H flag for hide)
22109 language=zh variant=zh-tw
22111 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22115 <p>(This should be stripped!)
22116 </p><p>Taiwan is Taiwan.
22119 <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>
22120 <p>Taiwan is China.</p>
22124 Explicit session-wise one-way language variant mapping (H flag for hide)
22126 language=zh variant=zh-tw
22128 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22130 COUNTRY is Taiwan or China.
22132 <p>(This should be stripped!)
22133 </p><p>Taiwan is Taiwan or China.
22136 <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>
22137 <p>COUNTRY is Taiwan or China.</p>
22140 ## Note that parsoid test runner does not support 'showtitle' option.
22142 Adding explicit conversion rule for title (T flag)
22144 language=zh variant=zh-tw showtitle
22146 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22151 <p>Should be stripped!
22152 </p><p>Taiwan is China.
22155 <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>
22156 <p>Taiwan is China.</p>
22160 Code coverage: T combined with H flag
22162 language=zh variant=zh-tw showtitle
22164 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22169 <p>Should be stripped!
22170 </p><p>Taiwan is Taiwan.
22173 <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>
22174 <p>Taiwan is China.</p>
22178 Code coverage: T with no variants
22180 language=zh variant=zh-tw showtitle
22182 -{H|zh:China; zh-tw:Taiwan}-
22183 Taiwan is China.-{T|Taiwan is China}-
22190 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22191 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22195 Code coverage: rules with no variants
22197 language=zh variant=zh-tw
22199 -{H|zh:China; zh-tw:Taiwan}-
22210 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22212 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22213 Taiwan is China.</p>
22218 Code coverage: D flag for conversion rule
22220 language=zh variant=zh-tw
22222 -{D|zh-cn:XA; zh-tw:YA}-
22223 -{A;D|zh-cn:XB; zh-tw:YB}-
22224 -{D;H|zh-cn:XC; zh-tw:YC}-
22226 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22232 XA XB XC YA YB YC FOO BAR BAT 012345
22237 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22241 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22244 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22245 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22246 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22247 <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>
22248 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22249 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22250 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22251 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22255 Code coverage: N flag for conversion rule
22257 language=zh variant=zh-cn
22267 </p><p>српски (ћирилица)
22270 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22271 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22272 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22275 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22277 Code coverage: N flag for conversion rule (wt2html only)
22279 language=zh variant=zh-cn
22280 parsoid=wt2html,html2html
22287 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22291 Testing that changing the language variant here in the tests actually works
22293 language=zh variant=zh showtitle
22295 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22298 <p>Should be stripped!
22301 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22305 Recursive conversion of alt and title attrs shouldn't clear converter state
22307 language=zh variant=zh-cn
22310 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22311 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22315 Should be stripped<span title="Exclamation">!</span>
22318 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22319 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>
22323 T26072: more test on conversion rule for title
22325 language=zh variant=zh-tw showtitle
22327 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22329 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22332 <p>This should be stripped!
22333 </p><p>This won't take interferes with the title rule.
22336 <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>
22337 <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>
22341 Partly disable title conversion if variant == main language code
22343 language=zh variant=zh title=[[ZH]] showtitle
22345 -{T|zh-cn:CN;zh-tw:TW}-
22351 <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>
22355 Partly disable title conversion if variant == main language code, more
22357 language=zh variant=zh title=[[ZH]] showtitle
22365 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22369 Raw output of variant escape tags (R flag)
22371 language=zh variant=zh-tw
22373 Raw: -{R|zh:China;zh-tw:Taiwan}-
22375 <p>Raw: zh:China;zh-tw:Taiwan
22378 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22381 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22383 Raw output of variant escape tags (R flag) (wt2html only)
22385 language=zh variant=zh-tw
22386 parsoid=wt2html,html2html
22388 -{Variant}- -{D|syntax}- -{D;R|options}-
22390 <p>Variant syntax options
22393 <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>
22397 Nested markup inside raw output of variant escape tags (R flag)
22399 language=zh variant=zh-tw
22401 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22403 <p>Nested raw: nested Taiwan nested
22406 <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>
22410 Nested markup and spaces inside raw output of variant escape tags (R flag)
22412 language=zh variant=zh-tw
22414 X-{ outer -{ inner }- outer }-X
22416 <p>X outer inner outer X
22419 <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>
22423 Templates inside raw output of variant escape tags (R flag)
22425 language=zh variant=zh-tw
22427 Nested raw: -{R|nested {{echo|hi}} templates}-
22429 <p>Nested raw: nested hi templates
22432 <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>
22436 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22438 language=zh variant=zh-cn
22440 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22445 <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>
22449 Conversion rules from [numeric-only string] to [something else] (T48634)
22451 language=zh variant=zh-cn
22453 -{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
22458 <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>
22462 Two-way converter rule entries with an empty value should be ignored (T53551)
22464 language=zh variant=zh-cn
22466 -{H|zh-cn:foo;zh-tw:;}-foobar
22471 <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>
22475 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22477 language=zh variant=zh-cn
22479 -{H|=>zh-cn:foo;}-foobar
22484 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22488 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22490 language=zh variant=zh-cn
22497 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22501 Nested using of manual convert syntax
22503 language=zh variant=zh-hk
22505 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22507 <p>Nested: Hello Hong Kong!
22510 <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>
22514 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22516 language=zh variant=zh-cn
22518 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22520 <p><span title="X">A</span>
22523 <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>
22527 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22529 language=zh variant=zh-cn
22531 -{<span title="-{X}-">A</span>}-
22532 !! html/php+disabled
22533 <p><span title="X">A</span>
22536 <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>
22539 # Parsoid and PHP disagree on how to parse this example: Parsoid
22540 # insists that the content of a language converter element be a valid
22541 # DOM fragment or attribute string
22543 Language converter markup with block content
22545 language=zh variant=zh-cn
22547 <span>a-{b<div>c}-d
22549 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22551 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22556 </span></div></span></div></span>
22558 <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>
22560 <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>
22562 <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>
22566 LanguageConverter selser (1)
22568 language=zh variant=zh-cn
22570 "modes": ["wt2wt", "selser"],
22572 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22582 LanguageConverter selser (2)
22584 language=zh variant=zh-cn
22586 "modes": ["wt2wt", "selser"],
22588 ["span[class='x']", "contents", "text", "-{foo}-"],
22589 ["a", "contents", "text", "-{"],
22590 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22594 <span class="x">TEXT1</span>
22595 [http://example.com TEXT2]
22599 <span class="x"><nowiki>-{foo}-</nowiki></span>
22600 [http://example.com -{]
22601 [[Foo|<nowiki>-{</nowiki>]]
22602 {{1x|<nowiki>-{</nowiki>}}
22605 # Tests LanguageVariantText in ConstrainedText
22607 LanguageConverter selser (3)
22609 language=zh variant=zh-cn
22611 "modes": ["wt2wt", "selser"],
22613 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22614 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22625 |<nowiki/>-{edited}-
22629 # Tests LanguageVariantText._fromSelSer
22631 LanguageConverter selser (4)
22633 language=zh variant=zh-cn
22635 "modes": ["wt2wt", "selser"],
22637 ["td > span.x", "remove"]
22643 |<span class="x">Foo</span>-{Bar}-
22644 ||<span class="x">Foo</span>-{Bar}-
22654 # Since Parsoid is starting to emit canonical wikitext for links,
22655 # [http://example.com http://example.com] will not RT back to that
22657 # Parsoid does not language-convert links (it is done in a
22658 # post-processing step)
22660 Proper conversion of text in external links
22662 language=sr variant=sr-ec
22665 http://www.google.com
22666 gopher://www.google.com
22667 [http://www.google.com http://www.google.com]
22668 [gopher://www.google.com gopher://www.google.com]
22669 [https://www.google.com irc://www.google.com]
22670 [ftp://www.google.com www.google.com/ftp://dir]
22671 [//www.google.com www.google.com]
22673 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22674 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22675 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22676 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22677 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22678 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22679 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22682 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22683 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22684 <a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22685 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22686 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22687 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22688 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22692 Do not convert roman numbers to language variants
22694 language=sr variant=sr-ec
22698 <p>Фридрих IV је цар.
22701 <p>Fridrih IV je car.</p>
22705 Unclosed language converter markup "-{"
22716 Don't convert raw rule "-{R|=>}-" to "=>"
22725 <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>
22729 Don't break link parsing if language converter markup is in the caption.
22731 language=sr variant=sr-ec
22733 [[Main Page|-{R|main page}-]]
22735 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22738 <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>
22742 T146304: Don't break template parsing if language converter markup is in the parameter.
22744 language=sr variant=sr-ec
22751 <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>
22755 T146305: Don't break image parsing if language converter markup is in the caption.
22759 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22761 <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>
22764 <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>
22768 T146305: Don't break image parsing if nested language converter markup is in the caption.
22770 language=zh variant=zh-cn
22772 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22774 <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>
22777 <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>
22780 # XXX html2wt disabled because rich markup in alt is not preserved.
22782 Don't break gallery if language converter markup is inside.
22787 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22788 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22791 <ul class="gallery mw-gallery-traditional">
22792 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22793 <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>
22794 <div class="gallerytext">
22795 <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>
22799 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22800 <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>
22801 <div class="gallerytext">
22802 <p>This is a test template
22809 <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"}}'>
22810 <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>
22811 <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>
22816 T153135: Don't break list handling if language converter markup is in the item.
22818 language=zh variant=zh-cn
22820 ;-{zh-cn:AAA;zh-tw:BBB}-
22824 <dt>foo:bar</dt></dl>
22827 <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>
22828 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22832 // Note that parsoid does not protect colons unless language converter
22833 // markup is properly nested, because it is a backtracking parser.
22835 T153135: Unclosed markup in definition list (code coverage)
22837 language=zh variant=zh-cn
22842 <dl><dt><b>foo:bar</b></dt><b>
22843 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22846 <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}'>
22847 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22848 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22853 T153135: Nested language converter markup in definition list (code coverage)
22855 language=zh variant=zh-cn
22857 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22859 <dl><dt>AAA foo:bar bat:baz</dt>
22863 <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>
22864 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22868 # html2wt mode disabled due to <nowiki> insertion.
22870 T153140: Don't break table handling if language converter markup is in the cell.
22872 language=sr variant=sr-ec
22873 parsoid=wt2html,wt2wt,html2html
22890 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22897 Language converter tricky html2wt cases (1)
22900 parsoid=html2wt,wt2wt
22902 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22904 -{<nowiki>}-</nowiki>}-
22911 Language converter tricky html2wt cases (2)
22914 parsoid=html2wt,wt2wt
22918 <nowiki>-{foo}-</nowiki>
22920 <p>-{foo}-
22925 Language converter tricky html2wt cases (3)
22928 parsoid=html2wt,wt2wt
22930 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22931 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22932 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22938 -{<nowiki>-{foo}-</nowiki>}-
22942 </p><p>-{foo}-
22947 Language converter tricky html2wt cases (4)
22950 parsoid=html2wt,wt2wt
22952 <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>
22960 # Note that the <nowiki> escaping added by parsoid for source text,
22961 # destination text, and language names only works on the PHP side
22962 # for *destination text*. (HTML entity escaping wouldn't work
22963 # any better.) This is probably a bug, at least for source texts.
22964 # (For language names PHP uses a precise regexp based on the languages
22965 # it currently knows have variants, which is fragile since this set
22966 # can grow/shrink over time.)
22968 Language converter tricky html2wt cases (5)
22970 language=zh variant=zh-cn
22972 <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>
22973 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22974 <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>
22975 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22978 -{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
22980 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22982 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22984 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22987 !! html/php+disabled
22988 <p>foobat;xyz=>zh-cn:abc
22992 </p><p>a:b=>c 0;zh-tw:bar
22997 T179579: Nowiki and lc interaction
23004 -{123<nowiki>|</nowiki>456}-
23006 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23008 <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>
23012 T2529: Uncovered bullet
23022 T2529: Uncovered bullet in a deeply nested list
23024 *******Foo {{bullet}}
23026 <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>
23032 T2529: Uncovered table already at line-start
23055 T2529: Uncovered bullet in parser function result
23057 *Foo {{lc:{{bullet}} }}
23065 T7678: Double-parsed template argument
23067 {{lc:{{{1}}}|hello}}
23074 T7678: Double-parsed template invocation
23076 {{lc:{{paramtest {{!}} param = hello }} }}
23078 <p>{{paramtest | param = hello }}
23083 Case insensitivity of parser functions for non-ASCII characters (T10143)
23086 title=[[Main Page]]
23088 {{PRVNÍVELKÉ:ěščř}}
23089 {{prvnívelké:ěščř}}
23109 Morwen/13: Unclosed link followed by heading
23116 <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>
23121 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23128 <h1><span class="mw-headline" id="heading">heading</span></h1>
23133 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23140 <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>
23155 Paragraphs inside divs (no extra line breaks)
23167 Paragraphs inside divs (extra line break on open)
23182 Paragraphs inside divs (extra line break on close)
23197 Paragraphs inside divs (extra line break on open and close)
23213 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23214 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23216 Nesting tags, paragraphs on lines which begin with <div>
23218 <div></div><strong>A
23221 <div></div><p><strong>A
23222 </strong></p><strong></strong><p><strong>B</strong>
23231 # T8200: <blockquote> should behave like <div> with respect to line breaks
23233 T8200: paragraphs inside blockquotes (no extra line breaks)
23235 <blockquote>Line one
23237 Line two</blockquote>
23239 <blockquote>Line one
23240 Line two</blockquote>
23243 <blockquote><p>Line one
23244 Line two</p></blockquote>
23248 T8200: paragraphs inside blockquotes (extra line break on open)
23253 Line two</blockquote>
23258 Line two</blockquote>
23264 Line two</p></blockquote>
23267 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23269 T8200: paragraphs inside blockquotes (extra line break on close)
23271 <blockquote>Line one
23276 <blockquote>Line one
23282 <blockquote><p>Line one
23289 T8200: paragraphs inside blockquotes (extra line break on open and close)
23305 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23307 Paragraphs inside blockquotes/divs (no extra line breaks)
23309 <blockquote><div>Line one
23311 Line two</div></blockquote>
23313 <blockquote><div>Line one
23314 Line two</div></blockquote>
23319 Paragraphs inside blockquotes/divs (extra line break on open)
23324 Line two</div></blockquote>
23329 Line two</div></blockquote>
23334 Paragraphs inside blockquotes/divs (extra line break on close)
23336 <blockquote><div>Line one
23339 </div></blockquote>
23341 <blockquote><div>Line one
23344 </div></blockquote>
23349 Paragraphs inside blockquotes/divs (extra line break on open and close)
23355 </div></blockquote>
23361 </div></blockquote>
23366 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23368 wgLinkHolderBatchSize=0
23374 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23375 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23376 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23381 Free external link invading image caption
23383 [[Image:Foobar.jpg|thumb|http://x|hello]]
23385 <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>
23388 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"bogus","ak":"http://x"},{"ck":"caption","ak":"hello"}]}'><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":"Image:Foobar.jpg"}}'/></a><figcaption>hello</figcaption></figure>
23392 T17196: localised external link numbers
23396 [http://en.wikipedia.org/]
23398 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23401 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23405 Multibyte character in padleft
23407 {{padleft:-Hello|7|Æ}}
23412 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23416 Multibyte character in padright
23418 {{padright:Hello-|7|Æ}}
23423 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23427 formatdate parser function
23429 {{#formatdate:2009-03-24}}
23431 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23436 formatdate parser function, with default format
23438 {{#formatdate:2009-03-24|mdy}}
23440 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23445 Spacing of numbers in formatted dates
23447 {{#formatdate:January 15}}
23449 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23454 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
23456 language=nl title=[[MediaWiki:Common.css]]
23458 {{#formatdate:2009-03-24|dmy}}
23460 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23473 Edit comment with link
23477 I like the [[Main Page]] a lot
23479 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23483 Edit comment with link and link text
23487 I like the [[Main Page|best pages]] a lot
23489 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23493 Edit comment with link and link text with suffix
23497 I like the [[Main Page|best page]]s a lot
23499 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23503 Edit comment with section link (non-local, eg in history list)
23505 comment title=[[Main Page]]
23507 /* External links */ removed bogus entries
23509 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23513 Edit comment with section link and text before it (non-local, eg in history list)
23515 comment title=[[Main Page]]
23517 pre-comment text /* External links */ removed bogus entries
23519 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>
23523 Edit comment with section link (local, eg in diff view)
23525 comment local title=[[Main Page]]
23527 /* External links */ removed bogus entries
23529 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23533 Edit comment with subpage link (T16080)
23537 title=[[Subpage test]]
23539 Poked at a [[/subpage]] here...
23541 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23545 Edit comment with subpage link and link text (T16080)
23549 title=[[Subpage test]]
23551 Poked at a [[/subpage|neat little page]] here...
23553 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23557 Edit comment with bogus subpage link in non-subpage NS (T16080)
23560 title=[[Subpage test]]
23562 Poked at a [[/subpage]] here...
23564 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23568 Edit comment with bare anchor link (local, as on diff)
23572 title=[[Main Page]]
23576 <a href="#section">#section</a>
23580 Edit comment with bare anchor link (non-local, as on history)
23583 title=[[Main Page]]
23587 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23591 Anchor starting with underscore
23597 <p><a href="#_ref">One</a>
23600 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23604 Id starting with underscore
23606 <div id="_ref"></div>
23608 <div id="_ref"></div>
23613 Edit comment with link with more than one pipe (T99346)
23617 [[Main Page|Many|pipes]]
23619 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23623 Complex edit comment with link with more than one pipe (T99346)
23627 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23629 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..."
23633 Space normalisation on autocomment (T24784)
23636 title=[[Main Page]]
23638 /* __hello__world__ */
23640 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23644 percent-encoding and + signs in comments (T28410)
23648 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23650 <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>
23653 # Parsoid doesn't support this yet: see T75581
23654 # but it *should* omit the 'src' attribute if the image is bad.
23655 # PHP side of tests was disabled in
23656 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23657 # because of issues in the PHP parserTests infrastructure
23658 # (but the output below is indeed what the PHP side emits)
23660 Bad images - basic functionality
23663 !! html/php+disabled
23665 <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>
23669 Bad images - T18039: text after bad image disappears
23674 !! html/php+disabled
23680 <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>
23685 Verify that displaytitle works (T24501) no displaytitle
23689 wgAllowDisplayTitle=true
23690 wgRestrictDisplayTitle=false
23692 this is not the the title
23695 <p>this is not the the title
23700 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23705 wgAllowDisplayTitle=true
23706 wgRestrictDisplayTitle=false
23708 this is not the the title
23709 {{DISPLAYTITLE:whatever}}
23712 <p>this is not the the title
23717 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23722 wgAllowDisplayTitle=true
23723 wgRestrictDisplayTitle=true
23725 this is not the the title
23726 {{DISPLAYTITLE:whatever}}
23729 <p>this is not the the title
23734 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23739 wgAllowDisplayTitle=true
23740 wgRestrictDisplayTitle=true
23742 this is not the the title
23743 {{DISPLAYTITLE:screen}}
23746 <p>this is not the the title
23751 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23756 wgAllowDisplayTitle=false
23758 this is not the the title
23759 {{DISPLAYTITLE:screen}}
23762 <p>this is not the the title
23763 <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>
23768 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23773 wgAllowDisplayTitle=false
23775 this is not the the title
23778 <p>this is not the the title
23783 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23788 wgAllowDisplayTitle=true
23789 wgRestrictDisplayTitle=true
23791 this is not the the title
23792 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23794 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23795 <p>this is not the the title
23800 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23805 wgAllowDisplayTitle=true
23806 wgRestrictDisplayTitle=true
23808 this is not the the title
23809 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23811 <span style="color: red;">s</span>creen
23812 <p>this is not the the title
23817 Page status indicators: Empty name is invalid
23821 <indicator name=" "></indicator>
23822 <indicator></indicator>
23824 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23825 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23830 Page status indicators: Weird syntaxes that are okay
23834 <indicator name="empty" />
23835 <indicator name="name"></indicator>
23844 Page status indicators: Torture test
23848 <indicator name="01">hello world</indicator>
23849 <indicator name="02">[[Main Page]]</indicator>
23850 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23851 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23852 <indicator name="05">*foo
23854 <indicator name="06"><nowiki>foo</nowiki></indicator>
23855 <indicator name="07"> Preformatted</indicator>
23856 <indicator name="08"><div>Broken tag</indicator>
23857 <indicator name="09">{| class=wikitable
23860 <indicator name="10">Two
23862 paragraphs</indicator>
23865 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23866 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" />
23867 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>
23868 05=<ul><li>foo</li>
23872 07=<pre>Preformatted
23874 08=<div>Broken tag</div>
23876 09=<table class="wikitable">
23893 preload: check <noinclude> and <includeonly>
23897 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23903 preload: check <onlyinclude>
23907 Goodbye <onlyinclude>Hello world</onlyinclude>
23913 preload: can pass tags through if we want to
23917 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23919 <includeonly>Hello world</includeonly>
23923 preload: check that it doesn't try to do tricks
23927 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23929 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23933 Play a bit with r67090 and T5158
23935 <div style="width:50% !important"> </div>
23936 <div style="width:50% !important"> </div>
23937 <div style="width:50% !important"> </div>
23938 <div style="border : solid;"> </div>
23940 <div style="width:50% !important"> </div>
23941 <div style="width:50% !important"> </div>
23942 <div style="width:50% !important"> </div>
23943 <div style="border : solid;"> </div>
23946 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23947 <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>
23948 <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>
23949 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23954 HTML5 data attributes
23956 <span data-foo="bar">Baz</span>
23957 <p data-abc-def_hij="">Quuz</p>
23959 <p><span data-foo="bar">Baz</span>
23961 <p data-abc-def_hij="">Quuz</p>
23964 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23965 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23969 Strip reserved data attributes
23971 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23973 <div data-ok="fred">d</div>
23976 <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>
23980 percent-encoding and + signs in internal links (T28410)
23982 [[User:+%]] [[Page+title%]]
23983 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23984 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23985 [[%33%45]] [[%33%45+]]
23987 <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>
23988 <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>
23989 <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>
23990 <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>
23993 <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>
23994 <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>
23995 <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>
23996 <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>
24000 Special characters in embedded file links (T29679)
24002 [[File:Contains & ampersand.jpg]]
24003 [[File:Does not exist.jpg|Title with & ampersand]]
24005 <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>
24006 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24009 <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>
24010 <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>
24014 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24016 Text's been normalized?
24018 <p>Text's been normalized?
24023 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24025 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24027 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24032 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24034 [http://www.example.org/ ideograms]
24036 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24041 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24043 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24045 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24069 T33098 Template which includes system messages which includes the template
24073 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24074 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24079 T33490 Turkish: ucfirst 'blah'
24090 T33490 Turkish: ucfirst 'ix'
24101 T33490 Turkish: lcfirst 'BLAH'
24112 T33490 Turkish: ucfırst (with a dotless i)
24118 <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>
24123 T33490 ucfırst (with a dotless i) with English language
24129 <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>
24133 # Note that Parsoid doesn't emit an explicit TOC.
24134 # Note also that the html2wt direction tends to emit an extra newline
24135 # between the __TOC__ magicword and the first heading unless *both*
24136 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24140 T28375: TOC with italics
24142 title=[[Main Page]]
24145 ==''Lost'' episodes==
24147 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24149 <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>
24153 <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>
24156 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24157 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24161 T28375: TOC with bold
24163 title=[[Main Page]]
24166 =='''should be bold''' then normal text==
24168 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24170 <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>
24174 <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>
24177 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24178 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24182 T35845: Headings become cursive in TOC when they contain an image
24184 title=[[Main Page]]
24187 ==Image [[Image:foobar.jpg]]==
24189 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24191 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24195 <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>
24198 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24199 <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>
24203 T35845 (2): Headings become bold in TOC when they contain a blockquote
24205 title=[[Main Page]]
24208 ==<blockquote>Quote</blockquote>==
24210 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24212 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24216 <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>
24219 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24221 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24225 <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>
24227 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24228 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24232 Unclosed tags in TOC
24234 wgFragmentMode=[ 'html5', 'legacy' ]
24236 title=[[Main Page]]
24240 <small>Hanc marginis exiguitas non caperet.</small>
24243 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24245 <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>
24249 <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>
24250 <p><small>Hanc marginis exiguitas non caperet.</small>
24254 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24255 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24256 <p><small>Hanc marginis exiguitas non caperet.</small>
24261 Multiple tags in TOC
24264 ==<i>Foo</i> <b>Bar</b>==
24266 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24268 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24270 <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>
24271 <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>
24275 <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>
24276 <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>
24279 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24281 <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>
24282 <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>
24286 <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>
24287 <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>
24289 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24290 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24292 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24295 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24296 # html5 tag parsing.
24298 Tags with parameters in TOC
24303 ==<sup class="in-h2">Hello</sup>==
24305 ==<sup class="a > b">Evilbye</sup>==
24307 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24309 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24310 <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>
24314 <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>
24315 <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>
24318 <meta property="mw:PageProp/toc" />
24319 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24321 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24325 span tags with directionality in TOC
24328 ==<span dir="ltr">C++</span>==
24330 ==<span dir="rtl">זבנג!</span>==
24332 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24334 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24336 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24338 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24340 <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>
24341 <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>
24342 <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>
24343 <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>
24344 <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>
24348 <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>
24349 <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>
24350 <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>
24351 <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>
24352 <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>
24355 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24356 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24357 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24358 <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>
24359 <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>
24360 <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>
24364 T74884: bdi element in ToC
24367 ==<bdi>test</bdi>==
24369 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24371 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24375 <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>
24378 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24379 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24383 T35715: s/strike element in ToC
24386 ==<s>test</s> test <strike>test</strike>==
24388 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24390 <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>
24394 <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>
24397 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24398 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24402 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24407 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24409 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24413 <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>
24416 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24417 <h2 id="x" data-parsoid='{}'>x</h2>
24423 == {{int:headline_sample}} ==
24427 T34057: Title needed when expanding <h> nodes.
24429 title=[[Main Page]]
24433 <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>
24438 Strip marker in urlencode
24440 {{urlencode:x<nowiki/>y}}
24441 {{urlencode:x<nowiki/>y|wiki}}
24442 {{urlencode:x<nowiki/>y|path}}
24443 {{urlencode:x<pre id="one">two</pre>y}}
24471 Strip marker in formatNum
24473 {{formatnum:1<nowiki/>2}}
24474 {{formatnum:1<nowiki/>2|R}}
24482 Check noCommafy in formatNum
24486 {{formatnum:123456.78}}
24487 {{formatnum:123456.78|NOSEP}}
24495 Wrong option for formatNum (T58199)
24497 {{formatnum:1,234.56|Random}}
24498 {{formatnum:1,234.56|EVERYTHING}}
24499 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24508 Strip marker in grammar
24512 {{grammar:elative|foo<nowiki/>bar}}
24519 Strip marker in padleft
24521 {{padleft:|2|x<nowiki/>y}}
24528 Strip marker in padright
24530 {{padright:|2|x<nowiki/>y}}
24537 Strip marker in anchorencode
24539 {{anchorencode:x<nowiki/>y}}
24544 <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>
24548 nowiki inside link inside heading (T20295)
24550 ==[[foo|x<nowiki>y</nowiki>z]]==
24552 <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>
24557 new support for bdi element (T33817)
24559 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24561 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24566 Ignore pipe between table row attributes
24570 |- id=foo | style='color: red'
24578 <tr id="foo" style="color: red">
24585 Language parser function
24594 Padleft and padright (default 0-padding)
24603 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24604 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24608 Padleft and padright (partial fill)
24610 {{padleft:xyz|6|ab}}
24611 {{padright:xyz|6|ab}}
24617 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>abaxyz</span>
24618 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>xyzaba</span></p>
24622 Padleft and padright as substr
24624 {{padleft:|3|abcde}}
24625 {{padright:|3|abcde}}
24631 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:","function":"padleft"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span>
24632 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:","function":"padright"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span></p>
24636 Special parser function
24638 {{#special:RandomPage}}
24639 {{#special:BaDtItLe}}
24640 {{#special:Foobar}}
24649 T36939 - Case insensitive link parsing ([HttP://])
24651 [HttP://MediaWiki.Org/]
24653 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24656 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24660 T36939 - Case insensitive link parsing ([HttP:// title])
24662 [HttP://MediaWiki.Org/ MediaWiki]
24664 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24669 T36939 - Case insensitive link parsing (HttP://)
24671 HttP://MediaWiki.Org/
24673 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24676 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24694 <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>
24695 <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>
24696 <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>
24697 <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>
24698 <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>
24704 ### Parsoid-specific tests
24705 ### Parsoid-PHP parser incompatibilities
24708 1. SOL-sensitive wikitext tokens as template-args
24710 parsoid=wt2html,wt2wt
24716 <span about="#mwt1" typeof="mw:Transclusion">
24717 </span><ul about="#mwt1"><li>a</li>
24719 <span about="#mwt2" typeof="mw:Transclusion">
24720 </span><ol about="#mwt2"><li>a</li>
24722 <span about="#mwt3" typeof="mw:Transclusion">
24723 </span><dl about="#mwt3"><dd>a</dd>
24727 #### -----------------------------------------------------------------
24728 #### Parsoid-specific functionality tests
24729 #### -----------------------------------------------------------------
24731 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24732 # We know wt2wt will fail, but we expect selser to pass.
24733 # Due to the nature of our testing, wt2wt and selser tests will enter the
24734 # blacklist and we'll catch selser regressions based on changes to the
24735 # blacklist entries for selser tests.
24737 1. Bad treebuilder fixup of formatting elt is cleaned up
24739 parsoid=wt2html,wt2wt
24744 [[Image:Foobar.jpg|right|Test]]
24751 <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>
24758 2. Bad treebuilder fixup of formatting elt is cleaned up
24760 parsoid=wt2html,wt2wt
24762 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24764 <small>[[Image:Foobar.jpg|right|300px]]</small>
24768 <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>
24770 <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>
24774 3. Bad treebuilder fixup of formatting elt is cleaned up
24776 parsoid=wt2html,wt2wt
24778 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24780 <p><small><b>foo</b></small></p>
24781 <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>
24782 <p><small><b>bar</b></small></p>
24786 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24788 parsoid=wt2html,wt2wt
24790 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24792 <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>
24795 #### ----------------------------------------------------------------
24796 #### Parsoid-only testing of Parsoid's impl of LST
24797 #### Not implemented yet, see
24798 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24799 #### ----------------------------------------------------------------
24801 ## We still need to support serializing the older format while content is stored.
24803 LST Sections: Backwards compatibility
24806 "suppressErrors": true,
24807 "modes": ["html2wt"]
24810 <section begin="2011-05-16" />
24811 <section end="2014-04-10 (MW 1.23wmf22)" />
24813 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24814 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24818 LST Sections: Newfangled approach
24820 <section begin="2011-05-16" />
24821 <section end="2014-04-10 (MW 1.23wmf22)" />
24823 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24825 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24829 #--------- Test stripping of empty nodes in template content ----------
24832 Empty LI and TR nodes should be stripped from template content
24837 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24841 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24854 Empty LI and TR nodes should not be stripped from top-level content
24868 <li class='mw-empty-elt'></li>
24873 <tr class='mw-empty-elt'></tr>
24882 Empty TR nodes should not be stripped if they have any attributes set
24884 {{EmptyTRWithHTMLAttrTest}}
24886 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24887 <tr align='center'></tr>
24888 <tr><td>foo</td></tr>
24889 <tr align='center'></tr>
24890 <tr><td>bar</td></tr>
24894 #### ----------------------------------------------------------------
24895 #### The following section of tests are primarily to test
24896 #### wikitext escaping capabilities of Parsoid. Given that
24897 #### escaping can be done any number of ways, the wikitext (input)
24898 #### is always adjusted to reflect how Parsoid adds nowiki
24901 #### We are marking several tests as parsoid-only since the
24902 #### HTML in the result section is different from what the
24903 #### PHP parser generates for it.
24904 #### ----------------------------------------------------------------
24907 #### --------------- Headings ---------------
24909 #### 1. Nested inside html <h1>=foo=</h1>
24910 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24911 #### 3. Nested inside html with wikitext split by html tags
24912 #### 4. No escape needed
24913 #### 5. Empty headings <h1></h1>
24914 #### 6. Heading chars in SOL context
24915 #### ----------------------------------------
24917 Headings: 0. Unnested
24927 <p>=foo<i>a</i>=</p>
24929 <nowiki>=foo=</nowiki>
24931 <nowiki> </nowiki>=foo=
24933 <nowiki>=foo=</nowiki>
24935 =foo''a''<nowiki>=</nowiki>
24938 # New headings and existing headings are handled differently
24940 Headings: 1. Nested inside html
24948 <h1 data-parsoid=''>=foo=</h1>
24949 <h2 data-parsoid=''>=foo=</h2>
24950 <h3 data-parsoid=''>=foo=</h3>
24951 <h4 data-parsoid=''>=foo=</h4>
24952 <h5 data-parsoid=''>=foo=</h5>
24953 <h6 data-parsoid=''>=foo=</h6>
24961 =<nowiki>=foo=</nowiki>=
24962 ==<nowiki>=foo=</nowiki>==
24963 ===<nowiki>=foo=</nowiki>===
24964 ====<nowiki>=foo=</nowiki>====
24965 =====<nowiki>=foo=</nowiki>=====
24966 ======<nowiki>=foo=</nowiki>======
24971 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24980 <nowiki>*</nowiki>bar
24986 <nowiki>=bar=</nowiki>
24990 Headings: 3. Nested inside html with wikitext split by html tags
24994 <h1>=<b>bold</b>foo=</h1>
24996 = ='''bold'''foo= =
25000 Headings: 4a. No escaping needed (testing just h1 and h2)
25011 <h1><i>=</i>foo=</h1>
25031 Headings: 4b. No escaping needed (inside p-tags)
25048 Headings: 4c. Short headings (1)
25055 <nowiki>===</nowiki>
25061 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25063 Headings: 4d. Short headings (2)
25065 parsoid=wt2html,html2html
25076 <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>
25077 <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>
25078 <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>
25083 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25084 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25085 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25089 Headings: 5. Empty headings
25093 <h1 data-parsoid='{}'></h1>
25095 <h2 data-parsoid='{}'></h2>
25097 <h3 data-parsoid='{}'></h3>
25099 <h4 data-parsoid='{}'></h4>
25101 <h5 data-parsoid='{}'></h5>
25103 <h6 data-parsoid='{}'></h6>
25113 =====<nowiki/>=====
25115 ======<nowiki/>======
25119 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25129 <nowiki>=a=</nowiki>
25131 <nowiki>=a=</nowiki>
25133 <nowiki>=a=</nowiki>
25137 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25150 <nowiki>=a=</nowiki>
25153 <nowiki>=a=</nowiki>
25156 <nowiki>=a=</nowiki>
25161 Headings: 6c. Heading chars in SOL context (leading newline break)
25169 <nowiki>=b=</nowiki>
25173 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25177 <!--c0--><p>=a=</p>
25179 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25181 <!--c0--><nowiki>=a=</nowiki>
25183 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25187 Headings: 6d. Heading chars in SOL context (No escaping needed)
25197 Headings: 7. Insert a newline between new content and headings
25203 <h2 data-parsoid='{}'>A</h2>
25204 <p data-parsoid='{}'>a</p>
25215 Headings: Used as horizontal rule
25217 wgFragmentMode=[ 'html5', 'legacy' ]
25223 <h6><span id=".3D.3D.3D"></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=1" title="Edit section: ===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
25226 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25229 #### --------------- Lists ---------------
25230 #### 0. Outside nests (*foo, etc.)
25231 #### 1. Nested inside html <ul><li>*foo</li></ul>
25232 #### 2. Inside definition lists
25233 #### 3. Only bullets at start should be escaped
25234 #### 4. No escapes needed
25235 #### 5. No unnecessary escapes
25236 #### 6. Escape bullets in SOL position
25237 #### 7. Escape bullets in a multi-line context
25238 #### ----------------------------------------
25241 Lists: 0. Outside nests
25251 <nowiki>*</nowiki>foo
25253 <nowiki>#</nowiki>foo
25255 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25258 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25259 ## to test wikitext escaping, and insignificant whitespace diffs
25260 ## cause PHP parser tests to barf
25262 Lists: 1. Nested inside html (No unnecessary escapes)
25271 <li data-parsoid='{}'>*foo</li>
25272 <li data-parsoid='{}'>#foo</li>
25273 <li data-parsoid='{}'>:foo</li>
25274 <li data-parsoid='{}'>;foo</li>
25282 <li data-parsoid='{}'>*foo</li>
25283 <li data-parsoid='{}'>#foo</li>
25284 <li data-parsoid='{}'>:foo</li>
25285 <li data-parsoid='{}'>;foo</li>
25292 *<nowiki>*foo</nowiki>
25293 *<nowiki>#foo</nowiki>
25294 *<nowiki>:foo</nowiki>
25295 *<nowiki>;foo</nowiki>
25301 #<nowiki>*foo</nowiki>
25302 #<nowiki>#foo</nowiki>
25303 #<nowiki>:foo</nowiki>
25304 #<nowiki>;foo</nowiki>
25308 Lists: 2. Inside definition lists
25312 <dl><dt>;foo</dt></dl>
25313 <dl><dt>:foo</dt></dl>
25316 <dl><dd>:foo</dd></dl>
25320 ; <nowiki>:foo</nowiki>
25322 ; <nowiki>:foo</nowiki>
25329 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25335 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25339 *<nowiki>*foo</nowiki>''it''*bar
25343 Lists: 4. No escapes needed
25356 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25360 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25374 Lists: 5. No unnecessary escapes
25378 <ul><li> bar <span>[[foo]]</span></li></ul>
25379 <ul><li> =bar <span>[[foo]]</span></li></ul>
25380 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25381 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25382 <ul><li> =bar <span>foo]]</span>=</li></ul>
25383 <ul><li> <s></s>: a</li></ul>
25384 <ul><li> <i>* foo</i></li></ul>
25387 * bar <span><nowiki>[[foo]]</nowiki></span>
25389 * =bar <span><nowiki>[[foo]]</nowiki></span>
25391 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25393 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25395 * =bar <span>foo]]</span>=
25403 Lists: 6. Escape bullets in SOL position
25407 <p><!--cmt-->*foo</p>
25409 <!--cmt--><nowiki>*</nowiki>foo
25413 Lists: 7. Escape bullets in a multi-line context
25422 <nowiki>*</nowiki>b
25426 Lists: 8. Escape colons only if not present in tags
25430 <dl><dt>a:b<i>c:d</i></dt></dl>
25432 ; <nowiki>a:b</nowiki>''c:d''
25435 #### --------------- HRs ---------------
25436 #### 1. Single line
25437 #### -----------------------------------
25440 HRs: 1. Single line
25448 ----<nowiki>----</nowiki>
25453 #### --------------- Tables ---------------
25454 #### 1a. Simple example
25455 #### 1b. No escaping needed (!foo)
25456 #### 1c. No escaping needed (|foo)
25457 #### 1d. No escaping needed (|}foo)
25459 #### 2a. Nested in td (<td>foo|bar</td>)
25460 #### 2b. Nested in td (<td>foo||bar</td>)
25461 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25463 #### 3a. Nested in th (<th>foo!bar</th>)
25464 #### 3b. Nested in th (<th>foo!!bar</th>)
25465 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25469 #### 4c. No escaping needed
25470 #### --------------------------------------
25473 Tables: 1a. Simple example
25481 <nowiki>{|</nowiki>
25486 Tables: 1b. No escaping needed
25497 Tables: 1c. No escaping needed
25508 Tables: 1d. No escaping needed
25519 Tables: 2a. Nested in td
25524 <td>foo|bar</td></tr>
25525 <tr><td>x<div>a|b</div></td>
25529 |<nowiki>foo|bar</nowiki>
25531 |x<div><nowiki>a|b</nowiki></div>
25539 <td>x<div>a|b</div>
25540 </td></tr></tbody></table>
25544 Tables: 2b. Nested in td
25550 <td>a<i>b||c</i></td>
25551 <td>a<i><div>b||c</div></i></td>
25552 </tr></tbody></table>
25555 |<nowiki>foo||bar</nowiki>
25556 |a''<nowiki>b||c</nowiki>''
25557 |a''<div><nowiki>b||c</nowiki></div>''
25566 <td>a<i><div>b||c</div></i>
25572 Tables: 2c. Nested in td -- no escaping needed
25588 Tables: 3a. Nested in th
25604 Tables: 3b. Nested in th
25609 <tr><th>foo!!bar</th>
25610 <th><i>foo|bar</i></th>
25611 <th><i>foo!!bar</i></th>
25612 <th><i><span>foo!!bar</span></i></th>
25613 </tr></tbody></table>
25616 !<nowiki>foo!!bar</nowiki>
25617 !''<nowiki>foo|bar</nowiki>''
25618 !''<nowiki>foo!!bar</nowiki>''
25619 !''<span><nowiki>foo!!bar</nowiki></span>''
25628 <th><i>foo!!bar</i>
25630 <th><i><span>foo!!bar</span></i>
25636 Tables: 3c. Nested in th
25641 <tr><th>foo||bar</th>
25642 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25643 </tr></tbody></table>
25646 !<nowiki>foo||bar</nowiki>
25647 !<nowiki>foo||bar</nowiki>
25660 Tables: 4a. Escape -
25676 |<nowiki>-bar</nowiki>
25681 Tables: 4b. Escape +
25697 |<nowiki>+bar</nowiki>
25702 Tables: 4c. No escaping needed
25707 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25708 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25714 <div>a|b</div></td>
25759 Tables: 4d. No escaping needed
25764 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25765 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25766 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25777 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25787 T97430: Don't emit empty nowiki pairs around marker meta tags
25791 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25792 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25794 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25795 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25799 Unclosed xmlish element in table line shouldn't eat end delimiters
25804 <tbody><tr><td> <foo</td>
25805 <td> bar></td></tr>
25822 #### --------------- Links ----------------
25823 #### 1. Quote marks in link text
25824 #### 2. Wikilinks: Escapes needed
25825 #### 3. Wikilinks: No escapes needed
25826 #### 4. Extlinks: Escapes needed
25827 #### 5. Extlinks: No escapes needed
25828 #### --------------------------------------
25830 Links 1. WikiLinks: No escapes needed
25834 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25835 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25836 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25840 [[Foo|x [Foobar] x]]
25842 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25843 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25844 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25849 Links 2. WikiLinks: Escapes needed
25853 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25854 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25855 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25856 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25857 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25858 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25859 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25860 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25861 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25862 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25864 [[Foo|<nowiki>Foobar]</nowiki>]]
25865 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25866 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25867 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25868 [[Foo|<nowiki>|Bar</nowiki>]]
25869 [[Foo|<nowiki>]]bar</nowiki>]]
25870 [[Foo|<nowiki>[[bar</nowiki>]]
25871 [[Foo|<nowiki>x [[ y</nowiki>]]
25872 [[Foo|<nowiki>x ]] y</nowiki>]]
25873 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25875 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25876 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25877 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25878 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25879 <a href="/wiki/Foo" title="Foo">|Bar</a>
25880 <a href="/wiki/Foo" title="Foo">]]bar</a>
25881 <a href="/wiki/Foo" title="Foo">[[bar</a>
25882 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25883 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25884 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25889 Links 3. WikiLinks: No escapes needed
25893 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25894 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25899 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25900 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25905 Links 4. ExtLinks: Escapes needed
25909 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25910 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25911 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25912 <p>[http://google.com]</p>
25913 <p>[http://google.com google]</p>
25914 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25915 <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>
25917 [http://google.com <nowiki>[google]</nowiki>]
25918 [http://google.com <nowiki>google]</nowiki>]
25919 [http://google.com <nowiki>goog] le</nowiki>]
25921 <nowiki>[http://google.com]</nowiki>
25923 <nowiki>[http://google.com google]</nowiki>
25925 [http://google.com<nowiki>]</nowiki>
25927 [{{echo|http://google.com}}<nowiki>]</nowiki>
25929 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25930 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25931 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25932 </p><p>[http://google.com]
25933 </p><p>[http://google.com google]
25934 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25935 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25940 Links 5. ExtLinks: No escapes needed
25944 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25945 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25947 [http://google.com [google]
25949 [[http://google.com]]
25951 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25952 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25957 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25961 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25962 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25963 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25964 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25965 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25966 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25967 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25968 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25969 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25970 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25971 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25972 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25973 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25976 x<nowiki/>http://example.com<nowiki/>y
25977 http://example.com<nowiki/>?x
25978 http://example.com<nowiki/>&x
25979 http://example.com<nowiki/>'x
25980 http://example.com<nowiki/>,x
25981 http://example.com<nowiki/>.x
25982 http://example.com<nowiki/>;x
25983 http://example.com<nowiki/>:x
25984 http://example.com<nowiki/>;x
25985 http://example.com<nowiki/>!x
25986 http://example.com<nowiki/>=x
25987 http://example.com<nowiki/>(x)
25988 http://example.com(x<nowiki/>)
25992 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25997 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25999 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26000 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26001 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26002 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26003 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26009 "http://example.com"
26010 (http://example.com)
26011 (http://example.com) foo
26012 http://example.com,
26013 http://example.com, foo
26016 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26018 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26019 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26020 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26021 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26022 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26027 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26031 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26032 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26034 http://example.com.,;:!?\
26035 -http://example.com:
26037 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26038 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26043 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26047 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26048 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26049 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26053 X<nowiki/>RFC 123<nowiki/>y
26057 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26061 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26062 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26063 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26070 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26071 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26072 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26077 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26081 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26082 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26083 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26087 X<nowiki/>PMID 123<nowiki/>y
26091 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26095 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26096 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26097 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26104 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26105 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26106 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26111 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26115 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26116 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26117 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26120 ISBN 1234567890<nowiki/>1
26121 ISBN 1234567890<nowiki/>x
26122 a<nowiki/>ISBN 1234567890<nowiki/>b
26126 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26130 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26134 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26139 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26143 <p>this is not a link: http://example.com
26146 this is not a link: <nowiki>http://example.com</nowiki>
26150 Links 15. Link trails can't become link prefixes.
26155 <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>
26157 [[Söfnuður]]-[[00]]
26159 <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>
26163 #### --------------- Quotes ---------------
26164 #### 1. Quotes inside <b> and <i>
26165 #### 2. Link fragments separated by <i> and <b> tags
26166 #### 3. Link fragments inside <i> and <b>
26167 #### 4. No escaping needed
26168 #### --------------------------------------
26170 1a. Quotes inside <b> and <i>
26181 <b>foo'<i>bar'</i>baz</b>
26190 <i>fools'<span> errand</span></i>
26191 <i><span>fool</span>'s errand</i>
26192 '<i>foo</i> bar '<i>baz</i>
26193 a|!*#-:;+-~[]{}b'<i>x</i>
26197 ''<nowiki>''foo''</nowiki>''
26198 ''<nowiki>'''foo'''</nowiki>''
26200 '''<nowiki/>'foo''''
26201 '''<nowiki>''foo''</nowiki>'''
26202 '''<nowiki>'''foo'''</nowiki>'''
26203 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26204 '''foo'''<nowiki/>'s
26210 '''foo'''<nowiki/>'
26211 ''''foo'''<nowiki/>'
26212 ''fools'<span> errand</span>''
26213 ''<span>fool</span>'s errand''
26214 '<nowiki/>''foo'' bar '''baz''
26215 a|!*#-:;+-~[]{}b'''x''
26219 1b. Quotes inside <b> and <i> with other tags on same line
26223 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26224 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26225 <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>
26226 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26227 '<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>
26228 '<i>foo</i> <div title="name">test</div>
26229 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26230 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26231 <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>
26234 '''a'' foo ''[[bar]]''
26235 ''a''' foo ''[[bar]]''
26236 ''a''' foo '''{{echo|[[bar]]}}'''
26237 [[foo]] x'''[[bar]]''
26238 '''foo'' <ref>test</ref>
26239 '''foo'' <div title="name">test</div>
26240 '''foo'' and <br> bar
26245 2. Link fragments separated by <i> and <b> tags
26249 <p>[[<i>foo</i>hello]]</p>
26250 <p>[[<b>foo</b>hello]]</p>
26252 [[''foo''<nowiki>hello]]</nowiki>
26254 [['''foo'''<nowiki>hello]]</nowiki>
26257 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26258 # this is one of the shortcomings of this format
26260 3. Link fragments inside <i> and <b>
26264 <p><i>[[foo</i>]]</p>
26265 <p><b>[[foo</b>]]</p>
26267 ''[[foo''<nowiki>]]</nowiki>
26269 '''[[foo'''<nowiki>]]</nowiki>
26273 4. No escaping needed
26277 <p>'<span><i>bar</i></span>'
26278 '<span><b>bar</b></span>'
26282 '<span>''bar''</span>'
26283 '<span>'''bar'''</span>'
26287 #### ----------- Paragraphs ---------------
26288 #### 1. No unnecessary escapes
26289 #### --------------------------------------
26292 1. No unnecessary escapes
26296 <p>bar <span>[[foo]]</span>
26297 </p><p>=bar <span>[[foo]]</span>
26298 </p><p>[[bar <span>[[foo]]</span>
26299 </p><p>]]bar <span>[[foo]]</span>
26300 </p><p>=bar <span>foo]]</span>=
26303 bar <span><nowiki>[[foo]]</nowiki></span>
26305 =bar <span><nowiki>[[foo]]</nowiki></span>
26307 [[bar <span><nowiki>[[foo]]</nowiki></span>
26309 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26311 =bar <span>foo]]</span><nowiki>=</nowiki>
26314 #### ----------------------- PRE --------------------------
26315 #### 1. Leading whitespace in SOL context should be escaped
26316 #### ------------------------------------------------------
26318 1. Leading whitespace in SOL context should be escaped
26341 <nowiki> </nowiki>a
26343 <nowiki> </nowiki> a
26347 <nowiki> </nowiki> a
26349 <nowiki> </nowiki>a
26352 <nowiki> </nowiki>b
26375 2. Leading whitespace in non-indent-pre contexts should not be escaped
26379 <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>
26380 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26381 <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>
26391 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26410 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26414 <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>
26416 [[File:Foobar.jpg|thumb|caption]]
26420 5. Nowiki escaping should account for indent-pres
26430 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26443 #### --------------- Behavior Switches --------------------
26446 1. Valid behavior switches should be escaped
26453 <nowiki>__TOC__</nowiki>
26454 ''<nowiki>__TOC__</nowiki>''
26458 2. Invalid behavior switches should not be escaped
26469 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26471 Behavior switches should be SOL-transparent
26475 <meta property="mw:PageProp/toc" />
26477 <!-- this one's bogus -->
26480 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26482 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26486 <!-- this one's bogus -->
26495 #### --------------- HTML tags ---------------
26498 #### 3. multi-line html tag
26499 #### 4. extension tags
26500 #### -----------------------------------------
26506 <a href="http://google.com">google</a>
26508 <a href="http://google.com">google</a>
26516 <ul><li> <div>foo</div></li>
26517 <li> <div style="color:red">foo</div></li>
26518 <li> <td></li></ul>
26521 * <nowiki><div>foo</div></nowiki>
26522 * <nowiki><div style="color:red">foo</div></nowiki>
26523 * <nowiki><td></nowiki>
26527 3. multi-line html tag
26546 <p><ref>foo</ref>
26547 </p><p><ref>bar
26548 </p><p>baz</ref>
26551 <nowiki><ref>foo</ref></nowiki>
26553 <nowiki><ref>bar</nowiki>
26555 baz<nowiki></ref></nowiki>
26558 #### --------------- Others ---------------
26564 <p><nowiki>foo</nowiki>
26567 <nowiki>foo</nowiki>
26570 ## The quote-char in the input is necessary for triggering the bug
26572 (T54035) Nowiki-escaping should not get tripped by " :" in text
26581 #----------- End of wikitext escaping tests --------------
26585 Tag-like HTML structures are passed through as text
26607 </p><p>1<d e>f
26612 HTML tag with necessary entities in attributes
26614 <span title="&amp;">foo</span>
26616 <p><span title="&amp;">foo</span>
26621 HTML tag with 'unnecessary' entity encoding in attributes
26623 <span title="&">foo</span>
26625 <p><span title="&">foo</span>
26630 HTML tag with broken attribute value quoting
26632 parsoid=wt2html,html2html
26634 <span title="Hello world>Foo</span>
26636 <p><span title="Hello world">Foo</span>
26639 <p><span title="Hello world">Foo</span></p>
26643 Self-closed tag with broken attribute value quoting
26645 parsoid=wt2html,html2html
26647 <div title="Hello world />Foo
26649 <div title="Hello world"></div><p>Foo
26652 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26656 Table with broken attribute value quoting
26658 parsoid=wt2html,html2html
26661 | title="Hello world|Foo
26666 <td title="Hello world">Foo
26672 <td title="Hello world">Foo
26678 Table with broken attribute value quoting on consecutive lines
26680 parsoid=wt2html,html2html
26683 | title="Hello world|Foo
26684 | style="color:red|Bar
26689 <td title="Hello world">Foo
26691 <td style="color:red">Bar
26697 <td title="Hello world">Foo
26698 </td><td style="color: red">Bar
26699 </td></tr></tbody></table>
26704 Accept empty td cell attribute
26707 | align="center" |foo|| |
26712 <td align="center">foo</td>
26719 Non-empty attributes in th-cells
26722 !Foo!! style="color: red" |Bar
26728 <th style="color: red">Bar
26734 Accept empty attributes in th-cells
26749 Empty table rows go away
26770 ### Parsoid-centric tests for testing RTing of inter-element separators
26771 ### Edge cases not tested by existing parser tests and specific to
26772 ### Parsoid-specific serialization strategies.
26776 RT-ed inter-element separators should be valid separators
26788 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26792 # Parsoid-only test of a DOM pass
26794 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26806 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26807 <p>bar</p></small></td></tr>
26811 <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>
26815 # Note that the "style" attribute is really a template parameter here.
26816 # The = would have to be {{=}} if you wanted the literal.
26818 Empty TD followed by TD with tpl-generated attribute
26823 |{{echo|style='color:red'}}|foo
26837 Indented table with an empty td
26855 ## We have some newline diffs RT-ing this edge case
26856 ## and it is not important enough -- we seem to be emitting
26857 ## at most 2 newlines after a </tr> and this is unrelated to
26858 ## the issue from T85627 that this is testing.
26860 Indented table with blank lines in between (T85627)
26879 Indented block & table
26893 <div data-parsoid='{"stx":"html"}'>foo</div>
26895 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26900 Indent and comment before table row
26915 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26916 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26920 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26922 Empty TR followed by a template-generated TR
26928 {{echo|<tr><td>foo</td></tr>}}
26933 <tr class='mw-empty-elt'></tr>
26934 <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}}]}'>
26939 ## PHP and parsoid output differ for this, and since this is primarily
26940 ## for testing Parsoid's serializer, marking this Parsoid only
26942 Empty TR followed by mixed-ws-comment line should RT correctly
26955 <tr class='mw-empty-elt'></tr>
26958 <!--c--> </tr><!--d-->
26964 Multi-line image caption generated by templates with/without trailing newlines
26966 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26967 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26969 <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>
26970 <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>
26974 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26978 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26980 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26982 <includeonly>foo</includeonly>
26990 ## PHP emits broken html for this, and since this is primarily
26991 ## a Parsoid serializer test, marking this Parsoid only
26993 Improperly nested inline or quotes tags with whitespace in between
26995 <span> <s>x</span> </s>
26998 <p><span> <s>x</s></span><s> </s>
26999 <b> <i>x</i></b><i> </i>
27004 Encapsulate protected attributes from wt
27006 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27008 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27012 <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>
27014 <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">
27015 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
27019 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27020 ## Having nested or stray pre tags results in the attempt to add duplicates,
27021 ## causing an assertion fail. This test tries to prevent that situation.
27023 Ensure ParagraphWrapper can deal with stray closing pre tags
27033 1. Ensure fostered text content is wrapped in element nodes
27037 <table>hi</table><table>ho</table>
27046 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27048 parsoid=wt2html,wt2wt
27057 <tbody><tr><td> a</td></tr>
27062 Encapsulation properly handles null DSR information from foster box
27064 parsoid=wt2html,wt2wt
27066 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27068 <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>
27072 1. Encapsulate foster-parented transclusion content
27074 parsoid=wt2wt,wt2html
27076 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27078 <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>
27088 2. Encapsulate foster-parented transclusion content
27090 parsoid=wt2wt,wt2html
27092 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27094 <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>
27105 3. Encapsulate foster-parented transclusion content
27107 parsoid=wt2wt,wt2html
27109 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27111 <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>"]}">
27124 4. Encapsulate foster-parented transclusion content
27126 parsoid=wt2wt,wt2html
27128 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27130 <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>"]}">
27143 5. Encapsulate foster-parented transclusion content
27145 parsoid=wt2wt,wt2html
27147 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27149 <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>
27164 6. Encapsulate foster-parented transclusion content
27166 parsoid=wt2wt,wt2html
27168 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27170 <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>
27186 7. Encapsulate foster-parented transclusion content
27188 parsoid=wt2wt,wt2html
27190 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27192 <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>
27202 # Note that the wt is broken on purpose: the = should be {{=}} if you
27203 # don't want it to be a template parameter key.
27205 8. Encapsulate foster-parented transclusion content
27207 parsoid=wt2wt,wt2html
27210 }}{|{{echo|style='color:red'}}
27215 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27217 <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>
27228 9. Encapsulate foster-parented transclusion content
27230 parsoid=wt2wt,wt2html
27232 <table>{{echo|hi</table>hello}}
27234 <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>
27238 Table in fosterable position
27249 <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">
27251 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27257 # Parsoid only for T66747
27259 Properly encapsulate empty-content transclusions in fosterable positions
27267 <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"}]]}'>
27273 Always encapsulate foster box when template range is expanded to table
27286 T115289: Unclosed table
27288 {{echo|<table>}}<!--c-->[[Category:Two]]
27290 <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>
27294 T115289: Don't migrate newlines out of tables with fostered content
27296 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27298 <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>
27302 T73074: More fostering fun
27304 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27306 <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>
27310 Support <object> element with .data attribute
27314 <object data="test.swf"></object>
27316 <object data="test.swf"></object>
27320 Don't block XML namespace declaration
27322 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27324 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27327 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27330 # -----------------------------------------------------------------
27331 # The following section of tests are primarily to spec requirements
27332 # around Parsoid's serialization (old, new, edited content)
27334 # All these tests are marked Parsoid html2wt and html2html only
27335 # ----------------------------------------------------------------
27338 Ignore rel attribute in a-tags during serialization to url-links
27342 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27343 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27344 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27346 http://en.wikipedia.org/wiki/Foobar
27347 http://en.wikipedia.org/wiki/Foobar
27348 http://en.wikipedia.org/wiki/Foobar
27351 # 'mi' is a localinterwiki prefix as well as a language
27353 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27357 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27363 Parsoid should accept interwiki shortcuts
27367 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27368 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27369 <a href='./fr:Foo'>Foo</a></p>
27370 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27371 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27372 <a href='fr%3AFoo'>Foo</a></p>
27373 <p><a href='FR%3AFoo'>Foo</a>
27374 <a href='./FR:Foo'>Foo</a></p>
27389 Parsoid should not accept invalid interwiki shortcuts
27393 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27394 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27395 <a href='news:Foo'>Foo</a></p>
27404 New wikilinks should be serialized properly
27408 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27409 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27410 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27411 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27412 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27416 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27417 http://en.wikipedia.org/wiki/Foo
27418 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27422 New wiki links (href variations)
27426 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27427 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27428 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27429 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27434 [[Toxine bactérienne]]
27438 New wiki links (content string variations)
27442 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27443 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27444 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27448 [[Foo_bar|./Foo_bar]]
27452 New category links (href variations)
27456 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27457 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27458 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27460 [[Category:Toxine bactérienne]]
27461 [[Category:Toxine bactérienne]]
27462 [[Category:Toxine bactérienne]]
27466 New sol transparent links don't need indent-pre nowiki protection
27471 <link rel="mw:PageProp/redirect" href="./Main_Page">
27472 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27473 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27475 #WEITERLEITUNG [[Main Page]]
27476 <!-- this is good --> [[Category:Good]]
27477 <!-- this is great --> [[Kategorie:Great]]
27481 New interlanguage links (href variations)
27485 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27486 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27487 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27489 [[es:Toxine bactérienne]]
27490 [[es:Toxine_bactérienne]]
27491 [[es:Toxine_bactérienne]]
27495 Image: Modifying size of an image (1)
27498 "modes": ["wt2wt"],
27500 ["img[height]", "attr", "height", "22"],
27501 ["img[width]", "attr", "width", "200"]
27505 [[Image:Foobar.jpg|230x230px]]
27507 [[Image:Foobar.jpg|200x200px]]
27511 Image: Modifying size of an image (2)
27514 "modes": ["wt2wt"],
27516 ["img[height]", "attr", "height", "100"],
27517 ["img[width]", "attr", "width", "500"]
27521 [[Image:Foobar.jpg|230x230px]]
27523 [[Image:Foobar.jpg|500x500px]]
27526 # Change in size is ignored so long as class='mw-default-size'
27528 Image: Modifying size of an image (3)
27531 "modes": ["wt2wt"],
27533 ["figure[class]", "removeClass", "mw-default-size"],
27534 ["figure img", "attr", "height", "19"],
27535 ["figure img", "attr", "width", "170"]
27539 [[Image:Foobar.jpg|thumb]]
27541 [[Image:Foobar.jpg|thumb|170x170px]]
27545 Image: Modifying alignment of an image (T50665)
27548 "modes": ["wt2wt"],
27550 ["figure[class]", "removeClass", "mw-halign-right"],
27551 ["figure[class]", "addClass", "mw-halign-left"]
27555 [[Image:Foobar.jpg|thumb|caption|right]]
27557 [[Image:Foobar.jpg|thumb|caption|left]]
27561 Image: Modifying mw-default-size of an frameless image (T64805)
27564 "modes": ["wt2wt"],
27566 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27570 [[Image:Foobar.jpg|frameless|right]]
27572 [[Image:Foobar.jpg|frameless|right|220x220px]]
27576 Image: Modifying valign of an image (T51221)
27579 "modes": ["wt2wt"],
27581 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27582 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27586 [[File:Foobar.jpg|20px|middle]]
27588 [[File:Foobar.jpg|20px|text-top]]
27592 Image: Modifying alt attribute of an image (T58400)
27595 "modes": ["wt2wt"],
27597 ["img[alt]", "attr", "alt", "some alternate edited text"]
27601 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27603 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27607 Image: Modifying caption of an image
27610 "modes": ["wt2wt"],
27612 ["figcaption", "text", "new caption"]
27616 [[Image:Foobar.jpg|thumb|original caption]]
27618 [[Image:Foobar.jpg|thumb|new caption]]
27622 Image: empty alt attribute (T50924)
27626 [[File:Foobar.jpg|thumb|alt=|bar]]
27628 <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>
27632 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27638 <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>
27640 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27644 Image: Block level image should have \n before and after
27647 [[File:Foobar.jpg|right|thumb|150x150px]]
27651 <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>
27656 Image: New block level image should have \n before and after (existing content)
27659 [[File:Foobar.jpg|right|thumb|150x150px]]
27663 <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>
27668 Image: upright option (parsoid)
27670 [[File:Foobar.jpg|thumb|upright|caption]]
27671 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27672 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27674 <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>
27675 <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>
27676 <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>
27680 Image: upright option is ignored on inline and frame images (parsoid)
27682 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27684 <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>
27688 Image: in template parameter with empty parameter
27690 {{echo|[[File:Foobar.jpg|link=]]}}
27692 <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>
27696 Image: from basic HTML (1)
27700 <span typeof="mw:Image">
27701 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27704 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27708 Image: from basic HTML (2)
27712 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27714 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27718 Image: from basic HTML (3)
27722 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27724 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27728 Image: from basic HTML (4)
27732 <img src="./File:Foobar.jpg">
27734 [[File:Foobar.jpg|link=]]
27738 Image: Invalid title as link
27740 [[File:Foobar.jpg|link=<]]
27742 <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>
27745 <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>
27749 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27754 <li><p>foo</p></li>
27761 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27765 <ul> <li>foo</li></ul>
27771 Don't strip leading whitespace when handling indent-pre suppressing tags
27776 <tr><td> indented row</td></tr>
27779 <b>This is very bold of you!</b>
27782 indented cell (no pre-wrapping!)
27792 '''This is very bold of you!'''
27796 indented cell (no pre-wrapping!)
27804 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27826 <nowiki> </nowiki></span>bar2
27829 <nowiki> </nowiki><span>bar</span>
27832 <nowiki> </nowiki><span>foo</span>
27837 Lists: Dont insert newlines in a serialized list item.
27841 <ul><li>a<br>b</li><li>c</li></ul>
27848 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27851 "modes": ["html2wt"],
27852 "scrubWikitext": false
27855 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27856 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27858 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27859 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27861 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27863 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27865 == hello there [[Category:A1]] ==
27867 == [[Category:A2]] hi pal ==
27869 == <!--foo--> [[Category:A3]] how goes it ==
27871 == it goes well [[Category:A4]] <!--bar--> ==
27873 ==howdy [[Category:A5]]==
27879 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27882 "modes": ["html2wt"],
27883 "scrubWikitext": true
27886 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27887 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27889 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27890 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27892 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27900 <!--foo--> [[Category:A3]]
27905 [[Category:A4]] <!--bar-->
27913 Headings: Don't hoist metas that come from templates
27916 "modes": ["html2wt"],
27917 "scrubWikitext": true
27920 <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>
27922 == {{echo|foo [[Category:Foo]]}} ==
27926 Headings: Category in ref isn't hoisted
27929 "modes": ["html2wt"],
27930 "scrubWikitext": true
27933 <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>
27935 <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>
27938 [[Category:Baz]] </ref> ==
27944 Parsoid: Serialize positional parameters with = in them as named parameter
27948 <p about="#mwt1" typeof="mw:Transclusion"
27949 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27951 <p about="#mwt1" typeof="mw:Transclusion"
27952 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27954 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27955 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27956 <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>
27960 {{echo|1=f=oo|2=bar}}
27962 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27963 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27964 {{echo|<nowiki>f=oo</nowiki>|bar}}
27968 Parsoid: Serialize positional parameters with = in extlink as named parameter
27972 <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>
27974 {{echo|1=http://stuff?is=ok}}
27978 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27982 <div>a<p>b</p></div>
28003 Substrings resembling wikitext in hrefs should not get nowiki escapes
28007 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28013 Enforce single-line context in the serializer
28020 <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">
28021 </span><span about="#mwt1">you</span> </h2>
28023 <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>
28025 <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
28026 there</span></li></ol>
28038 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28045 </tbody></table></dd></dl>
28049 == hi {{bogus|there
28060 * foo '''bar''' baz
28072 Serialize new placeholder space without spans
28076 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28078 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28080 <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>
28086 <ref>foo : bar</ref>ok
28090 #-----------------------
28091 # Tag minimization tests
28092 #-----------------------
28095 1. I/B quote minimization: wikitext-only tags should be combined
28099 <p><i>A</i><i>B</i></p>
28100 <p><b>A</b><b>B</b></p>
28101 <p><i>A</i><b><i>B</i></b></p>
28102 <p><b>A</b><i><b>B</b></i></p>
28103 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28104 <p><i><b>A</b></i><i><b>B</b></i></p>
28105 <p><i><b>A</b></i><b><i>B</i></b></p>
28106 <p><b><i>A</i></b><i><b>B</b></i></p>
28126 2. I/B quote minimization: wikitext and html tags should not be combined
28130 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28131 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28135 ''A''<nowiki/>'''<i>B</i>'''
28139 3. I/B quote minimization: templated content stops minimization
28143 <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>
28144 <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>
28146 ''A''{{echo|''B''}}
28148 ''A''{{echo|'''''B'''''}}
28152 4. I/B quote minimization: new content should be mimimized with adjacent old content
28156 <p><i>A</i><i>B</i></p>
28157 <p><b>A</b><b>B</b></p>
28158 <p><i>A</i><b><i>B</i></b></p>
28168 5a. Merge adjacent quote nodes if they've been edited
28171 "modes": ["wt2wt", "selser"],
28173 ["p", "contents", "remove", ":contains('b')"]
28183 5b. Merge adjacent quote nodes if they've been edited
28186 "modes": ["wt2wt", "selser"],
28192 ''a''<span id="x">b</span>''c''
28198 1. Merge adjacent link nodes as long as at least one element is new
28201 "modes": ["html2wt"],
28202 "scrubWikitext": true
28205 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28206 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28207 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28211 [[Football|Foot]][[Football|ball]]
28215 2. Merge adjacent link nodes and enable additional normalizations
28218 "modes": ["html2wt"],
28219 "scrubWikitext": true
28222 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28224 [[Football|''Football'']]
28228 3. Don't merge adjacent link nodes if scrubWikitext is false
28231 "modes": ["html2wt"],
28232 "scrubWikitext": false
28235 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28237 [[Football|Foot]][[Football|ball]]
28240 #------------------------------
28241 # End of tag minimization tests
28242 #------------------------------
28245 T56262: New entities
28249 <span typeof="mw:Entity"> </span>
28254 ## Note that there is no wikitext output for 'unknownproperty' ##
28255 ## Unknown magic words are silently dropped ##
28262 <meta property='mw:PageProp/toc' />
28263 <meta property='mw:PageProp/notoc' />
28264 <meta property='mw:PageProp/forcetoc' />
28265 <meta property='mw:PageProp/index' />
28266 <meta property='mw:PageProp/noindex' />
28267 <meta property='mw:PageProp/nogallery' />
28268 <meta property='mw:PageProp/noeditsection' />
28269 <meta property='mw:PageProp/notitleconvert' />
28270 <meta property='mw:PageProp/nocontentconvert' />
28271 <meta property='mw:PageProp/unknownproperty' />
28281 __NOCONTENTCONVERT__
28285 Consecutive <pre>s should not get merged
28287 parsoid=html2wt,html2html
28289 <pre>a</pre><pre>b</pre>
28317 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28321 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28323 [[Special:BookSources/1234567890|ISBN 1234567895]]
28327 Edited RFC links not serializable as RFC links should serialize as extlinks
28331 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28333 [https://tools.ietf.org/html/rfc123 New RFC]
28337 Edited PMID links not serializable as PMID links should serialize as extlinks
28341 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28343 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28347 WTS of autolinks with trailing/surrounding context
28351 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28352 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28353 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28354 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28355 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28356 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28358 http://cscott.net'''foo'''
28360 http://cscott.net<b>foo</b>
28362 '''http://cscott.net'''
28364 '''http://cscott.net '''
28366 '''http://cscott.net<nowiki/>x'''
28368 http://cscott.net<nowiki/>x
28372 WTS of autolinks with nowikis (round-trip)
28374 x<nowiki/>http://cscott.net<nowiki/>x
28376 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28379 # this is the "easy" test because it leaves in place all the
28380 # data-parsoid information indicating this is an autolink
28382 WTS of autolinks with escapes (editing)
28385 "modes": ["wt2wt"],
28387 [ "span", "remove" ]
28391 x<nowiki/>http://cscott.net<nowiki/>x
28393 x<nowiki/>http://cscott.net<nowiki/>x
28397 WTS of edited autolink-like text (T103364)
28400 "modes": ["wt2wt"],
28402 [ "span[typeof]", "removeAttr", "typeof" ]
28406 Not a link: <nowiki>http://example.com</nowiki>.
28408 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28412 WTS of newly-authored autolink-like text (T103364)
28416 <p>http://example.com is not a link.</p>
28418 <nowiki>http://example.com</nowiki> is not a link.
28422 WTS of autolink-like text after an autolink (T108563)
28426 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28428 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28432 Magic links inside links (not autolinked)
28434 [[Foo|http://example.com]]
28437 [[Foo|ISBN 123456789x]]
28439 [http://foo.com http://example.com]
28440 [http://foo.com RFC 1234]
28441 [http://foo.com PMID 1234]
28442 [http://foo.com ISBN 123456789x]
28444 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28445 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28446 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28447 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28448 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28449 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28450 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28451 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28454 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28455 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28456 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28457 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28459 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28460 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28461 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28462 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28466 Magic links inside image captions (autolinked)
28468 [[File:Foobar.jpg|thumb|http://example.com]]
28469 [[File:Foobar.jpg|thumb|RFC 1234]]
28470 [[File:Foobar.jpg|thumb|PMID 1234]]
28471 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28473 <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>
28474 <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>
28475 <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>
28476 <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>
28478 <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" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
28479 <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" class="external text">RFC 1234</a></figcaption></figure>
28480 <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" class="external text">PMID 1234</a></figcaption></figure>
28481 <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>
28485 WTS of magic word text (T109371)
28490 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28491 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28493 <nowiki>RFC 1234</nowiki>
28495 [http://foo.com RFC 1234]
28501 Edited Redirect link should emit a non-piped wikitext link
28505 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28511 T75121: Infer extension name from typeOf if data-mw is not present
28513 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28515 <div typeOf="mw:Extension/foo"></div>
28520 # Note that the <p> wrapping isn't present in PHP parser output
28521 # The important thing for this test is that P-wrapping doesn't
28522 # interfere with the <nowiki> protection for leading - in <td>
28523 # (which isn't necessary for <th>).
28525 T88318: p-wrapped dash in table.
28527 parsoid=html2wt,wt2wt
28530 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28531 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28532 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28539 |<nowiki>-</nowiki>
28540 |<nowiki>- </nowiki>
28561 <td><small>-</small>
28570 </td></tr></tbody></table>
28574 T149209: WTS: Handle newlines in table cells properly
28582 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28584 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28590 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28592 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28614 T149209: Selser: Handle newlines in table cells properly
28617 "modes": ["selser"],
28619 [ "#h1", "html", "a\nb\n" ],
28620 [ "#h2", "html", "a\nb\n" ],
28621 [ "#c1", "html", "a\nb\n" ],
28622 [ "#c2", "html", "<p>a</p>" ],
28623 [ "#c3", "html", "<p>a</p>" ],
28624 [ "#c4", "html", "edit-me<p>a</p>" ]
28629 ! id="h1" |edit-me!!1
28631 ! id="h2" |edit-me||2
28633 | id="c1" |edit-me||3
28635 | id="c2" |edit-me||4
28637 | id="c3" |edit-me||p||q||r
28639 | id="c4" |edit-me||p||q||r
28668 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28673 <td id='mwAc'>foo</td>
28674 <td id='serialize-this'>bar</td>
28679 | id="serialize-this" |bar
28684 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28688 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28690 <div id="hello">ok</div>
28697 "modes": ["wt2wt"],
28699 [ "#xyz", "before", "<b>before</b> stuff " ],
28700 [ "#xyz", "after", " stuff <i>after</i>" ],
28701 [ "#xyz", "html", "x <b>y</b> z" ]
28705 <span id="xyz">hello</span>
28707 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28711 Never serialize a-tag as html, regardless of what data-parsoid has to say
28713 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28715 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28720 ## SSS FIXME: This is broken output nevertheless.
28721 ## What might be a reasonable non-broken output for this?
28722 ## This is an edge case unlikely to be seen in production
28723 ## that I am not wasting more time on this right now.
28725 Never serialize a-tag as html, no matter what attributes it has
28727 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28729 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28731 [http://boo.org http://boohoo.org]
28734 # Misnested is an indication that selser can reuse the source but these have
28735 # shown to sneak through on occasion. See T101768.
28736 # The original wikitext here is: [http://test.com [[one]] two three]
28738 Strip span tags added to mark misnested links
28742 <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>
28744 [http://test.com][[one]] two three
28748 Catch regression when unpacking misnested links
28752 {{echo|hi}}[http://example.com [[ho]]]
28754 <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" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
28758 Catch regression when unpacking with trailing content
28760 {{echo|Foo <references/> bar}}
28762 <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>
28766 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28770 <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|}"]}'>
28782 ## This test verifies the presence and computation of this attribute indirectly
28783 ## by making an edit and ensuring that the serialization is correct (which it would be
28784 ## only if firstWikitextNode is properly set).
28786 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28789 "modes": ["wt2wt"],
28791 [ "div#x", "remove" ],
28792 [ "div", "before", "<div>new</div>" ]
28796 <div id="x">foo</div>
28798 {{echo|<div>boo</div>
28806 {{echo|<div>boo</div>
28812 # --------------------------------------------
28813 # Tests spec'ing wikitext serialization norms |
28814 # --------------------------------------------
28817 Serialize multi-line indent-pre starting with wikitext syntax
28831 1. Categories should always be serialized on their own line
28835 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28843 2. Categories that are part of templates should not introduce a line break
28845 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28847 <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>
28850 # Careful while editing these next 2 tests. There are \u200f characters
28851 # before and after the <link> tags in the HTML and following some
28852 # of the categories in wikitext
28853 # Do not remove these characters in edits.
28855 # As part of the serialization, these Unicode directional formatting characters will get stripped.
28857 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28860 "modes": ["html2wt"],
28861 "scrubWikitext": true
28864 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28865 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28868 [[קטגוריה: שיטות משפט]]
28872 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28875 "modes": ["html2wt"],
28876 "scrubWikitext": true
28879 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28886 Lists: Add space after bullets
28893 <li><span> baz</span></li>
28898 * <span> baz</span>
28902 1. Headings: Add space before/after == (T53744)
28909 <h2><span> baz</span></h2>
28917 == <span> baz</span> ==
28921 2. Headings: Add space before/after == even after hoisted content
28924 "modes": ["html2wt"],
28925 "scrubWikitext": true
28928 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28936 1. Headings: suppress newly created empty headings
28939 "modes": ["html2wt"],
28940 "scrubWikitext": true
28948 2. Headings: don't suppress empty headings if scrubWikitext is false
28958 3. Headings: suppress empty headings on edits
28961 "modes": ["selser"],
28962 "scrubWikitext": true,
28968 ==<span id="x">foo</span>==
28973 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28976 "modes": ["html2wt"],
28977 "scrubWikitext": true
28980 <h2>foo<br/>bar</h2>
28981 <h2>foo <span><br/>bar</span> baz</h2>
28985 == foo <span> bar</span> baz ==
28989 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28992 "modes": ["html2wt"],
28993 "scrubWikitext": false
28996 <h2>foo<br/>bar</h2>
28998 == foo<br /> bar ==
29002 1. WT Quote Tags: suppress newly created empty style tags
29005 "modes": ["html2wt"],
29006 "scrubWikitext": true
29014 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29020 ''<nowiki/>'''''<nowiki/>'''
29024 3. WT Quote Tags: suppress empty style tags on edits
29027 "modes": ["selser"],
29028 "scrubWikitext": true,
29034 '''<span id="x">foo</span>'''
29039 1. Anchors: suppress newly created empty anchors
29042 "modes": ["html2wt"],
29043 "scrubWikitext": true
29046 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29051 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29054 "modes": ["html2wt"],
29055 "scrubWikitext": false
29058 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29064 3. Anchors: suppress empty anchors on edits
29067 "modes": ["selser"],
29068 "scrubWikitext": true,
29074 [[Test|<span id="x">foo</span>]]
29079 3a. Anchors: do not suppress numbered extlinks
29082 "modes": ["wt2wt"],
29083 "scrubWikitext": true
29088 <a rel="mw:ExtLink" href="http://foo.com"></a>
29092 3b. Anchors: do not suppress numbered extlinks
29095 "modes": ["wt2wt"],
29096 "scrubWikitext": true,
29102 [http://foo.com <span id="x">foo</span>]
29108 Normalizations should be restricted to edited content
29111 "modes": ["selser"],
29112 "scrubWikitext": true,
29114 [ "h1", "before", "<i></i>"]
29128 1. Multiple normalizations (html2wt)
29131 "modes": ["html2wt"],
29132 "scrubWikitext": true
29136 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29137 </a><b><i></i></b>x</p>
29146 2. Multiple normalizations (selser)
29149 "modes": ["selser"],
29150 "scrubWikitext": true,
29152 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29156 <span id="x">foo</span>
29158 <span id="x">foo</span>
29164 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29167 "modes": ["html2wt"],
29168 "scrubWikitext": true
29180 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29187 <nowiki> </nowiki>hi
29189 <nowiki> </nowiki> hello
29193 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29196 "modes": ["html2wt"],
29197 "scrubWikitext": true
29206 baz bang</td></tr></table>
29212 bar<span>boo</span></p>
29228 bar<span>boo</span>
29232 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29235 "modes": ["selser"],
29236 "scrubWikitext": true,
29238 [ "p", "html", " a\n b" ]
29249 1. New links that end in spaces
29252 "modes": ["html2wt"],
29253 "scrubWikitext": false
29256 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29257 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29258 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29260 [[Berlin ]]<nowiki/>is the capital of Germany.
29264 [[Boston ]] is a city.
29268 2. New links that end in spaces
29271 "modes": ["html2wt"],
29272 "scrubWikitext": true
29275 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29276 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29277 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29279 [[Berlin]] is the capital of Germany.
29283 [[Boston]] is a city.
29287 1. Table cells with escapable prefixes
29290 "modes": ["html2wt"],
29291 "scrubWikitext": false
29295 <tr><td>a</td></tr>
29296 <tr><td>-</td></tr>
29297 <tr><td>+</td></tr>
29303 |<nowiki>-</nowiki>
29305 |<nowiki>+</nowiki>
29310 2. Table cells with escapable prefixes
29313 "modes": ["html2wt"],
29314 "scrubWikitext": true
29318 <tr><td>a</td></tr>
29319 <tr><td>-</td></tr>
29320 <tr><td>+</td></tr>
29333 3a. Table cells with escapable prefixes after edits
29336 "modes": ["selser"],
29337 "scrubWikitext": true,
29339 [ "table tbody tr:first-child td:first-child", "remove"]
29353 3b. Table cells with escapable prefixes after edits
29356 "modes": ["selser"],
29357 "scrubWikitext": true,
29359 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29366 |<span id="x">foo</span>+
29375 # FIXME: This test will fail because
29376 # normalization doesn't realize that the id attribute
29377 # will eliminate the escapable scenario
29379 4a. Table cells without escapable prefixes after edits
29382 "modes": ["selser"],
29383 "scrubWikitext": true,
29385 [ "#x", "html", "-" ]
29398 ## This tests normalizer's ability to discriminate between
29399 ## cells having identical content.
29401 4b. Table cells without escapable prefixes after edits
29404 "modes": ["selser"],
29405 "scrubWikitext": true,
29407 [ "td", "html", "-" ]
29420 ## This tests normalizer's ability to not be tripped by
29421 ## comments (and whitespace)
29423 4c. Table cells without escapable prefixes after edits
29426 "modes": ["selser"],
29427 "scrubWikitext": true,
29429 [ "table tbody tr td:first-child", "remove" ]
29444 ## This tests normalizer's ability to handle HTML cells
29446 4d. Table cells without escapable prefixes after edits
29449 "modes": ["selser"],
29450 "scrubWikitext": true,
29452 [ "td", "html", "-" ]
29457 <tr><td>a</td></tr>
29461 <tr><td>-</td></tr>
29465 ## T111151 Remove font elements without attributes
29467 5a. font tags without attributes should be dropped in scrubWikitext mode
29470 "modes": ["html2wt"],
29471 "scrubWikitext": true
29475 <font><font>bar</font></font>
29476 <font class="x">boo</font>
29480 <font class="x">boo</font>
29484 5b. font tags should not be dropped without scrubWikitext being enabled
29487 "modes": ["html2wt"],
29488 "scrubWikitext": false
29497 Escape nowiki DOM elements
29501 <nowiki><i>foo</i></nowiki>
29503 <nowiki>''foo''</nowiki>
29506 # This is meant to be an interim fix while we go about figuring out
29507 # how to not introduce these trailing <nowiki/>s in the first place.
29509 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29513 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29515 <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>
29516 <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>
29530 New list is serialized on newlines
29534 <p>The quick brown fox jumps over the lazy dog.</p><ul>
29538 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
29540 The quick brown fox jumps over the lazy dog.
29546 The quick onyx goblin jumps over the lazy dwarf.
29550 New lists in formatting elements serialized w/o newlines
29562 <small><ul><li>hi</li></ul></small>
29574 New list in table doesn't need newlines
29578 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
29587 # ---------------------------------------------------
29588 # End of tests spec'ing wikitext serialization norms |
29589 # ---------------------------------------------------
29593 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29601 <td><b>c</b><p>d</p></td>
29620 Anchor without href scenarios
29622 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29625 <a class="no">dice</a>
29630 <span name="foo"></span>
29634 New transclusion added after a list should be serialized after the list
29638 <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>
29644 # -----------------------------------------------------------------
29645 # End of section for Parsoid-only html2wt tests for serialization
29647 # -----------------------------------------------------------------
29649 # -----------------------------------------------------------------
29650 # The following section of tests are primarily to spec behavior of
29651 # the selective serializer. All these tests have manual selser
29652 # changes. The automated selser changes for all tests handle the
29653 # wide variation of changes, but these tests here capture specs
29654 # deterministically.
29655 # ----------------------------------------------------------------
29659 Selser: New comments should not be lost
29662 "modes": ["selser"],
29664 [ "#a", "after", "<!--c1-->" ],
29665 [ "#b", "before", "<!--c2-->" ]
29669 <span id="a">a</span>
29671 <span id="b">b</span>
29673 <span id="a">a</span><!--c1-->
29675 <!--c2--><span id="b">b</span>
29680 Selser: Check for validity of DSR before using it
29683 "modes": ["selser"],
29685 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29689 <span id="a">a</span>
29691 {{DISPLAYTITLE:foo}}
29692 <span id="a">a</span>
29696 1. DOMDiff: Changes to <ref> content should be looked up using id
29699 "modes": ["selser"],
29701 ["#X", "after", "bar"],
29702 ["#Y", "after", "baz"]
29706 X <ref><span id="X">foo</span></ref>
29709 <ref name="a"><span id="Y">foo</span></ref>
29712 X <ref><span id="X">foo</span>bar</ref>
29715 <ref name="a"><span id="Y">foo</span>baz</ref>
29720 2. DOMDiff: Changes to <ref> content should be looked up using id
29723 "modes": ["selser"],
29725 ["#Z", "after", "bar"]
29729 A <ref>foo bar for a</ref>
29730 B <ref group="X" name="b" />
29734 <references group="X">
29735 <ref name="b"><span id="Z">foo</span></ref>
29738 A <ref>foo bar for a</ref>
29739 B <ref group="X" name="b" />
29743 <references group="X">
29744 <ref name="b"><span id="Z">foo</span>bar</ref>
29749 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29752 "modes": ["selser"],
29754 [ "div:first-child", "text", "bar" ]
29758 <div style="{{1x|color:red;}}%">foo</div>
29760 <div style="{{1x|color:red;}}%">bar</div>
29772 <li class="mw-empty-elt"></li>
29773 <li class="mw-empty-elt"></li>
29780 [[File:Thumb.png|thumb]]
29782 <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>
29784 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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>
29788 unclosed internal link XSS (T137264)
29790 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29792 <p>[[#<script>alert(1)</script>|
29795 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29799 Validating that <style> isn't eaten by tidy (T167349)
29804 <style>.foo::before { content: "<foo>"; }</style>
29805 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29809 <style>.foo::before { content: "<foo>"; }</style>
29810 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29815 Validating that <style> isn't wrapped in a paragraph (T186965)
29819 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29821 <style>.foo::before { content: "<foo>"; }</style>
29823 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29825 But if it's on a line with other content, let it be wrapped.
29827 <style>.foo::before { content: "<foo>"; }</style> bar
29829 foo <style>.foo::before { content: "<foo>"; }</style>
29831 foo <style>.foo::before { content: "<foo>"; }</style> bar
29833 And the same if we have non-paragraph-breaking whitespace
29836 <style>.foo::before { content: "<foo>"; }</style>
29839 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29841 <style>.foo::before { content: "<foo>"; }</style>
29842 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29843 <p>But if it's on a line with other content, let it be wrapped.
29844 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
29845 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
29846 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
29847 </p><p>And the same if we have non-paragraph-breaking whitespace
29849 <style>.foo::before { content: "<foo>"; }</style>
29855 Validating that <link> isn't wrapped in a paragraph (T186965)
29859 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29861 <link rel="foo" href="bar"/>
29863 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29865 But if it's on a line with other content, let it be wrapped.
29867 <link rel="foo" href="bar"/> bar
29869 foo <link rel="foo" href="bar"/>
29871 foo <link rel="foo" href="bar"/> bar
29873 And the same if we have non-paragraph-breaking whitespace
29876 <link rel="foo" href="bar"/>
29879 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29881 <link rel="foo" href="bar"/>
29882 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29883 <p>But if it's on a line with other content, let it be wrapped.
29884 </p><p><link rel="foo" href="bar"/> bar
29885 </p><p>foo <link rel="foo" href="bar"/>
29886 </p><p>foo <link rel="foo" href="bar"/> bar
29887 </p><p>And the same if we have non-paragraph-breaking whitespace
29889 <link rel="foo" href="bar"/>
29895 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29897 wgFragmentMode=[ 'html5', 'legacy' ]
29899 ==A&B&C&amp;D&amp;amp;E==
29900 [[#A&B&C&amp;D&amp;amp;E]]
29902 <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>
29903 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29906 <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>
29907 <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>
29911 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29913 wgFragmentMode=[ 'legacy' ]
29915 ==A&B&C&amp;D&amp;amp;E==
29916 [[#A&B&C&amp;D&amp;amp;E]]
29918 <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>
29919 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29924 Decoding of HTML entities in embedded HTML tags
29926 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29928 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29931 <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>
29935 Decoding of HTML entities in indicator names for IDs (T104196)
29937 parsoid=wt2html,html2html
29940 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29942 1&2&3&4&amp;5=Indicator
29945 <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>
29948 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29950 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29954 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29956 1&2&3&4&amp;5=Indicator
29959 <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>
29962 # This fragment mode is what Parsoid supports.
29964 HTML5 ids: fallback to legacy
29966 wgFragmentMode=[ 'html5', 'legacy' ]
29978 ==Hey < # " > % : '==
29979 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29981 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29983 <!-- These two links should produce identical HTML -->
29984 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29987 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29989 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29990 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29991 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29992 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29993 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29994 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29998 <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>
29999 <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>
30000 <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>
30001 <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>
30002 <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>
30003 <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>
30004 <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>
30005 </p><p>💩 <span id="💩"></span>
30006 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30009 <h2 id="Foo_bar">Foo bar</h2>
30011 <h2 id="foo_Bar_2">foo Bar</h2>
30013 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30015 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30017 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30019 <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>
30020 <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>
30022 <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\":[178,197,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:💩\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>💩</span>"}]]}'></span></p>
30024 <!-- These two links should produce identical HTML -->
30025 <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>
30028 # Parsoid doesn't support this mode
30030 HTML5 ids: legacy with a fallback to modern
30032 wgFragmentMode=[ 'legacy', 'html5' ]
30044 ==Hey < # " > % : '==
30045 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30047 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30049 <!-- These two links should produce identical HTML -->
30050 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30053 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30055 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30056 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30057 <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>
30058 <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>
30059 <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>
30060 <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>
30064 <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>
30065 <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>
30066 <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>
30067 <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>
30068 <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>
30069 <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>
30070 <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>
30071 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30072 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30076 # Parsoid doesn't support this mode.
30078 HTML5 ids: no legacy
30080 wgFragmentMode=[ 'html5' ]
30092 ==Hey < # " > % : '==
30093 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30095 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30097 <!-- These two links should produce identical HTML -->
30098 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30101 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30103 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30104 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30105 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30106 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30107 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30108 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30112 <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>
30113 <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>
30114 <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>
30115 <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>
30116 <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>
30117 <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>
30118 <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>
30119 </p><p>💩 <span id="💩"></span>
30120 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30125 T90902: Normalize weird characters in section IDs
30127 wgFragmentMode=[ 'html5', 'legacy' ]
30133 <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>
30134 <p><a href="#Foo_bar">#Foo bar</a>
30137 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30138 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
30142 T51672: Test for brackets in attributes of elements in external link texts
30144 [http://example.com/ link <span title="title with [brackets]">span</span>]
30145 [http://example.com/ link <span title="title with [brackets]">span</span>]
30148 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30149 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30152 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30153 <a rel="mw:ExtLink" class="external text" 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>
30157 T72875: Test for brackets in attributes of elements in internal link texts
30159 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30160 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30163 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30164 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30167 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30168 <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>
30172 T179544: {{anchorencode:}} output should be always usable in links
30174 wgFragmentMode=[ 'html5' ]
30176 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30178 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30181 <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>
30184 ## ------------------------------
30185 ## Parsoid section-wrapping tests
30186 ## ------------------------------
30188 Section wrapping for well-nested sections (no leading content)
30191 "wrapSections": true
30212 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30215 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30218 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30221 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30224 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30227 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30234 Section wrapping for well-nested sections (with leading content)
30237 "wrapSections": true
30242 Para 2 with a <div>nested in it</div>
30255 <section data-mw-section-id="0"><p>Para 1.</p>
30257 <p>Para 2 with a </p><div>nested in it</div>
30261 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30264 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30267 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30270 </section></section>
30274 Section wrapping with template-generated sections (good nesting 1)
30277 "wrapSections": true
30294 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30297 <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">
30298 </span><p about="#mwt1">b</p>
30299 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30302 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30306 # In this example, the template scope is mildly expanded to incorporate the
30307 # trailing newline after the transclusion since that is part of section 1.1.1
30309 Section wrapping with template-generated sections (good nesting 2)
30312 "wrapSections": true,
30313 "modes": ["wt2html", "wt2wt"]
30328 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30331 <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">
30332 </span><p about="#mwt1">b</p><span about="#mwt1">
30333 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30334 </span><p about="#mwt1">d</p><span about="#mwt1">
30335 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30339 # In this example, the template scope is mildly expanded to incorporate the
30340 # trailing newline after the transclusion since that is part of section 1.2.1
30342 Section wrapping with template-generated sections (good nesting 3)
30345 "wrapSections": true,
30346 "modes": ["wt2html", "wt2wt"]
30364 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30367 <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">
30368 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30369 </span><p about="#mwt1">b</p><span about="#mwt1">
30370 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30371 </span><p about="#mwt1">c</p><span about="#mwt1">
30372 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30373 </span><p about="#mwt1">d</p><span about="#mwt1">
30374 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30378 # Because of section-wrapping and template-wrapping interactions,
30379 # the scope of the template is expanded so that the template markup
30380 # is valid in the presence of <section> tags.
30381 # This exercises the s1 is null scenario in the wrapSections code
30383 Section wrapping with template-generated sections (bad nesting 1)
30386 "wrapSections": true
30400 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30403 <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"]}'>
30404 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30405 </span><p about="#mwt1">b
30406 </p><span about="#mwt1">
30408 </span><p about="#mwt1">c</p><span about="#mwt1">
30409 </span></section></div></section>
30412 # Because of section-wrapping and template-wrapping interactions,
30413 # the scope of the template is expanded so that the template markup
30414 # is valid in the presence of <section> tags.
30415 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30417 Section wrapping with template-generated sections (bad nesting 2)
30420 "wrapSections": true
30438 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30441 </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">
30442 </span><p about="#mwt1">b</p><span about="#mwt1">
30443 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30444 </span><p about="#mwt1">c</p><span about="#mwt1">
30446 </span><p about="#mwt1">d</p><span about="#mwt1">
30448 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30452 # Because of section-wrapping and template-wrapping interactions,
30453 # additional template wrappers are added to <section> tags
30454 # so that template wrapping semantics are valid whether section
30455 # tags are retained or stripped. But, the template scope can expand
30456 # greatly when accounting for section tags.
30457 # This exercises the s1 and s2 are in different subtrees scenario
30459 Section wrapping with template-generated sections (bad nesting 3)
30462 "wrapSections": true,
30463 "modes": ["wt2html", "wt2wt"]
30481 <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>
30484 <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">
30485 </span><p about="#mwt1">b</p><span about="#mwt1">
30486 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30487 </span><p about="#mwt1">c</p>
30490 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30495 Section wrapping with uneditable lead section + div wrapping multiple sections
30498 "wrapSections": true
30503 <div style="border:1px solid red;">
30520 <section data-mw-section-id="-1"><p>foo</p>
30522 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30523 <section data-mw-section-id="1"><h1 id="1">1</h1>
30526 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30529 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30533 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30536 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30538 </section></section>
30542 Section wrapping with editable lead section + div overlapping multiple sections
30545 "wrapSections": true
30552 <div style="border:1px solid red;">
30569 <section data-mw-section-id="0"><p>foo</p>
30571 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
30573 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30576 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30579 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30584 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30587 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30589 </section></section>
30593 HTML header tags should not be wrapped in section tags
30596 "wrapSections": true
30609 <section data-mw-section-id="0"><p>foo</p>
30611 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30613 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
30615 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30617 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
30621 Lead section containing only whitespace and comments.
30624 "wrapSections": true
30628 <!-- this is a comment, presumably significant to editors -->
30635 <section data-mw-section-id="0" data-parsoid="{}">
30636 <!-- this is a comment, presumably significant to editors -->
30637 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30640 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30645 Pseudo-sections emitted by templates should have id -2
30648 "wrapSections": true
30658 <section data-mw-section-id="-1"><p>foo</p>
30659 </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}}]}'>
30660 <section data-mw-section-id="-1"><h2 id="a">a</h2>
30661 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
30662 </section></div><span about="#mwt1">
30666 ##########################################################################
30667 Tests demonstrating white-space insensitivity in input wikitext
30668 for wikitext headings, wikitext list items, and wikitext table captions,
30669 headings, and cells. HTML versions of the same should preserve whitespace.
30670 ##########################################################################
30672 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
30675 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
30676 == <!--c2--> <!--c2--> Tabs <!--c3--><!--c4--> ==
30677 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
30678 ; <!--term to define--> term : <!--term's definition--> definition
30680 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
30682 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
30684 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30686 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
30688 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
30691 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30694 <h2><span class="mw-headline" id="Spaces">Spaces</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: Spaces">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
30695 <h2><span class="mw-headline" id="Tabs">Tabs</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: Tabs">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
30696 <ul><li>List item</li></ul>
30697 <dl><dt>term </dt>
30698 <dd>definition</dd></dl>
30700 <caption>Table Caption
30703 <th>Table Heading 1</th>
30704 <th>Table Heading 2
30707 <td>Table Cell 1</td>
30711 <td>class="foo"</td>
30715 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
30716 </td></tr></tbody></table>
30719 <td>Table Cell 1</td>
30721 </td></tr></tbody></table> foo</dd></dl>
30724 # Looks like <caption> is not accepted in HTML
30726 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
30729 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
30730 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
30732 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
30733 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
30736 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
30737 <ul><li> List item </li></ul>
30739 <tbody><tr><th> Table Heading </th><th></th></tr>
30740 <tr><td> Table Cell </td><th></th></tr>
30745 Do not trim whitespace in links and quotes
30747 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
30748 [[Foo| some text ]]
30750 <p>foo <i> italic </i> and <b> bold </b>
30751 <a href="/wiki/Foo" title="Foo"> some text </a>
30756 Remove p tags surrounding a single element in a figcaption
30760 [[File:Foobar.jpg|right|200x200px|Caption]]
30762 <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><p>Caption</p></figcaption></figure>
30766 Selser preserves lack of newline before list and allows newline after the list
30769 "modes": ["selser"],
30770 "scrubWikitext": true,
30772 [ "ul", "after", "<p>footer</p>" ]
30789 Selser does not introduce newlines between unedited paragraph preceding the list
30792 "modes": ["selser"],
30794 [ "table tbody tr td p:last-child", "empty" ]
30816 Selser does not introduce newlines between unedited paragraph following the list
30819 "modes": ["selser"],
30821 [ "table tbody tr td p:first-child", "empty" ]
30843 Remove a list item but do not insert newline above list
30846 "modes": ["selser"],
30848 [ "ul li:last-child", "remove" ]
30863 Check soft hyphens as entities (­) in displaytitle (T66528)
30866 title=[[Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon]]
30868 {{DISPLAYTITLE:Lopado­temacho­selacho­galeo­kranio­leipsano­drim­hypo­trimmato­silphio­parao­melito­katakechy­meno­kichl­epi­kossypho­phatto­perister­alektryon­opte­kephallio­kigklo­peleio­lagoio­siraio­baphe­tragano­pterygon}}
30870 Lopado­temacho­selacho­galeo­kranio­leipsano­drim­hypo­trimmato­silphio­parao­melito­katakechy­meno­kichl­epi­kossypho­phatto­perister­alektryon­opte­kephallio­kigklo­peleio­lagoio­siraio­baphe­tragano­pterygon
30875 Check soft hyphens as Unicode characters (U+00AD) in displaytitle (T66528)
30878 title=[[Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon]]
30880 {{DISPLAYTITLE:Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon}}
30882 Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon