1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
83 MediaWiki:bad image list
85 * [[File:Bad.jpg]] except [[Nasty page]]
112 // For Serbian; localize Template namespace
120 Template:echo_with_span
126 Template:echo_with_div
139 Template:table_attribs
142 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_2
149 |</noinclude>style="color:red;"|Foo
154 Template:table_attribs_3
157 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
161 Template:table_attribs_4
163 | style="background-color:#DC241f;" width="10px" |
167 Template:table_attribs_5
170 |</noinclude>style="color:red;"||Bar
174 Template:table_attribs_6
176 style="background: <nowiki>
183 Template:table_attribs_7
186 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
190 Template:table_header_cells
192 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
198 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
202 Template:PartialTable
209 Template:image_attribs
212 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
215 ## See T48811 for details
217 Template:mixed_attr_content_template
219 style="color:red;" title="T48811"
225 Template:definition_list
272 Template:EmptyTRWithHTMLAttrTest
275 <tr align="center"></tr>
276 <tr><td>foo</td></tr>
277 <tr align="center"></tr>
278 <tr><td>bar</td></tr>
301 This is a simple paragraph.
303 <p>This is a simple paragraph.
308 Paragraphs with extra newline spacing
331 Paragraphs with newline spacing with comment lines in between
339 <!--foo--><!--More than 1 comment, still stripped-->
343 <!--foo--> <!----> <!-- bar -->
404 Paragraphs with newline spacing with non-empty white-space lines in between
431 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
439 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
478 Extra newlines: More paragraphs with indented comment
493 Extra newlines followed by heading
508 <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>
509 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
512 <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>
517 Extra newlines between heading and content are swallowed
525 <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>
526 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
531 Heading with line break in nowiki
535 wgFragmentMode=[ 'html5', 'legacy' ]
540 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
542 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>
546 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
553 http://fr.wikipedia.org/wiki/🍺
554 <!-- EasterEgg we love beer, better be able be able to link to it -->
556 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
575 *plain''italic''plain
576 *plain''italic''plain''italic''plain
577 *plain'''bold'''plain
578 *plain'''bold'''plain'''bold'''plain
579 *plain''italic''plain'''bold'''plain
580 *plain'''bold'''plain''italic''plain
581 *plain''italic'''bold-italic'''italic''plain
582 *plain'''bold''bold-italic''bold'''plain
583 *plain'''''bold-italic'''italic''plain
584 *plain'''''bold-italic''bold'''plain
585 *plain''italic'''bold-italic'''''plain
586 *plain'''bold''bold-italic'''''plain
587 *plain l'''italic''plain
588 *plain l''''bold''' plain
591 <li>plain<i>italic</i>plain</li>
592 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
593 <li>plain<b>bold</b>plain</li>
594 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
595 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
596 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
597 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
598 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
599 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
600 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
601 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
602 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
603 <li>plain l'<i>italic</i>plain</li>
604 <li>plain l'<b>bold</b> plain</li></ul>
608 # this example taken from the [[simple:Moon]] article (T49326)
610 Italics and possessives (1)
612 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
614 <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
618 # this example taken from [[en:Flaming Pie]] (T51926)
620 Italics and possessives (2)
622 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
624 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
628 # this example taken from [[en:Dictionary]] (T51926)
630 Italics and possessives (3)
632 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''.
634 <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>.
640 ### 2-quote opening sequence tests
643 Italics and bold: 2-quote opening sequence: (2,2)
652 Italics and bold: 2-quote opening sequence: (2,3)
661 Italics and bold: 2-quote opening sequence: (2,4)
671 # same html as previous, but wikitext adjusted to match parsoid html2wt
673 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
675 ''foo<nowiki>''</nowiki>''
681 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
683 Italics and bold: 2-quote opening sequence: (2,5)
696 # same html as previous, but wikitext adjusted to match parsoid html2wt
698 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
700 ''foo'''''<nowiki/>'''
711 ### 3-quote opening sequence tests
715 Italics and bold: 3-quote opening sequence: (3,2)
724 Italics and bold: 3-quote opening sequence: (3,3)
733 Italics and bold: 3-quote opening sequence: (3,4)
741 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
743 Italics and bold: 3-quote opening sequence: (3,5)
756 # same html as previous, but wikitext adjusted to match parsoid html2wt
758 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
760 '''foo'''''<nowiki/>''
771 ### 4-quote opening sequence tests
775 Italics and bold: 4-quote opening sequence: (4,2)
785 # same html as previous, but wikitext adjusted to match parsoid html2wt
787 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
789 <nowiki>''</nowiki>''foo''
796 Italics and bold: 4-quote opening sequence: (4,3)
805 Italics and bold: 4-quote opening sequence: (4,4)
815 # same html as previous, but wikitext adjusted to match parsoid html2wt
817 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
825 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
827 Italics and bold: 4-quote opening sequence: (4,5)
836 <p>'<b>foo</b><i></i>
840 # same html as previous, but wikitext adjusted to match parsoid html2wt
842 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
844 '<nowiki/>'''foo'''''<nowiki/>''
849 <p>'<b>foo</b><i></i>
855 ### 5-quote opening sequence tests
859 Italics and bold: 5-quote opening sequence: (5,2)
869 # same html as previous, but wikitext adjusted to match parsoid html2wt
871 Italics and bold: 5-quote opening sequence: (5,2+3)
880 Italics and bold: 5-quote opening sequence: (5,3)
890 # same html as previous, but wikitext adjusted to match parsoid html2wt
892 Italics and bold: 5-quote opening sequence: (5,3+2)
901 Italics and bold: 5-quote opening sequence: (5,4)
907 <p><i><b>foo'</b></i>
912 Italics and bold: 5-quote opening sequence: (5,5)
921 Italics and bold: 5-quote opening sequence: (5,6)
925 <p><i><b>foo'</b></i>
930 ### multiple quote sequences in a line
934 Italics and bold: multiple quote sequences: (2,4,2)
940 <p><i>foo'<b>bar</b></i>
944 # same html as previous, but wikitext adjusted to match parsoid html2wt
946 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
948 ''foo'<nowiki/>'''bar'''''
950 <p><i>foo'<b>bar</b></i>
955 Italics and bold: multiple quote sequences: (2,4,3)
961 <p><i>foo'<b>bar</b></i>
965 # same html as previous, but wikitext adjusted to match parsoid html2wt
967 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
969 ''foo'<nowiki/>'''bar'''''
971 <p><i>foo'<b>bar</b></i>
976 Italics and bold: multiple quote sequences: (2,4,4)
982 <p><i>foo'<b>bar'</b></i>
986 # same html as previous, but wikitext adjusted to match parsoid html2wt
988 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
990 ''foo'<nowiki/>'''bar'<nowiki/>'''''
992 <p><i>foo'<b>bar'</b></i>
996 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
998 Italics and bold: multiple quote sequences: (3,4,2)
1007 <p><b>foo'</b>bar<i></i>
1011 # same html as previous, but wikitext adjusted to match parsoid html2wt
1013 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1015 '''foo''''bar''<nowiki/>''
1020 <p><b>foo'</b>bar<i></i>
1024 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1026 Italics and bold: multiple quote sequences: (3,4,3)
1035 <p><b>foo'</b>bar<b></b>
1039 # same html as previous, but wikitext adjusted to match parsoid html2wt
1041 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1043 '''foo''''bar'''<nowiki/>'''
1048 <p><b>foo'</b>bar<b></b>
1053 ### other quote tests
1056 Italics and bold: other quote tests: (2,3,5)
1058 ''this is about '''foo's family'''''
1060 <p><i>this is about <b>foo's family</b></i>
1066 Italics and bold: other quote tests: (2,(3,3),2)
1068 ''this is about '''foo's''' family''
1070 <p><i>this is about <b>foo's</b> family</i>
1076 Italics and bold: other quote tests: (3,2,3,2)
1080 '''this is about ''foo'''s family''
1082 <p><b>this is about <i>foo</i></b><i>s family</i>
1087 # same html as previous, but wikitext adjusted to match parsoid html2wt
1089 Italics and bold: other quote tests: (3,2,3+2+2,2)
1091 '''this is about ''foo'''''<nowiki/>''s family''
1093 <p><b>this is about <i>foo</i></b><i>s family</i>
1099 Italics and bold: other quote tests: (3,2,3,3)
1101 '''this is about ''foo'''s family'''
1103 <p>'<i>this is about </i>foo<b>s family</b>
1109 Italics and bold: other quote tests: (3,(2,2),3)
1111 '''this is about ''foo's'' family'''
1113 <p><b>this is about <i>foo's</i> family</b>
1119 Italicized possessive
1121 The ''[[Main Page]]'''s talk page.
1123 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1126 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1130 Quote balancing context should be restricted to td/th cells on the same wikitext line
1132 parsoid=wt2html,wt2wt
1146 </td></tr></tbody></table>
1154 Non-html5 tags should be accepted
1156 <center>''foo''</center>
1158 <font>''foo''</font>
1159 <strike>''foo''</strike>
1162 <center><i>foo</i></center>
1163 <p><big><i>foo</i></big>
1164 <font><i>foo</i></font>
1165 <strike><i>foo</i></strike>
1171 <wbr> is valid wikitext (T54468)
1179 # <strike> is HTML4, <s> is HTML4/5.
1181 <s> or <strike> for strikethrough
1183 <strike>strike</strike>
1187 <p><strike>strike</strike>
1195 Text-level semantic html elements in wikitext
1198 <strong>text</strong>
1214 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1221 <strong>text</strong>
1237 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1245 # test cases taken from
1246 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1248 Ruby markup (W3C-style)
1250 ;Mono-ruby for individual base characters
1251 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1253 :<ruby>今日<rt>きょう</rt></ruby>
1255 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1257 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1259 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1262 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1263 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1264 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1267 <dl><dt>Mono-ruby for individual base characters</dt>
1268 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1270 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1271 <dt>Jukugo ruby</dt>
1272 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1273 <dt>Inline ruby</dt>
1274 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1275 <dt>Double-sided ruby</dt>
1276 <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>
1278 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1279 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1280 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1285 # The next two test different paths in the sanitizer.
1287 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1289 <blockquote|>a</blockquote>
1291 <b→> doesn't terminate </b→>
1293 <bä> doesn't terminate </bä>
1295 <boo> doesn't terminate </boo>
1297 <s.foo> doesn't terminate </s.foo>
1301 <p><blockquote|>a</blockquote>
1302 </p><p><b→> doesn't terminate </b→>
1303 </p><p><bä> doesn't terminate </bä>
1304 </p><p><boo> doesn't terminate </boo>
1305 </p><p><s.foo> doesn't terminate </s.foo>
1306 </p><p><sub-ID#1>
1311 Non-word characters don't terminate tag names
1313 <blockquote|>a</blockquote>
1315 <b→> doesn't terminate </b→>
1317 <bä> doesn't terminate </bä>
1319 <boo> doesn't terminate </boo>
1321 <s.foo> doesn't terminate </s.foo>
1325 <p><blockquote|>a
1326 </p><p><b→> doesn't terminate </b→>
1327 </p><p><bä> doesn't terminate </bä>
1328 </p><p><boo> doesn't terminate </boo>
1329 </p><p><s.foo> doesn't terminate </s.foo>
1330 </p><p><sub-ID#1>
1335 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1336 ### This checks that HTML5 tags (with non-word characters in the tag
1337 ### name) make it safely through the parser -- the Sanitizer will
1338 ### munge them later, as it should.
1341 Non-word characters are valid in extension tags (T19663)
1352 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1356 Isolated close tags should be treated as literal text (T54760)
1364 <p class="mw-empty-elt">
1365 </p><p><s.foo>s
1368 <p><s.foo>s</p>
1372 ### Special characters
1376 Bare pipe character (T54363)
1385 Bare pipe character from a template (T54363)
1394 ### <nowiki> test cases
1398 <nowiki> unordered list
1400 <nowiki>* This is not an unordered list item.</nowiki>
1402 <p>* This is not an unordered list item.
1405 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1411 <nowiki>Lorem ipsum dolor
1419 <p>Lorem ipsum dolor
1428 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1438 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1440 <nowiki><span class="error"></nowiki>
1442 <p><span class="error">
1445 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1451 :There is not nowiki.
1452 :There is <nowiki>nowiki</nowiki>.
1454 #There is not nowiki.
1455 #There is <nowiki>nowiki</nowiki>.
1457 *There is not nowiki.
1458 *There is <nowiki>nowiki</nowiki>.
1460 <dl><dd>There is not nowiki.</dd>
1461 <dd>There is nowiki.</dd></dl>
1462 <ol><li>There is not nowiki.</li>
1463 <li>There is nowiki.</li></ol>
1464 <ul><li>There is not nowiki.</li>
1465 <li>There is nowiki.</li></ul>
1468 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1469 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1471 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1472 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1474 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1475 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1479 Entities inside <nowiki>
1481 <nowiki><</nowiki>
1486 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1490 Entities inside template parameters
1497 <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>
1501 Properly escape nowiki when combined with other wiki markup
1505 <p>* </nowiki> tag</p>
1507 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1511 T93824: Put escaped HTML tags inside nowiki
1515 <p><h2>foo</h2></p>
1517 <nowiki><h2>foo</h2></nowiki>
1521 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1525 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1526 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1527 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1529 This text: L'[[Foo]]
1530 This text: L<nowiki>''</nowiki>[[Foo]]
1531 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1534 # This test fails because wikitext whitespace is not normalized before comparing.
1536 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1540 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1543 This text : L<nowiki>''</nowiki>[[Foo]]
1546 # This test and the next one are html2wt only as they test that incorrect wikitext
1547 # passed in template arguments gets escaped or wrapped in nowikis where required.
1549 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1553 <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>
1554 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1556 {{echo|foo{{!}}bar}}
1557 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1561 T53961: Output correct nowikis in template arguments
1565 <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>
1566 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1567 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1568 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1569 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1572 {{echo|<nowiki>a }} b</nowiki>}}
1573 {{echo|<nowiki>a [[ b</nowiki>}}
1574 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1575 {{echo|a <nowiki>}</nowiki>}}
1579 Cases where "!!" needs nowiki protection
1584 <tr><th>this needs protection !! here</th></tr>
1588 <tr><th>this does not need
1589 protection !! here</th></tr>
1593 !<nowiki>this needs protection !! here</nowiki>
1606 Comments and Indent-Pre
1608 <!-- comment 1 --> asdf
1610 <!-- comment 1 --> asdf
1613 <!-- comment 1 --> asdf
1614 <!-- comment 2 -->xyz
1616 <!-- comment 1 --> asdf
1617 <!-- comment 2 --> xyz
1673 asdf<!-- comment 1 -->jkl
1683 <!-- foo --> b <!-- bar -->
1697 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1703 Comment semantics and delimiters
1705 <!-- --><!----><!-----><!------>
1709 <!-- --><!----><!-----><!------>
1713 Comment semantics and delimiters, redux
1715 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1716 -- foo -- funky huh? ... -->
1720 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1721 -- foo -- funky huh? ... -->
1725 Comment semantics and delimiters: directors cut
1727 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1728 everything starting with < followed by !-- until the first -- and > we see,
1729 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1735 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1736 everything starting with < followed by !-- until the first -- and > we see,
1737 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1742 Comment semantics: nesting
1744 <!--<!-- no, we're not going to do anything fancy here -->-->
1749 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1752 # Parsoid closes the unclosed comment, even if it means a slight
1755 Comment semantics: unclosed comment at end
1757 parsoid=wt2html,html2html
1759 <!--This comment will run out to the end of the document
1763 <!--This comment will run out to the end of the document-->
1767 Comment semantics: normalize comments to play nice with XML and browsers
1769 <!-- Browsers --!> think this is closed -->
1770 <!--> This would normally be text -->
1771 <!---> As would this -->
1772 <!-- XML doesn't like trailing dashes -------->
1773 <!-- Nor doubled hyphens -- anywhere in the data -->
1774 But this is not a comment.
1776 <p>But this is not a comment.
1779 <!-- Browsers --!> think this is closed -->
1780 <!--> This would normally be text -->
1781 <!---> As would this -->
1782 <!-- XML doesn't like trailing dashes -------->
1783 <!-- Nor doubled hyphens -- anywhere in the data -->
1784 <p>But this is not a comment.</p>
1788 Comment semantics: round-trip even text which contains encoded -->
1790 <!-- hello & goodbye - > --> --&gt; --&xx -->
1792 <!-- hello & goodbye - > --> --&gt; --&xx -->
1796 Comment in template title
1805 Comment on its own line post-expand
1817 Comment on its own line post-expand with non-significant whitespace
1829 Multiple comments should still parse as SOL-transparent
1831 parsoid=wt2html,wt2wt
1834 <!--c2--><!--c3--><!--c4-->*b
1843 <!--c2--><!--c3--><!--c4-->
1849 ## Make sure ">" gets escaped in comments to avoid XSS
1851 IE conditional comments
1854 <script>alert('hi');</script>
1857 <!--[if lt IE 9]>
1858 <script>alert('hi');</script>
1863 ### paragraph wrapping tests
1879 Block tag on one line (<div>)
1889 <p>a </p><div>foo</div>
1894 # Remex wraps empty tag runs with p-tags.
1895 # Parsoid strips them out during p-wrapping.
1897 No p-wrappable content
1899 <span><div>x</div></span>
1900 <span><s><div>x</div></s></span>
1901 <small><em></em></small><span><s><div>x</div></s></span>
1903 <span><div>x</div></span>
1904 <span><s><div>x</div></s></span>
1905 <p><small><em></em></small></p><span><s><div>x</div></s></span>
1907 <span><div>x</div></span>
1908 <span><s><div>x</div></s></span>
1909 <small><em></em></small><span><s><div>x</div></s></span>
1912 # T177612: Parsoid-only test
1914 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
1916 {{echo|<span><div>x</div></span>}}
1919 <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>
1924 Block tag on one line (<blockquote>)
1926 a <blockquote>foo</blockquote>
1930 a <blockquote>foo</blockquote>
1934 <p>a </p><blockquote><p>foo</p></blockquote>
1940 Block tag on both lines (<div>)
1950 <p>a </p><div>foo</div><p>
1951 b </p><div>foo</div>
1955 Block tag on both lines (<blockquote>)
1957 a <blockquote>foo</blockquote>
1959 b <blockquote>foo</blockquote>
1961 a <blockquote>foo</blockquote>
1962 b <blockquote>foo</blockquote>
1965 <p>a </p><blockquote><p>foo</p></blockquote><p>
1966 b </p><blockquote><p>foo</p></blockquote>
1970 Multiple lines without block tags
1991 x </p><div>foo</div><p> z
1995 # The difference between Parsoid & Remex here
1996 # is because of Parsoid's Tidy-emulation code
1997 # for p-wrapping. We'll start work to remove this
1998 # emulation code in Parsoid sooner than later.
1999 # Remex wraps empty tag runs with p-tags.
2000 # Parsoid strips them out in a separate pass.
2002 Empty lines between lines with block tags
2037 </p><div>b</div><p>d
2042 <div data-parsoid='{"stx":"html"}'></div>
2045 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2048 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2050 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2053 <div data-parsoid='{"stx":"html"}'>e</div>
2057 Unclosed HTML p-tags should be handled properly
2064 <div><p>foo</p></div>
2069 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2074 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2075 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2078 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2082 a [[Category:A1]] [[Category:A2]]
2087 <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"/>
2091 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2097 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2101 No paragraph necessary for SOL transparent template
2103 <span><div>foo</div></span>
2106 <span><div>foo</div></span>
2107 {{echo|[[Category:Foo]]}}
2109 <span><div>foo</div></span>
2110 <span><div>foo</div></span>
2113 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2114 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2116 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2117 <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}}]}'/>
2121 Avoid expanding multiline sol transparent template ranges unnecessarily
2139 <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">
2142 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2146 ### Preformatted text
2156 And a [[Main Page|link]]
2162 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2167 Tabs don't trigger preformatted text
2171 This is preformatted text.
2177 <pre>This is preformatted text.
2182 preformatted text.</p>
2183 <pre>This is preformatted text.
2188 Space before tab needs nowiki pre protection
2194 <nowiki> </nowiki> a
2198 Ident preformatting with inline content
2209 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2226 Regression with preformatted in <center>
2240 T54763: Preformatted in <blockquote>
2246 indented cell (no pre-wrapping!)
2256 <p> indented cell (no pre-wrapping!)
2264 T53086: Double newlines in blockquotes should be turned into paragraphs
2281 T17491: <ins>/<del> in blockquote
2284 Foo <del>bar</del> <ins>baz</ins> quux
2288 <p>Foo <del>bar</del> <ins>baz</ins> quux
2295 T17491: <ins>/<del> in blockquote (2)
2297 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2300 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2304 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2309 <pre> with attributes (T5202)
2311 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2313 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2318 <pre> with width attribute (T5202)
2320 <pre width="8">Narrow screen goodies</pre>
2322 <pre width="8">Narrow screen goodies</pre>
2327 <pre> with forbidden attribute (T5202)
2329 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2331 <pre width="8">Narrow screen goodies</pre>
2336 Entities inside <pre>
2345 <pre> with forbidden attribute values (T5202)
2347 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2349 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2354 <nowiki> inside <pre> (T15238)
2362 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2370 <pre><nowiki>Foo</nowiki></pre>
2375 <nowiki> inside of #tag:pre
2377 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2379 <pre>Foo →bar</pre>
2382 <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>
2385 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2386 ## aren't enclosed in nowikis.
2388 <nowiki> and <pre> preference (first one wins)
2419 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2424 <p><span typeof="mw:Nowiki">
2432 </pre> inside nowiki
2434 <nowiki></pre></nowiki>
2441 Empty pre; pre inside other HTML tags (T56946)
2458 <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
2460 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2464 HTML pre followed by indent-pre
2477 <p><pre>foo</pre></p>
2479 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2481 <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>
2485 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2493 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2503 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2515 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2536 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2540 {{echo| foo}}{{echo| bar}}
2545 {{echo|<!--cmt--> foo}}
2547 <!--cmt-->{{echo| foo}}
2549 {{echo|{{echo| }}bar}}
2567 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2603 ## Hmm, should Parsoid rt this?
2605 Pres with newline attributes
2607 parsoid=wt2html,html2html
2612 <pre class="one two">hi</pre>
2615 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2619 Things that look like <pre> tags aren't treated as such
2621 Barack Obama <President> of the United States
2622 <President></President>
2624 <p>Barack Obama <President> of the United States
2625 <President></President>
2630 Handle broken pre-like tags (T66025)
2634 {{echo|<pre <pre>x</pre>}}
2636 <table><pre </table>
2639 <table><pre </table>
2643 <pre <table></table>
2645 <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>
2654 Parsoid: handle pre with space after attribute
2658 <pre style="width:50%;" >{{echo|foo}}</pre>
2660 <pre style="width:50%;">{{echo|foo}}</pre>
2663 <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>
2666 # TODO / maybe: fix wt2wt for this
2668 Parsoid: Don't paragraph-wrap fosterable content
2701 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2705 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2733 #--------------------------------------------------------------------
2734 # Transclusion parameter whitespace stripping tests
2735 # Behavior is different for positional and named parameters
2736 #--------------------------------------------------------------------
2738 Templates: Strip leading and trailing whitespace from named-param values
2742 {{echo|1= {{echo|b}} }}
2760 Templates: Don't strip whitespace from positional-param values
2764 {{echo|{{echo|b}} }}
2804 Templates: Don't recognize targets split by newlines
2820 Templates: Recognize targets when newlines and comments don't split the target
2825 <!--X--> ech<!--X-->o<!--X-->
2833 <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>
2837 Templates: Handle empty comment-and-ws-only lines correctly
2840 <!--should be ignored-->
2841 <!--should be ignored as well-->
2848 <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>
2852 Templates: Handle comments in the target
2855 <!-- should be ignored -->
2859 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2862 {{echo<!-- should be ignored -->
2865 {{echo<!-- should be ignored -->|foo}}
2867 {{<!-- should be ignored -->echo|foo}}
2876 <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>
2878 <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>
2880 <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>
2882 <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>
2884 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2888 Templates: Handle comments in parameter names (T69657)
2891 <!-- should be ignored -->
2895 <!-- should be ignored -->
2898 {{echo|1<!-- should be ignored -->=foo}}
2900 {{echo|<!-- should be ignored -->1=foo}}
2908 <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>
2910 <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>
2912 <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>
2914 <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>
2918 Templates: Other wikitext in parameter names (T69657)
2925 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2929 Templates: With colons
2933 <p>Template with colon
2936 <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>
2939 #--------------------------------------------------------------------
2940 # Transclusion parameter escaping tests
2941 #--------------------------------------------------------------------
2944 Templates: Parsoid parameter escaping test 1
2946 {{echo|[foo]|{{echo|[bar]}}}}
2951 <p about="#mwt1" typeof="mw:Transclusion"
2952 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2956 Parsoid: Pipes in external links in template parameter
2958 {{echo|[{{echo|http://example.com}} link]}}
2960 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
2963 <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>
2967 Parsoid: pipe in transclusion parameter
2969 {{echo|http://foo.com/a|b}}
2971 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
2974 <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>
2978 Parsoid: Pipe in external link target and content in template parameter
2980 parsoid=html2wt,wt2wt
2982 {{echo|[http://foo.com/a|b a|b]}}
2984 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
2987 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2988 typeof="mw:Transclusion"
2989 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2990 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2994 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2998 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3000 <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>
3004 Templates: Don't escape already nowiki-escaped text in template parameters
3006 parsoid=html2wt,wt2wt
3008 {{echo|foo<nowiki>|</nowiki>bar}}
3009 {{echo|<nowiki><div></nowiki>}}
3010 {{echo|<nowiki></nowiki>}}
3017 <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>
3018 <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>
3019 <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>
3025 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3027 parsoid=html2wt,wt2wt
3029 {{echo|{{echo|1=bar}}}}
3034 <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>
3039 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3046 <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>
3051 Templates: Preserve blank parameter names
3058 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3062 Templates: Preserve blank parameter names in other positions
3064 {{blank_param|bar|=foo}}
3070 <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
3075 ### Parsoid-centric tests for testing RT edge cases for pre
3079 1a. Indent-Pre and Comments
3092 1b. Indent-Pre and Comments
3105 1c. Indent-Pre and Comments
3118 1d. Indent-Pre and Comments
3119 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3132 2a. Indent-Pre and tables
3153 2b. Indent-Pre and tables
3169 2c. Indent-Pre and tables (T44252)
3186 2d. Indent-Pre and tables
3203 <tbody><tr><td> b</td></tr>
3208 2e. Indent-Pre and table-line syntax
3221 2f. Indent-pre started by table-line syntax
3240 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3245 Text that should be rendered preformatted
3253 <pre>Text that should be rendered preformatted
3262 3a. Indent-Pre and block tags (single-line html)
3266 c <blockquote> foo </blockquote>
3271 c <blockquote> foo </blockquote>
3272 <pre><span> foo </span>
3275 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3276 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3277 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3278 <pre><span> foo </span>
3281 <p> a </p><p> foo </p><p>
3282 b </p><div> foo </div><p>
3283 c </p><blockquote><p> foo </p></blockquote>
3284 <pre><span> foo </span>
3289 3b. Indent-Pre and block tags (multi-line html)
3294 <pre>a <span>foo</span>
3299 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3300 b <div data-parsoid='{"stx":"html"}'> foo </div>
3302 <pre>a <span>foo</span>
3304 b </p><div> foo </div>
3308 3c. Indent-Pre and block tags (pre-content on separate line)
3372 4. Indent-Pre and extension tags
3383 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3387 5. Indent-Pre and html pre
3389 <pre class="123">hi</pre>
3391 <pre class="123">hi</pre>
3394 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3398 Render paragraphs when indent-pre is suppressed in blocklevels
3415 4. Multiple spaces at start-of-line
3433 ## NOTE: the leading white-space chars on empty line are significant
3435 5a. White-space in indent-pre
3447 ## NOTE: the leading white-space chars on empty line are significant
3449 5b. White-space in indent-pre
3468 5c. White-space in indent-pre
3481 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3504 7a. Indent-pre and category links
3506 parsoid=wt2html,wt2wt
3508 [[Category:foo]] <!-- No pre-wrapping -->
3509 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3512 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3513 <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 -->
3516 ## We used to, but no longer wt2wt this test since the default serializer
3517 ## will normalize all categories to serialize on their own line.
3518 ## This wikitext usage is going to be fairly uncommon in production and
3519 ## selser will take care of preserving formatting in those scenarios.
3521 7b. Indent-pre and category links
3526 [[Category:foo]] {{echo|b}}
3528 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3529 <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>
3533 Indent-Pre: Newlines in comments shouldn't affect sol state
3548 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3552 HTML-pre: 1. embedded newlines
3584 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3586 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3589 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3594 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3602 HTML-pre: big spaces
3638 <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"}}'>
3657 HTML-pre: 2: indented text
3670 HTML-pre: 3: other wikitext
3689 <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
3698 ### Definition lists
3705 <dl><dt>name </dt>
3706 <dd>Definition</dd></dl>
3711 Definition list for indentation only
3715 <dl><dd>Indented text</dd></dl>
3720 Definition list with no space
3725 <dd>Definition</dd></dl>
3730 Definition list with URL link
3732 ;http://example.com/ :definition
3734 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3735 <dd>definition</dd></dl>
3740 Definition list with bracketed URL link
3742 ;[http://www.example.com/ Example]:Something about it
3744 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3745 <dd>Something about it</dd></dl>
3750 Definition list with wikilink containing colon
3752 ; [[Help:FAQ]]:The least-read page on Wikipedia
3754 <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>
3755 <dd>The least-read page on Wikipedia</dd></dl>
3759 # At Brion's and JeLuF's insistence... :)
3761 Definition list with news link containing colon
3763 ;news:alt.wikipedia.rox: This isn't even a real newsgroup!
3765 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3766 <dd>This isn't even a real newsgroup!</dd></dl>
3769 <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>
3773 Malformed definition list with colon
3775 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3777 <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>
3782 Definition lists: colon in external link text
3784 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
3786 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
3787 <dd>OK, I made that up</dd></dl>
3792 Definition lists: colon in HTML attribute
3794 ;<b style="display: inline">bold</b>
3796 <dl><dt><b style="display: inline">bold</b></dt></dl>
3801 Definition lists: self-closed tag
3803 ;one<br/>two :two-line fun
3805 <dl><dt>one<br />two </dt>
3806 <dd>two-line fun</dd></dl>
3811 Definition lists: ignore colons inside tags
3813 ;one <b>two : tag <i>fun:</i>:</b>:def
3815 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3821 Definition lists: excess closed tags
3823 ;one</b>two :bad tag fun
3825 <dl><dt>onetwo </dt>
3826 <dd>bad tag fun</dd></dl>
3830 <dd>bad tag fun</dd>
3835 T13748: Literal closing tags
3839 <dd>test test test test test</dd>
3841 <dd>test test test test test</dd>
3846 <dd>test test test test test</dd>
3848 <dd>test test test test test</dd>
3854 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3862 <dl><dt>term </dt>
3863 <dd>description</dd></dl>
3864 <ul><li>unordered</li></ul>
3870 Definition list with empty definition and following paragraph
3883 Nested definition lists using html syntax
3896 Definition Lists: No nesting: Multiple dd's
3909 Definition Lists: Indentation: Regular
3917 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3922 Definition Lists: Indentation: Missing 1st level
3928 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3933 Definition Lists: Indentation: Multi-level indent
3937 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3942 Definition Lists: Hacky use to indent tables
3949 should be left alone
3951 <dl><dd><dl><dd><table>
3956 </td></tr></table></dd></dl></dd></dl>
3958 should be left alone
3963 Definition Lists: Hacky use to indent tables (with content following table)
3968 |} <!--c1--> this text should be part of the dl
3975 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
3982 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
3986 Definition Lists: Hacky use to indent tables, with comments (T65979)
3994 should be left alone
3997 <dl><dd><dl><dd><table><tr>
4000 </tr></table><!-- bar --></dd></dl></dd></dl>
4002 should be left alone</p>
4006 Definition Lists: Hacky use to indent tables, with comment before table
4012 <dl><dd><dl><dd><!-- foo --><table><tr>
4014 </tr></table></dd></dl></dd></dl>
4017 # The trailing whitespace in this test is to catch a regression in
4018 # Parsoid after T54473.
4020 Definition Lists: Hacky use to indent tables (WS-insensitive)
4029 </td></tr></table></dd></dl>
4033 <tbody><tr><td>a</td></tr>
4034 </tbody></table> </dd></dl>
4037 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4038 ## as an empty dt item. It also ignores all but the last ";" when followed
4039 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4040 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4043 ## Ex: ";;t2 ::d2" is transformed into:
4055 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4056 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4067 ## All Parsoid only definition list tests have this difference.
4069 ## See also: https://phabricator.wikimedia.org/T8569
4070 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4073 Table / list interaction: indented table with lists in table contents
4095 </td></tr></table></dd></dl>
4100 Table / list interaction: lists nested in tables nested in indented lists
4123 </td></tr></table></dd></dl>
4130 Definition Lists: Nesting: Multi-level (Parsoid only)
4158 Definition Lists: Nesting: Test 2
4165 <dl><dd>d2</dd></dl></dd></dl>
4170 Definition Lists: Nesting: Test 3
4175 <dl><dd><dl><dt>t1</dt>
4177 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4182 Definition Lists: Nesting: Test 4
4187 <dl><dd><dl><dd><dl><dt>t3</dt>
4188 <dd>d3</dd></dl></dd></dl></dd></dl>
4193 ## The Parsoid team believes the following three test exposes a
4194 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4195 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4196 ## It also exposes a "misfeature" in tidy, which doesn't like
4197 ## <dl> tags with a single <dt> child; it converts the <dt> into
4198 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4200 Definition Lists: Mixed Lists: Test 1
4206 <dl><dd><dl><dt><ul><li>foo</li>
4207 <li>bar</li></ul></dt></dl>
4208 <dl><dt>baz</dt></dl></dd></dl>
4211 <dl><dd><dl><dt><ul><li>foo</li>
4212 <li>bar</li></ul></dt></dl>
4213 <dl><dt>baz</dt></dl></dd></dl>
4231 Definition Lists: Mixed Lists: Test 2
4236 <ul><li><dl><dd>d1</dd>
4237 <dd>d2</dd></dl></li></ul>
4243 Definition Lists: Mixed Lists: Test 3
4248 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4249 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4255 Definition Lists: Mixed Lists: Test 4
4260 <ul><li><dl><dt>d1 </dt>
4263 <dd>d4</dd></dl></li></ul>
4269 Definition Lists: Mixed Lists: Test 5
4275 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4281 Definition Lists: Mixed Lists: Test 6
4286 <ol><li><ul><li><dl><dd>d1
4287 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4293 Definition Lists: Mixed Lists: Test 7
4298 <dl><dd><ul><li>d1</li>
4299 <li>d2</li></ul></dd></dl>
4305 Definition Lists: Mixed Lists: Test 8
4310 <dl><dd><ul><li>d1</li></ul>
4311 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4317 Definition Lists: Mixed Lists: Test 9
4321 <ul><li><dl><dt>foo </dt>
4322 <dd>bar</dd></dl></li></ul>
4328 Definition Lists: Mixed Lists: Test 10
4332 <ul><li><ol><li><dl><dt>foo </dt>
4333 <dd>bar</dd></dl></li></ol></li></ul>
4337 # The Parsoid team disagrees with the PHP parser's seemingly-random
4338 # rules regarding dd/dt on the next few tests. Parsoid is more
4339 # consistent, and recognizes the shared nesting and keeps the
4340 # still-open tags around until the nesting is complete.
4342 # This is a regression test for T175099
4344 Definition Lists: Mixed Lists: Test 11
4351 <ul><li>b</li></ul></dd></dl>
4355 <dd><ul><li>b</li></ul></dd></dl>
4358 # FIXME: Maybe get rid of this test?
4360 Definition Lists: Mixed Lists: Test 12
4365 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4366 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4367 <dl><dt>boo </dt>
4368 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4371 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4372 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4373 <dl><dt>boo </dt>
4374 <dd>baz</dd></dl></li></ol></li></ul>
4391 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4392 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4396 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4397 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4405 # FIXME: Maybe get rid of this test?
4407 # * The test is wrong, there are two colons where there should be :;
4408 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4410 Definition Lists: Weird Ones: Test 1
4412 *#;*::;;foo :bar (who uses this?)
4414 <ul><li><ol><li><dl><dt>foo </dt>
4415 <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>
4432 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4433 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4445 Definition Lists: colons occurring in tags
4462 <dt><span>a:b</span></dt>
4463 <dt><div>a:b</div></dt>
4464 <dt><div>a</div></dt>
4468 <dt><i>a:b</i></dt></dl>
4469 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4471 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4473 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4474 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4475 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4476 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4478 <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>
4479 <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>
4480 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4483 # Parsoid's output differs here again because it shares
4484 # nesting between the two lists unlike the PHP parser.
4485 # Unsure which is more desirable.
4487 Definition Lists: colons and tables 1
4499 </td></tr></table></dd></dl>
4503 </td></tr></table></dd></dl>
4509 </td></tr></table></dd>
4513 </td></tr></table></dd></dl>
4516 # FIXME: Does this need a html/php section?
4518 Definition Lists: template interaction
4520 ::{{definition_list}}
4523 ::{{definition_list}}
4528 <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">
4529 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4531 <dl><dd data-parsoid='{}'>one
4532 <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">
4533 </span><dd about="#mwt2">two
4535 <dd>three</dd></dl></dd>
4536 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4544 External links: non-bracketed
4546 Non-bracketed: http://example.com
4548 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4552 # parsoid doesn't explicitly mark autonumbered links, see T55505
4554 External links: numbered
4556 Numbered: [http://example.com]
4557 Numbered: [http://example.net]
4558 Numbered: [http://example.com]
4560 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4561 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4562 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4565 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4566 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4567 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4571 External links: specified text
4573 Specified text: [http://example.com link]
4575 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4580 External links: trail
4582 Linktrails should not work for external links: [http://example.com link]s
4584 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4589 External links: dollar sign in URL
4591 http://example.com/1$2345
4593 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4597 # parsoid doesn't explicitly mark autonumbered links, see T55505
4599 External links: dollar sign in URL (autonumber)
4601 [http://example.com/1$2345]
4603 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4606 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4610 External links: open square bracket forbidden in URL (T6377)
4612 parsoid=wt2html,wt2wt,html2html
4614 http://example.com/1[2345
4616 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4619 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4623 External links: open square bracket forbidden in URL (named) (T6377)
4625 parsoid=wt2html,html2html
4627 [http://example.com/1[2345]
4629 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4632 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4635 # parsoid adds a space before the link name
4637 External links: open square bracket forbidden in URL (named) (T6377)
4640 [http://example.com/1 [2345]
4642 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4647 External links: nowiki in URL link text (T8230)
4649 [http://example.com/ <nowiki>''example site''</nowiki>]
4651 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4656 External links: newline forbidden in text (T8230 regression check)
4658 [http://example.com/ first
4661 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4667 External links: Pipe char between url and text
4669 [http://example.com | link]
4671 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4676 External links: protocol-relative URL in brackets
4678 [//example.com/ Test]
4680 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4684 # parsoid doesn't explicitly mark autonumbered links, see T55505
4686 External links: protocol-relative URL in brackets without text
4690 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4693 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4697 External links: protocol-relative URL in free text is left alone
4701 <p>//example.com/Foo
4706 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4708 foo//example.com/Foo
4710 <p>foo//example.com/Foo
4714 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4716 External links: with no contents
4718 parsoid=wt2html,wt2wt
4720 [http://en.wikipedia.org/wiki/Foo]
4722 [[wikipedia:Foo|Bar]]
4724 [[wikipedia:Foo|<span>Bar</span>]]
4726 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4727 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4728 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4731 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4732 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4733 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4737 External links: Free with trailing punctuation
4747 http://example.com/url_with_(brackets)
4748 (http://example.com/url_without_brackets)
4749 http://example.com/url_with_entity&
4750 http://example.com/url_with_entity&
4751 http://example.com/url_with_entity&
4752 http://example.com/url_with_entity
4753 http://example.com/url_with_entity 
4754 http://example.com/url_with_entity 
4755 http://example.com/url_with_entity<
4756 http://example.com/url_with_entity<
4757 http://example.com/url_with_entity<
4759 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4760 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4761 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4762 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4763 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4764 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4765 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4766 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4767 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4768 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4769 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4770 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4771 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4772 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4773 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4774 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4775 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4776 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4777 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4780 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
4781 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
4782 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
4783 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
4784 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
4785 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
4786 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
4787 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
4788 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4789 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4790 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4791 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4792 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4793 <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>
4794 <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>
4795 <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>
4796 <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>
4797 <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>
4798 <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>
4802 External links: tricky Parsoid html2html case
4804 parsoid=wt2html,wt2wt,html2html
4806 http://example.com/url_with_entity&amp;
4808 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4811 <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>
4815 External links: Free with trailing quotes (T113666)
4817 '''News:''' Stuff here
4821 <p><b>News:</b> Stuff here
4822 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4825 <p><b>News:</b> Stuff here</p>
4826 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4830 External links: with entity
4832 [http:// www.librarieswithoutborders.org Libraries without borders]
4834 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4837 <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>
4841 External links: Lone protocols are never linked (T105697)
4860 External links: No preceding word characters allowed (T67278)
4862 NOPEhttp://example.com
4863 N0http://example.com
4864 ok:http://example.com
4865 ok-http://example.com
4867 <p>NOPEhttp://example.com
4868 N0http://example.com
4869 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4870 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4875 External links: nofollow domain exception
4877 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4879 <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>.
4886 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4888 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4893 External image from https
4895 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4897 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4902 External image (when not allowed)
4904 wgAllowExternalImages=0
4906 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4908 <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>
4913 Link to non-http image, no img tag
4915 Link to non-http image, no img tag: ftp://example.com/test.jpg
4917 <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>
4922 External links: terminating separator
4924 Terminating separator: http://example.com/thing,
4926 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4931 External links: intervening separator
4933 Intervening separator: http://example.com/1,2,3
4935 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4940 External links: old bug with URL in query
4942 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4944 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4949 External links: old URL-in-URL bug, mixed protocols
4951 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4953 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4957 # Since Parsoid is starting to emit canonical wikitext for links,
4958 # [http://example.com http://example.com] will not RT back to that
4961 External links: URL in text
4965 URL in text: [http://example.com http://example.com]
4967 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
4970 <p>URL in text: <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
4974 External links: Clickable images
4976 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4978 <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>
4981 <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>
4985 External links: raw ampersand
4987 Old & use: http://x&y
4989 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4994 External links: encoded ampersand
4996 Old & use: http://x&y
4998 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5001 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5005 External links: encoded equals (T8102)
5007 http://example.com/?foo=bar
5009 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5012 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5016 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5017 ## does it number them. As discussed in T55505, we can identify
5018 ## autonumbered links via CSS.
5022 External links: [raw ampersand]
5024 Old & use: [http://x&y]
5026 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5029 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5032 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5033 # mode will return the [raw ampersand] wikitext
5035 External links: [encoded ampersand]
5037 parsoid=wt2html,wt2wt,html2html
5039 Old & use: [http://x&y]
5041 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5044 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5048 External links: [raw equals]
5050 [http://example.com/?foo=bar]
5052 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5055 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5058 # note that parsoid html is identical to [raw equals] case; so html2wt
5059 # mode will return the [raw equals] wikitext
5061 External links: [encoded equals] (T8102)
5063 parsoid=wt2html,wt2wt,html2html
5065 [http://example.com/?foo=bar]
5067 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5070 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5073 # xxx parsoid strips the IDN character, so the round-trip tests will
5074 # obviously fail and are disabled. --cscott
5076 External links: [IDN ignored character reference in hostname; strip it right off]
5078 parsoid=wt2html,wt2wt,html2html
5080 [http://e‌xample.com/]
5082 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5085 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5088 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5089 # Where an external link could easily circumvent the sanitization of the text of
5090 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5091 # test demands a higher standard. That's a bit strange.
5095 # http://example.com -> [http://example.com|http://example.com]
5096 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5098 # The first example is sanitized, but the second is not. Any security benefits
5099 # from this production are trivial to circumvent. Either remove this test and
5100 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5101 # the test accordingly.
5105 # xxx parsoid strips the IDN character, so the round-trip tests will
5106 # obviously fail and are disabled. --cscott
5108 External links: IDN ignored character reference in hostname; strip it right off
5110 parsoid=wt2html,html2html
5112 http://e‌xample.com/
5114 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5117 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5121 External links: www.jpeg.org (T2554)
5125 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5129 # parsoid doesn't explicitly mark autonumbered links, see T55505
5131 External links: URL within URL (T2002)
5133 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5135 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5138 <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>
5142 T2361: URL inside bracketed URL
5144 [http://www.example.com/foo http://www.example.com/bar]
5146 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5151 T2361: URL within URL, not bracketed
5153 http://www.example.com/foo?=http://www.example.com/bar
5155 <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>
5160 T2289: ">"-token in URL-tail
5162 http://www.example.com/<hello>
5164 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5169 T2289: literal ">"-token in URL-tail
5171 http://www.example.com/<b>html</b>
5173 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5176 <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>
5180 T2289: ">"-token in bracketed URL
5182 [http://www.example.com/<hello> stuff]
5184 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5189 T2289: literal ">"-token in bracketed URL
5191 [http://www.example.com/<b>html</b> stuff]
5193 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5198 T2289: literal double quote at end of URL
5200 http://www.example.com/"hello"
5202 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5207 T2289: literal double quote in bracketed URL
5209 [http://www.example.com/"hello" stuff]
5211 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5216 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5218 [http://www.example.com test]
5220 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5225 External links: link text with spaces
5227 [http://www.example.com a b c]
5228 [http://www.example.com ''a'' ''b'']
5230 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5231 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5235 # Note edge case difference between PHP and Parsoid here.
5237 External links: wiki links within external link (T5695)
5239 parsoid=wt2html,html2html
5241 [http://example.com [[wikilink]] embedded in ext link]
5243 [http://example.com test [[wikilink]] embedded in ext link]
5245 <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>
5246 </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>
5249 <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>
5250 <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>
5254 T2787: Links with one slash after the url protocol are invalid
5258 [http:/example.com title]
5260 <p>http:/example.com
5261 </p><p>[http:/example.com title]
5266 Bracketed external links with template-generated invalid target
5268 [{{echo|http:/example.com}} title]
5270 <p>[http:/example.com title]
5274 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5276 Broken wikilinks (but not external links) prevent templates from closing
5280 [http://example.com x
5282 {{echo|[http://example.com x}}
5288 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5289 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5291 </p><p>{{echo|[[Foo}}
5294 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5295 <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>
5297 <p>{{echo|[[Foo}}</p>
5301 Wikilinks with embedded newlines are not broken
5312 <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>
5324 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5328 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5329 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5333 T4702: Mismatched <i>, <b> and <a> tags are invalid
5335 ''[http://example.com text'']
5336 [http://example.com '''text]'''
5337 ''Something [http://example.com in italic'']
5338 ''Something [http://example.com mixed''''', even bold]'''
5339 '''''Now [http://example.com both''''']
5341 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5342 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5343 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5344 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5345 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5353 http://www.example.com/?title=AT%26T
5355 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5358 <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>
5361 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5362 # % is actually legal in HTML5. Any change in output would need testing though.
5364 T6781, T7267: %25 in URL
5366 http://www.example.com/?title=100%25_Bran
5368 <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>
5371 <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>
5375 T6781, T7267: %28, %29 in URL
5377 http://www.example.com/?title=Ben-Hur_%281959_film%29
5379 <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>
5382 <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>
5387 T6781: %26 in autonumber URL
5389 [http://www.example.com/?title=AT%26T]
5391 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5394 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5398 T6781, T7267: %26 in autonumber URL
5400 [http://www.example.com/?title=100%25_Bran]
5402 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5405 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5409 T6781, T7267: %28, %29 in autonumber URL
5411 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5413 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5416 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5421 T6781: %26 in bracketed URL
5423 [http://www.example.com/?title=AT%26T link]
5425 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5428 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5432 T6781, T7267: %25 in bracketed URL
5434 [http://www.example.com/?title=100%25_Bran link]
5436 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5441 T6781, T7267: %28, %29 in bracketed URL
5443 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5445 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5448 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5452 External link containing a period in the anchor. (T65947)
5454 [//foo.org/bar#baz. bang]
5456 [//foo.org/bar. bang]
5458 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5459 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5462 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5463 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5467 External link containing a single quote. (T65947)
5471 [//foo.org/bar'baz bang]
5473 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5474 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5477 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5478 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5482 External link containing double-single-quotes in text '' (T6598 sanity check)
5484 Some [http://example.com/ pretty ''italics'' and stuff]!
5486 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5491 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5493 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5495 <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>
5499 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5501 External link containing double-single-quotes with no space separating the url from text in italics
5503 [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]].]
5505 <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>.
5508 <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>
5512 External link with comments in link text
5514 [http://www.google.com Google <!-- comment -->]
5516 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5519 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5523 External link to bare IPv4 address
5525 [http://192.168.0.1 Link]
5527 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5530 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5534 URL-encoding in URL functions (single parameter)
5536 {{localurl:Some page|amp=&}}
5538 <p>/index.php?title=Some_page&amp=&
5543 URL-encoding in URL functions (multiple parameters)
5545 {{localurl:Some page|q=?&=&}}
5547 <p>/index.php?title=Some_page&q=?&amp=&
5554 http://example.com/index.php?foozoid%5B%5D=bar
5556 http://example.com/index.php?foozoid[]=bar
5558 <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>
5559 </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>
5562 <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>
5564 <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>
5568 IPv6 urls, autolink format (T23261)
5570 http://[2404:130:0:1000::187:2]/index.php
5572 Examples from RFC 2373, section 2.2:
5574 *http://[1080::8:800:200C:417A]/unicast
5575 *http://[FF01::101]/multicast
5576 *http://[::1]/loopback
5577 *http://[::]/unspecified
5578 *http://[::13.1.68.3]/ipv4compat
5579 *http://[::FFFF:129.144.52.38]/ipv4compat
5581 Examples from RFC 2732, section 2:
5583 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5584 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5585 *http://[3ffe:2a00:100:7031::1]
5586 *http://[1080::8:800:200C:417A]/foo
5587 *http://[::192.9.5.5]/ipng
5588 *http://[::FFFF:129.144.52.38]:80/index.html
5589 *http://[2010:836B:4179::836B:4179]
5591 <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>
5592 </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:
5594 <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>
5595 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5596 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5597 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5598 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5599 <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>
5600 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5602 <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>
5603 <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>
5604 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5605 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5606 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5607 <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>
5608 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5611 <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>
5613 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5614 <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>
5615 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5616 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5617 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5618 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5619 <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>
5621 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5622 <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>
5623 <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>
5624 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5625 <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>
5626 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5627 <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>
5628 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5632 IPv6 urls, bracketed format (T23261)
5634 [http://[2404:130:0:1000::187:2]/index.php test]
5636 Examples from RFC 2373, section 2.2:
5638 *[http://[1080::8:800:200C:417A] unicast]
5639 *[http://[FF01::101] multicast]
5640 *[http://[::1]/ loopback]
5641 *[http://[::] unspecified]
5642 *[http://[::13.1.68.3] ipv4compat]
5643 *[http://[::FFFF:129.144.52.38] ipv4compat]
5645 Examples from RFC 2732, section 2:
5647 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5648 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5649 *[http://[3ffe:2a00:100:7031::1] 3]
5650 *[http://[1080::8:800:200C:417A]/foo 4]
5651 *[http://[::192.9.5.5]/ipng 5]
5652 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5653 *[http://[2010:836B:4179::836B:4179] 7]
5655 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5656 </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:
5658 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5659 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5660 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5661 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5662 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5663 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5664 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5666 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5667 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5668 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5669 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5670 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5671 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5672 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5675 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5677 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5678 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5679 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5680 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5681 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5682 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5683 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5685 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5686 <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>
5687 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5688 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5689 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5690 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5691 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5692 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5696 Non-extlinks in brackets
5705 [{{echo|foo}} ''bar'']
5706 [{{echo|foo}}l's] errand
5707 [{{echo|foo}}l's errand]
5709 [url=http://example.com]
5710 [http:// bare protocols don't count]
5723 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5724 [http:// bare protocols don't count]
5732 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5733 [<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]
5734 [<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>]
5735 [<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
5736 [<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]
5737 [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>]
5738 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5739 [http:// bare protocols don't count]</p>
5743 Percent encoding in external links
5745 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5747 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5750 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5754 Use url link syntax for links where the content is equal the link target
5758 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5761 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5765 Parenthesis in external links, especially URL links
5769 http://example.com/test)
5771 http://example.com/(test)
5773 http://example.com/((test)
5775 (http://example.com/(test))
5777 (http://example.com/(test)))))
5779 http://example.com/a)b
5781 [http://example.com) foo]
5783 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5784 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5785 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5786 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5787 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5788 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5789 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5790 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5793 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
5794 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
5795 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
5796 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
5797 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
5798 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5799 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
5800 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
5804 Parenthesis in external links, w/ transclusion or comment
5806 (http://example.com/{{echo|hi}})
5808 (http://example.com<!-- hi -->)
5810 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5811 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5814 <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>
5816 <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>
5820 Serialize <a> tags with invalid link targets as plain text
5822 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5824 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5825 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5826 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5827 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5830 <nowiki>*</nowiki>text
5831 <nowiki>[[foo]]</nowiki>
5832 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5836 mw:ExtLink -vs- mw:WikiLink (T94723)
5840 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5841 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5842 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5843 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5845 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5846 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5854 [[:en:European_Robin|European Robin]]
5855 [[:en:European_Robin|European Robin]]
5859 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5863 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5865 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5876 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5878 Normal text. '''''Bold italic text.''''' Normal text.
5880 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5881 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5886 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5887 # parser strips. The wikitext contains just the first half of the bold
5890 Unclosed and unmatched quotes
5892 '''''Bold italic text '''with bold deactivated''' in between.'''''
5894 '''''Bold italic text ''with italic deactivated'' in between.'''''
5898 ..spanning two paragraphs (should not work).'''
5900 '''Bold tag left open
5902 ''Italic tag left open
5906 <!-- Unmatching number of opening, closing tags: -->
5907 '''This year''''s election ''should'' beat '''last year''''s.
5909 ''Tom'''s car is bigger than ''Susan'''s.
5911 Plain ''italic'''s plain
5913 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5914 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5915 </p><p><b>Bold text..</b>
5916 </p><p>..spanning two paragraphs (should not work).
5917 </p><p><b>Bold tag left open</b>
5918 </p><p><i>Italic tag left open</i>
5920 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5921 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5922 </p><p>Plain <i>italic'</i>s plain
5925 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5926 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5927 </p><p><b>Bold text..</b>
5928 </p><p>..spanning two paragraphs (should not work).<b></b>
5929 </p><p><b>Bold tag left open</b>
5930 </p><p><i>Italic tag left open</i>
5933 <!-- Unmatching number of opening, closing tags: -->
5934 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5935 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5936 </p><p>Plain <i>italic'</i>s plain
5943 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5946 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5947 # is the bare minimum required by the spec, see:
5948 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5949 # Parsoid team replies: empty table tags are legal in HTML5
5951 A table with no data.
5964 A table with stray table end tags on start tag line (wt2html)
5968 {|style="color: red;"|}
5970 {|style="color: red;" |}
5974 {|style="color: red;"|} id="foo"
5978 {|style="color: red;" |} id="foo"
5982 <table style="color: red;"></table>
5984 <table style="color: red;">
5990 <table style="color: red;" id="foo">
5996 <table style="color: red;" id="foo">
6005 A table with no data (take 2)
6013 # A table with nothing but a caption is invalid XHTML, we might want to render
6014 # this as <p>caption</p>
6015 # Parsoid team replies: table with only a caption is legal in HTML5
6017 A table with nothing but a caption
6025 </caption><tr><td></td></tr></table>
6028 <table><caption>caption</caption></table>
6032 A table with caption with default-spaced attributes and a table row
6035 |+ style="color: red;" | caption1
6041 <caption style="color: red;">caption1
6050 A table with captions with non-default spaced attributes and a table row
6053 |+style="color: red;"|caption2
6054 |+ style="color: red;"|caption3
6060 <caption style="color: red;">caption2
6062 <caption style="color: red;">caption3
6071 Table td-cell syntax variations
6076 |style='color:red;'|baz
6077 |style='color:red;'||baz
6084 <td>foo bar foo</td>
6087 <td style="color:red;">baz
6089 <td>style='color:red;'</td>
6117 Simple table but with multiple dashes for row wikitext
6136 Multiplication table
6138 {| border="1" cellpadding="2"
6139 |+Multiplication table
6159 <table border="1" cellpadding="2">
6160 <caption>Multiplication table
6207 Accept "||" in table headings
6222 Accept "!!" in table data
6236 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6241 Accept "||" in indented table headings
6251 </th></tr></table></dd></dl>
6256 Accept "!!" in templates
6270 <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>
6274 Accept "!!" in table headings after newline
6291 <p>b!!c</p></th></tr>
6296 Accept "!!" in table data of mixed wikitext / html syntax
6300 <tr><td>b!!c</td></tr>
6306 </th></tr><tr><td>b!!c</td></tr>
6310 <tbody><tr><th>a</th></tr>
6311 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6316 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6333 Accept "| !" at start of line in tables (ignore !-attribute)
6337 |!style="color:red"|bar
6349 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 +/-
6353 |style='color:red;'|+1
6354 |style='color:blue;'|-1
6366 <td style="color:red;">+1
6368 <td style="color:blue;">-1
6392 |rowspan=2|Cell 2, row 1 (and 2)
6403 <td rowspan="2">Cell 2, row 1 (and 2)
6421 {| bgcolor=#ABCDEF border=2
6426 |the original table again
6434 <table bgcolor="#ABCDEF" border="2">
6442 <td>the original table again
6448 Invalid attributes in table cell (T3830)
6462 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6466 | title="foo<nowiki>|</nowiki>" |bar
6467 | title="foo<nowiki>|</nowiki>" bar
6474 <td title="foo|">bar
6476 <td>title="foo|" bar
6481 <tbody><tr><td title="foo">bar</td>
6482 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6483 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6487 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6488 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6489 # *2wt modes will fail.
6491 Table security: embedded pipes
6493 parsoid=wt2html,html2html
6496 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6500 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6501 <td>]" onmouseover="alert(document.cookie)">test
6509 <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>
6513 Element attributes with double ! should not be broken up by <th>
6516 !hi <div class="!!">ha</div> ho
6521 <th>hi <div class="!!">ha</div> ho
6526 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6531 ! and || in element attributes should not be parsed as <th>/<td>
6534 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6539 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6544 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6548 # FIXME: The output seems broken. Filed as T110268.
6550 ! and || in td attributes should not be parsed as <th>/<td>
6555 |style="color: red !important;" data-contrived="put this here ||"|foo
6560 <td>style="color: red !important;" data-contrived="put this here</td>
6566 <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>
6571 Break on | in element attribute in template
6573 parsoid=wt2html,html2html
6575 {{echo|1=<div class="hi|ho">ha</div>}}
6577 <p>ho">ha</div>
6580 <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>
6584 Break on | in element attribute name in template
6586 {{echo|<div cla|ss="hiho">ha</div>}}
6588 <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>
6592 Don't break on | in extension attribute in template
6594 {{echo|<ref name="hi|ho">ha</ref>}}
6598 <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>
6600 <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>
6603 ## We don't support roundtripping of these attributes in Parsoid.
6604 ## Selective serialization takes care of preventing dirty diffs.
6605 ## But, on edits, we dirty-diff the invalid attribute text.
6607 Invalid text in table attributes should be discarded
6611 {| <span>boo</span> style='border:1px solid black'
6612 | <span>boo</span> style='color:blue' |1
6613 |<span>boo</span> style='color:blue'|2
6616 <table style="border:1px solid black">
6618 <td style="color:blue">1
6620 <td style="color:blue">2
6624 <table style="border:1px solid black">
6626 <td style="color:blue">1</td>
6627 <td style="color:blue">2</td>
6633 Invalid text in table attributes should be preserved by selective serializer
6636 "modes": ["selser"],
6638 ["td:first-child", "text", "abc"],
6639 ["td + td", "text", "xyz"]
6643 {| <span>boo</span> style='border:1px solid black'
6644 | <span>boo</span> style='color:blue' | 1
6645 |<span>boo</span> style='color:blue'| 2
6648 {| <span>boo</span> style='border:1px solid black'
6649 | <span>boo</span> style='color:blue' |abc
6650 |<span>boo</span> style='color:blue'|xyz
6655 1. Template-generated table cell attributes and cell content
6660 || {{table_attribs_5}}
6661 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6662 |align=center {{table_attribs}}
6663 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6668 <td style="color:red;">Foo
6670 <td style="color:red;">Foo
6672 <td>style="color:red;"</td>
6675 <td style="color:red;">Foo
6677 <td align="center" style="color:red;">Foo
6679 <td align="center" style="color:red;">Foo
6685 2. Template-generated table cell attributes and cell content
6688 |{{table_attribs_2}}
6693 <td style="color:red;">Foo
6701 <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>
6702 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6707 3. Template-generated table cell attributes and cell content
6710 !align=center {{table_header_cells}}
6712 |align=center {{table_cells}}
6717 <th align="center" style="color:red;">Foo</th>
6718 <th style="color:red;"><i>Bar</i></th>
6719 <th style="color:brown;"><i>Foo</i> and Baz
6722 <td align="center" style="color:red;">Foo</td>
6723 <td style="color:red;"><i>Bar</i></td>
6724 <td style="color:brown;"><i>Foo</i> and Baz
6729 <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>
6730 <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>
6735 4. Template-generated table cell attributes and cell content inside a templated table
6738 !align=center {{table_header_cells}}
6740 |align=center {{table_cells}}
6745 <th align="center" style="color:red;">Foo</th>
6746 <th style="color:red;"><i>Bar</i></th>
6747 <th style="color:brown;"><i>Foo</i> and Baz
6750 <td align="center" style="color:red;">Foo</td>
6751 <td style="color:red;"><i>Bar</i></td>
6752 <td style="color:brown;"><i>Foo</i> and Baz
6756 <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}}]}'>
6757 <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>
6759 <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>
6763 ## Edge case fix to prevent future regressions
6765 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6768 |{{table_attribs_7}}
6773 <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>
6775 <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>
6779 Table with row followed by newlines and table heading
6781 parsoid=wt2html,html2html
6799 Table with empty line following the start tag
6801 parsoid=wt2html,html2html
6819 Table attributes with empty value
6821 parsoid=wt2html,html2html
6834 <tbody><tr><td style="">hello</td></tr>
6839 Wikitext table with a lot of comments
6862 Wikitext table comments represented in parsoid dom
6864 {|<!--c1--><!--c2-->
6873 </td></tr></tbody></table>
6875 <table><!--c1--><!--c2-->
6876 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6877 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
6882 Wikitext table with double-line table cell
6899 Table cell with a single comment
6916 Table-cell after a comment-only-empty-line
6933 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6935 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
6941 Build table with {{!}}
6943 {{{!}} class="wikitable"
6946 {{!}}- style="color:red;"
6947 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
6950 <table class="wikitable">
6956 <tr style="color:red;">
6958 <td style="color:red;">second data
6964 Build table with pipe as data
6966 {| class="wikitable"
6969 |- style="color:red;"
6970 |data|| style="color:red;" |second data
6972 | style="color:red;" |data with | || style="color:red;" | second data with |
6974 ||data with | |||second data with |
6977 <table class="wikitable">
6983 <tr style="color:red;">
6985 <td style="color:red;">second data
6988 <td style="color:red;">data with |</td>
6989 <td style="color:red;">second data with |
6992 <td>data with |</td>
6993 <td>second data with |
6999 Build table with wikilink
7001 {| class="wikitable"
7002 !header||second header
7003 |- style="color:red;"
7004 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7006 |data||second data [[Main Page|link|text with pipe]]
7009 <table class="wikitable">
7014 <tr style="color:red;">
7015 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7016 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7020 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7025 # The expected HTML structure in this test is debatable. The PHP parser does
7026 # not parse this kind of table at all. The main focus for Parsoid is on
7027 # round-tripping, so this output is ok for now. TODO: revisit!
7029 Wikitext table with html-syntax row
7039 <td>foo</td></tr></tbody></table>
7043 Fostered content in tables: Plain text
7045 parsoid=wt2html,html2html
7063 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7064 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7066 </tr></tbody></table>
7070 Fostered content in tables: Lists
7072 parsoid=wt2html,html2html
7085 <ul><li>a</li></ul><table>
7090 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7091 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7093 </tr></tbody></table>
7097 Template generated table cell with attributes
7101 {{table_attribs_4}} ||a||b
7107 <td style="background-color:#DC241f;" width="10px"></td>
7110 </td></tr></tbody></table>
7113 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7114 <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>
7118 Parsoid: Round-trip tables directly followed by content (T53219)
7120 parsoid=wt2html,wt2wt
7133 </td></tr></tbody></table><p> bar
7137 </td></tr></tbody></table><p><b>quux</b>
7142 Parsoid: Default to a newline after tables in new content (T53219)
7147 <tr><td>foo</td></tr></tbody></table> bar
7149 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7154 <nowiki> </nowiki>bar
7162 Parsoid: newline inducing block nodes don't suppress <nowiki>
7174 Parsoid: Row-syntax table headings followed by comment & table cells
7176 parsoid=wt2html,wt2wt
7180 <!-- foo --> ||baz||quux
7194 <tbody><tr><th> foo </th><th> bar
7195 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7200 Parsoid: Recover better from broken table attributes
7214 </td></tr></tbody></table>
7219 <p>foo</p></td></tr>
7224 Tables: Digest broken attributes on table and tr tag
7235 <tr class='mw-empty-elt'></tr>
7236 <tr class='mw-empty-elt'></tr>
7240 # T137406: Whitespace in the HTML
7242 1. Generate correct wikitext for tables with thead/tbody/tfoot
7247 <caption>Test</caption>
7309 </td></tr></tbody></table>
7312 # T137406: No whitespace in the HTML
7314 2. Generate correct wikitext for tables with thead/tbody/tfoot
7318 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7328 Testing serialization after deletion in references
7337 hi <ref><div id="x">ho</div></ref>
7347 Testing serialization after deletion of table cells
7350 "modes": ["wt2wt", "selser"],
7358 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7368 Testing selser after addition of new row before first row (T125419)
7371 "modes": ["wt2wt", "selser"],
7373 [ "tr", "before", "<tr><td>X</td></tr>" ]
7389 Serialize new table rows in a HTML table using HTML tags
7392 "modes": ["wt2wt", "selser"],
7394 [ "tr", "before", "<tr><td>X</td></tr>" ]
7398 <table><tr><td>a</td></tr></table>
7400 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7404 Serialize new table cells in a HTML row using HTML tags
7407 "modes": ["wt2wt", "selser"],
7409 [ "td", "before", "<td>X</td>" ]
7413 <table><tr><td>a</td></tr></table>
7415 <table><tr><td>X</td><td>a</td></tr></table>
7419 Wikitext tables can be nested inside HTML tables
7423 <table data-parsoid='{"stx":"html"}'>
7426 <tr><td>foo</td></tr>
7441 Serialize wikitext list items as HTML list items when embedded in a HTML list
7445 <ul data-parsoid='{"stx": "html"}'>
7446 <li data-parsoid='{}'>a</li>
7456 # SSS FIXME: Is this actually a good thing given the
7457 # odd nested list output that is generated by MW?
7458 # <ul><li>foo<ul>..</ul></li></ul> instead of
7459 # <ul><li>foo</li><ul>..</ul></ul>
7461 Wikitext lists can be nested inside HTML lists
7465 <ul data-parsoid='{"stx": "html"}'>
7466 <li data-parsoid='{"stx": "html"}'>a
7471 <ul data-parsoid='{"stx": "html"}'>
7494 Plain link, capitalized
7498 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7503 Plain link, uncapitalized
7507 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7514 [[Main Page|The Main Page]]
7516 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7521 Piped link with comment in link text
7523 [[Main Page|The Main<!--front--> Page]]
7525 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7530 Piped link with multiple pipe characters in link text
7532 [[Main Page||The|Main|Page|]]
7534 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7537 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7541 Piped link with no link text
7543 [[Thomas Bek (bishop of St David's)|]]
7545 <p>[[Thomas Bek (bishop of St David's)|]]
7548 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7552 Piped link with empty link text
7554 [[Main Page|<nowiki/>]] - empty nowiki
7555 [[Main Page| ]] - empty space
7556 [[Main Page| ]] - empty non breaking space
7558 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7559 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7560 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7563 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7564 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7565 <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>
7573 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7578 Broken link with fragment
7580 [[Zigzagzogzagzig#zug]]
7582 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7587 Special page link with fragment
7589 [[Special:Version#anchor]]
7591 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7596 Nonexistent special page link with fragment
7598 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7600 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7607 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7609 <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>
7616 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7618 <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>!!!
7629 T45661: Piped links with identical prefixes
7631 [[prefixed article|prefixed articles with spaces]]
7633 [[prefixed article|prefixed articlesaoeu]]
7635 [[Main Page|Main Page test]]
7637 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7638 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7639 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7645 Link with HTML entity in suffix / tail
7647 [[Main Page]]", [[Main Page]]a
7649 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7652 <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>
7656 Link with 3 brackets
7667 Link with 4 brackets
7671 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7676 Piped link with 3 brackets
7678 [[[main page|the main page]]]
7680 <p>[[[main page|the main page]]]
7685 Piped link with extlink-like text
7688 [[Main Page|This is a [bar]]]
7691 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7692 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7693 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7696 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7697 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7698 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7702 Link with multiple pipes
7704 [[Main Page|The|Main|Page]]
7706 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7711 Anchor containing a #. (T65430)
7713 wgFragmentMode=[ 'html5', 'legacy' ]
7715 [[Main Page#And#Link]]
7717 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7720 <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>
7726 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7728 <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>
7733 Link with space in namespace
7735 [[User talk:Foo bar]]
7737 <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>
7742 MemoryAlpha:AlphaTest
7744 This is an article in the MemoryAlpha namespace
7745 (which shadows the memoryalpha interwiki link).
7749 Namespace takes precedence over interwiki link (T53680)
7751 [[MemoryAlpha:AlphaTest]]
7753 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7757 # The previous test doesn't work correctly in html2*, due to not recognizing the
7758 # link as an internal one. This one checks for the correct behavior.
7760 Link to namespace preferred over interwiki with correct rel attribute
7762 parsoid=html2wt,html2html
7764 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7766 [[MemoryAlpha:AlphaTest]]
7770 Piped link to namespace
7772 [[Meta:Disclaimers|The disclaimers]]
7774 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7781 [[Usually caused by a typo (oops}]]
7783 <p>[[Usually caused by a typo (oops}]]
7790 Just a test of an article title containing a percent.
7794 Link containing % (not as a hex sequence)
7797 [[7% Solution|7%25 Solution]]
7799 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7800 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7803 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7804 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7807 # note that the parsoid HTML is identical to the previous test output,
7808 # so the previous test ensures that the html2wt mode will generate the
7809 # "not as a hex sequence" wikitext.
7811 Link containing % as a single hex sequence interpreted to char
7813 parsoid=wt2wt,wt2html,html2html
7816 [[7%25 Solution|7%25 Solution]]
7818 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7819 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7822 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7823 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7827 Link containing % as a double hex sequence interpreted to hex sequence
7831 <p>[[7%2525 Solution]]
7835 ## Example for such a section: == < ==
7837 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7839 wgFragmentMode=[ 'html5', 'legacy' ]
7841 [[%23%3c]][[%23%3e]]
7843 <p><a href="#<">#<</a><a href="#>">#></a>
7846 <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>
7849 ## Example for such a section: == < ==
7851 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7853 wgFragmentMode=[ 'legacy' ]
7855 [[%23%3c]][[%23%3e]]
7857 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7862 Link containing "<#" and ">#" as a hex sequences
7864 [[%3c%23]][[%3e%23]]
7866 <p>[[%3c%23]][[%3e%23]]
7871 Link containing an equals sign
7873 [[Special:BookSources/isbn=4-00-026157-6]]
7875 <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>
7878 <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>
7884 Just a test of an article title containing a tilde.
7887 # note that links containing signatures, like [[Foo~~~~]], are
7888 # massaged by the pre-save transform (PST) and so the tildes are never
7889 # seen by the parser.
7891 Link containing a tilde
7895 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7898 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7902 Link containing double-single-quotes '' (T6598)
7904 [[Lista d''e paise d''o munno]]
7906 <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>
7909 <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>
7913 Link containing double quotes and spaces
7917 <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>
7920 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7924 File containing double quotes and spaces
7926 [[File:Cool "Gator".png]]
7928 <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>
7932 Redirect containing double quotes and spaces
7934 #REDIRECT [[Cool "Gator"]]
7936 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7940 Link containing double-single-quotes '' in text (T6598 sanity check)
7942 Some [[Link|pretty ''italics'' and stuff]]!
7944 <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>!
7947 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7951 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7953 ''Some [[Link|pretty ''italics'' and stuff]]!''
7955 <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>
7960 Link with double quotes in title part (literal) and alternate part (interpreted)
7962 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7966 [[''Pentecoste''|Pentecoste]]
7968 [[''Pentecoste''|''Pentecoste'']]
7970 <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>
7971 </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>
7972 </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>
7973 </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>
7976 <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>
7977 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7978 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7979 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7983 Broken image links with HTML captions (T41700)
7985 [[File:Nonexistent|<script></script>]]
7986 [[File:Nonexistent|100x100px|<script></script>]]
7987 [[File:Nonexistent|<]]
7988 [[File:Nonexistent|a<i>b</i>c]]
7990 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7991 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7992 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7993 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7996 <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>
7997 <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>
7998 <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>
7999 <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>
8005 [[http://www.example.com]]
8007 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8010 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8014 Plain link to URL with link text
8016 [[http://www.example.com Link text]]
8018 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8023 Plain link to protocol-relative URL
8025 [[//www.example.com]]
8027 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8030 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8034 Plain link to protocol-relative URL with link text
8036 [[//www.example.com Link text]]
8038 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8043 Plain link to page with question mark in title
8049 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8050 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8054 # I'm fairly sure the expected result here is wrong.
8055 # We want these to be URL links, not pseudo-pages with URLs for titles....
8056 # However the current output is also pretty screwy.
8059 # I'm changing it to match the current output--it arguably makes more
8060 # sense in the light of the test above. Old expected result was:
8061 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8063 # But I think this test is bordering on "garbage in, garbage out" anyway.
8068 Piped link to URL: [[http://www.example.com|an example URL]]
8070 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8073 <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>
8077 Plain link in template argument
8081 {{echo|[http://www.example.com |123]}}
8083 {{echo|[[http://www.example.com |123]]}}
8085 {{echo|[[http://www.example.com |123]}}
8087 {{echo|[http://www.example.com |123]]}}
8089 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8090 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8091 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8092 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8095 <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>
8097 <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>
8099 <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>
8101 <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>
8105 T2002: [[page|http://url/]] should link to page, not http://url/
8107 [[Main Page|http://url/]]
8109 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8112 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8115 # Parsoid does not mark self-links, by design.
8117 T2337: Escaped self-links should be bold
8121 [[Bug462]] [[Bug462]]
8123 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8126 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8130 Self-link to section should not be bold
8134 [[Main Page#section]]
8136 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8147 Self-link to numeric title
8153 <p><a class="mw-selflink selflink">0</a>
8158 Link to numeric-equivalent title
8164 <p><a href="/wiki/00" title="00">00</a>
8169 <nowiki> inside a link
8171 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8173 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8178 Non-breaking spaces in title
8180 [[ Main Page ]]
8182 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8186 # Add new article for the test below so that it doesn't red-link
8194 Multiple spaces in titles should normalize to a single underscore
8196 parsoid=wt2html,wt2wt
8202 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8203 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8204 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8207 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8208 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8209 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8214 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8220 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8225 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8231 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8236 Internal link with en linktrail: no apostrophes (T29473)
8242 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8247 Internal link with ca linktrail with apostrophes (T29473)
8253 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8258 Internal link with kaa linktrail with apostrophes (T29473)
8264 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8269 Link with multiple ":" in a subpage-supporting namespace (T65636)
8271 [[User:Foo/Test/63636:Bar|Test]]
8273 <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>
8276 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8279 ## Mainly a sanity check for Parsoid
8281 Handle title parsing for subpages
8301 Link to a subpage from a namespace other than main
8308 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8311 <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>
8315 Ensure that transclusion titles are not url-decoded
8317 subpage title=[[Test]]
8320 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8322 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8325 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8329 Purely hash wikilink
8331 title=[[User:Test/123]]
8336 <p><a href="#a">b</a>
8339 <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>
8343 Serialization of purely hash wikilink
8345 title=[[User:Test/123]]
8349 <p><a href="#a">[[</a></p>
8351 [[#a|<nowiki>[[</nowiki>]]
8353 <p><a href="#a">[[</a>
8358 1. Interaction of linktrail and template encapsulation
8362 <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>
8366 2. Interaction of linktrail and template encapsulation
8370 {{echo|Some [[Fool]]}}s
8372 <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>
8376 3. Interaction of linktrail and template encapsulation
8380 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8382 <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>
8392 Internal link with is link prefix
8396 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8398 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8409 Internal link with is link trail and link prefix
8413 [[mótmælendatrú|xxx]]ar
8415 mótmælenda[[söfnuður]]
8416 mótmælenda[[söfnuður|söfnuðir]]
8417 mótmælenda[[söfnuður|söfnuðir]]xxx
8419 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8420 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8421 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8422 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8423 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8428 Parsoid link trail escaping
8430 parsoid=html2wt,html2html
8432 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8438 Parsoid link prefix escaping
8441 parsoid=html2wt,html2html
8443 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8445 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8449 Parsoid link bracket escaping
8451 parsoid=html2wt,html2html
8453 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8454 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8455 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8456 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8457 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8458 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8466 [[[<nowiki/>[[Test]]]]]
8470 [[[[[<nowiki/>[[Test]]]]]]]
8474 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8482 [http://wp.org ''foo'']
8484 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8485 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8486 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8487 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8492 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8494 [[Foo|{{echo|a}} b {{echo|c}}]]
8496 <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>
8500 Link with angle bracket after anchor
8502 wgFragmentMode=[ 'html5', 'legacy' ]
8506 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8509 <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>
8513 Link with angle bracket after anchor (legacy)
8515 wgFragmentMode=[ 'legacy' ]
8519 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8524 ### Interwiki links (see maintenance/interwiki.sql)
8528 Inline interwiki link
8530 parsoid=wt2html,wt2wt,html2html
8532 [[MeatBall:SoftSecurity]]
8534 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8537 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8541 Inline interwiki link with empty title (T4372)
8543 parsoid=wt2html,wt2wt,html2html
8547 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8550 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8553 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8555 Interwiki link encoding conversion (T3636)
8557 parsoid=wt2html,wt2wt
8559 *[[Wikipedia:ro:Olteniţa]]
8560 *[[Wikipedia:ro:Olteniţa]]
8562 <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>
8563 <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>
8567 <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>
8568 <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>
8572 <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>
8573 <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>
8578 Interwiki link with fragment (T4130)
8580 [[MeatBall:SoftSecurity#foo]]
8582 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8587 Link scenarios with escaped fragments
8589 wgFragmentMode=[ 'html5', 'legacy' ]
8592 [[Foo#Is this great?]]
8593 [[meatball:Foo#Is this great?]]
8595 <p><a href="#Is_this_great?">#Is this great?</a>
8596 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8597 <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>
8600 <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>
8601 <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>
8602 <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>
8606 Link scenarios with escaped fragments (legacy)
8608 wgFragmentMode=[ 'legacy' ]
8611 [[Foo#Is this great?]]
8612 [[meatball:Foo#Is this great?]]
8614 <p><a href="#Is_this_great.3F">#Is this great?</a>
8615 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8616 <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>
8620 # Ideally the wikipedia: prefix here should be proto-relative too
8621 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8622 # define the 'en' prefix, and originally the test used 'wikipedia',
8623 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8626 Different interwiki prefixes mapping to the same URL
8634 [[:wikipedia:Foo|Foo]]
8636 [[wikipedia:en:Foo]]
8638 [[:wikipedia:en:Foo]]
8642 <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>
8644 <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>
8646 <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>
8648 <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>
8650 <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>
8652 <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>
8654 <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>
8658 Interwiki links that cannot be represented in wiki syntax
8661 [[meatball:ok#foo|ok with fragment]]
8662 [[meatball:ok_as_well?|ok ending with ? mark]]
8663 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8664 [http://de.wikipedia.org/wiki/#foo is just fragment]
8667 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8668 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8669 <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>
8670 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8671 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8674 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8675 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8676 <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>
8677 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8678 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8682 Interwiki links: trail
8684 [[wikipedia:Foo|Ba]]r
8686 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8689 <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>
8693 Local interwiki link
8695 parsoid=wt2html,wt2wt,html2html
8697 [[local:Template:Foo]]
8699 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8702 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8705 # Parsoid does not mark self-links, by design.
8707 Local interwiki link: self-link to current page
8710 parsoid=wt2html,wt2wt,html2html
8714 <p><a class="mw-selflink selflink">local:Main Page</a>
8717 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8721 Local interwiki link: prefix only (T66167)
8723 parsoid=wt2html,wt2wt,html2html
8727 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8730 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8734 Local interwiki link: with additional interwiki prefix (T63357)
8736 parsoid=wt2html,wt2wt,html2html
8738 [[local:meatball:Hello]]
8740 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8743 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8747 Multiple local interwiki link prefixes
8749 [[local:local:local:local:mi:local:Foo]]
8751 parsoid=wt2html,wt2wt,html2html
8753 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8756 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8760 ### Interlanguage links
8761 ### Language links (so that searching for '### language' matches..)
8773 <p>Blah blah blah</p>
8774 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8777 ## parsoid html2wt will lose the space variations
8779 Interlanguage link with spacing
8781 parsoid=wt2html,wt2wt,html2html
8789 <p>Blah blah blah</p>
8790 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8794 Double interlanguage link
8803 <p>Blah blah blah</p>
8804 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8805 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8808 ## parsoid html2wt will lose the space variations
8810 Interlanguage link variations
8812 parsoid=wt2html,wt2wt,html2html
8822 <p>Blah blah blah</p>
8823 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8824 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8825 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8829 Escaping of interlanguage links (T129218, T156308)
8833 [[ : zh : Chinese ]]
8836 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8837 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8841 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8842 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8846 Multiple colons escaping interlanguage links
8854 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8859 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8861 [[:::es:Spanish]]</p>
8864 ## parsoid html2wt will normalize the space to _
8866 Space and question mark encoding in interlanguage links (T95473)
8868 parsoid=wt2html,wt2wt,html2html
8876 <p>Blah blah blah</p>
8877 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8881 Interlanguage link, with prefix links
8891 <p>Blah blah blah</p>
8892 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8896 Double interlanguage link, with prefix links (T10897)
8907 <p>Blah blah blah</p>
8908 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8909 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8913 "Extra" interlanguage links (T34189 / gerrit 111390)
8921 <p>Blah blah blah</p>
8922 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8925 ## PHP parser tests script needs an update
8926 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8928 Language links render as inline links if $wgInterwikiMagic=false
8930 wgInterwikiMagic=false
8931 parsoid=wt2html,wt2wt,html2html
8936 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8939 ## PHP parser tests script needs an update
8940 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8942 Language links render as inline links in the Talk namespace
8945 parsoid=wt2html,wt2wt,html2html
8950 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8954 Parsoid-specific test: Wikilinks with should RT properly
8960 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8965 Parsoid T55221: Wikilinks should be properly entity-escaped
8967 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8969 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8970 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8972 He&nbsp;llo [[Foo|He&nbsp;llo]]
8974 He&nbsp;llo He&nbsp;llo
8976 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8977 </p><p>He&nbsp;llo He&nbsp;llo
8981 # html2wt will fail because of title normalization without data-parsoid
8983 Parsoid: handle constructor well
8985 parsoid=wt2html,wt2wt
8991 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8992 </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>
8995 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8997 <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>
9006 # Note that `ko` isn't a known interlanguage prefix
9008 Parsoid: recognize interlanguage links without a target page
9018 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9020 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9023 # Note that `ko` isn't a known interwiki prefix
9025 Parsoid: recognize interwiki links without a target page
9027 parsoid=wt2html,wt2wt,html2html
9033 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9034 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9037 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9038 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9042 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9046 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9049 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9053 Interlanguage link with preceding local interwiki link (T70085)
9055 parsoid=wt2html,wt2wt,html2html
9058 [[local:es:Spanish]]
9061 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9065 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9069 Looks like an interlanguage link, but is actually a local interwiki
9071 parsoid=wt2html,wt2wt,html2html
9077 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9081 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9085 ### Redirects, Parsoid-only
9089 1. Simple redirect to page
9091 #REDIRECT [[Main Page]]
9093 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9097 2. Other redirect variants
9099 #REDIRECT [[Main_Page]]
9101 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9104 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9105 # This tests the Parsoid bail-out code.
9107 3. Other redirect variants
9111 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9113 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9117 4. Redirect to a templated destination
9119 #REDIRECT [[{{echo|Foo}}bar]]
9121 <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"}]]}'/>
9127 parsoid=wt2html,wt2wt
9132 <li>REDIRECT [[]]</li></ol>
9136 Optional colon in #REDIRECT
9138 # the colon is archaic syntax. we support it for wt2html, but we
9139 # don't care that it roundtrips back to the modern syntax.
9140 parsoid=wt2html,html2html
9142 #REDIRECT:[[Main Page]]
9144 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9148 Whitespace in #REDIRECT with optional colon
9150 # the colon and gratuitous whitespace is archaic syntax. we support
9151 # it for wt2html, but we don't care that it roundtrips back to the
9152 # modern syntax (without extra whitespace)
9153 parsoid=wt2html,html2html
9160 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9164 Piped link in #REDIRECT
9166 # content after piped link is ignored. we support this syntax,
9167 # but don't care that the piped link is lost when we roundtrip this.
9170 #REDIRECT [[Main Page|bar]]
9172 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9176 Redirect to category (T104502)
9178 parsoid=wt2html,wt2wt
9180 #REDIRECT [[Category:Foo]]
9182 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9186 Redirect to category with URL encoding (T104502)
9190 #REDIRECT [[Category%3AFoo]]
9192 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9196 Redirect to category page
9198 #REDIRECT [[:Category:Foo]]
9200 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9204 Redirect to image page (1)
9206 #REDIRECT [[File:Wiki.png]]
9208 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9212 Redirect to image page (2)
9214 #REDIRECT [[Image:Wiki.png]]
9216 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9219 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9220 # Next test confirms this.
9222 Redirect to language (1) (T104918)
9224 parsoid=wt2html,wt2wt,html2html
9226 #REDIRECT [[en:File:Wiki.png]]
9228 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9232 Redirect to language (2) (T104918)
9234 #REDIRECT [[:en:File:Wiki.png]]
9236 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9240 Redirect to interwiki (T104918)
9242 #REDIRECT [[meatball:File:Wiki.png]]
9244 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9248 Non-English #REDIRECT
9252 #TILVÍSUN [[Main Page]]
9254 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9258 Redirect syntax under text isn't considered a redirect
9262 #redirect [[Main Page]]
9265 <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>
9273 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9280 Redirect followed by block on the same line
9284 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9286 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9290 Redirect followed by a newline
9292 #REDIRECT [[Main Page]]
9295 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9300 Redirect followed by multiple newlines
9302 #REDIRECT [[Main Page]]
9307 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9314 Drop duplicate redirects
9318 <link rel="mw:PageProp/redirect" href="./Foo"/>
9319 <link rel="mw:PageProp/redirect" href="./Bar"/>
9320 <link rel="mw:PageProp/redirect" href="./Baz"/>
9339 Broken br tag sanitization
9347 # TODO: Fix html2html mode (T53055)!
9349 Parsoid: Broken br tag recognition
9363 Incorrecly removing closing slashes from correctly formed XHTML
9365 <br style="clear:both;" />
9367 <p><br style="clear:both;" />
9372 Failing to transform badly formed HTML into correct XHTML
9374 <br style="clear: left;">
9375 <br style="clear: right;">
9376 <br style="clear: both;">
9378 <p><br style="clear: left;" />
9379 <br style="clear: right;" />
9380 <br style="clear: both;" />
9384 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9385 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9387 Handling html with a div self-closing tag
9396 <p><div title />
9400 <p><div title=bar />
9401 <div title=bar/>
9403 <div title="bar/"></div>
9407 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9408 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9409 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9410 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9411 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9412 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9416 Handling html with a br self-closing tag
9443 Horizontal ruler (should it add that extra space?)
9452 foo </p><hr /><p> bar
9457 Horizontal ruler -- 4+ dashes render hr
9466 Horizontal ruler -- eats additional dashes on the same line
9475 Horizontal ruler -- does not collapse dashes on consecutive lines
9486 Horizontal ruler -- <4 dashes render as plain text
9495 Horizontal ruler -- Supports content following dashes on same line
9507 ### Block-level elements
9516 <ul><li>Common list</li>
9518 <li>item 3</li></ul>
9529 <ol><li>Numbered list</li>
9531 <li>item 3</li></ol>
9535 # the switch from level 3 to ordered should not introduce a newline between
9546 ***#Number on level 4
9548 **#Number on level 3
9549 **#Number on level 3
9553 #**Level 3, but ordered
9556 <ol><li>with numbers</li></ol>
9557 <ul><li>and bullets</li></ul>
9558 <ol><li>and numbers</li></ol></li>
9560 <ul><li>bullet level 2
9561 <ul><li>bullet level 3
9562 <ol><li>Number on level 4</li></ol></li></ul></li>
9564 <ol><li>Number on level 3</li>
9565 <li>Number on level 3</li></ol></li></ul>
9566 <ol><li>number level 2</li></ol></li>
9568 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9569 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9574 1. Nested mixed wikitext and html list
9577 *<ul><li>ho</li></ul>
9582 <li><ul><li>ho</li></ul></li>
9584 <ul><li>ho</li></ul></li></ul>
9588 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9590 <ul><li>ho</li></ul></li></ul>
9594 2. Nested mixed wikitext and html list (incompatible)
9597 :{{echo|<li>ho</li>}}
9600 <dd><li>ho</li></dd></dl>
9604 <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>
9614 <ul><li>bar</li></ul></li></ul>
9624 <ul><li><ul><li>foo</li></ul></li>
9630 Nested lists 3 (first element empty)
9636 <ul><li>bar</li></ul></li></ul>
9641 Nested lists 4 (first element empty)
9646 <ul><li><ul><li></li></ul></li>
9652 Nested lists 5 (both elements empty)
9657 <ul><li><ul><li></li></ul></li>
9663 Nested lists 6 (both elements empty)
9669 <ul><li></li></ul></li></ul>
9674 Nested lists 7 (skip initial nesting levels)
9678 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9683 Nested lists 8 (multiple nesting transitions)
9691 <ul><li><ul><li>bar</li></ul></li>
9692 <li>baz</li></ul></li>
9698 Nested lists 9 (extension interaction)
9704 <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>
9708 1. Lists with start-of-line-transparent tokens before bullets: Comments
9721 2. Lists with start-of-line-transparent tokens before bullets: Template close
9726 <ul><li>foo bar</li>
9732 List items are not parsed correctly following a <pre> block (T2785)
9738 <ul><li><pre>foo</pre></li>
9739 <li><pre>bar</pre></li>
9743 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9744 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9748 # FIXME: Might benefit from a html/parsoid since this has a template
9750 List items from template
9761 *notSOL{{inner list}}
9765 <li>item 2</li></ul>
9768 <li>item 2</li></ul>
9772 <li>item 2</li></ul>
9777 List interrupted by empty line or heading
9785 <ul><li>foo</li></ul>
9786 <ul><li><ul><li>bar</li></ul></li></ul>
9787 <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>
9788 <ul><li>Another list item</li></ul>
9793 Multiple list tags generated by templates
9811 <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
9812 </li><li about="#mwt1">b
9813 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9817 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9820 <!--This line will NOT split the list-->
9822 <!--This line will NOT split the list either-->
9824 <!--foo--> <!----> <!--This line NOT split the list either-->
9835 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9838 <!--This line will NOT split the list-->
9840 <!--This line will NOT split the list either-->
9842 <!--foo--> <!----> <!--This line NOT split the list
9853 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9854 # That pass could possibly be removed.
9856 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9858 parsoid=wt2html,wt2wt
9862 *{{echo|<li>templated li-hack}}
9863 *<!--foo--><li> unsupported li-hack with preceding comments
9866 <li><li>not a li-hack
9871 <li class="mw-empty-elt"></li><li>li-hack</li>
9872 <li class="mw-empty-elt"></li><li>templated li-hack</li>
9873 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
9875 <li class="mw-empty-elt"></li><li>not a li-hack
9880 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
9881 <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>
9882 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
9884 <ul data-parsoid='{"stx":"html"}'>
9885 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9892 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9921 Parsoid: Test of whitespace serialization with Templated bullets
9928 <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>
9932 # ------------------------------------------------------------------------
9933 # The next set of tests are about Parsoid's ability to handle badly nested
9934 # tags (parse, minimize scope of fixup, and roundtrip back)
9935 # ------------------------------------------------------------------------
9937 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
9938 # Parsoid's list handling is more aware of block structure.
9940 Unbalanced closing block tags break a list
9947 <ul><li>a</li></ul></div><div>
9959 Unbalanced closing non-block tags don't break a list
9967 <ul><li>a<span></span></li>
9972 <li>a<span></span></li>
9978 # Parsoid does some post-dom-building cleanup
9979 # which is why its output differs from Remex.
9981 Unclosed formatting tags that straddle lists are closed and reopened
9983 parsoid=wt2html,wt2wt,html2html
9988 <ol><li><s> a</s></li><s>
9989 </s><li><s>b </s></li></ol>
9991 <ol><li><s> a</s></li>
9992 <li><s>b </s></li></ol>
9995 # Output is ugly because of all the misnested tag fixups.
9996 # Remex is wrapping p-tags around empty elements.
9997 # Parsoid has special-case handling of this pattern of
9998 # wrapping lists in formatting tags.
9999 # FIXME: Should we remove this code from Parsoid? Or add
10000 # special support in Remex? If the latter, maybe just wait
10001 # for Parsoid to become the default parser.
10004 1. List embedded in a formatting tag
10011 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10021 # Output is ugly because of all the misnested tag fixups
10022 # Remex is wrapping p-tags around empty elements.
10023 # Parsoid has code that strips useless p-tags.
10025 2. List embedded in a formatting tag in a misnested way
10032 </small></p><small></small><ul><small><li>a</li>
10033 </small><li><small>b</small></li></ul>
10039 <li><small>b</small></li>
10044 Table with missing opening <tr> tag
10046 parsoid=wt2html,wt2wt
10054 <tbody><tr><td>foo</td>
10063 # Note that the current date is hard-coded as
10064 # 1970-01-01T00:02:03Z (a Thursday)
10065 # when running parser tests. The timezone is also fixed to GMT, so
10066 # local date will be identical to current date.
10069 Magic Word: {{CURRENTDAY}}
10078 Magic Word: {{CURRENTDAY2}}
10087 Magic Word: {{CURRENTDAYNAME}}
10096 Magic Word: {{CURRENTDOW}}
10105 Magic Word: {{CURRENTMONTH}}
10114 Magic Word: {{CURRENTMONTH1}}
10123 Magic Word: {{CURRENTMONTHABBREV}}
10125 {{CURRENTMONTHABBREV}}
10132 Magic Word: {{CURRENTMONTHNAME}}
10134 {{CURRENTMONTHNAME}}
10141 Magic Word: {{CURRENTMONTHNAMEGEN}}
10143 {{CURRENTMONTHNAMEGEN}}
10150 Magic Word: {{CURRENTTIME}}
10159 Magic Word: {{CURRENTHOUR}}
10168 Magic Word: {{CURRENTWEEK}} (T6594)
10177 Magic Word: {{CURRENTYEAR}}
10186 Magic Word: {{CURRENTTIMESTAMP}}
10188 {{CURRENTTIMESTAMP}}
10195 Magic Words LOCAL (UTC)
10199 *{{LOCALMONTHNAME}}
10200 *{{LOCALMONTHNAMEGEN}}
10201 *{{LOCALMONTHABBREV}}
10210 *{{LOCALTIMESTAMP}}
10225 <li>19700101000203</li></ul>
10230 Magic Word: {{FULLPAGENAME}}
10232 title=[[User:Ævar Arnfjörð Bjarmason]]
10233 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10237 <p>User:Ævar Arnfjörð Bjarmason
10242 Magic Word: {{FULLPAGENAMEE}}
10244 title=[[User:Ævar Arnfjörð Bjarmason]]
10245 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10249 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10254 Magic Word: {{TALKSPACE}}
10256 title=[[User:Ævar Arnfjörð Bjarmason]]
10257 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10266 Magic Word: {{TALKSPACE}}, same namespace
10268 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10269 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10278 Magic Word: {{TALKSPACE}}, main namespace
10280 title=[[Parser Test]]
10281 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10290 Magic Word: {{TALKSPACEE}}
10292 title=[[User:Ævar Arnfjörð Bjarmason]]
10293 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10302 Magic Word: {{SUBJECTSPACE}}
10304 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10305 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10314 Magic Word: {{SUBJECTSPACE}}, same namespace
10316 title=[[User:Ævar Arnfjörð Bjarmason]]
10317 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10326 Magic Word: {{SUBJECTSPACE}}, main namespace
10328 title=[[Parser Test]]
10329 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10337 Magic Word: {{SUBJECTSPACEE}}
10339 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10340 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10349 Magic Word: {{NAMESPACE}}
10351 title=[[User:Ævar Arnfjörð Bjarmason]]
10352 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10361 Magic Word: {{NAMESPACEE}}
10363 title=[[User:Ævar Arnfjörð Bjarmason]]
10364 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10373 Magic Word: {{NAMESPACENUMBER}}
10375 title=[[User:Ævar Arnfjörð Bjarmason]]
10376 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10378 {{NAMESPACENUMBER}}
10385 Magic Word: {{SUBPAGENAME}}
10387 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10388 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10397 Magic Word: {{SUBPAGENAMEE}}
10399 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10400 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10409 Magic Word: {{ROOTPAGENAME}}
10411 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10412 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10416 <p>Ævar Arnfjörð Bjarmason
10421 Magic Word: {{ROOTPAGENAMEE}}
10423 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10424 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10428 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10433 Magic Word: {{BASEPAGENAME}}
10435 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10436 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10440 <p>Ævar Arnfjörð Bjarmason
10445 Magic Word: {{BASEPAGENAMEE}}
10447 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10448 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10452 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10457 Magic Word: {{TALKPAGENAME}}
10459 title=[[User:Ævar Arnfjörð Bjarmason]]
10460 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10464 <p>User talk:Ævar Arnfjörð Bjarmason
10469 Magic Word: {{TALKPAGENAMEE}}
10471 title=[[User:Ævar Arnfjörð Bjarmason]]
10472 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10476 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10481 Magic Word: {{SUBJECTPAGENAME}}
10483 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10484 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10486 {{SUBJECTPAGENAME}}
10488 <p>User:Ævar Arnfjörð Bjarmason
10493 Magic Word: {{SUBJECTPAGENAMEE}}
10495 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10496 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10498 {{SUBJECTPAGENAMEE}}
10500 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10505 Magic Word: {{NUMBEROFFILES}}
10507 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10516 Magic Word: {{PAGENAME}}
10518 title=[[User:Ævar Arnfjörð Bjarmason]]
10519 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10523 <p>Ævar Arnfjörð Bjarmason
10528 Magic Word: {{PAGENAME}} with metacharacters
10530 title=[['foo & bar = baz']]
10531 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10535 <p><i>'foo & bar = baz'</i>
10540 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10542 title=[[*RFC 1234 http://example.com/]]
10543 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10547 <p>*RFC 1234 http://example.com/
10552 Magic Word: {{PAGENAMEE}}
10554 title=[[User:Ævar Arnfjörð Bjarmason]]
10555 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10559 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10564 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10566 title=[[*RFC 1234 http://example.com/]]
10567 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10571 <p>*RFC_1234_http://example.com/
10576 Magic Word: {{REVISIONID}}
10578 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10585 flags=vary-revision-id
10589 Magic Word: {{SCRIPTPATH}}
10591 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10599 Magic Word: {{STYLEPATH}}
10601 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10610 Magic Word: {{SERVER}}
10612 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10616 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10621 Magic Word: {{SERVERNAME}}
10623 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10632 Magic Word: {{SITENAME}}
10634 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10643 Magic Word: {{PAGELANGUAGE}}
10646 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10655 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10657 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10666 Case-sensitive magic words, when cased differently, should just be template transclusions
10673 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10674 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10675 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10676 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10681 Case-insensitive magic words should still work with weird casing.
10691 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10695 # From plwiki:PLOS_ONE
10697 Parsoid: Page property magic word with magic word contents
10699 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10701 <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>"}]]}'/>
10704 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10705 # But, this is a limitation of our representation and is documented in
10706 # TemplateHandler.js in processSpecialMagicWord
10708 Parsoid: Template-generated DISPLAYTITLE
10710 {{{{echo|DISPLAYTITLE}}:Foo}}
10714 wgAllowDisplayTitle=true
10715 wgRestrictDisplayTitle=false
10720 <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"}]]}'/>
10724 Namespace 1 {{ns:1}}
10733 Namespace 1 {{ns:01}}
10742 Namespace 0 {{ns:0}} (T6783)
10750 Namespace 0 {{ns:00}} (T6783)
10758 Namespace -1 {{ns:-1}}
10767 Namespace User {{ns:User}}
10776 Namespace User talk {{ns:User_talk}}
10785 Namespace User talk {{ns:uSeR tAlK}}
10794 Namespace File {{ns:File}}
10803 Namespace File {{ns:Image}}
10812 Namespace (lang=de) Benutzer {{ns:User}}
10823 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10829 <p>Benutzer Diskussion
10836 {{urlencode:hi world?!}}
10837 {{urlencode:hi world?!|WIKI}}
10838 {{urlencode:hi world?!|PATH}}
10839 {{urlencode:hi world?!|QUERY}}
10849 Magic Word: prioritize type info over data-parsoid
10853 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10859 Magic Word: serialize on separate line (parsoid)
10861 parsoid=wt2wt,html2wt
10867 foo<meta property="mw:PageProp/notoc"/>bar
10871 Magic Word: rt non-english wikis
10878 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10882 __proto__ is treated as normal wikitext (T105997)
10894 Magic links: internal link to RFC (T2479)
10898 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10901 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10905 Magic links: RFC (T2479)
10909 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10912 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a></p>
10916 Magic links: RFC (T67278)
10918 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10920 <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.
10923 <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>
10927 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10929 RFC      822
10933 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10938 <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>
10944 Magic links: ISBN (T3937)
10948 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10951 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10955 Magic links: ISBN (T67278)
10957 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10959 <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.
10962 <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>
10966 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10968 ISBN      978 0 316 09811 3
10974 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10981 <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>
10989 Magic links: PMID incorrectly converts space to underscore
10993 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10996 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></p>
11000 Magic links: PMID (T67278)
11002 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11004 <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.
11007 <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>
11011 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11013 PMID      1234
11017 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11022 <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>
11027 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11028 # since these are ExtLinkText, not MagicLinkText
11030 Magic links: use appropriate serialization for "almost" magic links.
11032 X[[Special:BookSources/0978739256|foo]]
11034 X[https://tools.ietf.org/html/rfc1234 foo]
11036 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11037 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11040 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11041 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11045 Magic links: All disabled (T47942)
11047 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11053 <p>ISBN 0-306-40615-2
11064 Nonexistent template
11066 {{thistemplatedoesnotexist}}
11068 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11073 Template with invalid target containing tags
11075 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11077 <p>{{a<b>b</b>|foo|a=b|a = b}}
11082 Template with invalid target containing unclosed tag
11084 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11086 <p>{{a<b>|foo|a=b|a = b}}</b>
11091 Template with invalid target containing wikilink
11095 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11098 <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>
11102 Template with just whitespace in it, T70421
11106 <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>
11112 This is a test template
11120 <p>This is a test template
11125 Template with explicit namespace
11129 <p>This is a test template
11137 This is a test template with parameter {{{param}}}
11143 {{paramtest|param=foo}}
11145 <p>This is a test template with parameter foo
11150 Template:paramtestnum
11152 [[{{{1}}}|{{{2}}}]]
11156 Template unnamed parameter
11158 {{paramtestnum|Main Page|the main page}}
11160 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11165 Template:templatesimple
11171 Template:templateredirect
11173 #redirect [[Template:templatesimple]]
11177 Template:templateasargtestnum
11183 Template:templateasargtest
11185 {{template{{{templ}}}}}
11189 Template:templateasargtest2
11195 Template with template name as unnamed argument
11197 {{templateasargtestnum|templatesimple}}
11204 Template with template name as argument
11206 {{templateasargtest|templ=simple}}
11213 Template with template name as argument (2)
11215 {{templateasargtest2|templ=templatesimple}}
11222 Template:templateasargtestdefault
11224 {{{{{templ|templatesimple}}}}}
11234 Template with default value
11236 {{templateasargtestdefault}}
11243 Template with default value (value set)
11245 {{templateasargtestdefault|templ=templa}}
11254 {{templateredirect}}
11259 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11263 Template with argument in separate line
11265 {{ templateasargtest |
11273 Template with complex template as argument
11276 param ={{ templateasargtest |
11277 templ = simple }}}}
11279 <p>This is a test template with parameter (test)
11284 Templates with templated name
11286 {{{{echo|echo}}|foo}}
11287 {{{{echo|inner list}} }}
11291 <ul><li>item 1</li></ul>
11294 <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>
11295 <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>
11298 ## Regression test; the output here isn't really that interesting.
11300 Templates with templated name and top level template args
11302 {{1{{2{{{3}}}|4=5}}}}
11304 <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>
11307 # Parsoid markup is deliberate "broken". This is an edge case.
11308 # See long comment in TemplateHandler.js:convertAttribsToString.
11310 Templates with invalid templated targets
11321 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11326 Template with thumb image (with link in description)
11328 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11330 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>
11333 <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>
11335 <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>
11339 Template:complextemplate
11341 {{{1}}} {{paramtest|
11342 param ={{{param}}}}}
11346 Template with complex arguments
11349 param ={{ templateasargtest |
11350 templ = simple }}|[[Template:complextemplate|link]]}}
11352 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11357 T2553: link with two variables in a piped link
11360 |[[{{{1}}}|{{{2}}}]]
11365 <td>[[{{{1}}}|{{{2}}}]]
11370 <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>
11376 Abort table cell attribute parsing on wikilink
11379 |testing [[one|two]] |three||four
11380 |testing one two |three||four
11381 |testing="[[one|two]]" |three||four
11386 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11392 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11398 <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>
11399 <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>
11400 <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>
11405 Don't abort table cell attribute parsing if wikilink is found in template arg
11408 |Test {{#tag:ref|One two "[[three]]" four}}
11412 <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>
11417 Magic variable as template parameter
11419 {{paramtest|param={{SITENAME}}}}
11421 <p>This is a test template with parameter MediaWiki
11428 [[{{{param}}}|link]]
11432 Template parameter as link source
11434 {{linktest|param=Main Page}}
11436 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11441 Template:paramtest2
11443 including another template, {{paramtest|param={{{arg}}}}}
11447 Template passing argument to another template
11449 {{paramtest2|arg='hmm'}}
11451 <p>including another template, This is a test template with parameter 'hmm'
11462 Template as link source
11466 [[{{linktest2}}|Main Page]]
11468 [[{{linktest2}}]]Page
11470 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11471 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11472 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11490 Template infinite loop
11494 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11499 Template from main namespace
11518 T2529: Template with table, not included at beginning of line
11537 T2523: Template shouldn't eat newline (or add an extra one before table)
11557 T2041: Template parameters shown as broken links
11566 Template with targets containing wikilinks
11572 {{[[{{echo|foo}}]]}}
11574 {{{{echo|[[foo}}]]}}
11576 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11577 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11581 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11582 <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>
11583 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11593 Templates: Double quotes as template target
11600 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11604 ## This test is about making sure Parsoid's data-mw is well formed in the
11605 ## face of multiple templates with intersecting and overlapping ranges. The
11606 ## wikitext itself is wretched.
11608 Templates with intersecting and overlapping ranges
11619 </table><p>ho</p><table>
11623 </td></tr></tbody></table>
11625 <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":""}]]}'>
11627 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11629 <tbody><tr><td>hi</td></tr>
11634 Template:MSGNW test
11636 ''None'' of '''this''' should be
11638 but rather passed unmodified
11646 # hmm, fix this or just deprecate msgnw and document its behavior?
11650 {{msgnw:MSGNW test}}
11652 <p>''None'' of '''this''' should be
11654  but rather passed unmodified
11655 {{test}}
11659 <!-- comment -->
11666 {{int:youhavenewmessages|lots of money|not!}}
11668 <p>You have lots of money (not!).
11673 int keyword - non-existing message
11684 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11688 <includeonly> and <noinclude> being included
11699 <onlyinclude>Foo</onlyinclude>bar
11703 <onlyinclude> being included
11715 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11719 <onlyinclude> and <includeonly> being included
11728 <includeonly> and <noinclude> on a page
11730 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11737 Un-closed <noinclude>
11744 <onlyinclude> on a page
11746 <onlyinclude>Foo</onlyinclude>bar
11753 Un-closed <onlyinclude>
11760 Self-closed noinclude, includeonly, onlyinclude tags
11771 Unbalanced includeonly and noinclude tags
11775 |b</noinclude></noinclude>
11776 |c</noinclude></includeonly>
11777 |d</includeonly></includeonly>
11786 <td>c</includeonly>
11788 <td>d</includeonly></includeonly>
11794 Template:Includeonly section
11797 ==Includeonly section==
11803 T8563: Edit link generation for section shown by <includeonly>
11805 {{includeonly section}}
11807 <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>
11808 <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>
11812 # Uses same input as the contents of [[Template:Includeonly section]]
11814 T8563: Section extraction for section shown by <includeonly>
11819 ==Includeonly section==
11827 T8563: Edit link generation for section suppressed by <includeonly>
11830 ==Includeonly section==
11834 <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>
11839 T8563: Section extraction for section suppressed by <includeonly>
11844 ==Includeonly section==
11852 Un-closed <includeonly>
11857 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11860 ## We used to, but no longer wt2wt this test since the default serializer
11861 ## will normalize the include directives to serialize on their own line.
11862 ## Selser will take care of preserving formatting in scenarios where they
11863 ## intermingled with other wikitext.
11865 Includes and comments at SOL
11867 parsoid=wt2html,html2html
11869 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
11876 <includeonly>can have stuff</includeonly>===here===
11879 <h2><span class="mw-headline" id="hu">hu</span></h2>
11884 <h3><span class="mw-headline" id="here">here</span></h3>
11887 <!-- 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>
11889 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11891 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
11894 <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>
11898 # TODO: test with DOM fragment reuse!
11900 Parsoid: DOM fragment reuse
11902 parsoid=wt2wt,wt2html
11904 a{{echo|b<table></table>c}}d
11916 <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>
11918 <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">
11919 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11920 </span><p about="#mwt2">cd</p>
11922 <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">
11924 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11926 </span><p about="#mwt3">b</p>
11930 Parsoid: Merge double tds (T52603)
11935 |{{echo|{{!}} foo}}
11939 <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>
11944 Parsoid: Merge double tds in nested transclusion content (T52603)
11950 |{{echo|{{!}} foo}}
11954 <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}}]}'>
11956 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11962 ### <includeonly> and <noinclude> in attributes
11965 0. includeonly around the entire attribute
11967 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11969 <p><span id="v2">bar</span>
11974 1. includeonly in html attr key
11976 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11978 <p><span id="foo">bar</span>
11983 2. includeonly in html attr value
11985 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11986 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11988 <p><span id="v1">bar</span>
11989 <span id="v1">bar</span>
11994 3. includeonly in part of an attr value
11996 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11998 <p><span style="color:red;">bar</span>
12003 4. includeonly in table attributes
12027 ### Preprocessor precedence tests
12028 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12030 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12032 Preprocessor precedence 1: link is rightmost opening
12038 But close-brace is not a valid character in a link title:
12041 However, we can still tell this was handled as a link in the preprocessor:
12042 {{echo|[[Foo}}|bar]]|bat}}
12044 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12045 </p><p>But close-brace is not a valid character in a link title:
12047 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12051 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12052 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12053 <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>
12057 Preprocessor precedence 2: template is rightmost opening
12066 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12070 Preprocessor precedence 3: language converter is rightmost opening
12086 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12087 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12088 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12092 Preprocessor precedence 4: left-most angle bracket
12103 Template:Precedence5
12109 Preprocessor precedence 5: tplarg takes precedence over template
12111 {{Precedence5|Bullet}}
12113 <ul><li>Bar</li></ul>
12116 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12120 Preprocessor precedence 6: broken link is rightmost opening
12126 {{echo|[[Foo|bar|bat=baz}}
12129 </p><p>{{echo|[[Foo|bar|bat=baz}}
12132 <p>{{echo|[[Foo}}</p>
12133 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12136 # This next test exposes a difference between PHP and Parsoid:
12137 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12138 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12139 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12140 # outer `[[Foo` extends until the `y]]`
12141 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12142 # intermediate result (after template expansion), and link processing
12143 # happens on this intermediate result, which moves the wikilink
12144 # boundary leftward to `[[Foo|Bar]]`
12145 # 2b) Parsoid works in a single step, so it's going to keep the
12146 # wikilink as extending to the `y]]`
12147 # 3a) Then PHP does linktrail processing which slurps up the trailing
12148 # `xy` inside the link.
12149 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12150 # `z` inside the link.
12151 # This is "correct" behavior. Parsoid's basic worldview is that the
12152 # `]]` inside the template shouldn't be allowed to leak out to affect
12153 # the surrounding wikilink. PHP may match Parsoid (in the future)
12154 # if you use {{#balance}} (T114445).
12157 Preprocessor precedence 7: broken template is rightmost opening
12163 [[Foo|{{echo|Bar]]-x}}-y]]-z
12165 Careful: linktrails can move the end of the wikilink:
12166 [[Foo|{{echo|y']]a}}l]]l
12168 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12169 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12170 </p><p>Careful: linktrails can move the end of the wikilink:
12171 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12174 <p>[[Foo|{{echo|Bar]]</p>
12175 <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>
12176 <p>Careful: linktrails can move the end of the wikilink:
12177 <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>
12181 Preprocessor precedence 8: broken language converter is rightmost opening
12192 Template:Preprocessor_precedence_9
12197 ;7: {{{{{{{4}}}}}}}
12201 Preprocessor precedence 9: groups of braces
12203 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12209 <ul><li>Bar</li></ul>
12213 <dd>{Bullet}</dd></dl>
12216 <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}}]}'>
12221 </dl><ul about="#mwt1">
12223 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12232 Template:Preprocessor_precedence_10
12239 ;6: -{{{{{{4}}}}}}-
12240 ;7: -{{{{{{{5}}}}}}}-
12244 Preprocessor precedence 10: groups of braces with leading dash
12248 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12254 <ul><li>Bar-</li></ul>
12261 <ul><li>Bar-</li></ul>
12268 <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}}]}'>
12270 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12273 </dl><ul about="#mwt1">
12275 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12279 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12282 </dl><ul about="#mwt1">
12284 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12288 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12293 Preprocessor precedence 11: found during visual diff testing
12295 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12297 {{echo|-{{echo|-{{echo|x}}}}}}
12299 {{echo|-{{echo|x}}}}
12301 <p><span>-<span>-x</span></span>
12306 <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>
12308 <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>
12310 <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>
12314 Preprocessor precedence 12: broken language converter closed by brace.
12318 This form breaks the template, which is unfortunate:
12319 *{{echo|foo-{bar}bat}}
12321 But if the broken language converter markup is inside an extension
12322 tag, nothing bad happens:
12323 *<nowiki>foo-{bar}bat</nowiki>
12324 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12325 *<pre>foo-{bar}bat</pre>
12326 *{{echo|<pre>foo-{bar}bat</pre>}}
12328 <tag>foo-{bar}bat</tag>
12329 {{echo|<tag>foo-{bar}bat</tag>}}
12332 <p>This form breaks the template, which is unfortunate:
12334 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12335 <p>But if the broken language converter markup is inside an extension
12336 tag, nothing bad happens:
12338 <ul><li>foo-{bar}bat</li>
12339 <li>foo-{bar}bat</li>
12340 <li><pre>foo-{bar}bat</pre></li>
12341 <li><pre>foo-{bar}bat</pre></li></ul>
12342 <pre>'foo-{bar}bat'
12346 <pre>'foo-{bar}bat'
12351 <p>This form breaks the template, which is unfortunate:</p>
12353 <li>{{echo|foo-{bar}bat}}</li>
12355 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12357 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12358 <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>
12359 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12360 <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>
12362 <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>
12366 Preprocessor precedence 13: broken language converter in external link
12370 *[http://example.com/-{foo Example in URL]
12371 *[http://example.com Example in -{link} description]
12372 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12374 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12375 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12376 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12379 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12380 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12381 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12386 Preprocessor precedence 14: broken language converter in comment
12388 *<!--{{foo}}-->...should be ok
12389 *<!---{{foo}}-->...extra dashes
12390 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12392 <ul><li>...should be ok</li>
12393 <li>...extra dashes</li>
12394 <li>foobat...should be ok</li></ul>
12397 <li><!--{{foo}}-->...should be ok</li>
12398 <li><!---{{foo}}-->...extra dashes</li>
12399 <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>
12404 Preprocessor precedence 15: broken brace markup in headings
12406 wgFragmentMode=[ 'html5', 'legacy' ]
12410 __NOTOC__ __NOEDITSECTION__
12419 ===5 foo{{{bar 5===
12424 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12427 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12430 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12433 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12436 <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>
12439 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12443 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12444 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12446 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12448 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12450 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12452 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12454 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12459 Preprocessor precedence 16: matching closing braces to opening braces
12464 -{{{echo|foo}}bar}-
12469 <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>
12473 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12482 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12486 Preprocessor precedence 18: another rightmost wins scenario
12490 {{ -{{{{1|tplarg}}} }} }-
12492 <p>{{ -{tplarg }} }-
12495 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12499 Preprocessor precedence 19: break syntax
12512 ### Token Stream Patcher tests
12514 ### These tests won't always pass wt2wt and other modes because
12515 ### on serialization, the table will be output on a new line.
12516 ### For now, we are blacklisting them, and using this to test selser.
12520 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12522 parsoid=wt2html,wt2wt
12524 {{echo|}}{| width = '100%'
12528 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12529 <tbody><tr><td>foo</td></tr>
12533 ## We used to, but no longer wt2wt this test since the default serializer
12534 ## will normalize the include directives to serialize on their own line.
12535 ## Selser will take care of preserving formatting in scenarios where they
12536 ## intermingled with other wikitext.
12538 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12542 <includeonly>a</includeonly>{| {{{b}}}
12546 <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":""}]]}'>
12547 <tbody><tr><td>c</td></tr>
12552 Table wikitext syntax outside wiki-tables
12556 ! not a table heading
12559 | class="foo bar" | baz
12567 ! not a table heading
12570 | class="foo bar" | baz
12579 ### Testing parsing of templates where a template arg
12580 ### has the same name as the template itself.
12586 {{{quote|{{{1}}}}}}
12590 Templates: Template Name/Arg clash: 1. Use of positional param
12599 Templates: Template Name/Arg clash: 2. Use of named param
12601 {{quote|quote=foo}}
12608 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12617 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12621 Templates: 1. Simple use
12630 Templates: 2. Inside a block tag
12632 <div>{{echo|Foo}}</div>
12633 <blockquote>{{echo|Foo}}</blockquote>
12636 <blockquote>Foo</blockquote>
12640 <blockquote><p>Foo</p></blockquote>
12644 Templates: P-wrapping: 1a. Templates on consecutive lines
12655 Templates: P-wrapping: 1b. Templates on consecutive lines
12669 Templates: P-wrapping: 1c. Templates on consecutive lines
12672 {{echo|bar}} <div>baz</div>
12681 bar </p><div>baz</div>
12685 Templates: P-wrapping: 1d. Template preceded by comment-only line
12694 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12698 Templates: Inline Text: 1. Multiple template uses
12700 {{echo|Foo}}bar{{echo|baz}}
12707 Templates: Inline Text: 2. Back-to-back template uses
12709 {{echo|Foo}}{{echo|bar}}
12716 Templates: Block Tags: 1. Multiple template uses
12718 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12720 <div>Foo</div><div>bar</div><div>baz</div>
12725 Templates: Block Tags: 2. Back-to-back template uses
12727 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12729 <div>Foo</div><div>bar</div>
12733 # This is an edge case relating to paragraph wrapping.
12735 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12740 <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
12745 Templates: Links: 1. Simple example
12747 {{echo|[[Foo|bar]]}}
12749 <p><a href="/wiki/Foo" title="Foo">bar</a>
12754 Templates: Links: 2. Generation of link href
12756 [[{{echo|Foo}}|bar]]
12758 <p><a href="/wiki/Foo" title="Foo">bar</a>
12763 Templates: Links: 3. Generation of part of a link href
12765 [[Fo{{echo|o}}|bar]]
12767 [[Foo{{echo|bar}}]]
12769 [[Foo{{echo|bar}}baz]]
12771 [[Foo{{echo|bar}}|bar]]
12773 [[:Foo{{echo|bar}}]]
12775 [[:Foo{{echo|bar}}|bar]]
12777 <p><a href="/wiki/Foo" title="Foo">bar</a>
12778 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12779 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12780 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12781 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12782 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12787 Templates: Links: 4. Multiple templates generating link href
12789 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12791 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12796 Templates: Links: 5. Generation of link text
12798 [[Foo|{{echo|bar}}]]
12800 <p><a href="/wiki/Foo" title="Foo">bar</a>
12805 Templates: Links: 5. Nested templates (only outermost template should be marked)
12807 {{echo|[[{{echo|Foo}}|bar]]}}
12809 <p><a href="/wiki/Foo" title="Foo">bar</a>
12814 Templates: HTML Tag: 1. Generation of HTML attr. key
12816 <div {{echo|style}}="color:red;">foo</div>
12818 <div style="color:red;">foo</div>
12823 Templates: HTML Tag: 2. Generation of HTML attr. value
12825 <div style={{echo|'color:red;'}}>foo</div>
12827 <div style="color:red;">foo</div>
12832 Templates: HTML Tag: 3. Generation of HTML attr key and value
12834 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12836 <div style="color:red;">foo</div>
12841 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12843 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12845 <div title="This is a long title with just one piece templated">foo</div>
12850 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12852 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12854 <div title="This is a long title with just one piece templated">foo</div>
12859 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12861 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12863 <div title="This is a long title with just one piece templated">foo</div>
12867 # SSS FIXME: While it is great we added support for all this,
12868 # do we want to make this part of the spec? Maybe we want to
12869 # deprecate this kind of usage in the future?
12871 Templates: HTML Tag: 7. Generation of partial attribute key string
12873 <div st{{echo|yle}}="color:red;">foo</div>
12875 <div style="color:red;">foo</div>
12880 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12882 <div {{echo|1=id="v1"}}>bar</div>
12884 <div id="v1">bar</div>
12889 Templates: HTML Tag: 9. Multiple template-generated attributes
12891 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12893 <div id="v1" title="foo">bar</div>
12898 Templates: Support for templates generating attributes and content
12900 {| {{mixed_attr_content_template}}
12905 <table style="color:red;" title="T48811">
12915 <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|}"]}'>
12924 1. Entities and nowikis inside templated attributes should be handled correctly
12926 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12928 <div style="background:#f9f9f9;">foo</div>
12931 <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>
12935 2. Entities and nowikis inside templated attributes should be handled correctly
12938 |{{table_attribs_3}}
12943 <td style="background:#f9f9f9;">Foo
12948 <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>
12953 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12956 |{{table_attribs_3}}
12961 <td style="background:#f9f9f9;">Foo
12965 <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}}]}'>
12966 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12972 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12975 |{{table_attribs_6}} hi
12980 <td style="background: red;">hi
12985 <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>
12990 Templates: HTML Tables: 1. Generating start of a HTML table
12992 {{echo|<table><tr><td>foo</td>}}</tr></table>
12994 <table><tr><td>foo</td></tr></table>
12999 Templates: HTML Tables: 2a. Generating middle of a HTML table
13001 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13003 <table><tr><td>foo</td></tr></table>
13008 Templates: HTML Tables: 2b. Generating middle of a HTML table
13010 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13012 <table><tr><td>foo</td></tr></table>
13017 Templates: HTML Tables: 3. Generating end of a HTML table
13019 <table><tr>{{echo|<td>foo</td></tr></table>}}
13021 <table><tr><td>foo</td></tr></table>
13026 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13028 {{echo|<table>}}<tr><td>foo</td></tr></table>
13030 <table><tr><td>foo</td></tr></table>
13035 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13037 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13039 <table><tr><td>foo</td></tr></table>
13044 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13046 <table><tr>{{echo|<td>}}foo</td></tr></table>
13048 <table><tr><td>foo</td></tr></table>
13053 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13055 <table><tr><td>foo{{echo|</td>}}</tr></table>
13057 <table><tr><td>foo</td></tr></table>
13062 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13064 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13066 <table><tr><td>foo</td></tr></table>
13071 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13073 <table><tr><td>foo</td></tr>{{echo|</table>}}
13075 <table><tr><td>foo</td></tr></table>
13080 Templates: HTML Tables: 5. Proper fostering of categories from inside
13082 parsoid=wt2html,wt2wt
13084 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13085 <!--Two categories (T52330)-->
13086 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13088 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13089 <!--Two categories (T52330)-->
13090 <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>
13094 Templates: Wiki Tables: 1a. Fostering of entire template content
13102 <tr><td></td></tr></table>
13107 <table><tbody><tr><td></td></tr></tbody></table>
13109 <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">
13115 Templates: Wiki Tables: 1b. Fostering of entire template content
13128 <tr><td></td></tr></table>
13136 <tbody><tr><td></td></tr></tbody></table>
13138 <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|}"]}'>
13140 </div><table about="#mwt3">
13146 Templates: Wiki Tables: 2. Fostering of partial template content
13156 <tr><td></td></tr></table>
13161 <div>b</div><table>
13162 <tbody><tr><td></td></tr></tbody></table>
13164 <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">
13171 Templates: Wiki Tables: 3. td-content via multiple templates
13174 {{echo|{{pipe}}a}}{{echo|b}}
13185 Templates: Wiki Tables: 4. Templated tags, no content
13191 <tr><td></td></tr></table>
13196 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13210 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13223 ## This test case is very specific to Parsoid's internals
13224 ## and is hence only tested for Parsoid's code. Parsoid uses
13225 ## a <meta> marker tag for <ref> tags and they are expanded
13226 ## much later. We are verifying that this <meta> tag usage
13227 ## doesn't prevent foster parenting.
13229 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13231 {{PartialTable}}<ref>foo</ref>
13236 <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">
13240 <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>
13244 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13254 <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{{!}}}"]}'>
13255 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13259 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13264 Templates: Lists: Multi-line list-items via templates
13266 *{{echo|a {{nonexistent|
13268 *{{echo|b {{nonexistent|
13271 <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>
13272 <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>
13277 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13279 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13281 <p><i>ab</i>c<i>d</i>e
13286 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13287 (PHP parser generates misnested html)
13289 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13291 <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>
13295 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13296 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13298 parsoid=wt2html,wt2wt
13300 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13302 <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>
13303 <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>
13304 <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>
13308 Templates: Ugly nesting: 4. Divs opened/closed across templates
13310 a<div>b{{echo|c</div>d}}e
13315 <p>a</p><div>bc</div><p>de
13320 Templates: Ugly templates: 3. newline-only template parameter
13329 # This looks like a bug: a single newline triggers p/br for some reason.
13331 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13340 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13341 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13343 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13349 <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
13350 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13354 # T66017 -- ugly wikitext with fostered content generates two template ranges
13355 # that are "identical" and generate nesting cycles in the algorithm
13357 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13359 {{echo|<table><tr><td><table>}}
13363 <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"}'>
13364 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13365 </table></td></tr></tbody></table>
13369 Templates: Parameters substituted at the top-level
13371 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13375 <p><i>who</i> me? <b>never!</b>
13379 <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>
13381 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13385 Templates: Param with empty arg in the final position
13389 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13393 Parser Functions: 1. Simple example
13402 Parser Functions: 2. Nested use (only outermost should be marked up)
13411 ### Pre-save transform tests
13414 pre-save transform: subst:
13420 This is a test template
13424 pre-save transform: normal template
13434 pre-save transform: nonexistent template
13438 {{thistemplatedoesnotexist}}
13440 {{thistemplatedoesnotexist}}
13444 pre-save transform: subst magic variables
13453 # This is T2089, which I fixed. -- wtm
13455 pre-save transform: subst: templates with parameters
13459 {{subst:paramtest|param="something else"}}
13461 This is a test template with parameter "something else"
13465 Template:nowikitest
13467 <nowiki>'''not wiki'''</nowiki>
13471 pre-save transform: nowiki in subst (T3188)
13475 {{subst:nowikitest}}
13477 <nowiki>'''not wiki'''</nowiki>
13481 Template:commenttest
13483 This template has <!-- a comment --> in it.
13487 pre-save transform: comment in subst (T3936)
13491 {{subst:commenttest}}
13493 This template has <!-- a comment --> in it.
13497 pre-save transform: unclosed tag
13501 <nowiki>'''not wiki'''
13503 <nowiki>'''not wiki'''
13507 pre-save transform: mixed tag case
13511 <NOwiki>'''not wiki'''</noWIKI>
13513 <NOwiki>'''not wiki'''</noWIKI>
13517 pre-save transform: unclosed comment in <nowiki>
13521 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13523 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13526 # Leading @ in this template definition works around a limitation
13527 # in parsoid's parserTests which otherwise strips the <span> from the
13528 # result (confusing it for a template wrapper)
13532 @<span onmouseover="alert('crap')">Oh no</span>
13536 (confirming safety of fix for subst T3936)
13538 {{Template:dangerous}}
13540 <p>@<span>Oh no</span>
13545 pre-save transform: comment containing gallery (T7024)
13549 <!-- <gallery>data</gallery> -->
13551 <!-- <gallery>data</gallery> -->
13555 pre-save transform: comment containing extension
13559 <!-- <tag>data</tag> -->
13561 <!-- <tag>data</tag> -->
13565 pre-save transform: comment containing nowiki
13569 <!-- <nowiki>data</nowiki> -->
13571 <!-- <nowiki>data</nowiki> -->
13575 pre-save transform: <noinclude> in subst (T5298)
13585 pre-save transform: <onlyinclude> in subst (T5298)
13589 {{subst:Includes2}}
13597 {{<includeonly>subst:</includeonly>Includes}}
13601 Template:SafeSubstTest
13603 {{<includeonly>safesubst:</includeonly>Includes}}
13607 T24297: safesubst: works during PST
13611 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13617 T24297: safesubst: works during normal parse
13626 subst: does not work during normal parse
13630 <p>{{subst:Includes}}
13635 pre-save transform: context links ("pipe trick")
13639 [[Article (context)|]]
13642 [[Bar:Article (context)|]]
13643 [[:Bar:Article (context)|]]
13645 [[|Article (context)]]
13649 [[Article (context)|Article]]
13650 [[Bar:Article|Article]]
13651 [[:Bar:Article|Article]]
13652 [[Bar:Article (context)|Article]]
13653 [[:Bar:Article (context)|Article]]
13655 [[Article (context)]]
13656 [[Bar:X (Y) Z|X (Y) Z]]
13657 [[:Bar:X (Y) Z|X (Y) Z]]
13661 pre-save transform: context links ("pipe trick") with interwiki prefix
13665 [[interwiki:Article|]]
13666 [[:interwiki:Article|]]
13667 [[interwiki:Bar:Article|]]
13668 [[:interwiki:Bar:Article|]]
13670 [[interwiki:Article|Article]]
13671 [[:interwiki:Article|Article]]
13672 [[interwiki:Bar:Article|Bar:Article]]
13673 [[:interwiki:Bar:Article|Bar:Article]]
13677 pre-save transform: context links ("pipe trick") with parens in title
13679 pst title=[[Somearticle (context)]]
13683 [[Article (context)|Article]]
13687 pre-save transform: context links ("pipe trick") with comma in title
13689 pst title=[[Someplace, Somewhere]]
13692 [[Otherplace, Elsewhere|]]
13693 [[Otherplace, Elsewhere, Anywhere|]]
13695 [[Otherplace, Somewhere|Otherplace]]
13696 [[Otherplace, Elsewhere|Otherplace]]
13697 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13701 pre-save transform: context links ("pipe trick") with parens and comma
13703 pst title=[[Someplace (IGNORED), Somewhere]]
13706 [[Otherplace (place), Elsewhere|]]
13708 [[Otherplace, Somewhere|Otherplace]]
13709 [[Otherplace (place), Elsewhere|Otherplace]]
13713 pre-save transform: context links ("pipe trick") with comma and parens
13715 pst title=[[Who, me? (context)]]
13718 [[Me, Myself, and I (1937 song)|]]
13720 [[Yes, you. (context)|Yes, you.]]
13721 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13725 pre-save transform: context links ("pipe trick") with namespace
13727 pst title=[[Ns:Somearticle]]
13731 [[Ns:Article|Article]]
13735 pre-save transform: context links ("pipe trick") with namespace and parens
13737 pst title=[[Ns:Somearticle (context)]]
13741 [[Ns:Article (context)|Article]]
13745 pre-save transform: context links ("pipe trick") with namespace and comma
13747 pst title=[[Ns:Somearticle, Context, Whatever]]
13751 [[Ns:Article, Context, Whatever|Article]]
13755 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13757 pst title=[[Ns:Somearticle, Context (context)]]
13761 [[Ns:Article (context)|Article]]
13765 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13767 pst title=[[Ns:Somearticle (IGNORED), Context]]
13771 [[Ns:Article, Context|Article]]
13775 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13779 [[Article(context)|]]
13780 [[Bar:Article(context)|]]
13781 [[:Bar:Article(context)|]]
13782 [[|Article(context)]]
13786 [[Article(context)|Article]]
13787 [[Bar:Article(context)|Article]]
13788 [[:Bar:Article(context)|Article]]
13789 [[Article(context)]]
13790 [[Bar:X(Y)Z|X(Y)Z]]
13791 [[:Bar:X(Y)Z|X(Y)Z]]
13795 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13799 [[Article (context)|]]
13800 [[Bar:Article (context)|]]
13801 [[:Bar:Article (context)|]]
13802 [[|Article (context)]]
13806 [[Article (context)|Article]]
13807 [[Bar:Article (context)|Article]]
13808 [[:Bar:Article (context)|Article]]
13809 [[Article (context)]]
13810 [[Bar:X (Y) Z|X (Y) Z]]
13811 [[:Bar:X (Y) Z|X (Y) Z]]
13815 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13819 [[Article(context)|]]
13820 [[Bar:Article(context)|]]
13821 [[:Bar:Article(context)|]]
13822 [[|Article(context)]]
13826 [[Article(context)|Article]]
13827 [[Bar:Article(context)|Article]]
13828 [[:Bar:Article(context)|Article]]
13829 [[Article(context)]]
13830 [[Bar:X(Y)Z|X(Y)Z]]
13831 [[:Bar:X(Y)Z|X(Y)Z]]
13835 pre-save transform: context links ("pipe trick") with commas (T23660)
13839 [[Article (context), context|]]
13840 [[Article (context),context|]]
13841 [[Bar:Article (context), context|]]
13842 [[Bar:Article (context),context|]]
13843 [[:Bar:Article (context), context|]]
13844 [[:Bar:Article (context),context|]]
13846 [[Article (context), context|Article]]
13847 [[Article (context),context|Article]]
13848 [[Bar:Article (context), context|Article]]
13849 [[Bar:Article (context),context|Article]]
13850 [[:Bar:Article (context), context|Article]]
13851 [[:Bar:Article (context),context|Article]]
13855 Parsoid: backwards pipe trick
13862 <p>[[|<b>bar</b>]]</p>
13866 pre-save transform: trim trailing empty lines
13870 Empty lines are trimmed
13876 Empty lines are trimmed
13880 pre-save transform: Signature expansion
13887 * <noinclude>~~~</noinclude>
13888 * <includeonly>~~~</includeonly>
13889 * <onlyinclude>~~~</onlyinclude>
13891 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13892 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13893 * 00:02, 1 January 1970 (UTC)
13894 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13895 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13896 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13901 ParserOutput flags from signature expansion (T84843)
13908 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13909 flags=user-signature
13914 pre-save transform: Signature expansion in nowiki tags (T2093)
13920 <nowiki>~~~~</nowiki>
13922 <includeonly><nowiki>~~~~</nowiki></includeonly>
13924 <noinclude><nowiki>~~~~</nowiki></noinclude>
13926 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13928 {{subst:Foo}} shall be converted to FOO
13930 As well as inside noinclude/onlyinclude
13931 <noinclude>{{subst:Foo}}</noinclude>
13932 <onlyinclude>{{subst:Foo}}</onlyinclude>
13934 But not inside includeonly
13935 <includeonly>{{subst:Foo}}</includeonly>
13939 <nowiki>~~~~</nowiki>
13941 <includeonly><nowiki>~~~~</nowiki></includeonly>
13943 <noinclude><nowiki>~~~~</nowiki></noinclude>
13945 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13947 FOO shall be converted to FOO
13949 As well as inside noinclude/onlyinclude
13950 <noinclude>FOO</noinclude>
13951 <onlyinclude>FOO</onlyinclude>
13953 But not inside includeonly
13954 <includeonly>{{subst:Foo}}</includeonly>
13958 Parsoid: Recognize nowiki with trailing space in tags
13962 <nowiki ><div>[[foo]]</nowiki >
13970 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13977 Parsoid: Recognize nowiki with odd capitalization
13981 <noWikI ><div>[[foo]]</Nowiki >
13983 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13988 Parsoid: Escape nowiki with trailing space in tags
13992 <p><nowiki > foo </nowiki ></p>
13993 <p>a<nowiki />b</p>
13994 <p>c<nowiki/ >d</p>
13996 <nowiki > foo </nowiki >
14004 Parsoid: Escape weird noWikI capitalizations
14008 <p><noWikI > foo </NoWikI ></p>
14010 <noWikI > foo </NoWikI >
14014 ### Message transform tests
14017 message transform: magic variables
14027 message transform: should not transform wiki markup
14037 message transform: <noinclude> in transcluded template (T6926)
14047 message transform: <onlyinclude> in transcluded template (T6926)
14057 {{#special:}} page name, known
14061 {{#special:Recentchanges}}
14063 Special:RecentChanges
14067 {{#special:}} page name with subpage, known
14071 {{#special:Recentchanges/param}}
14073 Special:RecentChanges/param
14077 {{#special:}} page name, unknown
14081 {{#special:foobar nonexistent}}
14083 Special:Foobar nonexistent
14087 {{#speciale:}} page name, known
14091 {{#speciale:Recentchanges}}
14093 Special:RecentChanges
14097 {{#speciale:}} page name with subpage, known
14101 {{#speciale:Recentchanges/param}}
14103 Special:RecentChanges/param
14107 {{#speciale:}} page name, unknown
14111 {{#speciale:foobar nonexistent}}
14113 Special:Foobar_nonexistent
14119 ### For Parsoid-specific tests, see
14120 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14125 parsoid=wt2html,wt2wt,html2html
14127 [[Image:foobar.jpg]]
14129 <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>
14132 <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>
14136 Serialize simple image with span wrapper
14140 <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>
14142 [[File:Foobar.jpg]]
14146 Simple image (using File: namespace, now canonical)
14148 [[File:Foobar.jpg]]
14150 <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>
14153 <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>
14157 Right-aligned image
14159 [[File:Foobar.jpg|right]]
14161 <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>
14164 <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>
14170 [[File:Foobar.jpg|right|Caption text]]
14172 <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>
14175 <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>
14179 Image with caption, T55312 #1
14181 [[File:Foobar.jpg|right|Caption page stuff]]
14183 <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>
14186 <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>
14190 Image with caption, T55312 #2
14192 [[File:Foobar.jpg|right|Caption page=]]
14194 <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>
14197 <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>
14201 Image with caption, T55312 #3
14203 [[File:Foobar.jpg|right|Caption page=stuff]]
14205 <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>
14208 <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>
14212 Image caption with pipe entity
14214 [[File:Foobar.jpg|thumb|one | two]]
14215 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14217 <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>
14218 <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>
14221 <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>
14222 <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>
14226 Allow empty links in image captions (T62753)
14230 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14235 <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>
14238 <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>
14240 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14241 </figcaption></figure>
14245 Titles in unlinked images (T23454)
14247 [[File:Foobar.jpg|link=|stuff]]
14249 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14252 <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>
14256 Link with empty target
14265 Image with link trail
14267 Linktrails should not work for images: [[File:Foobar.jpg]]s
14269 <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
14272 <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>
14276 Image with empty attribute
14278 parsoid=wt2html,wt2wt,html2html
14280 [[File:Foobar.jpg|right||Caption text]]
14282 <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>
14285 <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>
14289 1. Block image with individual attributes from templates
14291 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14293 <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>
14296 <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>
14300 2. Block Image with individual attributes from templates
14302 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14304 <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>
14307 <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>
14311 3. Inline image with individual attributes from templates
14313 [[File:Foobar.jpg|{{echo|50px}}]]
14315 <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>
14318 <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>
14321 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14322 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14324 Image with multiple attributes from the same template
14326 [[File:Foobar.jpg|{{image_attribs}}]]
14328 <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>
14331 <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>
14335 Image with link tails
14339 123[[File:Foobar.jpg]]456
14340 123[[File:Foobar.jpg|right]]456
14341 123[[File:Foobar.jpg|thumb]]456
14343 <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
14345 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
14346 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
14349 <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
14351 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
14352 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
14355 <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>
14356 <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>
14357 <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>
14361 Image with multiple captions -- only last one is accepted
14363 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14365 <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>
14368 <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>
14372 Image with multiple widths -- use last
14374 [[File:Foobar.jpg|200px|300px|caption]]
14376 <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>
14379 <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>
14383 Image with multiple alignments -- use first (T50664)
14387 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14389 [[File:Foobar.jpg|middle|text-top|caption]]
14391 <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>
14392 <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>
14395 <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>
14396 <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>
14400 Image with width attribute at different positions
14402 [[File:Foobar.jpg|200px|right|Caption]]
14403 [[File:Foobar.jpg|right|200px|Caption]]
14404 [[File:Foobar.jpg|right|Caption|200px]]
14406 <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>
14407 <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>
14408 <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>
14411 <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>
14412 <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>
14413 <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>
14416 # a sad bit of backward-compatibility
14418 Image with size specified with pxpx (T15500, T53628)
14420 parsoid=wt2html,wt2wt,html2html
14422 [[File:Foobar.jpg|20pxpx]]
14423 [[File:Foobar.jpg|200x20pxpx]]
14425 <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>
14426 <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>
14429 <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>
14433 Image with link parameter, wiki target
14435 [[File:Foobar.jpg|link=Main Page]]
14437 <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>
14440 <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>
14443 # parsoid T51293 (part 1)
14445 Image with link parameter, URL target
14447 [[File:Foobar.jpg|link=http://example.com/]]
14449 <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>
14452 <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>
14455 # parsoid T51293 (part 2)
14457 Image with link parameter, protocol-less URL target
14459 [[File:Foobar.jpg|link=//example.com/]]
14461 <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>
14464 <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>
14468 Escaping non-block captions (T107435)
14471 "modes": ["wt2wt"],
14473 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14477 [[Image:Foobar.jpg|caption]]
14479 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14482 # wgExternalLinkTarget not supported by Parsoid
14484 Image with link parameter, wgExternalLinkTarget
14486 [[Image:foobar.jpg|link=http://example.com/]]
14488 wgExternalLinkTarget='foobar'
14490 <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>
14495 Image with link parameter, wgNoFollowLinks set to false
14497 [[Image:foobar.jpg|link=http://example.com/]]
14499 wgNoFollowLinks=false
14501 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14506 Image with link parameter, wgNoFollowDomainExceptions
14508 [[Image:foobar.jpg|link=http://example.com/]]
14510 wgNoFollowDomainExceptions='example.com'
14512 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14516 # wgExternalLinkTarget not supported by Parsoid
14518 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14520 [[Image:foobar.jpg|link=http://example.com/|Title]]
14522 wgExternalLinkTarget='foobar'
14524 <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>
14529 Image with empty link parameter
14531 [[File:Foobar.jpg|link=]]
14533 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14536 <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>
14540 Image with link parameter (wiki target) and unnamed parameter
14542 [[File:Foobar.jpg|link=Main_Page|Title]]
14544 <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>
14547 <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>
14551 Image with link parameter (URL target) and unnamed parameter
14553 [[File:Foobar.jpg|link=http://example.com/|Title]]
14555 <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>
14558 <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>
14562 Thumbnail image with link parameter
14565 parsoid=wt2html,wt2wt,html2html
14567 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14569 <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>
14572 <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>
14576 Manually-specified thumbnail image
14580 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14582 <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>
14585 <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>
14589 Manually-specified thumbnail image with explicit link to wiki page
14592 parsoid=wt2html,wt2wt,html2html
14594 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14596 <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>
14599 <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>
14603 Manually-specified thumbnail image with explicit link to url
14606 parsoid=wt2html,wt2wt,html2html
14608 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14610 <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>
14613 <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>
14617 Manually-specified thumbnail image with explicit no link
14620 parsoid=wt2html,wt2wt,html2html
14622 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14624 <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>
14627 <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>
14631 Manually-specified thumbnail image with explicit link and alt text
14634 parsoid=wt2html,wt2wt,html2html
14636 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14638 <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>
14641 <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>
14645 Image with frame and link
14647 parsoid=wt2html,wt2wt,html2html
14649 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14651 <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>
14654 <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>
14658 Image with frame and link and explicit alt
14660 parsoid=wt2html,wt2wt,html2html
14662 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14664 <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>
14667 <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>
14671 Image with wiki markup in implicit alt
14673 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14675 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14677 <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>
14678 </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>
14681 <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>
14683 <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>
14687 Alt image option should handle most kinds of wikitext without barfing
14689 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14691 <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>
14694 <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>
14698 Image with table with attributes in caption
14700 parsoid=wt2html,html2html
14702 [[File:Foobar.jpg|thumb|
14709 <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>
14710 <table class="123">
14711 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14714 </figcaption></figure>
14718 Image with table with rows from templates in caption
14720 [[File:Foobar.jpg|thumb|
14726 <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>
14728 <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>
14730 </figcaption></figure>
14734 Image with nested tables in caption
14736 [[File:Foobar.jpg|thumb|Foo<br />
14745 <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}'/>
14749 <tbody><tr><td>z</td></tr>
14750 </tbody></table></td></tr>
14752 </figcaption></figure>
14755 ###################
14756 # Conflicting image format options.
14757 # First option specified should 'win'.
14758 # All three cases in each test should be identical.
14761 Image with 'frameless' first.
14763 parsoid=wt2html,wt2wt,html2html
14765 [[File:Foobar.jpg|frameless|caption]]
14767 [[File:Foobar.jpg|frameless|frame|caption]]
14769 [[File:Foobar.jpg|frameless|thumb|caption]]
14771 <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>
14772 </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>
14773 </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>
14776 <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>
14777 <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>
14778 <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>
14782 Image with 'frame' first.
14784 parsoid=wt2html,wt2wt,html2html
14786 [[File:Foobar.jpg|frame|caption]]
14787 [[File:Foobar.jpg|frame|frameless|caption]]
14788 [[File:Foobar.jpg|frame|thumb|caption]]
14790 <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>
14791 <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>
14792 <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>
14795 <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>
14796 <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>
14797 <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>
14801 Image with 'thumb' first.
14803 parsoid=wt2html,wt2wt,html2html
14805 [[File:Foobar.jpg|thumb|caption]]
14806 [[File:Foobar.jpg|thumb|frameless|caption]]
14807 [[File:Foobar.jpg|thumb|frame|caption]]
14809 <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>
14810 <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>
14811 <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>
14814 <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>
14815 <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>
14816 <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>
14819 ###################
14821 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14822 # and https://phabricator.wikimedia.org/T64258
14823 # Foobar has actual size of 1941x220
14824 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14825 # a scalable format.
14826 # 2. Framed images always ignore size options; always render at default size.
14827 # 3. "Unspecified format" and border are the only types which can be
14831 Image: unspecified format and border enlarge
14833 parsoid=wt2html,wt2wt,html2html
14835 [[File:Foobar.jpg|2000px]]
14837 [[File:Foobar.jpg|border|2000px]]
14839 <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>
14840 </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>
14843 <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>
14844 <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>
14848 Image: "unspecified format" and border reduce
14850 parsoid=wt2html,wt2wt,html2html
14852 [[File:Foobar.jpg|1000px]]
14854 [[File:Foobar.jpg|border|1000px]]
14856 <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>
14857 </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>
14860 <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>
14861 <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>
14865 Image: thumbs reduce
14867 parsoid=wt2html,wt2wt,html2html
14869 [[File:Foobar.jpg|thumb|50px]]
14871 <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>
14874 <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>
14878 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14880 parsoid=wt2html,wt2wt,html2html
14882 [[File:Foobar.jpg|thumb|2000px]]
14884 [[File:Foobar.svg|thumb|2000px]]
14886 <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>
14887 <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>
14890 <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>
14891 <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>
14895 Image: frameless can reduce in size
14897 parsoid=wt2html,wt2wt,html2html
14899 [[File:Foobar.jpg|frameless|50px]]
14901 <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>
14904 <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>
14908 Image: bitmap frameless can't be enlarged past original size, but vector can
14910 parsoid=wt2html,wt2wt,html2html
14912 [[File:Foobar.jpg|frameless|2000px]]
14914 [[File:Foobar.svg|frameless|2000px]]
14916 <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>
14917 </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>
14920 <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>
14921 <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>
14925 Image: framed images are always unscaled.
14927 parsoid=wt2html,wt2wt,html2html
14929 [[File:Foobar.jpg|frame]]
14931 [[File:Foobar.jpg|frame|50px]]
14933 [[File:Foobar.jpg|frame|50x50px]]
14935 [[File:Foobar.jpg|frame|2000px]]
14937 <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>
14938 <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>
14939 <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>
14940 <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>
14943 <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>
14944 <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>
14945 <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>
14946 <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>
14949 ###################
14952 Link to image page- image page normally doesn't exists, hence edit link
14953 Add test with existing image page
14954 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14958 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14963 T20784 Link to non-existent image page with caption should use caption as link text
14965 [[:Image:test|caption]]
14967 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14972 Frameless image caption with a free URL
14974 [[File:Foobar.jpg|http://example.com]]
14976 <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>
14979 <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>
14983 Thumbnail image caption with a free URL
14987 [[File:Foobar.jpg|thumb|http://example.com]]
14989 <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>
14992 <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>
14996 Thumbnail image caption with a free URL and explicit alt
14999 parsoid=wt2html,wt2wt,html2html
15001 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15003 <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>
15006 <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>
15010 SVG thumbnails with no language set
15013 [[File:Foobar.svg|thumb|caption]]
15015 <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>
15018 <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>
15022 SVG thumbnails with language de
15024 parsoid=wt2html,wt2wt,html2html
15026 [[File:Foobar.svg|thumb|caption|lang=de]]
15028 <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>
15031 <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>
15035 SVG thumbnails with invalid language code
15037 parsoid=wt2html,wt2wt,html2html
15039 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15041 <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>
15044 <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>
15048 T3887: A ISBN with a thumbnail
15050 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15052 <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>
15055 <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>
15059 T3887: A RFC with a thumbnail
15061 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15063 <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>
15066 <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>
15070 T3887: A mailto link with a thumbnail
15072 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15074 <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>
15077 <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>
15080 # Pending resolution to T2368
15082 T2648: Frameless image caption with a link
15084 [[File:Foobar.jpg|text with a [[link]] in it]]
15086 <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>
15089 <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>
15093 T2648: Frameless image caption with a link (suffix)
15095 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15097 <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>
15100 <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>
15104 T2648: Frameless image caption with an interwiki link
15106 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15108 <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>
15111 <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>
15115 T2648: Frameless image caption with a piped interwiki link
15117 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15119 <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>
15122 <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>
15126 T107474: Frameless image caption with <nowiki>
15128 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15130 <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>
15134 Escape HTML special chars in image alt text
15136 [[File:Foobar.jpg|& < > "]]
15138 <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>
15141 <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>
15145 Escape HTML special chars in image alt text with LanguageConverter
15149 [[File:Foobar.jpg|& < > "]]
15151 <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>
15154 <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>
15158 Entities in file name and attributes
15160 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15162 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15165 <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>
15169 T2499: Alt text should have Ӓ, not &1234;
15171 [[File:Foobar.jpg|♀]]
15173 <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>
15176 <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>
15180 Broken image caption with link
15182 parsoid=wt2html,wt2wt,html2html
15184 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15186 <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.
15189 <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>
15193 Image caption containing another image
15195 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15197 <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>
15200 <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>
15204 Image: caption containing a newline
15206 [[File:Foobar.jpg|This
15209 <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>
15212 <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>
15216 Image: caption containing leading space
15217 (The leading space should not trigger nowiki escaping in wt2wt mode)
15219 [[File:Foobar.jpg|thumb| bar]]
15221 <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>
15224 <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>
15227 # html/php output not have newlines after table, td, th, etc. because
15228 # Linker::makeThumbLink2() replaces the newlines with spaces since
15229 # the table is inside a caption.
15230 # FIXME: Verify if that circa 2004 fix is still required.
15232 Image: caption containing a table
15234 parsoid=wt2html,wt2wt,html2html
15236 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15242 and some more text.]]
15244 <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>
15247 <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
15250 <tr><th>Foo</th><th>Bar</th></tr>
15253 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15257 T5090: External links other than http: in image captions
15259 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15261 <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>
15264 <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>
15270 parsoid=wt2html,wt2wt,html2html
15272 [[Image:foobar.jpg|a|class=b]]
15274 <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>
15277 <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>
15281 Localized image handling (1).
15283 parsoid=wt2html,wt2wt,html2html
15286 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15288 <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>
15291 <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>
15295 Localized image handling (2).
15298 parsoid=wt2html,wt2wt,html2html
15301 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15303 <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>
15306 <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>
15310 Localized image handling (3).
15315 <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>
15317 [[File:Foobar.jpg|بندانگشتی]]
15321 "border", "frameless" and "class" attributes on an image.
15324 parsoid=wt2html,wt2wt,html2html
15326 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15328 <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>
15331 <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>
15334 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15336 Invalid image attributes (T64500)
15339 parsoid=wt2html,wt2wt,html2html
15341 [[File:Foobar.jpg|thumb|float|left|caption]]
15343 [[File:Foobar.jpg|thumb|righ|caption]]
15345 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15347 <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>
15348 <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>
15349 <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>
15352 <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>
15353 <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>
15354 <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>
15360 #REDIRECT [[File:Barfoo.jpg]]
15363 # FIXME: Parsoid should run this test -- but we'd need to teach the
15364 # mockAPI about the redirected Barfoo.jpg image.
15368 [[Image:Barfoo.jpg]]
15370 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15375 Missing image with uploads disabled
15379 [[File:Foobaz.jpg]]
15381 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15384 <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>
15387 # Parsoid-specific testing for images
15388 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15389 # Currently imperfect due to a flaw in the Parsoid testrunner
15391 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15395 Parsoid-specific image handling - simple image with size and middle alignment
15397 [[File:Foobar.jpg|middle|50px]]
15399 <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>
15403 Parsoid-specific image handling - simple image with size, middle alignment,
15404 non-standard namespace alias
15406 parsoid=wt2wt,wt2html,html2html
15408 [[Image:Foobar.jpg|middle|50px]]
15410 <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>
15414 Parsoid-specific image handling - simple image with size and middle alignment
15417 [[File:Foobar.jpg|50px|middle]]
15419 <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>
15423 Parsoid-specific image handling - simple image with size and middle alignment
15424 and non-standard namespace name
15426 parsoid=wt2html,wt2wt,html2html
15428 [[Image:Foobar.jpg|50px|middle]]
15430 <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>
15434 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15436 [[File:Foobar.jpg|500x10px|baseline|caption]]
15438 <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>
15442 Parsoid-specific image handling - simple image with border and size spec
15444 [[File:Foobar.jpg|50px|border|caption]]
15446 <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>
15450 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15452 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15454 <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>
15458 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15461 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15463 <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>
15467 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15469 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15471 <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>
15475 Parsoid-specific image handling - thumbnail with specific size, halign,
15476 valign, and caption (existing content)
15478 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15480 <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>
15484 Parsoid-specific image handling - framed image with specific size and caption
15487 parsoid=wt2html,wt2wt,html2html
15489 [[File:Foobar.jpg|frame|500x50px|caption]]
15491 <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>
15495 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15498 parsoid=wt2html,wt2wt,html2html
15500 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15502 <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>
15506 Parsoid-specific image handling - frameless image with specific size, border, and caption
15508 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15510 <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>
15514 Parsoid-specific image handling - simple image with a formatted caption
15516 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15518 <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>
15522 Parsoid-specific image handling - caption with a template in it
15524 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15526 <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>
15530 Parsoid-specific image handling - caption with unbalanced tags in it
15532 parsoid=wt2html,wt2wt,html2html
15535 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15539 <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>
15544 Parsoid-specific image handling - empty caption (1)
15546 parsoid=wt2html,wt2wt
15548 [[File:Foobar.jpg|thumb|]]
15550 <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>
15553 # empty captions don't get serialized unless we're in the "round trip" case
15555 Parsoid-specific image handling - empty caption (2)
15559 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15560 <a href="./File:Foobar.jpg">
15561 <img resource="./File:Foobar.jpg"
15562 src="//example.com/images/3/3a/Foobar.jpg"
15563 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15564 height="25" width="220"/>
15566 <figcaption></figcaption>
15569 [[File:Foobar.jpg|thumb]]
15573 Parsoid-specific image handling - whitespace caption
15575 [[File:Foobar.jpg|thumb| ]]
15577 <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>
15581 Parsoid-specific image handling - lang option
15584 [[File:Foobar.svg|lang=de|caption]]
15588 <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>
15592 ## Edge case bugs in Parsoid from T93580
15594 T93580: 1. Templated <ref> inside block images
15596 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15600 <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>
15602 <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>
15606 T93580: 2. <ref> inside inline images
15608 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15612 <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>
15614 <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>
15618 T93580: 3. Templated <ref> inside inline images
15620 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15624 <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>
15626 <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>
15633 Subpage test/subpage
15641 subpage title=[[Subpage test]]
15645 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15650 Subpage noslash link
15652 subpage title=[[Subpage test]]
15656 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15661 Subpage test/1/2/subpage
15667 Relative subpage noslash link
15669 parsoid=wt2wt,wt2html,html2html
15670 subpage title=[[Subpage test/1/2/3/4]]
15676 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15677 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15680 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15681 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15685 Parsoid: dot-slash prefixed wikilinks
15695 </p><p>[[././baz/]]
15700 </p><p>[[././baz/]]
15705 Render invalid page names as plain text (T53090)
15717 [[foo[http://example.com]xyz]]
15719 [[{{echo|./../foo}}|bar]]
15720 [[{{echo|foo/.}}|bar]]
15721 [[{{echo|foo/..}}|bar]]
15722 [[{{echo|foo~~~~bar}}]]
15723 [[{{echo|foo>bar}}]]
15724 [[{{echo|foo././bar}}]]
15725 [[{{echo|foo{bar}}]]
15726 [[{{echo|foo}bar}}]]
15727 [[{{echo|foo[bar}}]]
15728 [[{{echo|foo]bar}}]]
15729 [[{{echo|foo<bar}}]]
15731 <p>[[./../foo|bar]]
15741 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15742 </p><p>[[./../foo|bar]]
15755 <p>[[./../foo|bar]]
15765 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15767 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15768 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15769 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15770 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15771 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15772 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15773 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15774 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15775 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15776 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15777 [[<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>
15785 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15790 T2561: {{/Subpage}}
15792 subpage title=[[Page]]
15796 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15804 Category:MediaWiki User's Guide
15812 [[:Category:MediaWiki User's Guide]]
15814 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15823 [[Category:MediaWiki User's Guide]]
15825 cat=MediaWiki_User's_Guide sort=
15827 <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"}}'/>
15831 PAGESINCATEGORY invalid title fatal (r33546 fix)
15833 {{PAGESINCATEGORY:<bogus>}}
15840 Category with different sort key
15844 [[Category:MediaWiki User's Guide|Foo]]
15846 cat=MediaWiki_User's_Guide sort=Foo
15848 <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"}}'/>
15852 Category with identical sort key
15856 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15858 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15860 <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"}}'/>
15864 Category with empty sort key
15869 [[Category:MediaWiki User's Guide|]]
15871 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15875 Category with empty sort key and parentheses
15880 [[Category:Foo (bar)|]]
15882 [[Category:Foo (bar)|Foo]]
15886 Category with link tail
15891 123[[Category:Foo]]456
15893 123[[Category:Foo]]456
15897 Category with template
15902 [[Category:{{echo|Foo}}]]
15904 [[Category:{{echo|Foo}}]]
15908 Category with template in sort key
15913 [[Category:Foo|{{echo|Bar}}]]
15915 [[Category:Foo|{{echo|Bar}}]]
15919 Category with template in sort key and title
15924 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15926 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15929 ## We used to, but no longer wt2wt this test since the default serializer
15930 ## will normalize all categories to serialize on their own line.
15931 ## This wikitext usage is going to be fairly uncommon in production and
15932 ## selser will take care of preserving formatting in those scenarios.
15934 Category / paragraph interactions
15938 Foo [[Category:Baz]] Bar
15940 Foo [[Category:Baz]]
15948 [[Category:Baz]] Bar
15961 {{echo|[[Category:Baz]]}}
15974 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15975 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15976 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15977 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15978 <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>
15979 <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}}]}'/>
15980 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15983 ## We used to, but no longer wt2wt this test since the default serializer
15984 ## will normalize all categories to serialize on their own line.
15985 ## This wikitext usage is going to be fairly uncommon in production and
15986 ## selser will take care of preserving formatting in those scenarios.
15988 ## The whitespace on the empty line is part of the test. Please do not delete
15990 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15996 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15998 {{echo|[[Category:Foo]] and so should this!}}
16000 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16005 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16007 <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>
16010 ## Parsoid will not try to wt2wt this while preserving newlines because
16011 ## it suppresses excess newlines within list items -- and we don't want to
16012 ## introduce a special case just for categories, which is, in reality somewhat
16013 ## odd behavior -- categories are unlikely to be used in list items like this
16014 ## in top-level pages and are only likely to show up in template-generated
16015 ## list items where this RT-ing is a non-issue.
16017 ## The whitespace on the empty line is part of the test. Please do not delete
16019 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16025 [[Category:Foo]] and this should be part of the same list item
16028 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16030 <ul><li>This and this should be part of the same list item</li>
16031 <li>So should this and this should be part of the same list item</li></ul>
16034 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16035 <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>
16039 ## Newlines and categories that follow the last item of a list
16040 ## are treated differently because this (list followed by categories)
16041 ## is an extremely common pattern on wikis.
16043 3. Categories and newlines: newline suppression for last list item should RT properly
16056 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16058 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16059 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16063 4. Categories and newlines: newline suppression for last list item should RT properly
16071 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16073 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16076 ## only wt2html for this to make sure the algo only applies to the rightmost path
16078 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16091 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16093 <ul><li> d</li></ul></li></ul>
16094 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16097 ## We used to, but no longer wt2wt this test since the default serializer
16098 ## will normalize all categories to serialize on their own line.
16099 ## This wikitext usage is going to be fairly uncommon in production and
16100 ## selser will take care of preserving formatting in those scenarios.
16102 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16106 * a [[Category:Foo]]
16108 <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>
16111 # This test also demonstrates because of newline+category tunneling
16112 # through the list hander, template wrapping doesn't expand to the
16113 # containing list when the list item swallows the category.
16115 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16120 <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
16121 </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>
16125 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16129 {{echo|[[Category:Foo]]
16133 <ul><li> a</li></ul>
16135 <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">
16136 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16137 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16141 9. Categories and newlines: should behave properly with linkprefix (T87753)
16156 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16157 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16161 10. No regressions on internal links following category (T174639)
16163 parsoid=wt2html,html2html
16165 [[Category:Foo]]<div>a
16170 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16173 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16175 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16178 # Note that Parsoid differs slightly from PHP due to T175421
16180 11. Special case where only newlines separate links (T175416)
16182 parsoid=wt2html,html2html
16186 [[Foo]][[es:Alimento]]
16191 <a href="/wiki/Foo" title="Foo">Foo</a>
16192 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16195 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16197 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16199 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16203 Category links with multiple namespaces
16205 [[Category:Project:Foo]]
16207 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16211 Parsoid: Serialize link to category page with colon escape
16217 [[:Category:Foo|Bar]]
16220 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16221 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16225 # We used to, but no longer wt2wt this test since the default serializer
16226 # will normalize all categories to serialize on their own line.
16227 # This wikitext usage is going to be fairly uncommon in production and
16228 # selser will take care of preventing whitespace insertion if this
16229 # occurs in an article.
16231 # html2html disabled for the same reason (whitespace insertion between
16234 # html2wt disabled because it localizes the "Category" namespace.
16236 Link prefix/suffixes aren't applied to category links
16246 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16250 Link prefix/suffixes aren't applied to language links
16260 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16264 Parsoid: Serialize link to file page with colon escape
16270 [[:File:Foo.png|Bar]]
16273 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16274 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16279 Parsoid: Serialize a genuine category link without colon escape
16284 [[Category:Foo|Bar]]
16286 <link rel="mw:PageProp/Category" href="./Category:Foo">
16287 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16291 Normalize hrefs properly before testing for invalid link targets (T72894)
16295 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16297 [[Category:Toxine bactérienne]]
16301 Parsoid: Defaultsort
16303 {{DEFAULTSORT:Foo}}
16305 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16308 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16309 # But, this is a limitation of our representation and is documented in
16310 # TemplateHandler.js in processSpecialMagicWord
16312 Parsoid: Defaultsort (template-generated)
16314 {{{{echo|DEFAULTSORT}}:Foo}}
16316 <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"}]]}'/>
16320 ### Inter-language links
16323 Interlanguage links
16331 es:Alimento fr:Nourriture zh:食品
16333 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16334 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16335 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16339 Duplicate interlanguage links (T26502)
16350 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16351 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16352 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16353 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16360 Basic section headings
16367 ===Smaller headline===
16370 <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>
16373 <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>
16376 <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>
16382 Section headings with TOC
16385 ===Subheadline 1===
16386 =====Skipping a level=====
16387 ======Skipping a level======
16391 ===Another headline===
16393 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16395 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16397 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16399 <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>
16401 <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>
16408 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16410 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16416 <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>
16417 <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>
16418 <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>
16419 <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>
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=5" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16423 <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>
16428 TOC anchors don't collide
16436 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16438 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16439 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16440 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16441 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16445 <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>
16446 <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>
16447 <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>
16448 <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>
16452 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16453 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16455 Handling of sections up to level 6 and beyond
16460 ==Level 2 Heading==
16461 ===Level 3 Heading===
16462 ====Level 4 Heading====
16463 =====Level 5 Heading=====
16464 ======Level 6 Heading======
16465 =======Level 7 Heading=======
16466 ========Level 8 Heading========
16467 =========Level 9 Heading=========
16468 ==========Level 10 Heading==========
16470 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16472 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16474 <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>
16476 <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>
16478 <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>
16480 <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>
16482 <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>
16483 <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>
16484 <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>
16485 <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>
16486 <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>
16500 <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>
16501 <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>
16502 <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>
16503 <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>
16504 <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>
16505 <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>
16506 <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>
16507 <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>
16508 <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>
16509 <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>
16512 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16513 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16514 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16515 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16516 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16517 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16518 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16519 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16520 <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>
16521 <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>
16525 TOC regression (T11764)
16529 ====title 1.1.1====
16534 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16536 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16538 <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>
16540 <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>
16543 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
16546 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16548 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
16554 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16555 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
16556 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
16557 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
16558 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16559 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
16564 TOC for heading containing <span id="..."></span> (T96153)
16567 ==<span id="old-anchor"></span>New title==
16569 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16571 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16575 <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>
16580 TOC with wgMaxTocLevel=3 (T8204)
16586 ====title 1.1.1====
16591 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16593 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16595 <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>
16596 <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>
16599 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16601 <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>
16607 <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>
16608 <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>
16609 <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>
16610 <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>
16611 <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>
16612 <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>
16617 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16623 ====Section 1.1.1====
16624 ====Section 1.1.1.1====
16627 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16629 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16631 <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>
16634 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16638 <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>
16639 <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>
16640 <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>
16641 <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>
16642 <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>
16648 Resolving duplicate section names
16653 <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>
16654 <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>
16659 Resolving duplicate section names with differing case (T12721)
16664 <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>
16665 <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>
16677 Template with sections, __NOTOC__
16684 <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>
16685 <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>
16686 <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>
16687 <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>
16692 __NOEDITSECTION__ keyword
16698 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16699 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16704 Link inside a section heading
16706 ==Section with a [[Main Page|link]] in it==
16708 <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>
16713 TOC regression (T14077)
16720 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16722 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16724 <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>
16727 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16731 <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>
16732 <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>
16733 <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>
16738 T3219 URL next to image (good)
16740 http://example.com [[File:Foobar.jpg]]
16742 <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>
16745 <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>
16748 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16750 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16752 parsoid=wt2html,html2html
16755 The line above must have a trailing space!
16758 But just in case it doesn't...
16760 <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>
16761 <p>The line above must have a trailing space!
16763 <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>
16764 <p>But just in case it doesn't...
16767 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16768 <p>The line above must have a trailing space!</p>
16769 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16771 <p>But just in case it doesn't...</p>
16775 Header with special characters (T27462)
16777 The tooltips shall not show entities to the user (ie. be double escaped)
16794 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16796 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16798 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16799 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16800 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16801 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16802 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16806 <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>
16809 <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>
16812 <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>
16815 <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>
16818 <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>
16822 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16824 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
16827 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
16830 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
16833 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
16836 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
16841 Header with space, plus and underscore as entity
16843 Id should not contain + for spaces
16845 ==Space between Text==
16848 ==Space-Entity between Text==
16851 ==Plus+between+Text==
16854 ==Plus-Entity+between+Text==
16857 ==Underscore_between_Text==
16860 ==Underscore-Entity_between_Text==
16863 [[#Space between Text]]
16864 [[#Space-Entity between Text]]
16865 [[#Plus+between+Text]]
16866 [[#Plus-Entity+between+Text]]
16867 [[#Underscore_between_Text]]
16868 [[#Underscore-Entity_between_Text]]
16870 <p>Id should not contain + for spaces
16872 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16874 <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>
16875 <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>
16876 <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>
16877 <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>
16878 <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>
16879 <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>
16883 <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>
16886 <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>
16889 <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>
16892 <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>
16895 <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>
16898 <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>
16900 </p><p><a href="#Space_between_Text">#Space between Text</a>
16901 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16902 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16903 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16904 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16905 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16908 <p>Id should not contain + for spaces</p>
16910 <h2 id="Space_between_Text">Space between Text</h2>
16913 <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>
16916 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
16919 <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>
16922 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
16925 <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>
16928 <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>
16929 <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>
16930 <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>
16931 <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>
16932 <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>
16933 <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>
16936 # Parsoid html2wt disabled because it adds padding spaces around =
16938 Headers with excess '=' characters
16939 (Are similar tests necessary beyond the 1st level?)
16941 parsoid=wt2html,wt2wt,html2html
16945 =''italic'' heading==
16946 ==''italic'' heading=
16948 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16950 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16951 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16952 <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>
16953 <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>
16957 <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>
16958 <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>
16959 <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>
16960 <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>
16963 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
16964 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
16965 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
16966 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
16970 HTML headers vs TOC (T25393)
16971 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16983 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16985 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16987 <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>
16988 <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>
16991 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16993 <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>
16994 <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>
17000 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17001 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17002 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17003 <h1><span class="mw-headline" id="Header_2">Header 2
17005 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17006 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17009 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17010 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17011 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17013 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17015 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17016 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17017 <meta property="mw:PageProp/noeditsection"/>
17021 Single-line or multiline-comments can follow headings
17023 parsoid=wt2html,wt2wt
17031 <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>
17032 <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>
17033 <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>
17036 <h2 id="foo">foo</h2><!---->
17037 <h2 id="bar">bar</h2><!--c1-->
17038 <h2 id="baz">baz</h2><!--
17044 T3219 URL next to image (broken)
17046 http://example.com[[File:Foobar.jpg]]
17048 <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>
17051 <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>
17055 T3186 news: in the middle of text
17057 http://en.wikinews.org/wiki/Wikinews:Workplace
17059 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17065 Namespaced link must have a title
17074 Namespaced link must have a title (bad fragment version)
17076 [[Project:#fragment]]
17078 <p>[[Project:#fragment]]
17084 ### HTML tags and HTML attributes
17088 div with no attributes
17090 <div>HTML rocks</div>
17092 <div>HTML rocks</div>
17097 div with double-quoted attribute
17099 <div id="rock">HTML rocks</div>
17101 <div id="rock">HTML rocks</div>
17106 div with single-quoted attribute
17108 <div id='rock'>HTML rocks</div>
17110 <div id="rock">HTML rocks</div>
17115 div with unquoted attribute
17117 <div id=rock>HTML rocks</div>
17119 <div id="rock">HTML rocks</div>
17124 div with illegal double attributes
17126 <div id="a" id="b">HTML rocks</div>
17128 <div id="b">HTML rocks</div>
17133 div with empty attribute value, space before equals
17135 parsoid=wt2html,html2html
17137 <div class =>HTML rocks</div>
17139 <div class="">HTML rocks</div>
17142 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17146 div with multiple empty attribute values
17148 wgFragmentMode=[ 'html5', 'legacy' ]
17150 parsoid=wt2html,html2html
17152 <div id= title=>HTML rocks</div>
17154 <div id="title=">HTML rocks</div>
17157 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17160 # FIXME Parsoid doesn't actually match PHP here.
17161 # Probably we should use the synthetic <foo /> or <indicator>
17162 # extensions for this test, which are enabled when running parser tests.
17164 Extension tag in attribute value
17166 <span title="<translate>123</translate>">ok</span>
17167 !! html/php+disabled
17168 <p><span title="<translate>123</translate>">ok</span>
17171 <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>
17175 table with multiple empty attribute values
17177 parsoid=wt2html,html2html
17183 <table title="id=">
17189 <table title="id=">
17190 <tbody><tr><td>hi</td></tr>
17195 div with braces in attribute value
17197 <div title="{}">Foo</div>
17199 <div title="{}">Foo</div>
17202 <div title="{}">Foo</div>
17206 div with empty attribute value, no space before equals
17208 parsoid=wt2html,html2html
17210 <div class=>HTML rocks</div>
17212 <div class="">HTML rocks</div>
17215 <div class="">HTML rocks</div>
17219 HTML multiple attributes correction
17221 <p class="error" class="awesome">Awesome!</p>
17223 <p class="awesome">Awesome!</p>
17228 Table multiple attributes correction
17231 !+ class="error" class="awesome"|status
17236 <th class="awesome">status
17244 <DIV ID="x">HTML ROCKS</DIV>
17246 <div id="x">HTML ROCKS</div>
17251 Non-ASCII pseudo-tags are rendered as text
17260 Pseudo-tag with URL 'name' renders as url link
17262 <http://example.com/>
17264 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17269 text with amp in the middle of nowhere
17273 <p>Remember AT&T?
17278 text with character entity: eacute
17280 I always thought é was a cute letter.
17282 <p>I always thought é was a cute letter.
17287 text with entity-escaped character entity-like string: eacute
17289 I always thought &eacute; was a cute letter.
17291 <p>I always thought &eacute; was a cute letter.
17296 text with undefined character entity: xacute
17298 I always thought &xacute; was a cute letter.
17300 <p>I always thought &xacute; was a cute letter.
17307 <data value="5">five</data>
17308 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17309 <mark>This highlighted text</mark>
17311 <p><data value="5">five</data>
17312 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17313 <mark>This highlighted text</mark>
17318 HTML tag with leading space is parsed as text
17322 <p>< div>foo< /div>
17326 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17327 ## the HTML5 parsing spec.
17329 Element with broken attribute syntax
17333 <div style=" style="123">hi</div>
17336 <div style="123">hi</div>
17340 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17341 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17345 ### Nesting tests (see T43545, T52604, T53081)
17348 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17349 # Note that html2wt is considerably more difficult if we use <b> in
17350 # the test case, instead of <small>
17352 Ensure that HTML adoption agency algorithm is properly implemented.
17354 <small>X<small>Y</small>Z</small>
17356 <p><small>X<small>Y</small>Z</small>
17360 # This was T43545 in the PHP parser.
17364 <kbd>X<kbd>Y</kbd>Z</kbd>
17366 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17370 # The following cases were T53081 in the PHP parser.
17371 # Note that there are some other nestable tags (b, i, etc) which are
17372 # not covered; see T53081 for discussion.
17377 <em>X<em>Y</em>Z</em>
17379 <p><em>X<em>Y</em>Z</em>
17384 Nesting of <strong>
17386 <strong>X<strong>Y</strong>Z</strong>
17388 <p><strong>X<strong>Y</strong>Z</strong>
17397 <p><q>X<q>Y</q>Z</q>
17404 <ruby>X<ruby>Y</ruby>Z</ruby>
17406 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17413 <bdo>X<bdo>Y</bdo>Z</bdo>
17415 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17427 [[Media:Foobar.jpg]]
17428 [[Media:Video.ogv]]
17429 [[:Media:Video.ogv]]
17431 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17432 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17433 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17436 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17437 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17438 <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>
17442 Media link with text
17444 [[Media:Foobar.jpg|A neat file to look at]]
17446 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17449 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17452 # FIXME: this is still bad HTML tag nesting
17453 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17454 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17456 Media link with nasty text
17458 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17460 <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>
17463 <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>
17465 <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>
17470 Media link to nonexistent file (T3702)
17472 [[Media:No such.jpg]]
17473 [[Media:No_such file.jpg]]
17475 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17476 <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>
17479 <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>
17480 <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>
17484 Image link to nonexistent file (T3850 - good)
17486 [[File:No_such.jpg]]
17488 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17491 <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>
17495 :Image link to nonexistent file (T3850 - bad)
17497 [[:Image:No such.jpg]]
17499 <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>
17502 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17506 Character reference normalization in link text (T3938)
17508 [[Main Page|this&that]]
17510 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17517 Test for unicode normalization
17519 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17523 (T21451) Links should refer to the normalized form.
17531 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17532 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17533 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17534 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17535 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17540 Empty attribute crash test (T4067)
17542 <font color="">foo</font>
17544 <p><font color="">foo</font>
17549 Empty attribute crash test single-quotes (T4067)
17551 <font color=''>foo</font>
17553 <p><font color="">foo</font>
17558 Attribute test: equals, then nothing
17560 parsoid=wt2html,html2html
17562 <font color=>foo</font>
17564 <p><font color="">foo</font>
17567 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17571 Attribute test: unquoted value
17573 parsoid=wt2html,html2html
17575 <font color=x>foo</font>
17577 <p><font color="x">foo</font>
17580 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17584 Attribute test: unquoted but illegal value (hash)
17586 <font color=#x>foo</font>
17588 <p><font color="#x">foo</font>
17592 # Parsoid does not serialize to empty attribute syntax,
17593 # so wt2wt and html2wt cases are skipped
17595 Attribute test: no value (T54330)
17597 parsoid=wt2html,html2html
17599 <font color>foo</font>
17601 <p><font color="">foo</font>
17604 <p><font color="">foo</font></p>
17608 T4095: link with three closing brackets
17612 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17615 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17619 T4095: link with pipe and three closing brackets
17621 [[Main Page|link]]]
17623 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17626 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17630 T4095: link with pipe and three closing brackets, version 2
17632 [[Main Page|[http://example.com/]]]
17634 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17637 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17646 Template:Dangerous attribute
17648 " onmouseover="alert(document.cookie)
17652 Template:Dangerous style attribute
17654 border-size: expression(alert(document.cookie))
17660 <div style="float: right; {{{1}}}">Magic div</div>
17664 T4304: HTML attribute safety (safe template; regression T4309)
17666 <div title="{{test}}"></div>
17668 <div title="This is a test template"></div>
17671 <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>
17674 # Parsoid has enough context to handle this case
17676 T4304: HTML attribute safety (dangerous template; 2309)
17678 <div title="{{dangerous attribute}}"></div>
17680 <div title=""></div>
17683 <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>
17687 T4304: HTML attribute safety (dangerous style template; 2309)
17689 <div style="{{dangerous style attribute}}"></div>
17691 <div style="/* insecure input */"></div>
17694 <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>
17698 T4304: HTML attribute safety (safe parameter; 2309)
17700 {{div style|width: 200px}}
17702 <div style="float: right; width: 200px">Magic div</div>
17705 <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>
17709 T4304: HTML attribute safety (unsafe parameter; 2309)
17711 {{div style|width: expression(alert(document.cookie))}}
17713 <div style="/* insecure input */">Magic div</div>
17716 <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>
17719 ## Parsoid output here differs; needs investigation.
17721 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17723 {{div style|"><script>alert(document.cookie)</script>}}
17725 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17729 ## Parsoid output here differs; needs investigation.
17731 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17733 {{div style|" ><script>alert(document.cookie)</script>}}
17735 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17740 T4304: HTML attribute safety (link)
17742 <div title="[[Main Page]]"></div>
17744 <div title="[[Main Page]]"></div>
17747 <div title="[[Main Page]]"></div>
17751 T4304: HTML attribute safety (italics)
17753 <div title="''foobar''"></div>
17755 <div title="''foobar''"></div>
17760 T4304: HTML attribute safety (bold)
17762 <div title="'''foobar'''"></div>
17764 <div title="'''foobar'''"></div>
17769 T4304: HTML attribute safety (ISBN)
17771 <div title="ISBN 1234567890"></div>
17773 <div title="ISBN 1234567890"></div>
17778 T4304: HTML attribute safety (RFC)
17780 <div title="RFC 1234"></div>
17782 <div title="RFC 1234"></div>
17787 T4304: HTML attribute safety (PMID)
17789 <div title="PMID 1234567890"></div>
17791 <div title="PMID 1234567890"></div>
17796 T4304: HTML attribute safety (web link)
17798 <div title="http://example.com/"></div>
17800 <div title="http://example.com/"></div>
17805 T4304: HTML attribute safety (named web link)
17807 <div title="[http://example.com/ link]"></div>
17809 <div title="[http://example.com/ link]"></div>
17812 <div title="[http://example.com/ link]"></div>
17816 T5244: HTML attribute safety (extension; safe)
17818 <div style="<nowiki>background:blue</nowiki>"></div>
17820 <div style="background:blue"></div>
17823 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17827 T5244: HTML attribute safety (extension; unsafe)
17829 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17831 <div style="/* insecure input */"></div>
17834 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17837 # More MSIE fun discovered by Tom Gilder
17840 MSIE CSS safety test: spurious slash
17842 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17844 <div style="/* insecure input */">evil</div>
17847 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17851 MSIE CSS safety test: hex code
17853 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17855 <div style="/* insecure input */">evil</div>
17858 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17862 MSIE CSS safety test: comment in url
17864 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17866 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17869 <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>
17873 MSIE CSS safety test: comment in expression
17875 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17877 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17880 <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>
17884 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17886 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17888 <p style="/* invalid control char */">A</p>
17891 <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>
17895 MSIE 6 CSS safety test: Fullwidth (T57332)
17897 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17898 <div style="top:EXPRESSION(alert())">B</div>
17900 <p style="/* insecure input */">A</p>
17901 <div style="/* insecure input */">B</div>
17904 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17905 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17909 MSIE 6 CSS safety test: IPA extensions (T57332)
17911 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17912 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17914 <div style="/* insecure input */">A</div>
17915 <p style="/* insecure input */">B</p>
17918 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17919 <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>
17923 MSIE 6 CSS safety test: sup/sub script (T57332)
17925 <div style="background-image:url⁽javascript:alert())">A</div>
17926 <div style="background-image:url₍javascript:alert())">B</div>
17927 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17929 <div style="/* insecure input */">A</div>
17930 <div style="/* insecure input */">B</div>
17931 <p style="/* insecure input */">C</p>
17934 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17935 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17936 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17942 parsoid=wt2html,html2html
17945 title="data:text/html,<img src=1 onerror=alert(1)>"
17946 style="-o-link:attr(title);-o-link-source:current">X</div>
17948 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17951 <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>
17955 MSIE 6 CSS safety test: Repetition markers (T57332)
17957 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17958 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17959 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17960 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17961 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17962 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17963 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17965 <p style="/* insecure input */">A</p>
17966 <p style="/* insecure input */">B</p>
17967 <p style="/* insecure input */">C</p>
17968 <p style="/* insecure input */">D</p>
17969 <p style="/* insecure input */">E</p>
17970 <p style="/* insecure input */">F</p>
17971 <p style="/* insecure input */">G</p>
17974 <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>
17975 <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>
17976 <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>
17977 <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>
17978 <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>
17979 <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>
17980 <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>
17984 Table attribute legitimate extension
17987 !+ style="<nowiki>color:blue</nowiki>"|status
17992 <th style="color:blue">status
17998 Table attribute safety
18001 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18006 <th style="/* insecure input */">status
18012 CSS line continuation 1
18014 <div style="background-image: u\ rl(test.jpg);"></div>
18016 <div style="/* insecure input */"></div>
18021 CSS line continuation 2
18023 <div style="background-image: u\ rl(test.jpg); "></div>
18025 <div style="/* invalid control char */"></div>
18036 Expansion of multi-line templates in attribute values (T8255)
18038 <div style="background: {{identity|#00FF00}}">-</div>
18040 <div style="background: #00FF00">-</div>
18045 Expansion of multi-line templates in attribute values (T8255 sanity check)
18047 <div style="background:
18050 <div style="background: #00FF00">-</div>
18053 <div style="background:
18058 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18060 <div style="background: #00FF00">-</div>
18062 <div style="background: #00FF00">-</div>
18067 Tags which are hidden from tidiers cannot pass through the Sanitizer
18069 <mw:toc><script>alert();</script></mw:toc>
18071 <p><mw:toc><script>alert();</script></mw:toc>
18076 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18080 Parser hook: empty input
18091 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18094 ## Don't expect parsoid to rt this form.
18096 Parser hook: empty input using terminated empty elements
18098 parsoid=wt2html,html2html
18109 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18113 Parser hook: empty input using terminated empty elements (space before)
18124 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18128 Parser hook: basic input
18139 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18142 ## Don't expect parsoid to rt this form.
18144 Parser hook: case insensitive
18146 parsoid=wt2html,html2html
18157 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18160 ## Don't expect parsoid to rt this form.
18162 Parser hook: case insensitive, redux
18164 parsoid=wt2html,html2html
18175 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18179 Parser hook: nested tags
18181 <tag><tag></tag></tag>
18190 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18194 Parser hook: basic arguments
18196 <tag width="200" height="100" depth="50" square=""></tag>
18209 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18212 ## Don't expect parsoid to rt this form.
18214 Parser hook: basic arguments, variations
18216 parsoid=wt2html,html2html
18218 <tag width=200 height = "100" depth = '50' square></tag>
18231 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18235 Parser hook: argument containing a forward slash (T7344)
18237 <tag filename="/tmp/bla"></tag>
18242 'filename' => '/tmp/bla',
18247 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18250 ## Don't expect parsoid to rt this form.
18252 Parser hook: empty input using terminated empty elements (T4374)
18254 parsoid=wt2html,html2html
18266 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18269 ## </tag> should be output literally since there is no matching tag that begins it
18270 ## Don't expect parsoid to rt this form.
18272 Parser hook: basic arguments using terminated empty elements (T4374)
18276 <tag width=200 height = "100" depth = '50' square/>
18293 <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
18297 ## Don't expect parsoid to rt this form.
18299 Parser hook: Don't allow unclosed extension tags
18305 this is a '''test'''
18307 <p>test <tag>123
18308 </p><p>this is a <b>test</b>
18311 <p>test <tag>123</p>
18313 <p>this is a <b>test</b></p>
18317 Parser hook: horizontal rule inside extension tag that outputs <pre>
18338 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18342 Parser hook: static parser hook not inside a comment
18344 <statictag>hello, world</statictag>
18346 <statictag action="flush" />
18352 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18353 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18357 Parser hook: static parser hook inside a comment
18359 <!-- <statictag>hello, world</statictag> -->
18360 <statictag action="flush" />
18365 <!-- <statictag>hello, world</statictag> -->
18366 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18369 # Nested template calls; this case was broken by Parser.php rev 1.506,
18373 Template:One-parameter
18375 (My parameter is: {{{1}}})
18379 Template:Map-one-parameter
18381 {{{{{1}}}|{{{2}}}}}
18385 Nested template calls
18387 {{Map-one-parameter|One-parameter|param}}
18389 <p>(My parameter is: param)
18398 # Remex wraps empty tag runs with p-tags.
18399 # Parsoid strips them out during p-wrapping.
18401 Sanitizer: Closing of open tags
18403 <s></s><table></table>
18405 <p><s></s></p><table></table>
18407 <s></s><table></table>
18411 Sanitizer: Closing of open but not closed tags
18420 Sanitizer: Closing of closed but not open tags
18426 <p class="mw-empty-elt">
18432 Sanitizer: Closing of closed but not open table tags
18436 Table not started</td></tr></table>
18438 <p>Table not started
18443 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18445 wgFragmentMode=[ 'html5', 'legacy' ]
18447 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18449 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18452 <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>
18456 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18458 wgFragmentMode=[ 'legacy' ]
18460 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18462 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18466 # In HTML5, the restrictions are that id must contain at least one character,
18467 # and must not contain any space characters.
18469 Sanitizer: Validating the contents of the id attribute (T6515)
18473 <br id="" /><br id="a space" />
18478 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18480 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18484 <br id="foo" /><br id="foo" />
18486 Something need to be done. foo-2 ?
18490 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18493 <meta itemprop="hello" content="world">
18494 <meta http-equiv="refresh" content="5">
18495 <meta itemprop="hello" http-equiv="refresh" content="5">
18496 <link itemprop="hello" href="{{SERVER}}">
18497 <link rel="stylesheet" href="{{SERVER}}">
18498 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18502 <p> <meta itemprop="hello" content="world" />
18503 <meta http-equiv="refresh" content="5">
18504 <meta itemprop="hello" content="5" />
18505 <link itemprop="hello" href="http://example.org" />
18506 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18507 <link itemprop="hello" href="http://example.org" />
18514 Sanitizer: Strip comments from CSS attributes
18516 parsoid=wt2html,wt2wt
18518 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18520 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18523 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18527 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18529 [[meatball:Soft"Security]]
18531 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18534 <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>
18538 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18540 [[meatball:Foo<Bar]]
18541 [[meatball:Foo>Bar]]
18542 [[meatball:Foo<bar]]
18543 [[meatball:Foo>bar]]
18545 <p>[[meatball:Foo<Bar]]
18546 [[meatball:Foo>Bar]]
18547 [[meatball:Foo<bar]]
18548 [[meatball:Foo>bar]]
18551 <p>[[meatball:Foo<Bar]]
18552 [[meatball:Foo>Bar]]
18553 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18554 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18558 Language converter: output gets cut off unexpectedly (T7757)
18562 this bit is safe: }-
18564 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18566 then we get cut off here: }-
18568 all additional text is vanished
18570 <p>this bit is safe: }-
18571 </p><p>but if we add a conversion instance: xxx
18572 </p><p>then we get cut off here: }-
18573 </p><p>all additional text is vanished
18576 <p>this bit is safe: }-</p>
18577 <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>
18578 <p>then we get cut off here: }-</p>
18579 <p>all additional text is vanished</p>
18583 Language converter glossary rules inside attributes (T119158)
18585 language=sr variant=sr-el
18587 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18589 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18592 </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>
18595 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18597 <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>
18601 Self closed html pairs (T7487)
18603 <center><font id="bug" />Centered text</center>
18604 <div><font id="bug2" />In div text</div>
18606 <center><font id="bug"></font>Centered text</center>
18607 <div><font id="bug2"></font>In div text</div>
18611 Punctuation: nbsp before exclamation
18615 <p>C'est grave !
18620 Punctuation: CSS !important (T13874)
18622 <div style="width:50% !important">important</div>
18624 <div style="width:50% !important">important</div>
18629 Punctuation: CSS ! important (T13874; with space after)
18631 <div style="width:50% ! important">important</div>
18633 <div style="width:50% ! important">important</div>
18638 HTML bullet list, closed tags (T7497)
18651 <ul data-parsoid='{"stx":"html"}'>
18652 <li data-parsoid='{"stx":"html"}'>One</li>
18653 <li data-parsoid='{"stx":"html"}'>Two</li>
18659 HTML bullet list, unclosed tags (T7497)
18671 <ul data-parsoid='{"stx":"html"}'>
18672 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18673 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18679 HTML ordered list, closed tags (T7497)
18692 <ol data-parsoid='{"stx":"html"}'>
18693 <li data-parsoid='{"stx":"html"}'>One</li>
18694 <li data-parsoid='{"stx":"html"}'>Two</li>
18700 HTML ordered list, unclosed tags (T7497)
18713 <ol data-parsoid='{"stx":"html"}'>
18714 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18715 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18721 HTML nested bullet list, closed tags (T7497)
18744 <ul data-parsoid='{"stx":"html"}'>
18745 <li data-parsoid='{"stx":"html"}'>One</li>
18746 <li data-parsoid='{"stx":"html"}'>Two:
18747 <ul data-parsoid='{"stx":"html"}'>
18748 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18749 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18756 HTML nested bullet list, open tags (T7497)
18778 HTML nested ordered list, closed tags (T7497)
18803 HTML nested ordered list, open tags (T7497)
18840 HTML ordered list item with parameters oddity
18842 <ol><li id="fragment">One</li>
18845 <ol><li id="fragment">One</li>
18850 # parsoid doesn't explicitly mark autonumbered links, see T55505
18852 T7918: autonumbering
18854 [http://first/] [http://second] [ftp://ftp]
18858 [mailto:enclosed@mail.tld With target]
18860 [mailto:enclosed@mail.tld]
18862 mailto:inline@mail.tld
18864 <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>
18865 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18866 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18867 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18868 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18871 <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>
18872 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
18873 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
18874 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
18875 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18880 # Security and HTML correctness
18881 # From Nick Jenkins' fuzz testing
18885 Fuzz testing: Parser13
18899 # Note that Parsoid output differs from the PHP parser here: the PHP
18900 # parser breaks the URL for the magic word, while in Parsoid the URL
18901 # production takes precedence.
18903 Fuzz testing: Parser14
18908 <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>
18909 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18911 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18917 <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>
18918 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18920 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18924 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
18925 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
18929 Fuzz testing: Parser14-table
18931 parsoid=wt2html,html2html
18936 <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>
18937 <table style="__TOC__">
18942 <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>
18943 <table style="__TOC__">
18950 <table style="__TOC__"></table>
18953 # Known to produce bogus xml (extra </td>)
18954 # Don't add the html/php section since it generates broken HTML
18956 Fuzz testing: Parser16
18973 Fuzz testing: Parser21
18976 !irc://{{ftp://a" onmouseover="alert('hello world');"
18981 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18991 Fuzz testing: Parser22
18993 http://===r:::https://b
18997 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19005 # Known to produce bad XML for now
19007 Fuzz testing: Parser24
19014 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19015 <br style="onmouseover='alert(document.cookie);' " />
19017 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19022 <u class="|">}}}} >
19023 <br style="onmouseover='alert(document.cookie);'" />
19025 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19033 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19034 <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>"}'/>}}}} >
19035 <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}'>
19039 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19042 # Note: the current result listed for this is not what the original one was,
19043 # but the original bug was JavaScript injection, which is fixed in any case.
19044 # It's not clear that the original result listed was any more correct than the
19045 # current one. Original result:
19048 # <li class="||">
19049 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19051 Fuzz testing: Parser25 (T8055)
19057 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19059 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19062 <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"]}'>
19063 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19067 Fuzz testing: URL adjacent extension (with space, clean)
19069 http://example.com <nowiki>junk</nowiki>
19071 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19074 <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>
19078 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19080 http://example.com<nowiki>junk</nowiki>
19082 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19085 <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>
19089 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19091 http://example.com<pre>junk</pre>
19093 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19096 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19098 <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>
19102 Fuzz testing: image with bogus manual thumbnail
19104 [[Image:foobar.jpg|thumbnail= ]]
19106 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19109 <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>
19112 # Parsoid will emit the newline literally in wt2wt; see next test case.
19114 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19118 <pre dir=" "></pre>
19120 <pre dir=" "></pre>
19123 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19124 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19128 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19132 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19133 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19143 Templates in extension attributes are not expanded
19145 <pre dir="{{echo|ltr}}"></pre>
19147 <pre dir="{{echo|ltr}}"></pre>
19150 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19154 Parsing optional HTML elements (T8171)
19159 <td> Some tabular data</td>
19160 <td> More tabular data ...
19161 <td> And yet som tabular data</td>
19167 <td> Some tabular data</td>
19168 <td> More tabular data ...
19169 </td><td> And yet som tabular data</td>
19176 Correct handling of <td>, <tr> (T8171)
19181 <td> Some tabular data</td>
19182 <td> More tabular data ...</td>
19183 <td> And yet som tabular data</td>
19189 <td> Some tabular data</td>
19190 <td> More tabular data ...</td>
19191 <td> And yet som tabular data</td>
19199 Parsing crashing regression (fr:JavaScript)
19203 <p></body></x>
19208 Inline wiki vs wiki block nesting
19214 <p><b>Bold paragraph</b>
19215 </p><p>New wiki paragraph
19219 # FIXME: The current php output is documented
19220 # and desired output is the parsoid target.
19222 Inline HTML vs wiki block nesting
19228 <p><b>Bold paragraph
19229 </p><p>New wiki paragraph</b>
19232 <p><b>Bold paragraph</b>
19233 </p><p>New wiki paragraph
19237 # Original result was this:
19238 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19240 # While that might be marginally more intuitive, maybe, the six-apostrophe
19241 # construct is clearly pathological and the result stated here (which is what
19242 # the parser actually does) is about as reasonable as anything.
19244 Mixing markup for italics and bold
19247 '''bold''''''bold''bolditalics'''''
19249 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19257 Article for special page transclusion test
19261 Special page transclusion
19264 {{Special:Prefixindex/Xyzzyx}}
19266 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19272 Special page transclusion twice (T7021)
19275 {{Special:Prefixindex/Xyzzyx}}
19276 {{Special:Prefixindex/Xyzzyx}}
19278 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19280 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19286 Transclusion of default MediaWiki message
19288 {{MediaWiki:Mainpage}}
19295 Transclusion of nonexistent MediaWiki message
19297 {{MediaWiki:Mainpagexxx}}
19299 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19304 Transclusion of MediaWiki message with underscore
19306 {{MediaWiki:history_short}}
19313 Transclusion of MediaWiki message with space
19315 {{MediaWiki:history short}}
19322 Invalid header with following text
19332 Section extraction test (section 0)
19352 Section extraction test (section 1)
19374 Section extraction test (section 2)
19395 Section extraction test (section 3)
19415 Section extraction test (section 4)
19439 Section extraction test (section 5)
19459 Section extraction test (section 6)
19480 Section extraction test (section 7)
19500 Section extraction test (section 8)
19520 Section extraction test (section 9)
19541 Section extraction test (section 10)
19561 Section extraction test (nonexistent section 11)
19580 Section extraction test with bogus heading (section 1)
19585 ==bogus== not a legal section
19589 ==bogus== not a legal section
19593 Section extraction test with bogus heading (section 2)
19598 ==bogus== not a legal section
19605 Section extraction test with comment after heading (section 1)
19617 Section extraction test with comment after heading (section 2)
19629 Section extraction test with bogus <nowiki> heading (section 1)
19634 ==bogus== <nowiki>not a legal section</nowiki>
19638 ==bogus== <nowiki>not a legal section</nowiki>
19642 Section extraction test with bogus <nowiki> heading (section 2)
19647 ==bogus== <nowiki>not a legal section</nowiki>
19653 # Formerly testing for T4587, now resolved by the use of unmarked sections
19654 # instead of respecting commented sections
19656 Section extraction prefixed by comment (section 1)
19667 Section extraction prefixed by comment (section 2)
19677 # Formerly testing for T4607, now resolved by the use of unmarked sections
19678 # instead of respecting HTML-style headings
19680 Section extraction, mixed wiki and html (section 1)
19696 Section extraction, mixed wiki and html (section 2)
19712 # Formerly testing for T5342
19714 Section extraction, heading surrounded by <noinclude>
19718 <noinclude>==unmarked==</noinclude>
19724 # Test behavior of T21910
19726 Sectiion with all-equals
19731 The line above must have a trailing space
19734 But just in case it doesn't...
19738 But just in case it doesn't...
19742 Section replacement test (section 0)
19773 Section replacement test (section 1)
19802 Section replacement test (section 2)
19832 Section replacement test (section 3)
19863 Section replacement test (section 4)
19890 Section replacement test (section 5)
19921 Section replacement test (section 6)
19951 Section replacement test (section 7)
19982 Section replacement test (section 8)
20013 Section replacement test (section 9)
20042 Section replacement test (section 10)
20072 Section replacement test with initial whitespace (T15728)
20076 Preformatted initial line
20080 Preformatted initial line
20087 Section extraction, heading followed by pre with 20 spaces (T8398)
20099 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20112 Section extraction, <pre> around bogus header (T12309)
20129 Section replacement, <pre> around bogus header (T12309)
20150 Handling of 
 in URLs
20154 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20157 <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>
20161 Handling of %0A in URLs
20165 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20168 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20171 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20173 5 quotes, code coverage +1 line
20183 # same html as previous, but wikitext adjusted to match parsoid html2wt
20184 # note that wt2html and html2html will put the <i> before the <b>
20186 5 quotes, code coverage +1 line w/ nowiki (1)
20188 parsoid=wt2wt,html2wt
20190 '''''<nowiki/>'''''
20195 <p><b><i></i></b></p>
20198 # same as previous, just swapping the <i> and <b>
20200 5 quotes, code coverage +1 line w/ nowiki (2)
20202 '''''<nowiki/>'''''
20207 <p><i><b></b></i></p>
20211 Special:Search page linking.
20215 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20220 {{!}} is a magic word
20222 {{!}} is a magic word there and {{!}} is still a magic word here
20223 | is not a magic word here but {{!}} is still a magic word here
20225 <p>| is a magic word there and | is still a magic word here
20226 | is not a magic word here but | is still a magic word here
20229 <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
20230 | 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>
20236 title=[[Parser test]]
20250 *{{SUBJECTPAGENAME}}
20251 *{{SUBJECTPAGENAMEE}}
20254 *{{NAMESPACENUMBER}}
20259 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20261 <ul><li>Parser test</li>
20262 <li>Parser_test</li>
20263 <li>Parser test</li>
20264 <li>Parser_test</li>
20265 <li>Parser test</li>
20266 <li>Parser_test</li>
20267 <li>Parser test</li>
20268 <li>Parser_test</li>
20269 <li>Parser test</li>
20270 <li>Parser_test</li>
20271 <li>Talk:Parser test</li>
20272 <li>Talk:Parser_test</li>
20273 <li>Parser test</li>
20274 <li>Parser_test</li>
20282 <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>
20285 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20288 Gallery with valid attributes
20290 <gallery type="123" summary="345">
20291 File:File:Foobar.jpg
20294 <ul class="gallery mw-gallery-traditional" type="123">
20295 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20296 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20297 <div class="gallerytext">
20303 <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"}}'>
20304 <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>
20308 ## Parsoid thinks the "centre" here is a property, not a caption.
20313 "modes": ["wt2html"],
20314 "nativeGallery": true
20322 image4 |300px| centre
20323 image5.svg| http://///////
20328 <ul class="gallery mw-gallery-traditional">
20329 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20330 <div class="thumb" style="height: 150px;">Image1.png</div>
20331 <div class="gallerytext">
20334 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20335 <div class="thumb" style="height: 150px;">Image2.gif</div>
20336 <div class="gallerytext">
20339 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20340 <div class="thumb" style="height: 150px;">Image3</div>
20341 <div class="gallerytext">
20344 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20345 <div class="thumb" style="height: 150px;">Image4</div>
20346 <div class="gallerytext">
20351 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20352 <div class="thumb" style="height: 150px;">Image5.svg</div>
20353 <div class="gallerytext">
20354 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20358 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20359 <div class="thumb" style="height: 150px;">* image6</div>
20360 <div class="gallerytext">
20366 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20367 <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>
20368 <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>
20369 <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>
20370 <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>
20371 <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>
20372 <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>
20377 Gallery (with options, html)
20380 "modes": ["wt2html", "html2html"],
20381 "nativeGallery": true
20384 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20385 File:Nonexistent.jpg|caption
20386 File:Nonexistent.jpg
20387 image:foobar.jpg|some '''caption''' [[Main Page]]
20389 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20392 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20393 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20394 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20395 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20396 <div class="gallerytext">
20401 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20402 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20403 <div class="gallerytext">
20406 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20407 <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>
20408 <div class="gallerytext">
20409 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20413 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20414 <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>
20415 <div class="gallerytext">
20418 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20419 <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>
20420 <div class="gallerytext">
20428 <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":{}}'>
20429 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20430 <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>
20431 <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>
20432 <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>
20433 <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>
20434 <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>
20439 Gallery (with options, extsrc)
20442 "nativeGallery": false
20445 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20446 File:Nonexistent.jpg|caption
20447 File:Nonexistent.jpg
20448 image:foobar.jpg|some '''caption''' [[Main Page]]
20450 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20453 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20454 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20455 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20456 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20457 <div class="gallerytext">
20462 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20463 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20464 <div class="gallerytext">
20467 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20468 <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>
20469 <div class="gallerytext">
20470 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20474 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20475 <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>
20476 <div class="gallerytext">
20479 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20480 <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>
20481 <div class="gallerytext">
20489 <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"}}'>
20490 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20491 <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>
20492 <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>
20493 <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>
20494 <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>
20495 <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>
20500 Gallery (without px units)
20502 <gallery widths="70" heights="40">
20506 <ul class="gallery mw-gallery-traditional">
20507 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20508 <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>
20509 <div class="gallerytext">
20515 <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"}}'>
20516 <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>
20521 Gallery (with invalid units)
20523 <gallery widths="70em" heights="40em">
20527 <ul class="gallery mw-gallery-traditional">
20528 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20529 <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>
20530 <div class="gallerytext">
20536 <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"}}'>
20537 <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>
20542 Gallery with link that has fragment
20545 "modes": ["wt2html", "html2html"],
20546 "nativeGallery": true
20550 image:foobar.jpg|link=Main_Page
20551 image:foobar.jpg|link=Main_Page#section
20552 image:foobar.jpg|link=Main Page#section|caption
20555 <ul class="gallery mw-gallery-traditional">
20556 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20557 <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>
20558 <div class="gallerytext">
20561 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20562 <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>
20563 <div class="gallerytext">
20566 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20567 <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>
20568 <div class="gallerytext">
20576 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20577 <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>
20578 <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>
20579 <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>
20583 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20585 Gallery with template inside caption
20588 "nativeGallery": true
20591 <gallery caption="{{echo|hi}}">
20592 File:Foobar.jpg|{{echo|ho}}
20595 <ul class="gallery mw-gallery-traditional">
20596 <li class='gallerycaption'>{{echo|hi}}</li>
20597 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20598 <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>
20599 <div class="gallerytext">
20607 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20608 <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>
20609 <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>
20614 Gallery with wikitext inside caption
20617 "nativeGallery": true
20621 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20622 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20625 <ul class="gallery mw-gallery-traditional">
20626 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20627 <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>
20628 <div class="gallerytext">
20629 <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>
20633 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20634 <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>
20635 <div class="gallerytext">
20636 <p>This is a test template
20643 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20644 <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>
20645 <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>
20650 Gallery (with showfilename option)
20653 "nativeGallery": true
20656 <gallery showfilename="">
20657 File:Nonexistent.jpg|caption
20658 File:Nonexistent.jpg
20659 File:Foobar.jpg|some '''caption''' [[Main Page]]
20663 <ul class="gallery mw-gallery-traditional">
20664 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20665 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20666 <div class="gallerytext">
20667 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20672 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20673 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20674 <div class="gallerytext">
20675 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20679 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20680 <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>
20681 <div class="gallerytext">
20682 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20683 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20687 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20688 <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>
20689 <div class="gallerytext">
20690 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20697 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20698 <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>
20699 <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>
20700 <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>
20701 <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>
20705 ## Should Parsoid be preserving these variations? See T151367
20707 Gallery (with namespace-less filenames)
20710 "modes": ["wt2html", "html2html"],
20711 "nativeGallery": true
20715 File:Nonexistent.jpg
20721 <ul class="gallery mw-gallery-traditional">
20722 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20723 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20724 <div class="gallerytext">
20727 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20728 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20729 <div class="gallerytext">
20732 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20733 <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>
20734 <div class="gallerytext">
20737 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20738 <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>
20739 <div class="gallerytext">
20745 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
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"></div></li>
20747 <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>
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"></div></li>
20749 <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>
20754 Gallery override link with wikilink (T36852)
20757 "nativeGallery": true
20761 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20764 <ul class="gallery mw-gallery-traditional">
20765 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20766 <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>
20767 <div class="gallerytext">
20773 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20774 <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>
20779 Gallery override link with absolute external link (T36852)
20782 "nativeGallery": true
20786 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20789 <ul class="gallery mw-gallery-traditional">
20790 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20791 <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>
20792 <div class="gallerytext">
20798 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20799 <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>
20804 Gallery override link with absolute external link with LanguageConverter
20809 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20812 <ul class="gallery mw-gallery-traditional">
20813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20814 <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>
20815 <div class="gallerytext">
20823 <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"}}'>
20824 <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>
20829 Gallery override link with malicious javascript (T36852)
20832 "modes": ["wt2html", "html2html"],
20833 "nativeGallery": true
20837 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20840 <ul class="gallery mw-gallery-traditional">
20841 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20842 <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>
20843 <div class="gallerytext">
20849 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20850 <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>
20854 # Note that parsoid uses the invalid link as a caption, PHP does not.
20856 Gallery with invalid title as link (T45964)
20859 "modes": ["wt2html", "html2html"],
20860 "nativeGallery": true
20864 File:Foobar.jpg|link=<
20867 <ul class="gallery mw-gallery-traditional">
20868 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20869 <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>
20870 <div class="gallerytext">
20876 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20877 <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>
20882 Serialize gallery without attrs in data-mw
20885 "modes": ["html2wt"],
20886 "nativeGallery": true
20889 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20890 <li class="gallerycaption">123</li>
20891 <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>
20894 <gallery caption="123">
20900 Gallery with class and style attributes
20903 "nativeGallery": true
20906 <gallery class="center" style="text-align: center;">
20910 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20911 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20912 <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>
20913 <div class="gallerytext">
20919 <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":{}}'>
20920 <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>
20925 Gallery in slideshow mode
20928 "nativeGallery": true
20931 <gallery mode="slideshow" showthumbnails="">
20935 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20936 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20937 <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>
20938 <div class="gallerytext">
20944 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20945 <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>
20950 HTML Hex character encoding (spells the word "JavaScript")
20952 parsoid=wt2html,wt2wt,html2html
20954 JavaScript
20956 <p>JavaScript
20959 <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>
20963 HTML Hex character encoding bogus encoding (T28437 regression check)
20967 <p>&#xsee;&#XSEE;
20972 HTML Hex character encoding mixed case
20974 parsoid=wt2html,wt2wt,html2html
20981 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20984 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20985 # Note that U+000C (form feed) is not a valid XML character, so
20986 # it is banned even though allowed in HTML5.
20988 Illegal character references (T106578)
20993 ; Control (low): 
20994 ; Control (high):  Ÿ
20995 ; Surrogate: ��
20996 ; This is an okay astral character: 💩
21004 <dt>Control (low)</dt>
21006 <dt>Control (high)</dt>
21007 <dd>&#x7F; &#x9F;</dd>
21009 <dd>&#xD83D;&#xDCA9;</dd>
21010 <dt>This is an okay astral character</dt>
21011 <dd>💩</dd></dl>
21015 __FORCETOC__ override
21027 ISBN 978-0-1234-56 789
21029 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21032 <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>
21036 ISBN followed by 5 spaces
21047 ISBN ISBN 1234567890
21049 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21052 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21055 # Uppercase X and lowercase x as well
21066 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21067 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21068 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21069 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21070 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21071 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21074 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21075 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21076 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21077 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21078 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21079 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21083 ISBN with empty prefix (parsoid test)
21087 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21090 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21094 T24905: <abbr> followed by ISBN followed by </a>
21096 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21098 <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>
21101 <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>
21109 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21114 Double RFC with a wiki link
21118 <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>
21127 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21130 <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>
21134 Centre-aligned image
21136 [[Image:foobar.jpg|centre]]
21138 <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>
21141 <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>
21147 [[Image:foobar.jpg|none]]
21149 <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>
21152 <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>
21156 Width + Height sized image (using px) (height is ignored)
21158 [[Image:foobar.jpg|640x480px]]
21160 <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>
21163 <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>
21167 Width-sized image (using px, no following whitespace)
21169 [[Image:foobar.jpg|640px]]
21171 <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>
21174 <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>
21178 Width-sized image (using px, with following whitespace - test regression from r39467)
21180 [[Image:foobar.jpg|640px ]]
21182 <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>
21185 <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>
21189 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21191 [[Image:foobar.jpg| 640px]]
21193 <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>
21196 <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>
21200 Image with page parameter
21204 [[File:LoremIpsum.djvu|page=2]]
21206 <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>
21209 <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>
21213 Another italics / bold test
21221 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21227 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21230 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21234 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21236 Images with the "|" character in the comment
21238 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21240 <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>
21243 <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>
21247 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21249 <html><script>alert(1);</script></html>
21251 <p><html><script>alert(1);</script></html>
21256 HTML with raw HTML ($wgRawHtml==true)
21260 <html><script>alert(1);</script></html>
21262 <p><script>alert(1);</script>
21267 Parents of subpages, one level up
21269 subpage title=[[Subpage test/L1/L2/L3]]
21273 <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>
21279 Parents of subpages, one level up, not named
21281 subpage title=[[Subpage test/L1/L2/L3]]
21285 <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>
21292 Parents of subpages, two levels up
21294 subpage title=[[Subpage test/L1/L2/L3]]
21300 <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
21301 </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>
21306 Parents of subpages, two levels up, without trailing slash or name.
21308 subpage title=[[Subpage test/L1/L2/L3]]
21317 Parents of subpages, two levels up, with lots of extra trailing slashes.
21319 subpage title=[[Subpage test/L1/L2/L3]]
21323 <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>
21328 Subpage test/L1/L2/L3Sibling
21334 Transclusion of a sibling page (one level up)
21336 subpage title=[[Subpage test/L1/L2/L3]]
21345 Transclusion of a child page
21347 subpage title=[[Subpage test/L1/L2]]
21355 # This is wt2html only in Parsoid because we add <nowiki>
21356 # because of {{..}} and we don't expect to fix that to
21357 # eliminate the nowikis selective for {{..}} markup.
21359 Non-transclusion because of too many up levels
21361 subpage title=[[Subpage test/L1/L2/L3]]
21364 {{../../../../More than parent}}
21366 <p>{{../../../../More than parent}}
21369 <p>{{../../../../More than parent}}</p>
21373 Definition list code coverage
21379 <dl><dt>title  </dt>
21381 <dt>title </dt>
21387 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21388 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21389 <dt>title</dt><dd> def</dd></dl>
21393 Don't fall for the self-closing div
21395 <div>hello world</div/>
21397 <div>hello world</div>
21406 <p>[[:Template:Msg]]
21415 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21419 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21421 Always escape literal '>' in output, not just after '<'
21435 <p>This is a test template
21436 This is a test template
21448 Inclusion of !userCanEdit() content
21452 <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>
21458 Out-of-order TOC heading levels
21467 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21469 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21471 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21472 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21475 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21477 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21478 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21484 <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>
21485 <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>
21486 <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>
21487 <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>
21488 <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>
21489 <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>
21495 ISBN with a dummy number
21505 ISBN with space-delimited number
21509 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21512 <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>
21517 ISBN with multiple spaces, no number
21536 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21537 </p><p>ISBN 12345678901
21540 <p>ISBN 123456789</p>
21542 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21544 <p>ISBN 12345678901</p>
21549 ISBN with trailing year (T9110)
21551 ISBN 1-234-56789-0 - 2006
21553 ISBN 1 234 56789 0 - 2006
21555 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21556 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21559 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21561 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21568 wgFragmentMode=[ 'html5', 'legacy' ]
21570 {{anchorencode:foo bar©#%n}}
21575 <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>
21579 anchorencode (legacy)
21581 wgFragmentMode=[ 'legacy' ]
21583 {{anchorencode:foo bar©#%n}}
21585 <p>foo_bar.C2.A9.23.25n
21590 anchorencode trims spaces
21592 wgFragmentMode=[ 'html5', 'legacy' ]
21594 {{anchorencode: __pretty__please__}}
21599 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21603 anchorencode deals with links
21605 wgFragmentMode=[ 'html5', 'legacy' ]
21607 {{anchorencode: [[hello|world]] [[hi]]}}
21612 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21616 anchorencode deals with templates
21618 wgFragmentMode=[ 'html5', 'legacy' ]
21620 {{anchorencode: {{Foo}} x}}
21625 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21629 anchorencode encodes like the TOC generator: (T20431)
21631 wgFragmentMode=[ 'html5', 'legacy' ]
21633 ===_ +:.3A%3A _ &&]] x===
21634 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21637 <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>
21638 <p>+:.3A%3A_&&]]_x
21641 <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>
21642 <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>
21643 <meta property="mw:PageProp/noeditsection"/>
21647 anchorencode encodes like the TOC generator: (T20431) (legacy)
21649 wgFragmentMode=[ 'legacy' ]
21651 ===_ +:.3A%3A&&]]===
21652 {{anchorencode: _ +:.3A%3A&&]] }}
21655 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21656 <p>.2B:.3A.253A.26.26.5D.5D
21661 T8200: blockquotes and paragraph formatting
21682 T10293: Use of center tag ruins paragraph formatting
21703 Parsing of overlapping (improperly nested) inline html tags
21705 <span><s>x</span></s>
21707 <p><span><s>x</span></s></span>
21710 <p><span><s>x</s></span>
21715 ### Language variants related tests
21718 # Parsoid does not mark self-links.
21719 # Parsoid does not convert links; PHP will do any necessary redirects.
21722 Self-link in language variants
21724 title=[[Dunav]] language=sr
21726 Both [[Dunav]] and [[Дунав]] are names for this river.
21728 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21731 <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>
21741 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21743 title=[[Duna]] language=sr
21745 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21747 <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.
21750 <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>
21754 Link to a section of a variant of this title shouldn't be parsed as self-link
21756 title=[[Duna]] language=sr
21758 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21760 <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.
21763 <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>
21767 Link to pages in language variants
21771 Main Page can be written as [[Маин Паге]]
21773 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21776 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21781 Multiple links to pages in language variants
21785 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21787 <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>.
21790 <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>
21795 Simple template in language variants
21801 <p>This is a test template
21807 Template with explicit namespace in language variants
21813 <p>This is a test template
21819 Basic test for template parameter in language variants
21823 {{парамтест|param=foo}}
21825 <p>This is a test template with parameter foo
21830 Simple category in language variants
21834 [[Category:МедиаWики Усер'с Гуиде]]
21836 cat=МедиаWики_Усер'с_Гуиде sort=
21838 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21853 ## We used to, but no longer wt2wt this test since the default serializer
21854 ## will normalize all categories to serialize on their own line.
21855 ## This wikitext usage is going to be fairly uncommon in production and
21856 ## selser will take care of preserving formatting in those scenarios.
21858 Don't convert blue categorylinks to another variant (T35210)
21864 [[A]][[Category:分类]]
21868 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21869 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21873 Stripping -{}- tags (language variants)
21877 Latin proverb: -{Ne nuntium necare}-
21879 <p>Latin proverb: Ne nuntium necare
21882 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21887 Prevent conversion with -{}- tags (language variants)
21889 language=sr variant=sr-ec
21891 Latinski: -{Ne nuntium necare}-
21893 <p>Латински: Ne nuntium necare
21896 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21901 Prevent conversion of text with -{}- tags (language variants)
21903 language=sr variant=sr-ec
21905 Latinski: -{Ne nuntium necare}-
21907 <p>Латински: Ne nuntium necare
21910 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21915 Prevent conversion of links with -{}- tags (language variants)
21917 language=sr variant=sr-ec
21921 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21924 <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>
21929 -{}- tags within headlines (within html for parserConvert())
21931 wgFragmentMode=[ 'html5', 'legacy' ]
21933 language=sr variant=sr-ec
21937 Note that even an unprotected headline ID is not affected by language
21942 <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>
21943 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21946 <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>
21949 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21951 <p>Note that even an unprotected headline ID is not affected by language
21954 <h2 id="Latinski">Latinski</h2>
21958 Explicit definition of language variant alternatives
21960 language=zh variant=zh-tw
21962 -{zh:China;zh-tw:Taiwan}-, not China
21964 <p>Taiwan, not China
21967 <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>
21971 Filter syntax for language variants
21973 language=zh variant=zh-tw
21975 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21977 <p>fooblog, WEBJOURNAL, WEBLOGquux
21980 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21983 # Note that Parsoid post-processing for language variants needs to
21984 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21986 Conversion around HTML tags
21988 language=sr variant=sr-ec
21990 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21991 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21994 <span title="ЛаCтин">ски</span>
21997 <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"}]}'/>
21998 <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>
22002 Explicit session-wise two-way language variant mapping (A flag and - flag)
22004 language=zh variant=zh-tw
22006 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22008 Taiwan is not China.
22010 But -{A|zh:China; zh-tw:Taiwan}- is China,
22012 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22014 and -{China}- is China.
22016 <p>This is Taiwan, but we'll forget that now.
22017 </p><p>Taiwan is not China.
22018 </p><p>But Taiwan is Taiwan,
22019 </p><p>(This should be stripped!)
22020 </p><p>and China is China.
22023 <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>
22024 <p>Taiwan is not China.</p>
22025 <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>
22026 <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>
22027 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22031 Explicit session-wise one-way language variant mapping (A flag and - flag)
22033 language=zh variant=zh-tw
22035 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22037 COUNTRY is China or Taiwan.
22039 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22041 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22043 and -{COUNTRY}- is COUNTRY.
22045 <p>This is Taiwan, but we'll forget that now.
22046 </p><p>COUNTRY is China or Taiwan.
22047 </p><p>But Taiwan is Taiwan,
22048 </p><p>(This should be stripped!)
22049 </p><p>and COUNTRY is COUNTRY.
22052 <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>
22053 <p>COUNTRY is China or Taiwan.</p>
22054 <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>
22055 <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>
22056 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22060 Explicit session-wise two-way language variant mapping (H flag for hide)
22062 language=zh variant=zh-tw
22064 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22068 <p>(This should be stripped!)
22069 </p><p>Taiwan is Taiwan.
22072 <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>
22073 <p>Taiwan is China.</p>
22077 Explicit session-wise one-way language variant mapping (H flag for hide)
22079 language=zh variant=zh-tw
22081 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22083 COUNTRY is Taiwan or China.
22085 <p>(This should be stripped!)
22086 </p><p>Taiwan is Taiwan or China.
22089 <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>
22090 <p>COUNTRY is Taiwan or China.</p>
22093 ## Note that parsoid test runner does not support 'showtitle' option.
22095 Adding explicit conversion rule for title (T flag)
22097 language=zh variant=zh-tw showtitle
22099 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22104 <p>Should be stripped!
22105 </p><p>Taiwan is China.
22108 <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>
22109 <p>Taiwan is China.</p>
22113 Code coverage: T combined with H flag
22115 language=zh variant=zh-tw showtitle
22117 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22122 <p>Should be stripped!
22123 </p><p>Taiwan is Taiwan.
22126 <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>
22127 <p>Taiwan is China.</p>
22131 Code coverage: T with no variants
22133 language=zh variant=zh-tw showtitle
22135 -{H|zh:China; zh-tw:Taiwan}-
22136 Taiwan is China.-{T|Taiwan is China}-
22143 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22144 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22148 Code coverage: rules with no variants
22150 language=zh variant=zh-tw
22152 -{H|zh:China; zh-tw:Taiwan}-
22163 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22165 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22166 Taiwan is China.</p>
22171 Code coverage: D flag for conversion rule
22173 language=zh variant=zh-tw
22175 -{D|zh-cn:XA; zh-tw:YA}-
22176 -{A;D|zh-cn:XB; zh-tw:YB}-
22177 -{D;H|zh-cn:XC; zh-tw:YC}-
22179 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22185 XA XB XC YA YB YC FOO BAR BAT 012345
22190 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22194 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22197 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22198 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22199 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22200 <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>
22201 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22202 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22203 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22204 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22208 Code coverage: N flag for conversion rule
22210 language=zh variant=zh-cn
22220 </p><p>српски (ћирилица)
22223 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22224 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22225 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22228 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22230 Code coverage: N flag for conversion rule (wt2html only)
22232 language=zh variant=zh-cn
22233 parsoid=wt2html,html2html
22240 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22244 Testing that changing the language variant here in the tests actually works
22246 language=zh variant=zh showtitle
22248 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22251 <p>Should be stripped!
22254 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22258 Recursive conversion of alt and title attrs shouldn't clear converter state
22260 language=zh variant=zh-cn
22263 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22264 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22268 Should be stripped<span title="Exclamation">!</span>
22271 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22272 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>
22276 T26072: more test on conversion rule for title
22278 language=zh variant=zh-tw showtitle
22280 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22282 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22285 <p>This should be stripped!
22286 </p><p>This won't take interferes with the title rule.
22289 <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>
22290 <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>
22294 Partly disable title conversion if variant == main language code
22296 language=zh variant=zh title=[[ZH]] showtitle
22298 -{T|zh-cn:CN;zh-tw:TW}-
22304 <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>
22308 Partly disable title conversion if variant == main language code, more
22310 language=zh variant=zh title=[[ZH]] showtitle
22318 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22322 Raw output of variant escape tags (R flag)
22324 language=zh variant=zh-tw
22326 Raw: -{R|zh:China;zh-tw:Taiwan}-
22328 <p>Raw: zh:China;zh-tw:Taiwan
22331 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22334 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22336 Raw output of variant escape tags (R flag) (wt2html only)
22338 language=zh variant=zh-tw
22339 parsoid=wt2html,html2html
22341 -{Variant}- -{D|syntax}- -{D;R|options}-
22343 <p>Variant syntax options
22346 <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>
22350 Nested markup inside raw output of variant escape tags (R flag)
22352 language=zh variant=zh-tw
22354 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22356 <p>Nested raw: nested Taiwan nested
22359 <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>
22363 Nested markup and spaces inside raw output of variant escape tags (R flag)
22365 language=zh variant=zh-tw
22367 X-{ outer -{ inner }- outer }-X
22369 <p>X outer inner outer X
22372 <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>
22376 Templates inside raw output of variant escape tags (R flag)
22378 language=zh variant=zh-tw
22380 Nested raw: -{R|nested {{echo|hi}} templates}-
22382 <p>Nested raw: nested hi templates
22385 <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>
22389 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22391 language=zh variant=zh-cn
22393 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22398 <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>
22402 Conversion rules from [numeric-only string] to [something else] (T48634)
22404 language=zh variant=zh-cn
22406 -{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
22411 <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>
22415 Two-way converter rule entries with an empty value should be ignored (T53551)
22417 language=zh variant=zh-cn
22419 -{H|zh-cn:foo;zh-tw:;}-foobar
22424 <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>
22428 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22430 language=zh variant=zh-cn
22432 -{H|=>zh-cn:foo;}-foobar
22437 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22441 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22443 language=zh variant=zh-cn
22450 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22454 Nested using of manual convert syntax
22456 language=zh variant=zh-hk
22458 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22460 <p>Nested: Hello Hong Kong!
22463 <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>
22467 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22469 language=zh variant=zh-cn
22471 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22473 <p><span title="X">A</span>
22476 <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>
22480 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22482 language=zh variant=zh-cn
22484 -{<span title="-{X}-">A</span>}-
22485 !! html/php+disabled
22486 <p><span title="X">A</span>
22489 <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>
22492 # Parsoid and PHP disagree on how to parse this example: Parsoid
22493 # insists that the content of a language converter element be a valid
22494 # DOM fragment or attribute string
22496 Language converter markup with block content
22498 language=zh variant=zh-cn
22500 <span>a-{b<div>c}-d
22502 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22504 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22509 </span></div></span></div></span>
22511 <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>
22513 <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>
22515 <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>
22519 LanguageConverter selser (1)
22521 language=zh variant=zh-cn
22523 "modes": ["wt2wt", "selser"],
22525 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22535 LanguageConverter selser (2)
22537 language=zh variant=zh-cn
22539 "modes": ["wt2wt", "selser"],
22541 ["span[class='x']", "contents", "text", "-{foo}-"],
22542 ["a", "contents", "text", "-{"],
22543 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22547 <span class="x">TEXT1</span>
22548 [http://example.com TEXT2]
22552 <span class="x"><nowiki>-{foo}-</nowiki></span>
22553 [http://example.com -{]
22554 [[Foo|<nowiki>-{</nowiki>]]
22555 {{1x|<nowiki>-{</nowiki>}}
22558 # Tests LanguageVariantText in ConstrainedText
22560 LanguageConverter selser (3)
22562 language=zh variant=zh-cn
22564 "modes": ["wt2wt", "selser"],
22566 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22567 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22578 |<nowiki/>-{edited}-
22582 # Tests LanguageVariantText._fromSelSer
22584 LanguageConverter selser (4)
22586 language=zh variant=zh-cn
22588 "modes": ["wt2wt", "selser"],
22590 ["td > span.x", "remove"]
22596 |<span class="x">Foo</span>-{Bar}-
22597 ||<span class="x">Foo</span>-{Bar}-
22607 # Since Parsoid is starting to emit canonical wikitext for links,
22608 # [http://example.com http://example.com] will not RT back to that
22610 # Parsoid does not language-convert links (it is done in a
22611 # post-processing step)
22613 Proper conversion of text in external links
22615 language=sr variant=sr-ec
22618 http://www.google.com
22619 gopher://www.google.com
22620 [http://www.google.com http://www.google.com]
22621 [gopher://www.google.com gopher://www.google.com]
22622 [https://www.google.com irc://www.google.com]
22623 [ftp://www.google.com www.google.com/ftp://dir]
22624 [//www.google.com www.google.com]
22626 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22627 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22628 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22629 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22630 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22631 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22632 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22635 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22636 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22637 <a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22638 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22639 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22640 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22641 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22645 Do not convert roman numbers to language variants
22647 language=sr variant=sr-ec
22651 <p>Фридрих IV је цар.
22654 <p>Fridrih IV je car.</p>
22658 Unclosed language converter markup "-{"
22669 Don't convert raw rule "-{R|=>}-" to "=>"
22678 <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>
22682 Don't break link parsing if language converter markup is in the caption.
22684 language=sr variant=sr-ec
22686 [[Main Page|-{R|main page}-]]
22688 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22691 <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>
22695 T146304: Don't break template parsing if language converter markup is in the parameter.
22697 language=sr variant=sr-ec
22704 <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>
22708 T146305: Don't break image parsing if language converter markup is in the caption.
22712 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22714 <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>
22717 <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>
22721 T146305: Don't break image parsing if nested language converter markup is in the caption.
22723 language=zh variant=zh-cn
22725 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22727 <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>
22730 <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>
22733 # XXX html2wt disabled because rich markup in alt is not preserved.
22735 Don't break gallery if language converter markup is inside.
22740 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22741 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22744 <ul class="gallery mw-gallery-traditional">
22745 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22746 <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>
22747 <div class="gallerytext">
22748 <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>
22752 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22753 <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>
22754 <div class="gallerytext">
22755 <p>This is a test template
22762 <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"}}'>
22763 <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>
22764 <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>
22769 T153135: Don't break list handling if language converter markup is in the item.
22771 language=zh variant=zh-cn
22773 ;-{zh-cn:AAA;zh-tw:BBB}-
22777 <dt>foo:bar</dt></dl>
22780 <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>
22781 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22785 // Note that parsoid does not protect colons unless language converter
22786 // markup is properly nested, because it is a backtracking parser.
22788 T153135: Unclosed markup in definition list (code coverage)
22790 language=zh variant=zh-cn
22795 <dl><dt><b>foo:bar</b></dt><b>
22796 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22799 <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}'>
22800 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22801 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22806 T153135: Nested language converter markup in definition list (code coverage)
22808 language=zh variant=zh-cn
22810 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22812 <dl><dt>AAA foo:bar bat:baz</dt>
22816 <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>
22817 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22821 # html2wt mode disabled due to <nowiki> insertion.
22823 T153140: Don't break table handling if language converter markup is in the cell.
22825 language=sr variant=sr-ec
22826 parsoid=wt2html,wt2wt,html2html
22843 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22850 Language converter tricky html2wt cases (1)
22853 parsoid=html2wt,wt2wt
22855 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22857 -{<nowiki>}-</nowiki>}-
22864 Language converter tricky html2wt cases (2)
22867 parsoid=html2wt,wt2wt
22871 <nowiki>-{foo}-</nowiki>
22873 <p>-{foo}-
22878 Language converter tricky html2wt cases (3)
22881 parsoid=html2wt,wt2wt
22883 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22884 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22885 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22891 -{<nowiki>-{foo}-</nowiki>}-
22895 </p><p>-{foo}-
22900 Language converter tricky html2wt cases (4)
22903 parsoid=html2wt,wt2wt
22905 <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>
22913 # Note that the <nowiki> escaping added by parsoid for source text,
22914 # destination text, and language names only works on the PHP side
22915 # for *destination text*. (HTML entity escaping wouldn't work
22916 # any better.) This is probably a bug, at least for source texts.
22917 # (For language names PHP uses a precise regexp based on the languages
22918 # it currently knows have variants, which is fragile since this set
22919 # can grow/shrink over time.)
22921 Language converter tricky html2wt cases (5)
22923 language=zh variant=zh-cn
22925 <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>
22926 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22927 <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>
22928 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22931 -{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
22933 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22935 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22937 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22940 !! html/php+disabled
22941 <p>foobat;xyz=>zh-cn:abc
22945 </p><p>a:b=>c 0;zh-tw:bar
22950 T179579: Nowiki and lc interaction
22957 -{123<nowiki>|</nowiki>456}-
22959 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
22961 <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>
22965 T2529: Uncovered bullet
22975 T2529: Uncovered bullet in a deeply nested list
22977 *******Foo {{bullet}}
22979 <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>
22985 T2529: Uncovered table already at line-start
23008 T2529: Uncovered bullet in parser function result
23010 *Foo {{lc:{{bullet}} }}
23018 T7678: Double-parsed template argument
23020 {{lc:{{{1}}}|hello}}
23027 T7678: Double-parsed template invocation
23029 {{lc:{{paramtest {{!}} param = hello }} }}
23031 <p>{{paramtest | param = hello }}
23036 Case insensitivity of parser functions for non-ASCII characters (T10143)
23039 title=[[Main Page]]
23041 {{PRVNÍVELKÉ:ěščř}}
23042 {{prvnívelké:ěščř}}
23062 Morwen/13: Unclosed link followed by heading
23069 <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>
23074 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23081 <h1><span class="mw-headline" id="heading">heading</span></h1>
23086 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23093 <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>
23108 Paragraphs inside divs (no extra line breaks)
23120 Paragraphs inside divs (extra line break on open)
23135 Paragraphs inside divs (extra line break on close)
23150 Paragraphs inside divs (extra line break on open and close)
23166 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23167 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23169 Nesting tags, paragraphs on lines which begin with <div>
23171 <div></div><strong>A
23174 <div></div><p><strong>A
23175 </strong></p><strong></strong><p><strong>B</strong>
23184 # T8200: <blockquote> should behave like <div> with respect to line breaks
23186 T8200: paragraphs inside blockquotes (no extra line breaks)
23188 <blockquote>Line one
23190 Line two</blockquote>
23192 <blockquote>Line one
23193 Line two</blockquote>
23196 <blockquote><p>Line one
23197 Line two</p></blockquote>
23201 T8200: paragraphs inside blockquotes (extra line break on open)
23206 Line two</blockquote>
23211 Line two</blockquote>
23217 Line two</p></blockquote>
23220 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23222 T8200: paragraphs inside blockquotes (extra line break on close)
23224 <blockquote>Line one
23229 <blockquote>Line one
23235 <blockquote><p>Line one
23242 T8200: paragraphs inside blockquotes (extra line break on open and close)
23258 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23260 Paragraphs inside blockquotes/divs (no extra line breaks)
23262 <blockquote><div>Line one
23264 Line two</div></blockquote>
23266 <blockquote><div>Line one
23267 Line two</div></blockquote>
23272 Paragraphs inside blockquotes/divs (extra line break on open)
23277 Line two</div></blockquote>
23282 Line two</div></blockquote>
23287 Paragraphs inside blockquotes/divs (extra line break on close)
23289 <blockquote><div>Line one
23292 </div></blockquote>
23294 <blockquote><div>Line one
23297 </div></blockquote>
23302 Paragraphs inside blockquotes/divs (extra line break on open and close)
23308 </div></blockquote>
23314 </div></blockquote>
23319 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23321 wgLinkHolderBatchSize=0
23327 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23328 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23329 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23334 Free external link invading image caption
23336 [[Image:Foobar.jpg|thumb|http://x|hello]]
23338 <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>
23341 <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>
23345 T17196: localised external link numbers
23349 [http://en.wikipedia.org/]
23351 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23354 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23358 Multibyte character in padleft
23360 {{padleft:-Hello|7|Æ}}
23365 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23369 Multibyte character in padright
23371 {{padright:Hello-|7|Æ}}
23376 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23380 formatdate parser function
23382 {{#formatdate:2009-03-24}}
23384 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23389 formatdate parser function, with default format
23391 {{#formatdate:2009-03-24|mdy}}
23393 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23398 Spacing of numbers in formatted dates
23400 {{#formatdate:January 15}}
23402 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23407 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
23409 language=nl title=[[MediaWiki:Common.css]]
23411 {{#formatdate:2009-03-24|dmy}}
23413 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23426 Edit comment with link
23430 I like the [[Main Page]] a lot
23432 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23436 Edit comment with link and link text
23440 I like the [[Main Page|best pages]] a lot
23442 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23446 Edit comment with link and link text with suffix
23450 I like the [[Main Page|best page]]s a lot
23452 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23456 Edit comment with section link (non-local, eg in history list)
23458 comment title=[[Main Page]]
23460 /* External links */ removed bogus entries
23462 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23466 Edit comment with section link and text before it (non-local, eg in history list)
23468 comment title=[[Main Page]]
23470 pre-comment text /* External links */ removed bogus entries
23472 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>
23476 Edit comment with section link (local, eg in diff view)
23478 comment local title=[[Main Page]]
23480 /* External links */ removed bogus entries
23482 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23486 Edit comment with subpage link (T16080)
23490 title=[[Subpage test]]
23492 Poked at a [[/subpage]] here...
23494 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23498 Edit comment with subpage link and link text (T16080)
23502 title=[[Subpage test]]
23504 Poked at a [[/subpage|neat little page]] here...
23506 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23510 Edit comment with bogus subpage link in non-subpage NS (T16080)
23513 title=[[Subpage test]]
23515 Poked at a [[/subpage]] here...
23517 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23521 Edit comment with bare anchor link (local, as on diff)
23525 title=[[Main Page]]
23529 <a href="#section">#section</a>
23533 Edit comment with bare anchor link (non-local, as on history)
23536 title=[[Main Page]]
23540 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23544 Anchor starting with underscore
23550 <p><a href="#_ref">One</a>
23553 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23557 Id starting with underscore
23559 <div id="_ref"></div>
23561 <div id="_ref"></div>
23566 Edit comment with link with more than one pipe (T99346)
23570 [[Main Page|Many|pipes]]
23572 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23576 Complex edit comment with link with more than one pipe (T99346)
23580 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23582 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..."
23586 Space normalisation on autocomment (T24784)
23589 title=[[Main Page]]
23591 /* __hello__world__ */
23593 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23597 percent-encoding and + signs in comments (T28410)
23601 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23603 <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>
23606 # Parsoid doesn't support this yet: see T75581
23607 # but it *should* omit the 'src' attribute if the image is bad.
23608 # PHP side of tests was disabled in
23609 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23610 # because of issues in the PHP parserTests infrastructure
23611 # (but the output below is indeed what the PHP side emits)
23613 Bad images - basic functionality
23616 !! html/php+disabled
23618 <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>
23622 Bad images - T18039: text after bad image disappears
23627 !! html/php+disabled
23633 <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>
23638 Verify that displaytitle works (T24501) no displaytitle
23642 wgAllowDisplayTitle=true
23643 wgRestrictDisplayTitle=false
23645 this is not the the title
23648 <p>this is not the the title
23653 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23658 wgAllowDisplayTitle=true
23659 wgRestrictDisplayTitle=false
23661 this is not the the title
23662 {{DISPLAYTITLE:whatever}}
23665 <p>this is not the the title
23670 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23675 wgAllowDisplayTitle=true
23676 wgRestrictDisplayTitle=true
23678 this is not the the title
23679 {{DISPLAYTITLE:whatever}}
23682 <p>this is not the the title
23687 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23692 wgAllowDisplayTitle=true
23693 wgRestrictDisplayTitle=true
23695 this is not the the title
23696 {{DISPLAYTITLE:screen}}
23699 <p>this is not the the title
23704 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23709 wgAllowDisplayTitle=false
23711 this is not the the title
23712 {{DISPLAYTITLE:screen}}
23715 <p>this is not the the title
23716 <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>
23721 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23726 wgAllowDisplayTitle=false
23728 this is not the the title
23731 <p>this is not the the title
23736 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23741 wgAllowDisplayTitle=true
23742 wgRestrictDisplayTitle=true
23744 this is not the the title
23745 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23747 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23748 <p>this is not the the title
23753 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23758 wgAllowDisplayTitle=true
23759 wgRestrictDisplayTitle=true
23761 this is not the the title
23762 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23764 <span style="color: red;">s</span>creen
23765 <p>this is not the the title
23770 Page status indicators: Empty name is invalid
23774 <indicator name=" "></indicator>
23775 <indicator></indicator>
23777 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23778 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23783 Page status indicators: Weird syntaxes that are okay
23787 <indicator name="empty" />
23788 <indicator name="name"></indicator>
23797 Page status indicators: Torture test
23801 <indicator name="01">hello world</indicator>
23802 <indicator name="02">[[Main Page]]</indicator>
23803 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23804 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23805 <indicator name="05">*foo
23807 <indicator name="06"><nowiki>foo</nowiki></indicator>
23808 <indicator name="07"> Preformatted</indicator>
23809 <indicator name="08"><div>Broken tag</indicator>
23810 <indicator name="09">{| class=wikitable
23813 <indicator name="10">Two
23815 paragraphs</indicator>
23818 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23819 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" />
23820 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>
23821 05=<ul><li>foo</li>
23825 07=<pre>Preformatted
23827 08=<div>Broken tag</div>
23829 09=<table class="wikitable">
23846 preload: check <noinclude> and <includeonly>
23850 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23856 preload: check <onlyinclude>
23860 Goodbye <onlyinclude>Hello world</onlyinclude>
23866 preload: can pass tags through if we want to
23870 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23872 <includeonly>Hello world</includeonly>
23876 preload: check that it doesn't try to do tricks
23880 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23882 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23886 Play a bit with r67090 and T5158
23888 <div style="width:50% !important"> </div>
23889 <div style="width:50% !important"> </div>
23890 <div style="width:50% !important"> </div>
23891 <div style="border : solid;"> </div>
23893 <div style="width:50% !important"> </div>
23894 <div style="width:50% !important"> </div>
23895 <div style="width:50% !important"> </div>
23896 <div style="border : solid;"> </div>
23899 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23900 <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>
23901 <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>
23902 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23907 HTML5 data attributes
23909 <span data-foo="bar">Baz</span>
23910 <p data-abc-def_hij="">Quuz</p>
23912 <p><span data-foo="bar">Baz</span>
23914 <p data-abc-def_hij="">Quuz</p>
23917 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23918 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23922 Strip reserved data attributes
23924 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23926 <div data-ok="fred">d</div>
23929 <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>
23933 percent-encoding and + signs in internal links (T28410)
23935 [[User:+%]] [[Page+title%]]
23936 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23937 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23938 [[%33%45]] [[%33%45+]]
23940 <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>
23941 <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>
23942 <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>
23943 <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>
23946 <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>
23947 <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>
23948 <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>
23949 <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>
23953 Special characters in embedded file links (T29679)
23955 [[File:Contains & ampersand.jpg]]
23956 [[File:Does not exist.jpg|Title with & ampersand]]
23958 <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>
23959 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23962 <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>
23963 <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>
23967 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23969 Text's been normalized?
23971 <p>Text's been normalized?
23976 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23978 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23980 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23985 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23987 [http://www.example.org/ ideograms]
23989 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23994 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
23996 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
23998 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24022 T33098 Template which includes system messages which includes the template
24026 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24027 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24032 T33490 Turkish: ucfirst 'blah'
24043 T33490 Turkish: ucfirst 'ix'
24054 T33490 Turkish: lcfirst 'BLAH'
24065 T33490 Turkish: ucfırst (with a dotless i)
24071 <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>
24076 T33490 ucfırst (with a dotless i) with English language
24082 <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>
24086 # Note that Parsoid doesn't emit an explicit TOC.
24087 # Note also that the html2wt direction tends to emit an extra newline
24088 # between the __TOC__ magicword and the first heading unless *both*
24089 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24093 T28375: TOC with italics
24095 title=[[Main Page]]
24098 ==''Lost'' episodes==
24100 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24102 <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>
24106 <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>
24109 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24110 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24114 T28375: TOC with bold
24116 title=[[Main Page]]
24119 =='''should be bold''' then normal text==
24121 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24123 <li class="toclevel-1 tocsection-1"><a href="#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>
24127 <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>
24130 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24131 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24135 T35845: Headings become cursive in TOC when they contain an image
24137 title=[[Main Page]]
24140 ==Image [[Image:foobar.jpg]]==
24142 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24144 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24148 <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>
24151 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24152 <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>
24156 T35845 (2): Headings become bold in TOC when they contain a blockquote
24158 title=[[Main Page]]
24161 ==<blockquote>Quote</blockquote>==
24163 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24165 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24169 <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>
24172 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24174 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24178 <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>
24180 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24181 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24185 Unclosed tags in TOC
24187 wgFragmentMode=[ 'html5', 'legacy' ]
24189 title=[[Main Page]]
24193 <small>Hanc marginis exiguitas non caperet.</small>
24196 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24198 <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>
24202 <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>
24203 <p><small>Hanc marginis exiguitas non caperet.</small>
24207 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24208 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24209 <p><small>Hanc marginis exiguitas non caperet.</small>
24214 Multiple tags in TOC
24217 ==<i>Foo</i> <b>Bar</b>==
24219 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24221 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24223 <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>
24224 <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>
24228 <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>
24229 <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>
24232 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24234 <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>
24235 <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>
24239 <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>
24240 <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>
24242 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24243 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24245 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24248 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24249 # html5 tag parsing.
24251 Tags with parameters in TOC
24256 ==<sup class="in-h2">Hello</sup>==
24258 ==<sup class="a > b">Evilbye</sup>==
24260 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24262 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24263 <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>
24267 <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>
24268 <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>
24271 <meta property="mw:PageProp/toc" />
24272 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24274 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24278 span tags with directionality in TOC
24281 ==<span dir="ltr">C++</span>==
24283 ==<span dir="rtl">זבנג!</span>==
24285 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24287 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24289 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24291 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24293 <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>
24294 <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>
24295 <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>
24296 <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>
24297 <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>
24301 <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>
24302 <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>
24303 <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>
24304 <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>
24305 <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>
24308 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24309 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24310 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24311 <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>
24312 <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>
24313 <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>
24317 T74884: bdi element in ToC
24320 ==<bdi>test</bdi>==
24322 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24324 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24328 <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>
24331 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24332 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24336 T35715: s/strike element in ToC
24339 ==<s>test</s> test <strike>test</strike>==
24341 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24343 <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>
24347 <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>
24350 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24351 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24355 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24360 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24362 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24366 <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>
24369 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24370 <h2 id="x" data-parsoid='{}'>x</h2>
24376 == {{int:headline_sample}} ==
24380 T34057: Title needed when expanding <h> nodes.
24382 title=[[Main Page]]
24386 <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>
24391 Strip marker in urlencode
24393 {{urlencode:x<nowiki/>y}}
24394 {{urlencode:x<nowiki/>y|wiki}}
24395 {{urlencode:x<nowiki/>y|path}}
24396 {{urlencode:x<pre id="one">two</pre>y}}
24424 Strip marker in formatNum
24426 {{formatnum:1<nowiki/>2}}
24427 {{formatnum:1<nowiki/>2|R}}
24435 Check noCommafy in formatNum
24439 {{formatnum:123456.78}}
24440 {{formatnum:123456.78|NOSEP}}
24448 Wrong option for formatNum (T58199)
24450 {{formatnum:1,234.56|Random}}
24451 {{formatnum:1,234.56|EVERYTHING}}
24452 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24461 Strip marker in grammar
24465 {{grammar:elative|foo<nowiki/>bar}}
24472 Strip marker in padleft
24474 {{padleft:|2|x<nowiki/>y}}
24481 Strip marker in padright
24483 {{padright:|2|x<nowiki/>y}}
24490 Strip marker in anchorencode
24492 {{anchorencode:x<nowiki/>y}}
24497 <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>
24501 nowiki inside link inside heading (T20295)
24503 ==[[foo|x<nowiki>y</nowiki>z]]==
24505 <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>
24510 new support for bdi element (T33817)
24512 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24514 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24519 Ignore pipe between table row attributes
24523 |- id=foo | style='color: red'
24531 <tr id="foo" style="color: red">
24538 Language parser function
24547 Padleft and padright (default 0-padding)
24556 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24557 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24561 Padleft and padright (partial fill)
24563 {{padleft:xyz|6|ab}}
24564 {{padright:xyz|6|ab}}
24570 <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>
24571 <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>
24575 Padleft and padright as substr
24577 {{padleft:|3|abcde}}
24578 {{padright:|3|abcde}}
24584 <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>
24585 <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>
24589 Special parser function
24591 {{#special:RandomPage}}
24592 {{#special:BaDtItLe}}
24593 {{#special:Foobar}}
24602 T36939 - Case insensitive link parsing ([HttP://])
24604 [HttP://MediaWiki.Org/]
24606 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24609 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24613 T36939 - Case insensitive link parsing ([HttP:// title])
24615 [HttP://MediaWiki.Org/ MediaWiki]
24617 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24622 T36939 - Case insensitive link parsing (HttP://)
24624 HttP://MediaWiki.Org/
24626 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24629 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24647 <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>
24648 <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>
24649 <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>
24650 <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>
24651 <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>
24657 ### Parsoid-specific tests
24658 ### Parsoid-PHP parser incompatibilities
24661 1. SOL-sensitive wikitext tokens as template-args
24663 parsoid=wt2html,wt2wt
24669 <span about="#mwt1" typeof="mw:Transclusion">
24670 </span><ul about="#mwt1"><li>a</li>
24672 <span about="#mwt2" typeof="mw:Transclusion">
24673 </span><ol about="#mwt2"><li>a</li>
24675 <span about="#mwt3" typeof="mw:Transclusion">
24676 </span><dl about="#mwt3"><dd>a</dd>
24680 #### -----------------------------------------------------------------
24681 #### Parsoid-specific functionality tests
24682 #### -----------------------------------------------------------------
24684 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24685 # We know wt2wt will fail, but we expect selser to pass.
24686 # Due to the nature of our testing, wt2wt and selser tests will enter the
24687 # blacklist and we'll catch selser regressions based on changes to the
24688 # blacklist entries for selser tests.
24690 1. Bad treebuilder fixup of formatting elt is cleaned up
24692 parsoid=wt2html,wt2wt
24697 [[Image:Foobar.jpg|right|Test]]
24704 <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>
24711 2. Bad treebuilder fixup of formatting elt is cleaned up
24713 parsoid=wt2html,wt2wt
24715 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24717 <small>[[Image:Foobar.jpg|right|300px]]</small>
24721 <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>
24723 <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>
24727 3. Bad treebuilder fixup of formatting elt is cleaned up
24729 parsoid=wt2html,wt2wt
24731 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24733 <p><small><b>foo</b></small></p>
24734 <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>
24735 <p><small><b>bar</b></small></p>
24739 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24741 parsoid=wt2html,wt2wt
24743 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24745 <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>
24748 #### ----------------------------------------------------------------
24749 #### Parsoid-only testing of Parsoid's impl of LST
24750 #### Not implemented yet, see
24751 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24752 #### ----------------------------------------------------------------
24754 ## We still need to support serializing the older format while content is stored.
24756 LST Sections: Backwards compatibility
24759 "suppressErrors": true,
24760 "modes": ["html2wt"]
24763 <section begin="2011-05-16" />
24764 <section end="2014-04-10 (MW 1.23wmf22)" />
24766 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24767 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24771 LST Sections: Newfangled approach
24773 <section begin="2011-05-16" />
24774 <section end="2014-04-10 (MW 1.23wmf22)" />
24776 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24778 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24782 #--------- Test stripping of empty nodes in template content ----------
24785 Empty LI and TR nodes should be stripped from template content
24790 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24794 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24807 Empty LI and TR nodes should not be stripped from top-level content
24821 <li class='mw-empty-elt'></li>
24826 <tr class='mw-empty-elt'></tr>
24835 Empty TR nodes should not be stripped if they have any attributes set
24837 {{EmptyTRWithHTMLAttrTest}}
24839 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24840 <tr align='center'></tr>
24841 <tr><td>foo</td></tr>
24842 <tr align='center'></tr>
24843 <tr><td>bar</td></tr>
24847 #### ----------------------------------------------------------------
24848 #### The following section of tests are primarily to test
24849 #### wikitext escaping capabilities of Parsoid. Given that
24850 #### escaping can be done any number of ways, the wikitext (input)
24851 #### is always adjusted to reflect how Parsoid adds nowiki
24854 #### We are marking several tests as parsoid-only since the
24855 #### HTML in the result section is different from what the
24856 #### PHP parser generates for it.
24857 #### ----------------------------------------------------------------
24860 #### --------------- Headings ---------------
24862 #### 1. Nested inside html <h1>=foo=</h1>
24863 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24864 #### 3. Nested inside html with wikitext split by html tags
24865 #### 4. No escape needed
24866 #### 5. Empty headings <h1></h1>
24867 #### 6. Heading chars in SOL context
24868 #### ----------------------------------------
24870 Headings: 0. Unnested
24880 <p>=foo<i>a</i>=</p>
24882 <nowiki>=foo=</nowiki>
24884 <nowiki> </nowiki>=foo=
24886 <nowiki>=foo=</nowiki>
24888 =foo''a''<nowiki>=</nowiki>
24891 # New headings and existing headings are handled differently
24893 Headings: 1. Nested inside html
24901 <h1 data-parsoid=''>=foo=</h1>
24902 <h2 data-parsoid=''>=foo=</h2>
24903 <h3 data-parsoid=''>=foo=</h3>
24904 <h4 data-parsoid=''>=foo=</h4>
24905 <h5 data-parsoid=''>=foo=</h5>
24906 <h6 data-parsoid=''>=foo=</h6>
24914 =<nowiki>=foo=</nowiki>=
24915 ==<nowiki>=foo=</nowiki>==
24916 ===<nowiki>=foo=</nowiki>===
24917 ====<nowiki>=foo=</nowiki>====
24918 =====<nowiki>=foo=</nowiki>=====
24919 ======<nowiki>=foo=</nowiki>======
24924 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24933 <nowiki>*</nowiki>bar
24939 <nowiki>=bar=</nowiki>
24943 Headings: 3. Nested inside html with wikitext split by html tags
24947 <h1>=<b>bold</b>foo=</h1>
24949 = ='''bold'''foo= =
24953 Headings: 4a. No escaping needed (testing just h1 and h2)
24964 <h1><i>=</i>foo=</h1>
24984 Headings: 4b. No escaping needed (inside p-tags)
25001 Headings: 4c. Short headings (1)
25008 <nowiki>===</nowiki>
25014 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25016 Headings: 4d. Short headings (2)
25018 parsoid=wt2html,html2html
25029 <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>
25030 <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>
25031 <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>
25036 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25037 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25038 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25042 Headings: 5. Empty headings
25046 <h1 data-parsoid='{}'></h1>
25048 <h2 data-parsoid='{}'></h2>
25050 <h3 data-parsoid='{}'></h3>
25052 <h4 data-parsoid='{}'></h4>
25054 <h5 data-parsoid='{}'></h5>
25056 <h6 data-parsoid='{}'></h6>
25066 =====<nowiki/>=====
25068 ======<nowiki/>======
25072 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25082 <nowiki>=a=</nowiki>
25084 <nowiki>=a=</nowiki>
25086 <nowiki>=a=</nowiki>
25090 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25103 <nowiki>=a=</nowiki>
25106 <nowiki>=a=</nowiki>
25109 <nowiki>=a=</nowiki>
25114 Headings: 6c. Heading chars in SOL context (leading newline break)
25122 <nowiki>=b=</nowiki>
25126 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25130 <!--c0--><p>=a=</p>
25132 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25134 <!--c0--><nowiki>=a=</nowiki>
25136 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25140 Headings: 6d. Heading chars in SOL context (No escaping needed)
25150 Headings: 7. Insert a newline between new content and headings
25156 <h2 data-parsoid='{}'>A</h2>
25157 <p data-parsoid='{}'>a</p>
25168 Headings: Used as horizontal rule
25170 wgFragmentMode=[ 'html5', 'legacy' ]
25176 <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>
25179 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25182 #### --------------- Lists ---------------
25183 #### 0. Outside nests (*foo, etc.)
25184 #### 1. Nested inside html <ul><li>*foo</li></ul>
25185 #### 2. Inside definition lists
25186 #### 3. Only bullets at start should be escaped
25187 #### 4. No escapes needed
25188 #### 5. No unnecessary escapes
25189 #### 6. Escape bullets in SOL position
25190 #### 7. Escape bullets in a multi-line context
25191 #### ----------------------------------------
25194 Lists: 0. Outside nests
25204 <nowiki>*</nowiki>foo
25206 <nowiki>#</nowiki>foo
25208 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25211 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25212 ## to test wikitext escaping, and insignificant whitespace diffs
25213 ## cause PHP parser tests to barf
25215 Lists: 1. Nested inside html (No unnecessary escapes)
25224 <li data-parsoid='{}'>*foo</li>
25225 <li data-parsoid='{}'>#foo</li>
25226 <li data-parsoid='{}'>:foo</li>
25227 <li data-parsoid='{}'>;foo</li>
25235 <li data-parsoid='{}'>*foo</li>
25236 <li data-parsoid='{}'>#foo</li>
25237 <li data-parsoid='{}'>:foo</li>
25238 <li data-parsoid='{}'>;foo</li>
25245 *<nowiki>*foo</nowiki>
25246 *<nowiki>#foo</nowiki>
25247 *<nowiki>:foo</nowiki>
25248 *<nowiki>;foo</nowiki>
25254 #<nowiki>*foo</nowiki>
25255 #<nowiki>#foo</nowiki>
25256 #<nowiki>:foo</nowiki>
25257 #<nowiki>;foo</nowiki>
25261 Lists: 2. Inside definition lists
25265 <dl><dt>;foo</dt></dl>
25266 <dl><dt>:foo</dt></dl>
25269 <dl><dd>:foo</dd></dl>
25273 ; <nowiki>:foo</nowiki>
25275 ; <nowiki>:foo</nowiki>
25282 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25288 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25292 *<nowiki>*foo</nowiki>''it''*bar
25296 Lists: 4. No escapes needed
25309 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25313 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25327 Lists: 5. No unnecessary escapes
25331 <ul><li> bar <span>[[foo]]</span></li></ul>
25332 <ul><li> =bar <span>[[foo]]</span></li></ul>
25333 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25334 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25335 <ul><li> =bar <span>foo]]</span>=</li></ul>
25336 <ul><li> <s></s>: a</li></ul>
25337 <ul><li> <i>* foo</i></li></ul>
25340 * bar <span><nowiki>[[foo]]</nowiki></span>
25342 * =bar <span><nowiki>[[foo]]</nowiki></span>
25344 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25346 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25348 * =bar <span>foo]]</span>=
25356 Lists: 6. Escape bullets in SOL position
25360 <p><!--cmt-->*foo</p>
25362 <!--cmt--><nowiki>*</nowiki>foo
25366 Lists: 7. Escape bullets in a multi-line context
25375 <nowiki>*</nowiki>b
25379 Lists: 8. Escape colons only if not present in tags
25383 <dl><dt>a:b<i>c:d</i></dt></dl>
25385 ; <nowiki>a:b</nowiki>''c:d''
25388 #### --------------- HRs ---------------
25389 #### 1. Single line
25390 #### -----------------------------------
25393 HRs: 1. Single line
25401 ----<nowiki>----</nowiki>
25406 #### --------------- Tables ---------------
25407 #### 1a. Simple example
25408 #### 1b. No escaping needed (!foo)
25409 #### 1c. No escaping needed (|foo)
25410 #### 1d. No escaping needed (|}foo)
25412 #### 2a. Nested in td (<td>foo|bar</td>)
25413 #### 2b. Nested in td (<td>foo||bar</td>)
25414 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25416 #### 3a. Nested in th (<th>foo!bar</th>)
25417 #### 3b. Nested in th (<th>foo!!bar</th>)
25418 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25422 #### 4c. No escaping needed
25423 #### --------------------------------------
25426 Tables: 1a. Simple example
25434 <nowiki>{|</nowiki>
25439 Tables: 1b. No escaping needed
25450 Tables: 1c. No escaping needed
25461 Tables: 1d. No escaping needed
25472 Tables: 2a. Nested in td
25477 <td>foo|bar</td></tr>
25478 <tr><td>x<div>a|b</div></td>
25482 |<nowiki>foo|bar</nowiki>
25484 |x<div><nowiki>a|b</nowiki></div>
25492 <td>x<div>a|b</div>
25493 </td></tr></tbody></table>
25497 Tables: 2b. Nested in td
25503 <td>a<i>b||c</i></td>
25504 <td>a<i><div>b||c</div></i></td>
25505 </tr></tbody></table>
25508 |<nowiki>foo||bar</nowiki>
25509 |a''<nowiki>b||c</nowiki>''
25510 |a''<div><nowiki>b||c</nowiki></div>''
25519 <td>a<i><div>b||c</div></i>
25525 Tables: 2c. Nested in td -- no escaping needed
25541 Tables: 3a. Nested in th
25557 Tables: 3b. Nested in th
25562 <tr><th>foo!!bar</th>
25563 <th><i>foo|bar</i></th>
25564 <th><i>foo!!bar</i></th>
25565 <th><i><span>foo!!bar</span></i></th>
25566 </tr></tbody></table>
25569 !<nowiki>foo!!bar</nowiki>
25570 !''<nowiki>foo|bar</nowiki>''
25571 !''<nowiki>foo!!bar</nowiki>''
25572 !''<span><nowiki>foo!!bar</nowiki></span>''
25581 <th><i>foo!!bar</i>
25583 <th><i><span>foo!!bar</span></i>
25589 Tables: 3c. Nested in th
25594 <tr><th>foo||bar</th>
25595 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25596 </tr></tbody></table>
25599 !<nowiki>foo||bar</nowiki>
25600 !<nowiki>foo||bar</nowiki>
25613 Tables: 4a. Escape -
25629 |<nowiki>-bar</nowiki>
25634 Tables: 4b. Escape +
25650 |<nowiki>+bar</nowiki>
25655 Tables: 4c. No escaping needed
25660 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25661 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25667 <div>a|b</div></td>
25712 Tables: 4d. No escaping needed
25717 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25718 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25719 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25730 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25740 T97430: Don't emit empty nowiki pairs around marker meta tags
25744 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25745 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25747 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25748 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25752 Unclosed xmlish element in table line shouldn't eat end delimiters
25757 <tbody><tr><td> <foo</td>
25758 <td> bar></td></tr>
25775 #### --------------- Links ----------------
25776 #### 1. Quote marks in link text
25777 #### 2. Wikilinks: Escapes needed
25778 #### 3. Wikilinks: No escapes needed
25779 #### 4. Extlinks: Escapes needed
25780 #### 5. Extlinks: No escapes needed
25781 #### --------------------------------------
25783 Links 1. WikiLinks: No escapes needed
25787 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25788 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25789 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25793 [[Foo|x [Foobar] x]]
25795 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25796 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25797 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25802 Links 2. WikiLinks: Escapes needed
25806 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25807 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25808 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25809 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25810 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25811 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25812 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25813 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25814 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25815 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25817 [[Foo|<nowiki>Foobar]</nowiki>]]
25818 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25819 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25820 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25821 [[Foo|<nowiki>|Bar</nowiki>]]
25822 [[Foo|<nowiki>]]bar</nowiki>]]
25823 [[Foo|<nowiki>[[bar</nowiki>]]
25824 [[Foo|<nowiki>x [[ y</nowiki>]]
25825 [[Foo|<nowiki>x ]] y</nowiki>]]
25826 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25828 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25829 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25830 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25831 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25832 <a href="/wiki/Foo" title="Foo">|Bar</a>
25833 <a href="/wiki/Foo" title="Foo">]]bar</a>
25834 <a href="/wiki/Foo" title="Foo">[[bar</a>
25835 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25836 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25837 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25842 Links 3. WikiLinks: No escapes needed
25846 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25847 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25852 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25853 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25858 Links 4. ExtLinks: Escapes needed
25862 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25863 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25864 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25865 <p>[http://google.com]</p>
25866 <p>[http://google.com google]</p>
25867 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25868 <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>
25870 [http://google.com <nowiki>[google]</nowiki>]
25871 [http://google.com <nowiki>google]</nowiki>]
25872 [http://google.com <nowiki>goog] le</nowiki>]
25874 <nowiki>[http://google.com]</nowiki>
25876 <nowiki>[http://google.com google]</nowiki>
25878 [http://google.com<nowiki>]</nowiki>
25880 [{{echo|http://google.com}}<nowiki>]</nowiki>
25882 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25883 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25884 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25885 </p><p>[http://google.com]
25886 </p><p>[http://google.com google]
25887 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25888 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25893 Links 5. ExtLinks: No escapes needed
25897 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25898 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25900 [http://google.com [google]
25902 [[http://google.com]]
25904 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25905 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25910 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25914 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25915 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25916 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25917 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25918 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25919 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25920 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25921 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25922 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25923 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25924 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25925 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25926 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25929 x<nowiki/>http://example.com<nowiki/>y
25930 http://example.com<nowiki/>?x
25931 http://example.com<nowiki/>&x
25932 http://example.com<nowiki/>'x
25933 http://example.com<nowiki/>,x
25934 http://example.com<nowiki/>.x
25935 http://example.com<nowiki/>;x
25936 http://example.com<nowiki/>:x
25937 http://example.com<nowiki/>;x
25938 http://example.com<nowiki/>!x
25939 http://example.com<nowiki/>=x
25940 http://example.com<nowiki/>(x)
25941 http://example.com(x<nowiki/>)
25945 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25950 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25952 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25953 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25954 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25955 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25956 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25962 "http://example.com"
25963 (http://example.com)
25964 (http://example.com) foo
25965 http://example.com,
25966 http://example.com, foo
25969 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25971 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25972 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25973 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25974 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25975 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25980 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25984 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
25985 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
25987 http://example.com.,;:!?\
25988 -http://example.com:
25990 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
25991 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
25996 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26000 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26001 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26002 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26006 X<nowiki/>RFC 123<nowiki/>y
26010 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26014 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26015 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26016 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26023 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26024 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26025 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26030 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26034 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26035 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26036 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26040 X<nowiki/>PMID 123<nowiki/>y
26044 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26048 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26049 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26050 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26057 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26058 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26059 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26064 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26068 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26069 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26070 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26073 ISBN 1234567890<nowiki/>1
26074 ISBN 1234567890<nowiki/>x
26075 a<nowiki/>ISBN 1234567890<nowiki/>b
26079 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26083 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26087 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26092 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26096 <p>this is not a link: http://example.com
26099 this is not a link: <nowiki>http://example.com</nowiki>
26103 Links 15. Link trails can't become link prefixes.
26108 <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>
26110 [[Söfnuður]]-[[00]]
26112 <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>
26116 #### --------------- Quotes ---------------
26117 #### 1. Quotes inside <b> and <i>
26118 #### 2. Link fragments separated by <i> and <b> tags
26119 #### 3. Link fragments inside <i> and <b>
26120 #### 4. No escaping needed
26121 #### --------------------------------------
26123 1a. Quotes inside <b> and <i>
26134 <b>foo'<i>bar'</i>baz</b>
26143 <i>fools'<span> errand</span></i>
26144 <i><span>fool</span>'s errand</i>
26145 '<i>foo</i> bar '<i>baz</i>
26146 a|!*#-:;+-~[]{}b'<i>x</i>
26150 ''<nowiki>''foo''</nowiki>''
26151 ''<nowiki>'''foo'''</nowiki>''
26153 '''<nowiki/>'foo''''
26154 '''<nowiki>''foo''</nowiki>'''
26155 '''<nowiki>'''foo'''</nowiki>'''
26156 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26157 '''foo'''<nowiki/>'s
26163 '''foo'''<nowiki/>'
26164 ''''foo'''<nowiki/>'
26165 ''fools'<span> errand</span>''
26166 ''<span>fool</span>'s errand''
26167 '<nowiki/>''foo'' bar '''baz''
26168 a|!*#-:;+-~[]{}b'''x''
26172 1b. Quotes inside <b> and <i> with other tags on same line
26176 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26177 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26178 <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>
26179 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26180 '<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>
26181 '<i>foo</i> <div title="name">test</div>
26182 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26183 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26184 <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>
26187 '''a'' foo ''[[bar]]''
26188 ''a''' foo ''[[bar]]''
26189 ''a''' foo '''{{echo|[[bar]]}}'''
26190 [[foo]] x'''[[bar]]''
26191 '''foo'' <ref>test</ref>
26192 '''foo'' <div title="name">test</div>
26193 '''foo'' and <br> bar
26198 2. Link fragments separated by <i> and <b> tags
26202 <p>[[<i>foo</i>hello]]</p>
26203 <p>[[<b>foo</b>hello]]</p>
26205 [[''foo''<nowiki>hello]]</nowiki>
26207 [['''foo'''<nowiki>hello]]</nowiki>
26210 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26211 # this is one of the shortcomings of this format
26213 3. Link fragments inside <i> and <b>
26217 <p><i>[[foo</i>]]</p>
26218 <p><b>[[foo</b>]]</p>
26220 ''[[foo''<nowiki>]]</nowiki>
26222 '''[[foo'''<nowiki>]]</nowiki>
26226 4. No escaping needed
26230 <p>'<span><i>bar</i></span>'
26231 '<span><b>bar</b></span>'
26235 '<span>''bar''</span>'
26236 '<span>'''bar'''</span>'
26240 #### ----------- Paragraphs ---------------
26241 #### 1. No unnecessary escapes
26242 #### --------------------------------------
26245 1. No unnecessary escapes
26249 <p>bar <span>[[foo]]</span>
26250 </p><p>=bar <span>[[foo]]</span>
26251 </p><p>[[bar <span>[[foo]]</span>
26252 </p><p>]]bar <span>[[foo]]</span>
26253 </p><p>=bar <span>foo]]</span>=
26256 bar <span><nowiki>[[foo]]</nowiki></span>
26258 =bar <span><nowiki>[[foo]]</nowiki></span>
26260 [[bar <span><nowiki>[[foo]]</nowiki></span>
26262 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26264 =bar <span>foo]]</span><nowiki>=</nowiki>
26267 #### ----------------------- PRE --------------------------
26268 #### 1. Leading whitespace in SOL context should be escaped
26269 #### ------------------------------------------------------
26271 1. Leading whitespace in SOL context should be escaped
26294 <nowiki> </nowiki>a
26296 <nowiki> </nowiki> a
26300 <nowiki> </nowiki> a
26302 <nowiki> </nowiki>a
26305 <nowiki> </nowiki>b
26328 2. Leading whitespace in non-indent-pre contexts should not be escaped
26332 <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>
26333 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26334 <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>
26344 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26363 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26367 <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>
26369 [[File:Foobar.jpg|thumb|caption]]
26373 5. Nowiki escaping should account for indent-pres
26383 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26396 #### --------------- Behavior Switches --------------------
26399 1. Valid behavior switches should be escaped
26406 <nowiki>__TOC__</nowiki>
26407 ''<nowiki>__TOC__</nowiki>''
26411 2. Invalid behavior switches should not be escaped
26422 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26424 Behavior switches should be SOL-transparent
26428 <meta property="mw:PageProp/toc" />
26430 <!-- this one's bogus -->
26433 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26435 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26439 <!-- this one's bogus -->
26448 #### --------------- HTML tags ---------------
26451 #### 3. multi-line html tag
26452 #### 4. extension tags
26453 #### -----------------------------------------
26459 <a href="http://google.com">google</a>
26461 <a href="http://google.com">google</a>
26469 <ul><li> <div>foo</div></li>
26470 <li> <div style="color:red">foo</div></li>
26471 <li> <td></li></ul>
26474 * <nowiki><div>foo</div></nowiki>
26475 * <nowiki><div style="color:red">foo</div></nowiki>
26476 * <nowiki><td></nowiki>
26480 3. multi-line html tag
26499 <p><ref>foo</ref>
26500 </p><p><ref>bar
26501 </p><p>baz</ref>
26504 <nowiki><ref>foo</ref></nowiki>
26506 <nowiki><ref>bar</nowiki>
26508 baz<nowiki></ref></nowiki>
26511 #### --------------- Others ---------------
26517 <p><nowiki>foo</nowiki>
26520 <nowiki>foo</nowiki>
26523 ## The quote-char in the input is necessary for triggering the bug
26525 (T54035) Nowiki-escaping should not get tripped by " :" in text
26534 #----------- End of wikitext escaping tests --------------
26538 Tag-like HTML structures are passed through as text
26560 </p><p>1<d e>f
26565 HTML tag with necessary entities in attributes
26567 <span title="&amp;">foo</span>
26569 <p><span title="&amp;">foo</span>
26574 HTML tag with 'unnecessary' entity encoding in attributes
26576 <span title="&">foo</span>
26578 <p><span title="&">foo</span>
26583 HTML tag with broken attribute value quoting
26585 parsoid=wt2html,html2html
26587 <span title="Hello world>Foo</span>
26589 <p><span title="Hello world">Foo</span>
26592 <p><span title="Hello world">Foo</span></p>
26596 Self-closed tag with broken attribute value quoting
26598 parsoid=wt2html,html2html
26600 <div title="Hello world />Foo
26602 <div title="Hello world"></div><p>Foo
26605 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26609 Table with broken attribute value quoting
26611 parsoid=wt2html,html2html
26614 | title="Hello world|Foo
26619 <td title="Hello world">Foo
26625 <td title="Hello world">Foo
26631 Table with broken attribute value quoting on consecutive lines
26633 parsoid=wt2html,html2html
26636 | title="Hello world|Foo
26637 | style="color:red|Bar
26642 <td title="Hello world">Foo
26644 <td style="color:red">Bar
26650 <td title="Hello world">Foo
26651 </td><td style="color: red">Bar
26652 </td></tr></tbody></table>
26657 Accept empty td cell attribute
26660 | align="center" |foo|| |
26665 <td align="center">foo</td>
26672 Non-empty attributes in th-cells
26675 !Foo!! style="color: red" |Bar
26681 <th style="color: red">Bar
26687 Accept empty attributes in th-cells
26702 Empty table rows go away
26723 ### Parsoid-centric tests for testing RTing of inter-element separators
26724 ### Edge cases not tested by existing parser tests and specific to
26725 ### Parsoid-specific serialization strategies.
26729 RT-ed inter-element separators should be valid separators
26741 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26745 # Parsoid-only test of a DOM pass
26747 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26759 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26760 <p>bar</p></small></td></tr>
26764 <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>
26768 # Note that the "style" attribute is really a template parameter here.
26769 # The = would have to be {{=}} if you wanted the literal.
26771 Empty TD followed by TD with tpl-generated attribute
26776 |{{echo|style='color:red'}}|foo
26790 Indented table with an empty td
26808 ## We have some newline diffs RT-ing this edge case
26809 ## and it is not important enough -- we seem to be emitting
26810 ## at most 2 newlines after a </tr> and this is unrelated to
26811 ## the issue from T85627 that this is testing.
26813 Indented table with blank lines in between (T85627)
26832 Indented block & table
26846 <div data-parsoid='{"stx":"html"}'>foo</div>
26848 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26853 Indent and comment before table row
26868 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26869 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26873 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26875 Empty TR followed by a template-generated TR
26881 {{echo|<tr><td>foo</td></tr>}}
26886 <tr class='mw-empty-elt'></tr>
26887 <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}}]}'>
26892 ## PHP and parsoid output differ for this, and since this is primarily
26893 ## for testing Parsoid's serializer, marking this Parsoid only
26895 Empty TR followed by mixed-ws-comment line should RT correctly
26908 <tr class='mw-empty-elt'></tr>
26911 <!--c--> </tr><!--d-->
26917 Multi-line image caption generated by templates with/without trailing newlines
26919 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26920 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26922 <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>
26923 <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>
26927 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26931 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26933 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26935 <includeonly>foo</includeonly>
26943 ## PHP emits broken html for this, and since this is primarily
26944 ## a Parsoid serializer test, marking this Parsoid only
26946 Improperly nested inline or quotes tags with whitespace in between
26948 <span> <s>x</span> </s>
26951 <p><span> <s>x</s></span><s> </s>
26952 <b> <i>x</i></b><i> </i>
26957 Encapsulate protected attributes from wt
26959 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26961 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26965 <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>
26967 <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">
26968 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26972 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26973 ## Having nested or stray pre tags results in the attempt to add duplicates,
26974 ## causing an assertion fail. This test tries to prevent that situation.
26976 Ensure ParagraphWrapper can deal with stray closing pre tags
26986 1. Ensure fostered text content is wrapped in element nodes
26990 <table>hi</table><table>ho</table>
26999 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27001 parsoid=wt2html,wt2wt
27010 <tbody><tr><td> a</td></tr>
27015 Encapsulation properly handles null DSR information from foster box
27017 parsoid=wt2html,wt2wt
27019 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27021 <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>
27025 1. Encapsulate foster-parented transclusion content
27027 parsoid=wt2wt,wt2html
27029 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27031 <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>
27041 2. Encapsulate foster-parented transclusion content
27043 parsoid=wt2wt,wt2html
27045 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27047 <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>
27058 3. Encapsulate foster-parented transclusion content
27060 parsoid=wt2wt,wt2html
27062 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27064 <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>"]}">
27077 4. Encapsulate foster-parented transclusion content
27079 parsoid=wt2wt,wt2html
27081 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27083 <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>"]}">
27096 5. Encapsulate foster-parented transclusion content
27098 parsoid=wt2wt,wt2html
27100 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27102 <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>
27117 6. Encapsulate foster-parented transclusion content
27119 parsoid=wt2wt,wt2html
27121 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27123 <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>
27139 7. Encapsulate foster-parented transclusion content
27141 parsoid=wt2wt,wt2html
27143 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27145 <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>
27155 # Note that the wt is broken on purpose: the = should be {{=}} if you
27156 # don't want it to be a template parameter key.
27158 8. Encapsulate foster-parented transclusion content
27160 parsoid=wt2wt,wt2html
27163 }}{|{{echo|style='color:red'}}
27168 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27170 <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>
27181 9. Encapsulate foster-parented transclusion content
27183 parsoid=wt2wt,wt2html
27185 <table>{{echo|hi</table>hello}}
27187 <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>
27191 Table in fosterable position
27202 <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">
27204 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27210 # Parsoid only for T66747
27212 Properly encapsulate empty-content transclusions in fosterable positions
27220 <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"}]]}'>
27226 Always encapsulate foster box when template range is expanded to table
27239 T115289: Unclosed table
27241 {{echo|<table>}}<!--c-->[[Category:Two]]
27243 <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>
27247 T115289: Don't migrate newlines out of tables with fostered content
27249 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27251 <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>
27255 T73074: More fostering fun
27257 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27259 <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>
27263 Support <object> element with .data attribute
27267 <object data="test.swf"></object>
27269 <object data="test.swf"></object>
27273 Don't block XML namespace declaration
27275 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27277 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27280 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27283 # -----------------------------------------------------------------
27284 # The following section of tests are primarily to spec requirements
27285 # around Parsoid's serialization (old, new, edited content)
27287 # All these tests are marked Parsoid html2wt and html2html only
27288 # ----------------------------------------------------------------
27291 Ignore rel attribute in a-tags during serialization to url-links
27295 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27296 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27297 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27299 http://en.wikipedia.org/wiki/Foobar
27300 http://en.wikipedia.org/wiki/Foobar
27301 http://en.wikipedia.org/wiki/Foobar
27304 # 'mi' is a localinterwiki prefix as well as a language
27306 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27310 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27316 Parsoid should accept interwiki shortcuts
27320 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27321 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27322 <a href='./fr:Foo'>Foo</a></p>
27323 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27324 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27325 <a href='fr%3AFoo'>Foo</a></p>
27326 <p><a href='FR%3AFoo'>Foo</a>
27327 <a href='./FR:Foo'>Foo</a></p>
27342 Parsoid should not accept invalid interwiki shortcuts
27346 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27347 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27348 <a href='news:Foo'>Foo</a></p>
27357 New wikilinks should be serialized properly
27361 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27362 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27363 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27364 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27365 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27369 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27370 http://en.wikipedia.org/wiki/Foo
27371 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27375 New wiki links (href variations)
27379 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27380 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27381 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27382 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27387 [[Toxine bactérienne]]
27391 New wiki links (content string variations)
27395 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27396 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27397 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27401 [[Foo_bar|./Foo_bar]]
27405 New category links (href variations)
27409 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27410 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27411 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27413 [[Category:Toxine bactérienne]]
27414 [[Category:Toxine bactérienne]]
27415 [[Category:Toxine bactérienne]]
27419 New sol transparent links don't need indent-pre nowiki protection
27424 <link rel="mw:PageProp/redirect" href="./Main_Page">
27425 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27426 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27428 #WEITERLEITUNG [[Main Page]]
27429 <!-- this is good --> [[Category:Good]]
27430 <!-- this is great --> [[Kategorie:Great]]
27434 New interlanguage links (href variations)
27438 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27439 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27440 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27442 [[es:Toxine bactérienne]]
27443 [[es:Toxine_bactérienne]]
27444 [[es:Toxine_bactérienne]]
27448 Image: Modifying size of an image (1)
27451 "modes": ["wt2wt"],
27453 ["img[height]", "attr", "height", "22"],
27454 ["img[width]", "attr", "width", "200"]
27458 [[Image:Foobar.jpg|230x230px]]
27460 [[Image:Foobar.jpg|200x200px]]
27464 Image: Modifying size of an image (2)
27467 "modes": ["wt2wt"],
27469 ["img[height]", "attr", "height", "100"],
27470 ["img[width]", "attr", "width", "500"]
27474 [[Image:Foobar.jpg|230x230px]]
27476 [[Image:Foobar.jpg|500x500px]]
27479 # Change in size is ignored so long as class='mw-default-size'
27481 Image: Modifying size of an image (3)
27484 "modes": ["wt2wt"],
27486 ["figure[class]", "removeClass", "mw-default-size"],
27487 ["figure img", "attr", "height", "19"],
27488 ["figure img", "attr", "width", "170"]
27492 [[Image:Foobar.jpg|thumb]]
27494 [[Image:Foobar.jpg|thumb|170x170px]]
27498 Image: Modifying alignment of an image (T50665)
27501 "modes": ["wt2wt"],
27503 ["figure[class]", "removeClass", "mw-halign-right"],
27504 ["figure[class]", "addClass", "mw-halign-left"]
27508 [[Image:Foobar.jpg|thumb|caption|right]]
27510 [[Image:Foobar.jpg|thumb|caption|left]]
27514 Image: Modifying mw-default-size of an frameless image (T64805)
27517 "modes": ["wt2wt"],
27519 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27523 [[Image:Foobar.jpg|frameless|right]]
27525 [[Image:Foobar.jpg|frameless|right|220x220px]]
27529 Image: Modifying valign of an image (T51221)
27532 "modes": ["wt2wt"],
27534 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27535 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27539 [[File:Foobar.jpg|20px|middle]]
27541 [[File:Foobar.jpg|20px|text-top]]
27545 Image: Modifying alt attribute of an image (T58400)
27548 "modes": ["wt2wt"],
27550 ["img[alt]", "attr", "alt", "some alternate edited text"]
27554 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27556 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27560 Image: Modifying caption of an image
27563 "modes": ["wt2wt"],
27565 ["figcaption", "text", "new caption"]
27569 [[Image:Foobar.jpg|thumb|original caption]]
27571 [[Image:Foobar.jpg|thumb|new caption]]
27575 Image: empty alt attribute (T50924)
27579 [[File:Foobar.jpg|thumb|alt=|bar]]
27581 <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>
27585 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27591 <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>
27593 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27597 Image: Block level image should have \n before and after
27600 [[File:Foobar.jpg|right|thumb|150x150px]]
27604 <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>
27609 Image: New block level image should have \n before and after (existing content)
27612 [[File:Foobar.jpg|right|thumb|150x150px]]
27616 <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>
27621 Image: upright option (parsoid)
27623 [[File:Foobar.jpg|thumb|upright|caption]]
27624 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27625 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27627 <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>
27628 <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>
27629 <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>
27633 Image: upright option is ignored on inline and frame images (parsoid)
27635 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27637 <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>
27641 Image: in template parameter with empty parameter
27643 {{echo|[[File:Foobar.jpg|link=]]}}
27645 <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>
27649 Image: from basic HTML (1)
27653 <span typeof="mw:Image">
27654 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27657 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27661 Image: from basic HTML (2)
27665 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27667 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27671 Image: from basic HTML (3)
27675 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27677 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27681 Image: from basic HTML (4)
27685 <img src="./File:Foobar.jpg">
27687 [[File:Foobar.jpg|link=]]
27691 Image: Invalid title as link
27693 [[File:Foobar.jpg|link=<]]
27695 <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>
27698 <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>
27702 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27707 <li><p>foo</p></li>
27714 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27718 <ul> <li>foo</li></ul>
27724 Don't strip leading whitespace when handling indent-pre suppressing tags
27729 <tr><td> indented row</td></tr>
27732 <b>This is very bold of you!</b>
27735 indented cell (no pre-wrapping!)
27745 '''This is very bold of you!'''
27749 indented cell (no pre-wrapping!)
27757 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27779 <nowiki> </nowiki></span>bar2
27782 <nowiki> </nowiki><span>bar</span>
27785 <nowiki> </nowiki><span>foo</span>
27790 Lists: Dont insert newlines in a serialized list item.
27794 <ul><li>a<br>b</li><li>c</li></ul>
27801 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27804 "modes": ["html2wt"],
27805 "scrubWikitext": false
27808 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27809 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27811 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27812 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27814 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27816 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27818 == hello there [[Category:A1]] ==
27820 == [[Category:A2]] hi pal ==
27822 == <!--foo--> [[Category:A3]] how goes it ==
27824 == it goes well [[Category:A4]] <!--bar--> ==
27826 ==howdy [[Category:A5]]==
27832 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27835 "modes": ["html2wt"],
27836 "scrubWikitext": true
27839 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27840 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27842 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27843 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27845 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27853 <!--foo--> [[Category:A3]]
27858 [[Category:A4]] <!--bar-->
27866 Headings: Don't hoist metas that come from templates
27869 "modes": ["html2wt"],
27870 "scrubWikitext": true
27873 <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>
27875 == {{echo|foo [[Category:Foo]]}} ==
27879 Headings: Category in ref isn't hoisted
27882 "modes": ["html2wt"],
27883 "scrubWikitext": true
27886 <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>
27888 <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>
27891 [[Category:Baz]] </ref> ==
27897 Parsoid: Serialize positional parameters with = in them as named parameter
27901 <p about="#mwt1" typeof="mw:Transclusion"
27902 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27904 <p about="#mwt1" typeof="mw:Transclusion"
27905 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27907 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27908 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27909 <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>
27913 {{echo|1=f=oo|2=bar}}
27915 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27916 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27917 {{echo|<nowiki>f=oo</nowiki>|bar}}
27921 Parsoid: Serialize positional parameters with = in extlink as named parameter
27925 <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>
27927 {{echo|1=http://stuff?is=ok}}
27931 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27935 <div>a<p>b</p></div>
27956 Substrings resembling wikitext in hrefs should not get nowiki escapes
27960 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27966 Enforce single-line context in the serializer
27973 <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">
27974 </span><span about="#mwt1">you</span> </h2>
27976 <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>
27978 <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
27979 there</span></li></ol>
27991 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
27998 </tbody></table></dd></dl>
28002 == hi {{bogus|there
28013 * foo '''bar''' baz
28025 Serialize new placeholder space without spans
28029 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28031 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28033 <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>
28039 <ref>foo : bar</ref>ok
28043 #-----------------------
28044 # Tag minimization tests
28045 #-----------------------
28048 1. I/B quote minimization: wikitext-only tags should be combined
28052 <p><i>A</i><i>B</i></p>
28053 <p><b>A</b><b>B</b></p>
28054 <p><i>A</i><b><i>B</i></b></p>
28055 <p><b>A</b><i><b>B</b></i></p>
28056 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28057 <p><i><b>A</b></i><i><b>B</b></i></p>
28058 <p><i><b>A</b></i><b><i>B</i></b></p>
28059 <p><b><i>A</i></b><i><b>B</b></i></p>
28079 2. I/B quote minimization: wikitext and html tags should not be combined
28083 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28084 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28088 ''A''<nowiki/>'''<i>B</i>'''
28092 3. I/B quote minimization: templated content stops minimization
28096 <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>
28097 <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>
28099 ''A''{{echo|''B''}}
28101 ''A''{{echo|'''''B'''''}}
28105 4. I/B quote minimization: new content should be mimimized with adjacent old content
28109 <p><i>A</i><i>B</i></p>
28110 <p><b>A</b><b>B</b></p>
28111 <p><i>A</i><b><i>B</i></b></p>
28121 5a. Merge adjacent quote nodes if they've been edited
28124 "modes": ["wt2wt", "selser"],
28126 ["p", "contents", "remove", ":contains('b')"]
28136 5b. Merge adjacent quote nodes if they've been edited
28139 "modes": ["wt2wt", "selser"],
28145 ''a''<span id="x">b</span>''c''
28151 1. Merge adjacent link nodes as long as at least one element is new
28154 "modes": ["html2wt"],
28155 "scrubWikitext": true
28158 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28159 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28160 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28164 [[Football|Foot]][[Football|ball]]
28168 2. Merge adjacent link nodes and enable additional normalizations
28171 "modes": ["html2wt"],
28172 "scrubWikitext": true
28175 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28177 [[Football|''Football'']]
28181 3. Don't merge adjacent link nodes if scrubWikitext is false
28184 "modes": ["html2wt"],
28185 "scrubWikitext": false
28188 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28190 [[Football|Foot]][[Football|ball]]
28193 #------------------------------
28194 # End of tag minimization tests
28195 #------------------------------
28198 T56262: New entities
28202 <span typeof="mw:Entity"> </span>
28207 ## Note that there is no wikitext output for 'unknownproperty' ##
28208 ## Unknown magic words are silently dropped ##
28215 <meta property='mw:PageProp/toc' />
28216 <meta property='mw:PageProp/notoc' />
28217 <meta property='mw:PageProp/forcetoc' />
28218 <meta property='mw:PageProp/index' />
28219 <meta property='mw:PageProp/noindex' />
28220 <meta property='mw:PageProp/nogallery' />
28221 <meta property='mw:PageProp/noeditsection' />
28222 <meta property='mw:PageProp/notitleconvert' />
28223 <meta property='mw:PageProp/nocontentconvert' />
28224 <meta property='mw:PageProp/unknownproperty' />
28234 __NOCONTENTCONVERT__
28238 Consecutive <pre>s should not get merged
28240 parsoid=html2wt,html2html
28242 <pre>a</pre><pre>b</pre>
28270 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28274 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28276 [[Special:BookSources/1234567890|ISBN 1234567895]]
28280 Edited RFC links not serializable as RFC links should serialize as extlinks
28284 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28286 [https://tools.ietf.org/html/rfc123 New RFC]
28290 Edited PMID links not serializable as PMID links should serialize as extlinks
28294 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28296 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28300 WTS of autolinks with trailing/surrounding context
28304 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28305 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28306 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28307 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28308 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28309 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28311 http://cscott.net'''foo'''
28313 http://cscott.net<b>foo</b>
28315 '''http://cscott.net'''
28317 '''http://cscott.net '''
28319 '''http://cscott.net<nowiki/>x'''
28321 http://cscott.net<nowiki/>x
28325 WTS of autolinks with nowikis (round-trip)
28327 x<nowiki/>http://cscott.net<nowiki/>x
28329 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28332 # this is the "easy" test because it leaves in place all the
28333 # data-parsoid information indicating this is an autolink
28335 WTS of autolinks with escapes (editing)
28338 "modes": ["wt2wt"],
28340 [ "span", "remove" ]
28344 x<nowiki/>http://cscott.net<nowiki/>x
28346 x<nowiki/>http://cscott.net<nowiki/>x
28350 WTS of edited autolink-like text (T103364)
28353 "modes": ["wt2wt"],
28355 [ "span[typeof]", "removeAttr", "typeof" ]
28359 Not a link: <nowiki>http://example.com</nowiki>.
28361 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28365 WTS of newly-authored autolink-like text (T103364)
28369 <p>http://example.com is not a link.</p>
28371 <nowiki>http://example.com</nowiki> is not a link.
28375 WTS of autolink-like text after an autolink (T108563)
28379 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28381 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28385 Magic links inside links (not autolinked)
28387 [[Foo|http://example.com]]
28390 [[Foo|ISBN 123456789x]]
28392 [http://foo.com http://example.com]
28393 [http://foo.com RFC 1234]
28394 [http://foo.com PMID 1234]
28395 [http://foo.com ISBN 123456789x]
28397 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28398 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28399 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28400 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28401 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28402 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28403 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28404 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28407 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28408 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28409 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28410 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28412 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28413 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28414 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28415 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28419 Magic links inside image captions (autolinked)
28421 [[File:Foobar.jpg|thumb|http://example.com]]
28422 [[File:Foobar.jpg|thumb|RFC 1234]]
28423 [[File:Foobar.jpg|thumb|PMID 1234]]
28424 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28426 <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>
28427 <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>
28428 <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>
28429 <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>
28431 <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>
28432 <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>
28433 <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>
28434 <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>
28438 WTS of magic word text (T109371)
28443 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28444 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28446 <nowiki>RFC 1234</nowiki>
28448 [http://foo.com RFC 1234]
28454 Edited Redirect link should emit a non-piped wikitext link
28458 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28464 T75121: Infer extension name from typeOf if data-mw is not present
28466 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28468 <div typeOf="mw:Extension/foo"></div>
28473 # Note that the <p> wrapping isn't present in PHP parser output
28474 # The important thing for this test is that P-wrapping doesn't
28475 # interfere with the <nowiki> protection for leading - in <td>
28476 # (which isn't necessary for <th>).
28478 T88318: p-wrapped dash in table.
28480 parsoid=html2wt,wt2wt
28483 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28484 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28485 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28492 |<nowiki>-</nowiki>
28493 |<nowiki>- </nowiki>
28514 <td><small>-</small>
28523 </td></tr></tbody></table>
28527 T149209: WTS: Handle newlines in table cells properly
28535 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28537 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28543 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28545 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28567 T149209: Selser: Handle newlines in table cells properly
28570 "modes": ["selser"],
28572 [ "#h1", "html", "a\nb\n" ],
28573 [ "#h2", "html", "a\nb\n" ],
28574 [ "#c1", "html", "a\nb\n" ],
28575 [ "#c2", "html", "<p>a</p>" ],
28576 [ "#c3", "html", "<p>a</p>" ],
28577 [ "#c4", "html", "edit-me<p>a</p>" ]
28582 ! id="h1" |edit-me!!1
28584 ! id="h2" |edit-me||2
28586 | id="c1" |edit-me||3
28588 | id="c2" |edit-me||4
28590 | id="c3" |edit-me||p||q||r
28592 | id="c4" |edit-me||p||q||r
28621 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28626 <td id='mwAc'>foo</td>
28627 <td id='serialize-this'>bar</td>
28632 | id="serialize-this" |bar
28637 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28641 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28643 <div id="hello">ok</div>
28650 "modes": ["wt2wt"],
28652 [ "#xyz", "before", "<b>before</b> stuff " ],
28653 [ "#xyz", "after", " stuff <i>after</i>" ],
28654 [ "#xyz", "html", "x <b>y</b> z" ]
28658 <span id="xyz">hello</span>
28660 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28664 Never serialize a-tag as html, regardless of what data-parsoid has to say
28666 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28668 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28673 ## SSS FIXME: This is broken output nevertheless.
28674 ## What might be a reasonable non-broken output for this?
28675 ## This is an edge case unlikely to be seen in production
28676 ## that I am not wasting more time on this right now.
28678 Never serialize a-tag as html, no matter what attributes it has
28680 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28682 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28684 [http://boo.org http://boohoo.org]
28687 # Misnested is an indication that selser can reuse the source but these have
28688 # shown to sneak through on occasion. See T101768.
28689 # The original wikitext here is: [http://test.com [[one]] two three]
28691 Strip span tags added to mark misnested links
28695 <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>
28697 [http://test.com][[one]] two three
28701 Catch regression when unpacking misnested links
28705 {{echo|hi}}[http://example.com [[ho]]]
28707 <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>
28711 Catch regression when unpacking with trailing content
28713 {{echo|Foo <references/> bar}}
28715 <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>
28719 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28723 <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|}"]}'>
28735 ## This test verifies the presence and computation of this attribute indirectly
28736 ## by making an edit and ensuring that the serialization is correct (which it would be
28737 ## only if firstWikitextNode is properly set).
28739 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28742 "modes": ["wt2wt"],
28744 [ "div#x", "remove" ],
28745 [ "div", "before", "<div>new</div>" ]
28749 <div id="x">foo</div>
28751 {{echo|<div>boo</div>
28759 {{echo|<div>boo</div>
28765 # --------------------------------------------
28766 # Tests spec'ing wikitext serialization norms |
28767 # --------------------------------------------
28770 Serialize multi-line indent-pre starting with wikitext syntax
28784 1. Categories should always be serialized on their own line
28788 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28796 2. Categories that are part of templates should not introduce a line break
28798 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28800 <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>
28803 # Careful while editing these next 2 tests. There are \u200f characters
28804 # before and after the <link> tags in the HTML and following some
28805 # of the categories in wikitext
28806 # Do not remove these characters in edits.
28808 # As part of the serialization, these bidi characters will get stripped.
28810 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28813 "modes": ["html2wt"],
28814 "scrubWikitext": true
28817 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28818 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28821 [[קטגוריה: שיטות משפט]]
28825 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28828 "modes": ["html2wt"],
28829 "scrubWikitext": true
28832 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28839 Lists: Add space after bullets
28846 <li><span> baz</span></li>
28851 * <span> baz</span>
28855 1. Headings: Add space before/after == (T53744)
28862 <h2><span> baz</span></h2>
28870 == <span> baz</span> ==
28874 2. Headings: Add space before/after == even after hoisted content
28877 "modes": ["html2wt"],
28878 "scrubWikitext": true
28881 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28889 1. Headings: suppress newly created empty headings
28892 "modes": ["html2wt"],
28893 "scrubWikitext": true
28901 2. Headings: don't suppress empty headings if scrubWikitext is false
28911 3. Headings: suppress empty headings on edits
28914 "modes": ["selser"],
28915 "scrubWikitext": true,
28921 ==<span id="x">foo</span>==
28926 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28929 "modes": ["html2wt"],
28930 "scrubWikitext": true
28933 <h2>foo<br/>bar</h2>
28934 <h2>foo <span><br/>bar</span> baz</h2>
28938 == foo <span> bar</span> baz ==
28942 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28945 "modes": ["html2wt"],
28946 "scrubWikitext": false
28949 <h2>foo<br/>bar</h2>
28951 == foo<br /> bar ==
28955 1. WT Quote Tags: suppress newly created empty style tags
28958 "modes": ["html2wt"],
28959 "scrubWikitext": true
28967 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28973 ''<nowiki/>'''''<nowiki/>'''
28977 3. WT Quote Tags: suppress empty style tags on edits
28980 "modes": ["selser"],
28981 "scrubWikitext": true,
28987 '''<span id="x">foo</span>'''
28992 1. Anchors: suppress newly created empty anchors
28995 "modes": ["html2wt"],
28996 "scrubWikitext": true
28999 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29004 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29007 "modes": ["html2wt"],
29008 "scrubWikitext": false
29011 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29017 3. Anchors: suppress empty anchors on edits
29020 "modes": ["selser"],
29021 "scrubWikitext": true,
29027 [[Test|<span id="x">foo</span>]]
29032 3a. Anchors: do not suppress numbered extlinks
29035 "modes": ["wt2wt"],
29036 "scrubWikitext": true
29041 <a rel="mw:ExtLink" href="http://foo.com"></a>
29045 3b. Anchors: do not suppress numbered extlinks
29048 "modes": ["wt2wt"],
29049 "scrubWikitext": true,
29055 [http://foo.com <span id="x">foo</span>]
29061 Normalizations should be restricted to edited content
29064 "modes": ["selser"],
29065 "scrubWikitext": true,
29067 [ "h1", "before", "<i></i>"]
29081 1. Multiple normalizations (html2wt)
29084 "modes": ["html2wt"],
29085 "scrubWikitext": true
29089 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29090 </a><b><i></i></b>x</p>
29099 2. Multiple normalizations (selser)
29102 "modes": ["selser"],
29103 "scrubWikitext": true,
29105 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29109 <span id="x">foo</span>
29111 <span id="x">foo</span>
29117 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29120 "modes": ["html2wt"],
29121 "scrubWikitext": true
29133 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29140 <nowiki> </nowiki>hi
29142 <nowiki> </nowiki> hello
29146 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29149 "modes": ["html2wt"],
29150 "scrubWikitext": true
29159 baz bang</td></tr></table>
29165 bar<span>boo</span></p>
29181 bar<span>boo</span>
29185 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29188 "modes": ["selser"],
29189 "scrubWikitext": true,
29191 [ "p", "html", " a\n b" ]
29202 1. New links that end in spaces
29205 "modes": ["html2wt"],
29206 "scrubWikitext": false
29209 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29210 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29211 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29213 [[Berlin ]]<nowiki/>is the capital of Germany.
29217 [[Boston ]] is a city.
29221 2. New links that end in spaces
29224 "modes": ["html2wt"],
29225 "scrubWikitext": true
29228 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29229 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29230 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29232 [[Berlin]] is the capital of Germany.
29236 [[Boston]] is a city.
29240 1. Table cells with escapable prefixes
29243 "modes": ["html2wt"],
29244 "scrubWikitext": false
29248 <tr><td>a</td></tr>
29249 <tr><td>-</td></tr>
29250 <tr><td>+</td></tr>
29256 |<nowiki>-</nowiki>
29258 |<nowiki>+</nowiki>
29263 2. Table cells with escapable prefixes
29266 "modes": ["html2wt"],
29267 "scrubWikitext": true
29271 <tr><td>a</td></tr>
29272 <tr><td>-</td></tr>
29273 <tr><td>+</td></tr>
29286 3a. Table cells with escapable prefixes after edits
29289 "modes": ["selser"],
29290 "scrubWikitext": true,
29292 [ "table tbody tr:first-child td:first-child", "remove"]
29306 3b. Table cells with escapable prefixes after edits
29309 "modes": ["selser"],
29310 "scrubWikitext": true,
29312 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29319 |<span id="x">foo</span>+
29328 # FIXME: This test will fail because
29329 # normalization doesn't realize that the id attribute
29330 # will eliminate the escapable scenario
29332 4a. Table cells without escapable prefixes after edits
29335 "modes": ["selser"],
29336 "scrubWikitext": true,
29338 [ "#x", "html", "-" ]
29351 ## This tests normalizer's ability to discriminate between
29352 ## cells having identical content.
29354 4b. Table cells without escapable prefixes after edits
29357 "modes": ["selser"],
29358 "scrubWikitext": true,
29360 [ "td", "html", "-" ]
29373 ## This tests normalizer's ability to not be tripped by
29374 ## comments (and whitespace)
29376 4c. Table cells without escapable prefixes after edits
29379 "modes": ["selser"],
29380 "scrubWikitext": true,
29382 [ "table tbody tr td:first-child", "remove" ]
29397 ## This tests normalizer's ability to handle HTML cells
29399 4d. Table cells without escapable prefixes after edits
29402 "modes": ["selser"],
29403 "scrubWikitext": true,
29405 [ "td", "html", "-" ]
29410 <tr><td>a</td></tr>
29414 <tr><td>-</td></tr>
29418 ## T111151 Remove font elements without attributes
29420 5a. font tags without attributes should be dropped in scrubWikitext mode
29423 "modes": ["html2wt"],
29424 "scrubWikitext": true
29428 <font><font>bar</font></font>
29429 <font class="x">boo</font>
29433 <font class="x">boo</font>
29437 5b. font tags should not be dropped without scrubWikitext being enabled
29440 "modes": ["html2wt"],
29441 "scrubWikitext": false
29450 Escape nowiki DOM elements
29454 <nowiki><i>foo</i></nowiki>
29456 <nowiki>''foo''</nowiki>
29459 # This is meant to be an interim fix while we go about figuring out
29460 # how to not introduce these trailing <nowiki/>s in the first place.
29462 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29466 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29468 <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>
29469 <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>
29483 New list is serialized on newlines
29487 <p>The quick brown fox jumps over the lazy dog.</p><ul>
29491 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
29493 The quick brown fox jumps over the lazy dog.
29499 The quick onyx goblin jumps over the lazy dwarf.
29503 New lists in formatting elements serialized w/o newlines
29515 <small><ul><li>hi</li></ul></small>
29527 New list in table doesn't need newlines
29531 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
29540 # ---------------------------------------------------
29541 # End of tests spec'ing wikitext serialization norms |
29542 # ---------------------------------------------------
29546 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29554 <td><b>c</b><p>d</p></td>
29573 Anchor without href scenarios
29575 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29578 <a class="no">dice</a>
29583 <span name="foo"></span>
29587 New transclusion added after a list should be serialized after the list
29591 <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>
29597 # -----------------------------------------------------------------
29598 # End of section for Parsoid-only html2wt tests for serialization
29600 # -----------------------------------------------------------------
29602 # -----------------------------------------------------------------
29603 # The following section of tests are primarily to spec behavior of
29604 # the selective serializer. All these tests have manual selser
29605 # changes. The automated selser changes for all tests handle the
29606 # wide variation of changes, but these tests here capture specs
29607 # deterministically.
29608 # ----------------------------------------------------------------
29612 Selser: New comments should not be lost
29615 "modes": ["selser"],
29617 [ "#a", "after", "<!--c1-->" ],
29618 [ "#b", "before", "<!--c2-->" ]
29622 <span id="a">a</span>
29624 <span id="b">b</span>
29626 <span id="a">a</span><!--c1-->
29628 <!--c2--><span id="b">b</span>
29633 Selser: Check for validity of DSR before using it
29636 "modes": ["selser"],
29638 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29642 <span id="a">a</span>
29644 {{DISPLAYTITLE:foo}}
29645 <span id="a">a</span>
29649 1. DOMDiff: Changes to <ref> content should be looked up using id
29652 "modes": ["selser"],
29654 ["#X", "after", "bar"],
29655 ["#Y", "after", "baz"]
29659 X <ref><span id="X">foo</span></ref>
29662 <ref name="a"><span id="Y">foo</span></ref>
29665 X <ref><span id="X">foo</span>bar</ref>
29668 <ref name="a"><span id="Y">foo</span>baz</ref>
29673 2. DOMDiff: Changes to <ref> content should be looked up using id
29676 "modes": ["selser"],
29678 ["#Z", "after", "bar"]
29682 A <ref>foo bar for a</ref>
29683 B <ref group="X" name="b" />
29687 <references group="X">
29688 <ref name="b"><span id="Z">foo</span></ref>
29691 A <ref>foo bar for a</ref>
29692 B <ref group="X" name="b" />
29696 <references group="X">
29697 <ref name="b"><span id="Z">foo</span>bar</ref>
29702 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29705 "modes": ["selser"],
29707 [ "div:first-child", "text", "bar" ]
29711 <div style="{{1x|color:red;}}%">foo</div>
29713 <div style="{{1x|color:red;}}%">bar</div>
29725 <li class="mw-empty-elt"></li>
29726 <li class="mw-empty-elt"></li>
29733 [[File:Thumb.png|thumb]]
29735 <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>
29737 <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>
29741 unclosed internal link XSS (T137264)
29743 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29745 <p>[[#<script>alert(1)</script>|
29748 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29752 Validating that <style> isn't eaten by tidy (T167349)
29757 <style>.foo::before { content: "<foo>"; }</style>
29758 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29762 <style>.foo::before { content: "<foo>"; }</style>
29763 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29768 Validating that <style> isn't wrapped in a paragraph (T186965)
29772 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29774 <style>.foo::before { content: "<foo>"; }</style>
29776 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29778 But if it's on a line with other content, let it be wrapped.
29780 <style>.foo::before { content: "<foo>"; }</style> bar
29782 foo <style>.foo::before { content: "<foo>"; }</style>
29784 foo <style>.foo::before { content: "<foo>"; }</style> bar
29786 And the same if we have non-paragraph-breaking whitespace
29789 <style>.foo::before { content: "<foo>"; }</style>
29792 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29794 <style>.foo::before { content: "<foo>"; }</style>
29795 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29796 <p>But if it's on a line with other content, let it be wrapped.
29797 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
29798 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
29799 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
29800 </p><p>And the same if we have non-paragraph-breaking whitespace
29802 <style>.foo::before { content: "<foo>"; }</style>
29808 Validating that <link> isn't wrapped in a paragraph (T186965)
29812 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29814 <link rel="foo" href="bar"/>
29816 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29818 But if it's on a line with other content, let it be wrapped.
29820 <link rel="foo" href="bar"/> bar
29822 foo <link rel="foo" href="bar"/>
29824 foo <link rel="foo" href="bar"/> bar
29826 And the same if we have non-paragraph-breaking whitespace
29829 <link rel="foo" href="bar"/>
29832 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29834 <link rel="foo" href="bar"/>
29835 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29836 <p>But if it's on a line with other content, let it be wrapped.
29837 </p><p><link rel="foo" href="bar"/> bar
29838 </p><p>foo <link rel="foo" href="bar"/>
29839 </p><p>foo <link rel="foo" href="bar"/> bar
29840 </p><p>And the same if we have non-paragraph-breaking whitespace
29842 <link rel="foo" href="bar"/>
29848 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29850 wgFragmentMode=[ 'html5', 'legacy' ]
29852 ==A&B&C&amp;D&amp;amp;E==
29853 [[#A&B&C&amp;D&amp;amp;E]]
29855 <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>
29856 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29859 <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>
29860 <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>
29864 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29866 wgFragmentMode=[ 'legacy' ]
29868 ==A&B&C&amp;D&amp;amp;E==
29869 [[#A&B&C&amp;D&amp;amp;E]]
29871 <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>
29872 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29877 Decoding of HTML entities in embedded HTML tags
29879 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29881 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29884 <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>
29888 Decoding of HTML entities in indicator names for IDs (T104196)
29890 parsoid=wt2html,html2html
29893 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29895 1&2&3&4&amp;5=Indicator
29898 <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>
29901 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29903 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29907 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29909 1&2&3&4&amp;5=Indicator
29912 <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>
29915 # This fragment mode is what Parsoid supports.
29917 HTML5 ids: fallback to legacy
29919 wgFragmentMode=[ 'html5', 'legacy' ]
29931 ==Hey < # " > % : '==
29932 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29934 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29936 <!-- These two links should produce identical HTML -->
29937 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29940 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29942 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29943 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29944 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29945 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29946 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29947 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29951 <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>
29952 <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>
29953 <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>
29954 <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>
29955 <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>
29956 <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>
29957 <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>
29958 </p><p>💩 <span id="💩"></span>
29959 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29962 <h2 id="Foo_bar">Foo bar</h2>
29964 <h2 id="foo_Bar_2">foo Bar</h2>
29966 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
29968 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
29970 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
29972 <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>
29973 <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>
29975 <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>
29977 <!-- These two links should produce identical HTML -->
29978 <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>
29981 # Parsoid doesn't support this mode
29983 HTML5 ids: legacy with a fallback to modern
29985 wgFragmentMode=[ 'legacy', 'html5' ]
29997 ==Hey < # " > % : '==
29998 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30000 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30002 <!-- These two links should produce identical HTML -->
30003 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30006 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30008 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30009 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30010 <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>
30011 <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>
30012 <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>
30013 <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>
30017 <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>
30018 <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>
30019 <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>
30020 <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>
30021 <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>
30022 <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>
30023 <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>
30024 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30025 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30029 # Parsoid doesn't support this mode.
30031 HTML5 ids: no legacy
30033 wgFragmentMode=[ 'html5' ]
30045 ==Hey < # " > % : '==
30046 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30048 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30050 <!-- These two links should produce identical HTML -->
30051 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30054 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30056 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30057 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30058 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30059 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30060 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30061 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30065 <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>
30066 <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>
30067 <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>
30068 <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>
30069 <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>
30070 <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>
30071 <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>
30072 </p><p>💩 <span id="💩"></span>
30073 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30078 T90902: Normalize weird characters in section IDs
30080 wgFragmentMode=[ 'html5', 'legacy' ]
30086 <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>
30087 <p><a href="#Foo_bar">#Foo bar</a>
30090 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30091 <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>
30095 T51672: Test for brackets in attributes of elements in external link texts
30097 [http://example.com/ link <span title="title with [brackets]">span</span>]
30098 [http://example.com/ link <span title="title with [brackets]">span</span>]
30101 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30102 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30105 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30106 <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>
30110 T72875: Test for brackets in attributes of elements in internal link texts
30112 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30113 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30116 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30117 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30120 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30121 <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>
30125 T179544: {{anchorencode:}} output should be always usable in links
30127 wgFragmentMode=[ 'html5' ]
30129 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30131 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30134 <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>
30137 ## ------------------------------
30138 ## Parsoid section-wrapping tests
30139 ## ------------------------------
30141 Section wrapping for well-nested sections (no leading content)
30144 "wrapSections": true
30165 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30168 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30171 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30174 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30177 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30180 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30187 Section wrapping for well-nested sections (with leading content)
30190 "wrapSections": true
30195 Para 2 with a <div>nested in it</div>
30208 <section data-mw-section-id="0"><p>Para 1.</p>
30210 <p>Para 2 with a </p><div>nested in it</div>
30214 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30217 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30220 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30223 </section></section>
30227 Section wrapping with template-generated sections (good nesting 1)
30230 "wrapSections": true
30247 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30250 <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">
30251 </span><p about="#mwt1">b</p>
30252 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30255 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30259 # In this example, the template scope is mildly expanded to incorporate the
30260 # trailing newline after the transclusion since that is part of section 1.1.1
30262 Section wrapping with template-generated sections (good nesting 2)
30265 "wrapSections": true,
30266 "modes": ["wt2html", "wt2wt"]
30281 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30284 <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">
30285 </span><p about="#mwt1">b</p><span about="#mwt1">
30286 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30287 </span><p about="#mwt1">d</p><span about="#mwt1">
30288 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30292 # In this example, the template scope is mildly expanded to incorporate the
30293 # trailing newline after the transclusion since that is part of section 1.2.1
30295 Section wrapping with template-generated sections (good nesting 3)
30298 "wrapSections": true,
30299 "modes": ["wt2html", "wt2wt"]
30317 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30320 <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">
30321 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30322 </span><p about="#mwt1">b</p><span about="#mwt1">
30323 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30324 </span><p about="#mwt1">c</p><span about="#mwt1">
30325 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30326 </span><p about="#mwt1">d</p><span about="#mwt1">
30327 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30331 # Because of section-wrapping and template-wrapping interactions,
30332 # the scope of the template is expanded so that the template markup
30333 # is valid in the presence of <section> tags.
30334 # This exercises the s1 is null scenario in the wrapSections code
30336 Section wrapping with template-generated sections (bad nesting 1)
30339 "wrapSections": true
30353 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30356 <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"]}'>
30357 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30358 </span><p about="#mwt1">b
30359 </p><span about="#mwt1">
30361 </span><p about="#mwt1">c</p><span about="#mwt1">
30362 </span></section></div></section>
30365 # Because of section-wrapping and template-wrapping interactions,
30366 # the scope of the template is expanded so that the template markup
30367 # is valid in the presence of <section> tags.
30368 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30370 Section wrapping with template-generated sections (bad nesting 2)
30373 "wrapSections": true
30391 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30394 </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">
30395 </span><p about="#mwt1">b</p><span about="#mwt1">
30396 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30397 </span><p about="#mwt1">c</p><span about="#mwt1">
30399 </span><p about="#mwt1">d</p><span about="#mwt1">
30401 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30405 # Because of section-wrapping and template-wrapping interactions,
30406 # additional template wrappers are added to <section> tags
30407 # so that template wrapping semantics are valid whether section
30408 # tags are retained or stripped. But, the template scope can expand
30409 # greatly when accounting for section tags.
30410 # This exercises the s1 and s2 are in different subtrees scenario
30412 Section wrapping with template-generated sections (bad nesting 3)
30415 "wrapSections": true,
30416 "modes": ["wt2html", "wt2wt"]
30434 <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>
30437 <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">
30438 </span><p about="#mwt1">b</p><span about="#mwt1">
30439 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30440 </span><p about="#mwt1">c</p>
30443 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30448 Section wrapping with uneditable lead section + div wrapping multiple sections
30451 "wrapSections": true
30456 <div style="border:1px solid red;">
30473 <section data-mw-section-id="-1"><p>foo</p>
30475 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30476 <section data-mw-section-id="1"><h1 id="1">1</h1>
30479 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30482 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30486 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30489 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30491 </section></section>
30495 Section wrapping with editable lead section + div overlapping multiple sections
30498 "wrapSections": true
30505 <div style="border:1px solid red;">
30522 <section data-mw-section-id="0"><p>foo</p>
30524 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
30526 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30529 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30532 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30537 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30540 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30542 </section></section>
30546 HTML header tags should not be wrapped in section tags
30549 "wrapSections": true
30562 <section data-mw-section-id="0"><p>foo</p>
30564 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30566 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
30568 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30570 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
30574 Lead section containing only whitespace and comments.
30577 "wrapSections": true
30581 <!-- this is a comment, presumably significant to editors -->
30588 <section data-mw-section-id="0" data-parsoid="{}">
30589 <!-- this is a comment, presumably significant to editors -->
30590 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30593 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30598 Pseudo-sections emitted by templates should have id -2
30601 "wrapSections": true
30611 <section data-mw-section-id="-1"><p>foo</p>
30612 </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}}]}'>
30613 <section data-mw-section-id="-1"><h2 id="a">a</h2>
30614 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
30615 </section></div><span about="#mwt1">
30619 ##########################################################################
30620 Tests demonstrating white-space insensitivity in input wikitext
30621 for wikitext headings, wikitext list items, and wikitext table captions,
30622 headings, and cells. HTML versions of the same should preserve whitespace.
30623 ##########################################################################
30625 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
30628 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
30629 == <!--c2--> <!--c2--> Tabs <!--c3--><!--c4--> ==
30630 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
30631 ; <!--term to define--> term : <!--term's definition--> definition
30633 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
30635 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
30637 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30639 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
30641 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
30644 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30647 <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>
30648 <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>
30649 <ul><li>List item</li></ul>
30650 <dl><dt>term </dt>
30651 <dd>definition</dd></dl>
30653 <caption>Table Caption
30656 <th>Table Heading 1</th>
30657 <th>Table Heading 2
30660 <td>Table Cell 1</td>
30664 <td>class="foo"</td>
30668 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
30669 </td></tr></tbody></table>
30672 <td>Table Cell 1</td>
30674 </td></tr></tbody></table> foo</dd></dl>
30677 # Looks like <caption> is not accepted in HTML
30679 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
30682 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
30683 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
30685 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
30686 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
30689 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
30690 <ul><li> List item </li></ul>
30692 <tbody><tr><th> Table Heading </th><th></th></tr>
30693 <tr><td> Table Cell </td><th></th></tr>
30698 Do not trim whitespace in links and quotes
30700 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
30701 [[Foo| some text ]]
30703 <p>foo <i> italic </i> and <b> bold </b>
30704 <a href="/wiki/Foo" title="Foo"> some text </a>
30709 Remove p tags surrounding a single element in a figcaption
30713 [[File:Foobar.jpg|right|200x200px|Caption]]
30715 <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>
30719 Selser preserves lack of newline before list and allows newline after the list
30722 "modes": ["selser"],
30723 "scrubWikitext": true,
30725 [ "ul", "after", "<p>footer</p>" ]
30742 Selser does not introduce newlines between unedited paragraph preceding the list
30745 "modes": ["selser"],
30747 [ "table tbody tr td p:last-child", "empty" ]
30769 Selser does not introduce newlines between unedited paragraph following the list
30772 "modes": ["selser"],
30774 [ "table tbody tr td p:first-child", "empty" ]
30796 Remove a list item but do not insert newline above list
30799 "modes": ["selser"],
30801 [ "ul li:last-child", "remove" ]