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 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18321 Parser hook: static parser hook not inside a comment
18323 <statictag>hello, world</statictag>
18325 <statictag action="flush" />
18331 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18332 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18336 Parser hook: static parser hook inside a comment
18338 <!-- <statictag>hello, world</statictag> -->
18339 <statictag action="flush" />
18344 <!-- <statictag>hello, world</statictag> -->
18345 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18348 # Nested template calls; this case was broken by Parser.php rev 1.506,
18352 Template:One-parameter
18354 (My parameter is: {{{1}}})
18358 Template:Map-one-parameter
18360 {{{{{1}}}|{{{2}}}}}
18364 Nested template calls
18366 {{Map-one-parameter|One-parameter|param}}
18368 <p>(My parameter is: param)
18377 # Remex wraps empty tag runs with p-tags.
18378 # Parsoid strips them out during p-wrapping.
18380 Sanitizer: Closing of open tags
18382 <s></s><table></table>
18384 <p><s></s></p><table></table>
18386 <s></s><table></table>
18390 Sanitizer: Closing of open but not closed tags
18399 Sanitizer: Closing of closed but not open tags
18405 <p class="mw-empty-elt">
18411 Sanitizer: Closing of closed but not open table tags
18415 Table not started</td></tr></table>
18417 <p>Table not started
18422 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18424 wgFragmentMode=[ 'html5', 'legacy' ]
18426 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18428 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18431 <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>
18435 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18437 wgFragmentMode=[ 'legacy' ]
18439 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18441 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18445 # In HTML5, the restrictions are that id must contain at least one character,
18446 # and must not contain any space characters.
18448 Sanitizer: Validating the contents of the id attribute (T6515)
18452 <br id="" /><br id="a space" />
18457 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18459 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18463 <br id="foo" /><br id="foo" />
18465 Something need to be done. foo-2 ?
18469 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18472 <meta itemprop="hello" content="world">
18473 <meta http-equiv="refresh" content="5">
18474 <meta itemprop="hello" http-equiv="refresh" content="5">
18475 <link itemprop="hello" href="{{SERVER}}">
18476 <link rel="stylesheet" href="{{SERVER}}">
18477 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18481 <p> <meta itemprop="hello" content="world" />
18482 <meta http-equiv="refresh" content="5">
18483 <meta itemprop="hello" content="5" />
18484 <link itemprop="hello" href="http://example.org" />
18485 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18486 <link itemprop="hello" href="http://example.org" />
18493 Sanitizer: Strip comments from CSS attributes
18495 parsoid=wt2html,wt2wt
18497 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18499 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18502 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18506 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18508 [[meatball:Soft"Security]]
18510 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18513 <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>
18517 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18519 [[meatball:Foo<Bar]]
18520 [[meatball:Foo>Bar]]
18521 [[meatball:Foo<bar]]
18522 [[meatball:Foo>bar]]
18524 <p>[[meatball:Foo<Bar]]
18525 [[meatball:Foo>Bar]]
18526 [[meatball:Foo<bar]]
18527 [[meatball:Foo>bar]]
18530 <p>[[meatball:Foo<Bar]]
18531 [[meatball:Foo>Bar]]
18532 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18533 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18537 Language converter: output gets cut off unexpectedly (T7757)
18541 this bit is safe: }-
18543 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18545 then we get cut off here: }-
18547 all additional text is vanished
18549 <p>this bit is safe: }-
18550 </p><p>but if we add a conversion instance: xxx
18551 </p><p>then we get cut off here: }-
18552 </p><p>all additional text is vanished
18555 <p>this bit is safe: }-</p>
18556 <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>
18557 <p>then we get cut off here: }-</p>
18558 <p>all additional text is vanished</p>
18562 Language converter glossary rules inside attributes (T119158)
18564 language=sr variant=sr-el
18566 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18568 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18571 </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>
18574 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18576 <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>
18580 Self closed html pairs (T7487)
18582 <center><font id="bug" />Centered text</center>
18583 <div><font id="bug2" />In div text</div>
18585 <center><font id="bug"></font>Centered text</center>
18586 <div><font id="bug2"></font>In div text</div>
18590 Punctuation: nbsp before exclamation
18594 <p>C'est grave !
18599 Punctuation: CSS !important (T13874)
18601 <div style="width:50% !important">important</div>
18603 <div style="width:50% !important">important</div>
18608 Punctuation: CSS ! important (T13874; with space after)
18610 <div style="width:50% ! important">important</div>
18612 <div style="width:50% ! important">important</div>
18617 HTML bullet list, closed tags (T7497)
18630 <ul data-parsoid='{"stx":"html"}'>
18631 <li data-parsoid='{"stx":"html"}'>One</li>
18632 <li data-parsoid='{"stx":"html"}'>Two</li>
18638 HTML bullet list, unclosed tags (T7497)
18650 <ul data-parsoid='{"stx":"html"}'>
18651 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18652 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18658 HTML ordered list, closed tags (T7497)
18671 <ol data-parsoid='{"stx":"html"}'>
18672 <li data-parsoid='{"stx":"html"}'>One</li>
18673 <li data-parsoid='{"stx":"html"}'>Two</li>
18679 HTML ordered list, unclosed tags (T7497)
18692 <ol data-parsoid='{"stx":"html"}'>
18693 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18694 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18700 HTML nested bullet list, closed tags (T7497)
18723 <ul data-parsoid='{"stx":"html"}'>
18724 <li data-parsoid='{"stx":"html"}'>One</li>
18725 <li data-parsoid='{"stx":"html"}'>Two:
18726 <ul data-parsoid='{"stx":"html"}'>
18727 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18728 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18735 HTML nested bullet list, open tags (T7497)
18757 HTML nested ordered list, closed tags (T7497)
18782 HTML nested ordered list, open tags (T7497)
18819 HTML ordered list item with parameters oddity
18821 <ol><li id="fragment">One</li>
18824 <ol><li id="fragment">One</li>
18829 # parsoid doesn't explicitly mark autonumbered links, see T55505
18831 T7918: autonumbering
18833 [http://first/] [http://second] [ftp://ftp]
18837 [mailto:enclosed@mail.tld With target]
18839 [mailto:enclosed@mail.tld]
18841 mailto:inline@mail.tld
18843 <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>
18844 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18845 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18846 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18847 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18850 <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>
18851 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
18852 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
18853 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
18854 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18859 # Security and HTML correctness
18860 # From Nick Jenkins' fuzz testing
18864 Fuzz testing: Parser13
18878 # Note that Parsoid output differs from the PHP parser here: the PHP
18879 # parser breaks the URL for the magic word, while in Parsoid the URL
18880 # production takes precedence.
18882 Fuzz testing: Parser14
18887 <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>
18888 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18890 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18896 <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>
18897 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18899 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18903 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
18904 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
18908 Fuzz testing: Parser14-table
18910 parsoid=wt2html,html2html
18915 <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>
18916 <table style="__TOC__">
18921 <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>
18922 <table style="__TOC__">
18929 <table style="__TOC__"></table>
18932 # Known to produce bogus xml (extra </td>)
18933 # Don't add the html/php section since it generates broken HTML
18935 Fuzz testing: Parser16
18952 Fuzz testing: Parser21
18955 !irc://{{ftp://a" onmouseover="alert('hello world');"
18960 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18970 Fuzz testing: Parser22
18972 http://===r:::https://b
18976 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18984 # Known to produce bad XML for now
18986 Fuzz testing: Parser24
18993 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18994 <br style="onmouseover='alert(document.cookie);' " />
18996 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19001 <u class="|">}}}} >
19002 <br style="onmouseover='alert(document.cookie);'" />
19004 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19012 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19013 <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>"}'/>}}}} >
19014 <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}'>
19018 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19021 # Note: the current result listed for this is not what the original one was,
19022 # but the original bug was JavaScript injection, which is fixed in any case.
19023 # It's not clear that the original result listed was any more correct than the
19024 # current one. Original result:
19027 # <li class="||">
19028 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19030 Fuzz testing: Parser25 (T8055)
19036 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19038 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19041 <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"]}'>
19042 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19046 Fuzz testing: URL adjacent extension (with space, clean)
19048 http://example.com <nowiki>junk</nowiki>
19050 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19053 <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>
19057 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19059 http://example.com<nowiki>junk</nowiki>
19061 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19064 <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>
19068 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19070 http://example.com<pre>junk</pre>
19072 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19075 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19077 <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>
19081 Fuzz testing: image with bogus manual thumbnail
19083 [[Image:foobar.jpg|thumbnail= ]]
19085 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19088 <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>
19091 # Parsoid will emit the newline literally in wt2wt; see next test case.
19093 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19097 <pre dir=" "></pre>
19099 <pre dir=" "></pre>
19102 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19103 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19107 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19111 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19112 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19122 Templates in extension attributes are not expanded
19124 <pre dir="{{echo|ltr}}"></pre>
19126 <pre dir="{{echo|ltr}}"></pre>
19129 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19133 Parsing optional HTML elements (T8171)
19138 <td> Some tabular data</td>
19139 <td> More tabular data ...
19140 <td> And yet som tabular data</td>
19146 <td> Some tabular data</td>
19147 <td> More tabular data ...
19148 </td><td> And yet som tabular data</td>
19155 Correct handling of <td>, <tr> (T8171)
19160 <td> Some tabular data</td>
19161 <td> More tabular data ...</td>
19162 <td> And yet som tabular data</td>
19168 <td> Some tabular data</td>
19169 <td> More tabular data ...</td>
19170 <td> And yet som tabular data</td>
19178 Parsing crashing regression (fr:JavaScript)
19182 <p></body></x>
19187 Inline wiki vs wiki block nesting
19193 <p><b>Bold paragraph</b>
19194 </p><p>New wiki paragraph
19198 # FIXME: The current php output is documented
19199 # and desired output is the parsoid target.
19201 Inline HTML vs wiki block nesting
19207 <p><b>Bold paragraph
19208 </p><p>New wiki paragraph</b>
19211 <p><b>Bold paragraph</b>
19212 </p><p>New wiki paragraph
19216 # Original result was this:
19217 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19219 # While that might be marginally more intuitive, maybe, the six-apostrophe
19220 # construct is clearly pathological and the result stated here (which is what
19221 # the parser actually does) is about as reasonable as anything.
19223 Mixing markup for italics and bold
19226 '''bold''''''bold''bolditalics'''''
19228 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19236 Article for special page transclusion test
19240 Special page transclusion
19243 {{Special:Prefixindex/Xyzzyx}}
19245 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19251 Special page transclusion twice (T7021)
19254 {{Special:Prefixindex/Xyzzyx}}
19255 {{Special:Prefixindex/Xyzzyx}}
19257 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19259 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19265 Transclusion of default MediaWiki message
19267 {{MediaWiki:Mainpage}}
19274 Transclusion of nonexistent MediaWiki message
19276 {{MediaWiki:Mainpagexxx}}
19278 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19283 Transclusion of MediaWiki message with underscore
19285 {{MediaWiki:history_short}}
19292 Transclusion of MediaWiki message with space
19294 {{MediaWiki:history short}}
19301 Invalid header with following text
19311 Section extraction test (section 0)
19331 Section extraction test (section 1)
19353 Section extraction test (section 2)
19374 Section extraction test (section 3)
19394 Section extraction test (section 4)
19418 Section extraction test (section 5)
19438 Section extraction test (section 6)
19459 Section extraction test (section 7)
19479 Section extraction test (section 8)
19499 Section extraction test (section 9)
19520 Section extraction test (section 10)
19540 Section extraction test (nonexistent section 11)
19559 Section extraction test with bogus heading (section 1)
19564 ==bogus== not a legal section
19568 ==bogus== not a legal section
19572 Section extraction test with bogus heading (section 2)
19577 ==bogus== not a legal section
19584 Section extraction test with comment after heading (section 1)
19596 Section extraction test with comment after heading (section 2)
19608 Section extraction test with bogus <nowiki> heading (section 1)
19613 ==bogus== <nowiki>not a legal section</nowiki>
19617 ==bogus== <nowiki>not a legal section</nowiki>
19621 Section extraction test with bogus <nowiki> heading (section 2)
19626 ==bogus== <nowiki>not a legal section</nowiki>
19632 # Formerly testing for T4587, now resolved by the use of unmarked sections
19633 # instead of respecting commented sections
19635 Section extraction prefixed by comment (section 1)
19646 Section extraction prefixed by comment (section 2)
19656 # Formerly testing for T4607, now resolved by the use of unmarked sections
19657 # instead of respecting HTML-style headings
19659 Section extraction, mixed wiki and html (section 1)
19675 Section extraction, mixed wiki and html (section 2)
19691 # Formerly testing for T5342
19693 Section extraction, heading surrounded by <noinclude>
19697 <noinclude>==unmarked==</noinclude>
19703 # Test behavior of T21910
19705 Sectiion with all-equals
19710 The line above must have a trailing space
19713 But just in case it doesn't...
19717 But just in case it doesn't...
19721 Section replacement test (section 0)
19752 Section replacement test (section 1)
19781 Section replacement test (section 2)
19811 Section replacement test (section 3)
19842 Section replacement test (section 4)
19869 Section replacement test (section 5)
19900 Section replacement test (section 6)
19930 Section replacement test (section 7)
19961 Section replacement test (section 8)
19992 Section replacement test (section 9)
20021 Section replacement test (section 10)
20051 Section replacement test with initial whitespace (T15728)
20055 Preformatted initial line
20059 Preformatted initial line
20066 Section extraction, heading followed by pre with 20 spaces (T8398)
20078 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20091 Section extraction, <pre> around bogus header (T12309)
20108 Section replacement, <pre> around bogus header (T12309)
20129 Handling of 
 in URLs
20133 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20136 <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>
20140 Handling of %0A in URLs
20144 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20147 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20150 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20152 5 quotes, code coverage +1 line
20162 # same html as previous, but wikitext adjusted to match parsoid html2wt
20163 # note that wt2html and html2html will put the <i> before the <b>
20165 5 quotes, code coverage +1 line w/ nowiki (1)
20167 parsoid=wt2wt,html2wt
20169 '''''<nowiki/>'''''
20174 <p><b><i></i></b></p>
20177 # same as previous, just swapping the <i> and <b>
20179 5 quotes, code coverage +1 line w/ nowiki (2)
20181 '''''<nowiki/>'''''
20186 <p><i><b></b></i></p>
20190 Special:Search page linking.
20194 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20199 {{!}} is a magic word
20201 {{!}} is a magic word there and {{!}} is still a magic word here
20202 | is not a magic word here but {{!}} is still a magic word here
20204 <p>| is a magic word there and | is still a magic word here
20205 | is not a magic word here but | is still a magic word here
20208 <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
20209 | 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>
20215 title=[[Parser test]]
20229 *{{SUBJECTPAGENAME}}
20230 *{{SUBJECTPAGENAMEE}}
20233 *{{NAMESPACENUMBER}}
20238 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20240 <ul><li>Parser test</li>
20241 <li>Parser_test</li>
20242 <li>Parser test</li>
20243 <li>Parser_test</li>
20244 <li>Parser test</li>
20245 <li>Parser_test</li>
20246 <li>Parser test</li>
20247 <li>Parser_test</li>
20248 <li>Parser test</li>
20249 <li>Parser_test</li>
20250 <li>Talk:Parser test</li>
20251 <li>Talk:Parser_test</li>
20252 <li>Parser test</li>
20253 <li>Parser_test</li>
20261 <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>
20264 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20267 Gallery with valid attributes
20269 <gallery type="123" summary="345">
20270 File:File:Foobar.jpg
20273 <ul class="gallery mw-gallery-traditional" type="123">
20274 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20275 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20276 <div class="gallerytext">
20282 <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"}}'>
20283 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20287 ## Parsoid thinks the "centre" here is a property, not a caption.
20292 "modes": ["wt2html"],
20293 "nativeGallery": true
20301 image4 |300px| centre
20302 image5.svg| http://///////
20307 <ul class="gallery mw-gallery-traditional">
20308 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20309 <div class="thumb" style="height: 150px;">Image1.png</div>
20310 <div class="gallerytext">
20313 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20314 <div class="thumb" style="height: 150px;">Image2.gif</div>
20315 <div class="gallerytext">
20318 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20319 <div class="thumb" style="height: 150px;">Image3</div>
20320 <div class="gallerytext">
20323 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20324 <div class="thumb" style="height: 150px;">Image4</div>
20325 <div class="gallerytext">
20330 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20331 <div class="thumb" style="height: 150px;">Image5.svg</div>
20332 <div class="gallerytext">
20333 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20337 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20338 <div class="thumb" style="height: 150px;">* image6</div>
20339 <div class="gallerytext">
20345 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20346 <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>
20347 <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>
20348 <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>
20349 <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>
20350 <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>
20351 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20356 Gallery (with options, html)
20359 "modes": ["wt2html", "html2html"],
20360 "nativeGallery": true
20363 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20364 File:Nonexistent.jpg|caption
20365 File:Nonexistent.jpg
20366 image:foobar.jpg|some '''caption''' [[Main Page]]
20368 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20371 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20372 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20373 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20374 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20375 <div class="gallerytext">
20380 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20381 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20382 <div class="gallerytext">
20385 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20386 <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>
20387 <div class="gallerytext">
20388 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20392 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20393 <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>
20394 <div class="gallerytext">
20397 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20398 <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>
20399 <div class="gallerytext">
20407 <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":{}}'>
20408 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20409 <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>
20410 <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>
20411 <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>
20412 <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>
20413 <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>
20418 Gallery (with options, extsrc)
20421 "nativeGallery": false
20424 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20425 File:Nonexistent.jpg|caption
20426 File:Nonexistent.jpg
20427 image:foobar.jpg|some '''caption''' [[Main Page]]
20429 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20432 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20433 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20434 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20435 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20436 <div class="gallerytext">
20441 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20442 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20443 <div class="gallerytext">
20446 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20447 <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>
20448 <div class="gallerytext">
20449 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20453 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20454 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20455 <div class="gallerytext">
20458 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20459 <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>
20460 <div class="gallerytext">
20468 <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"}}'>
20469 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20470 <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>
20471 <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>
20472 <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>
20473 <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>
20474 <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>
20479 Gallery (without px units)
20481 <gallery widths="70" heights="40">
20485 <ul class="gallery mw-gallery-traditional">
20486 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20487 <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>
20488 <div class="gallerytext">
20494 <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"}}'>
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 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>
20500 Gallery (with invalid units)
20502 <gallery widths="70em" heights="40em">
20506 <ul class="gallery mw-gallery-traditional">
20507 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20508 <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>
20509 <div class="gallerytext">
20515 <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"}}'>
20516 <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>
20521 Gallery with link that has fragment
20524 "modes": ["wt2html", "html2html"],
20525 "nativeGallery": true
20529 image:foobar.jpg|link=Main_Page
20530 image:foobar.jpg|link=Main_Page#section
20531 image:foobar.jpg|link=Main Page#section|caption
20534 <ul class="gallery mw-gallery-traditional">
20535 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20536 <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>
20537 <div class="gallerytext">
20540 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20541 <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>
20542 <div class="gallerytext">
20545 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20546 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
20547 <div class="gallerytext">
20555 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20556 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./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>
20557 <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>
20558 <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>
20562 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20564 Gallery with template inside caption
20567 "nativeGallery": true
20570 <gallery caption="{{echo|hi}}">
20571 File:Foobar.jpg|{{echo|ho}}
20574 <ul class="gallery mw-gallery-traditional">
20575 <li class='gallerycaption'>{{echo|hi}}</li>
20576 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20577 <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>
20578 <div class="gallerytext">
20586 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20587 <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>
20588 <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>
20593 Gallery with wikitext inside caption
20596 "nativeGallery": true
20600 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20601 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20604 <ul class="gallery mw-gallery-traditional">
20605 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20606 <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>
20607 <div class="gallerytext">
20608 <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>
20612 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20613 <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>
20614 <div class="gallerytext">
20615 <p>This is a test template
20622 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20623 <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>
20624 <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>
20629 Gallery (with showfilename option)
20632 "nativeGallery": true
20635 <gallery showfilename="">
20636 File:Nonexistent.jpg|caption
20637 File:Nonexistent.jpg
20638 File:Foobar.jpg|some '''caption''' [[Main Page]]
20642 <ul class="gallery mw-gallery-traditional">
20643 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20644 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20645 <div class="gallerytext">
20646 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20651 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20652 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20653 <div class="gallerytext">
20654 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20658 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20659 <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>
20660 <div class="gallerytext">
20661 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20662 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20666 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20667 <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>
20668 <div class="gallerytext">
20669 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20676 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20677 <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>
20678 <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>
20679 <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>
20680 <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>
20684 ## Should Parsoid be preserving these variations? See T151367
20686 Gallery (with namespace-less filenames)
20689 "modes": ["wt2html", "html2html"],
20690 "nativeGallery": true
20694 File:Nonexistent.jpg
20700 <ul class="gallery mw-gallery-traditional">
20701 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20702 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20703 <div class="gallerytext">
20706 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20707 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20708 <div class="gallerytext">
20711 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20712 <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>
20713 <div class="gallerytext">
20716 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20717 <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>
20718 <div class="gallerytext">
20724 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20725 <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>
20726 <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>
20727 <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>
20728 <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>
20733 Gallery override link with wikilink (T36852)
20736 "nativeGallery": true
20740 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20743 <ul class="gallery mw-gallery-traditional">
20744 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20745 <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>
20746 <div class="gallerytext">
20752 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20753 <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>
20758 Gallery override link with absolute external link (T36852)
20761 "nativeGallery": true
20765 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20768 <ul class="gallery mw-gallery-traditional">
20769 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20770 <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>
20771 <div class="gallerytext">
20777 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20778 <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>
20783 Gallery override link with absolute external link with LanguageConverter
20788 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20791 <ul class="gallery mw-gallery-traditional">
20792 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20793 <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>
20794 <div class="gallerytext">
20802 <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"}}'>
20803 <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>
20808 Gallery override link with malicious javascript (T36852)
20811 "modes": ["wt2html", "html2html"],
20812 "nativeGallery": true
20816 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20819 <ul class="gallery mw-gallery-traditional">
20820 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20821 <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>
20822 <div class="gallerytext">
20828 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20829 <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>
20833 # Note that parsoid uses the invalid link as a caption, PHP does not.
20835 Gallery with invalid title as link (T45964)
20838 "modes": ["wt2html", "html2html"],
20839 "nativeGallery": true
20843 File:Foobar.jpg|link=<
20846 <ul class="gallery mw-gallery-traditional">
20847 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20848 <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>
20849 <div class="gallerytext">
20855 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20856 <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>
20861 Serialize gallery without attrs in data-mw
20864 "modes": ["html2wt"],
20865 "nativeGallery": true
20868 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20869 <li class="gallerycaption">123</li>
20870 <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>
20873 <gallery caption="123">
20879 Gallery with class and style attributes
20882 "nativeGallery": true
20885 <gallery class="center" style="text-align: center;">
20889 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20890 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20891 <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>
20892 <div class="gallerytext">
20898 <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":{}}'>
20899 <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>
20904 Gallery in slideshow mode
20907 "nativeGallery": true
20910 <gallery mode="slideshow" showthumbnails="">
20914 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20915 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20916 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20917 <div class="gallerytext">
20923 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20924 <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>
20929 HTML Hex character encoding (spells the word "JavaScript")
20931 parsoid=wt2html,wt2wt,html2html
20933 JavaScript
20935 <p>JavaScript
20938 <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>
20942 HTML Hex character encoding bogus encoding (T28437 regression check)
20946 <p>&#xsee;&#XSEE;
20951 HTML Hex character encoding mixed case
20953 parsoid=wt2html,wt2wt,html2html
20960 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20963 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20964 # Note that U+000C (form feed) is not a valid XML character, so
20965 # it is banned even though allowed in HTML5.
20967 Illegal character references (T106578)
20972 ; Control (low): 
20973 ; Control (high):  Ÿ
20974 ; Surrogate: ��
20975 ; This is an okay astral character: 💩
20983 <dt>Control (low)</dt>
20985 <dt>Control (high)</dt>
20986 <dd>&#x7F; &#x9F;</dd>
20988 <dd>&#xD83D;&#xDCA9;</dd>
20989 <dt>This is an okay astral character</dt>
20990 <dd>💩</dd></dl>
20994 __FORCETOC__ override
21006 ISBN 978-0-1234-56 789
21008 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21011 <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>
21015 ISBN followed by 5 spaces
21026 ISBN ISBN 1234567890
21028 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21031 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21034 # Uppercase X and lowercase x as well
21045 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21046 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21047 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21048 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21049 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21050 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21053 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21054 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21055 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21056 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21057 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21058 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21062 ISBN with empty prefix (parsoid test)
21066 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21069 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21073 T24905: <abbr> followed by ISBN followed by </a>
21075 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21077 <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>
21080 <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>
21088 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21093 Double RFC with a wiki link
21097 <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>
21106 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21109 <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>
21113 Centre-aligned image
21115 [[Image:foobar.jpg|centre]]
21117 <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>
21120 <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>
21126 [[Image:foobar.jpg|none]]
21128 <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>
21131 <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>
21135 Width + Height sized image (using px) (height is ignored)
21137 [[Image:foobar.jpg|640x480px]]
21139 <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>
21142 <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>
21146 Width-sized image (using px, no following whitespace)
21148 [[Image:foobar.jpg|640px]]
21150 <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>
21153 <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>
21157 Width-sized image (using px, with following whitespace - test regression from r39467)
21159 [[Image:foobar.jpg|640px ]]
21161 <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>
21164 <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>
21168 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21170 [[Image:foobar.jpg| 640px]]
21172 <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>
21175 <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>
21179 Image with page parameter
21183 [[File:LoremIpsum.djvu|page=2]]
21185 <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>
21188 <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>
21192 Another italics / bold test
21200 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21206 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21209 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21213 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21215 Images with the "|" character in the comment
21217 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21219 <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>
21222 <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>
21226 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21228 <html><script>alert(1);</script></html>
21230 <p><html><script>alert(1);</script></html>
21235 HTML with raw HTML ($wgRawHtml==true)
21239 <html><script>alert(1);</script></html>
21241 <p><script>alert(1);</script>
21246 Parents of subpages, one level up
21248 subpage title=[[Subpage test/L1/L2/L3]]
21252 <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>
21258 Parents of subpages, one level up, not named
21260 subpage title=[[Subpage test/L1/L2/L3]]
21264 <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>
21271 Parents of subpages, two levels up
21273 subpage title=[[Subpage test/L1/L2/L3]]
21279 <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
21280 </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>
21285 Parents of subpages, two levels up, without trailing slash or name.
21287 subpage title=[[Subpage test/L1/L2/L3]]
21296 Parents of subpages, two levels up, with lots of extra trailing slashes.
21298 subpage title=[[Subpage test/L1/L2/L3]]
21302 <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>
21307 Subpage test/L1/L2/L3Sibling
21313 Transclusion of a sibling page (one level up)
21315 subpage title=[[Subpage test/L1/L2/L3]]
21324 Transclusion of a child page
21326 subpage title=[[Subpage test/L1/L2]]
21334 # This is wt2html only in Parsoid because we add <nowiki>
21335 # because of {{..}} and we don't expect to fix that to
21336 # eliminate the nowikis selective for {{..}} markup.
21338 Non-transclusion because of too many up levels
21340 subpage title=[[Subpage test/L1/L2/L3]]
21343 {{../../../../More than parent}}
21345 <p>{{../../../../More than parent}}
21348 <p>{{../../../../More than parent}}</p>
21352 Definition list code coverage
21358 <dl><dt>title  </dt>
21360 <dt>title </dt>
21366 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21367 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21368 <dt>title</dt><dd> def</dd></dl>
21372 Don't fall for the self-closing div
21374 <div>hello world</div/>
21376 <div>hello world</div>
21385 <p>[[:Template:Msg]]
21394 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21398 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21400 Always escape literal '>' in output, not just after '<'
21414 <p>This is a test template
21415 This is a test template
21427 Inclusion of !userCanEdit() content
21431 <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>
21437 Out-of-order TOC heading levels
21446 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21448 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21450 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21451 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21454 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21456 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21457 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21463 <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>
21464 <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>
21465 <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>
21466 <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>
21467 <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>
21468 <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>
21474 ISBN with a dummy number
21484 ISBN with space-delimited number
21488 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21491 <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>
21496 ISBN with multiple spaces, no number
21515 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21516 </p><p>ISBN 12345678901
21519 <p>ISBN 123456789</p>
21521 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21523 <p>ISBN 12345678901</p>
21528 ISBN with trailing year (T9110)
21530 ISBN 1-234-56789-0 - 2006
21532 ISBN 1 234 56789 0 - 2006
21534 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21535 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21538 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21540 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21547 wgFragmentMode=[ 'html5', 'legacy' ]
21549 {{anchorencode:foo bar©#%n}}
21554 <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>
21558 anchorencode (legacy)
21560 wgFragmentMode=[ 'legacy' ]
21562 {{anchorencode:foo bar©#%n}}
21564 <p>foo_bar.C2.A9.23.25n
21569 anchorencode trims spaces
21571 wgFragmentMode=[ 'html5', 'legacy' ]
21573 {{anchorencode: __pretty__please__}}
21578 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21582 anchorencode deals with links
21584 wgFragmentMode=[ 'html5', 'legacy' ]
21586 {{anchorencode: [[hello|world]] [[hi]]}}
21591 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21595 anchorencode deals with templates
21597 wgFragmentMode=[ 'html5', 'legacy' ]
21599 {{anchorencode: {{Foo}} x}}
21604 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21608 anchorencode encodes like the TOC generator: (T20431)
21610 wgFragmentMode=[ 'html5', 'legacy' ]
21612 ===_ +:.3A%3A _ &&]] x===
21613 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21616 <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>
21617 <p>+:.3A%3A_&&]]_x
21620 <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>
21621 <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>
21622 <meta property="mw:PageProp/noeditsection"/>
21626 anchorencode encodes like the TOC generator: (T20431) (legacy)
21628 wgFragmentMode=[ 'legacy' ]
21630 ===_ +:.3A%3A&&]]===
21631 {{anchorencode: _ +:.3A%3A&&]] }}
21634 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21635 <p>.2B:.3A.253A.26.26.5D.5D
21640 T8200: blockquotes and paragraph formatting
21661 T10293: Use of center tag ruins paragraph formatting
21682 Parsing of overlapping (improperly nested) inline html tags
21684 <span><s>x</span></s>
21686 <p><span><s>x</span></s></span>
21689 <p><span><s>x</s></span>
21694 ### Language variants related tests
21697 # Parsoid does not mark self-links.
21698 # Parsoid does not convert links; PHP will do any necessary redirects.
21701 Self-link in language variants
21703 title=[[Dunav]] language=sr
21705 Both [[Dunav]] and [[Дунав]] are names for this river.
21707 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21710 <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>
21720 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21722 title=[[Duna]] language=sr
21724 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21726 <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.
21729 <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>
21733 Link to a section of a variant of this title shouldn't be parsed as self-link
21735 title=[[Duna]] language=sr
21737 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21739 <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.
21742 <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>
21746 Link to pages in language variants
21750 Main Page can be written as [[Маин Паге]]
21752 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21755 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21760 Multiple links to pages in language variants
21764 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21766 <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>.
21769 <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>
21774 Simple template in language variants
21780 <p>This is a test template
21786 Template with explicit namespace in language variants
21792 <p>This is a test template
21798 Basic test for template parameter in language variants
21802 {{парамтест|param=foo}}
21804 <p>This is a test template with parameter foo
21809 Simple category in language variants
21813 [[Category:МедиаWики Усер'с Гуиде]]
21815 cat=МедиаWики_Усер'с_Гуиде sort=
21817 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21832 ## We used to, but no longer wt2wt this test since the default serializer
21833 ## will normalize all categories to serialize on their own line.
21834 ## This wikitext usage is going to be fairly uncommon in production and
21835 ## selser will take care of preserving formatting in those scenarios.
21837 Don't convert blue categorylinks to another variant (T35210)
21843 [[A]][[Category:分类]]
21847 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21848 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21852 Stripping -{}- tags (language variants)
21856 Latin proverb: -{Ne nuntium necare}-
21858 <p>Latin proverb: Ne nuntium necare
21861 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21866 Prevent conversion with -{}- tags (language variants)
21868 language=sr variant=sr-ec
21870 Latinski: -{Ne nuntium necare}-
21872 <p>Латински: Ne nuntium necare
21875 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21880 Prevent conversion of text with -{}- tags (language variants)
21882 language=sr variant=sr-ec
21884 Latinski: -{Ne nuntium necare}-
21886 <p>Латински: Ne nuntium necare
21889 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21894 Prevent conversion of links with -{}- tags (language variants)
21896 language=sr variant=sr-ec
21900 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21903 <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>
21908 -{}- tags within headlines (within html for parserConvert())
21910 wgFragmentMode=[ 'html5', 'legacy' ]
21912 language=sr variant=sr-ec
21916 Note that even an unprotected headline ID is not affected by language
21921 <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>
21922 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21925 <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>
21928 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21930 <p>Note that even an unprotected headline ID is not affected by language
21933 <h2 id="Latinski">Latinski</h2>
21937 Explicit definition of language variant alternatives
21939 language=zh variant=zh-tw
21941 -{zh:China;zh-tw:Taiwan}-, not China
21943 <p>Taiwan, not China
21946 <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>
21950 Filter syntax for language variants
21952 language=zh variant=zh-tw
21954 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21956 <p>fooblog, WEBJOURNAL, WEBLOGquux
21959 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21962 # Note that Parsoid post-processing for language variants needs to
21963 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21965 Conversion around HTML tags
21967 language=sr variant=sr-ec
21969 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21970 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21973 <span title="ЛаCтин">ски</span>
21976 <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"}]}'/>
21977 <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>
21981 Explicit session-wise two-way language variant mapping (A flag and - flag)
21983 language=zh variant=zh-tw
21985 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
21987 Taiwan is not China.
21989 But -{A|zh:China; zh-tw:Taiwan}- is China,
21991 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
21993 and -{China}- is China.
21995 <p>This is Taiwan, but we'll forget that now.
21996 </p><p>Taiwan is not China.
21997 </p><p>But Taiwan is Taiwan,
21998 </p><p>(This should be stripped!)
21999 </p><p>and China is China.
22002 <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>
22003 <p>Taiwan is not China.</p>
22004 <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>
22005 <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>
22006 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22010 Explicit session-wise one-way language variant mapping (A flag and - flag)
22012 language=zh variant=zh-tw
22014 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22016 COUNTRY is China or Taiwan.
22018 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22020 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22022 and -{COUNTRY}- is COUNTRY.
22024 <p>This is Taiwan, but we'll forget that now.
22025 </p><p>COUNTRY is China or Taiwan.
22026 </p><p>But Taiwan is Taiwan,
22027 </p><p>(This should be stripped!)
22028 </p><p>and COUNTRY is COUNTRY.
22031 <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>
22032 <p>COUNTRY is China or Taiwan.</p>
22033 <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>
22034 <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>
22035 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22039 Explicit session-wise two-way language variant mapping (H flag for hide)
22041 language=zh variant=zh-tw
22043 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22047 <p>(This should be stripped!)
22048 </p><p>Taiwan is Taiwan.
22051 <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>
22052 <p>Taiwan is China.</p>
22056 Explicit session-wise one-way language variant mapping (H flag for hide)
22058 language=zh variant=zh-tw
22060 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22062 COUNTRY is Taiwan or China.
22064 <p>(This should be stripped!)
22065 </p><p>Taiwan is Taiwan or China.
22068 <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>
22069 <p>COUNTRY is Taiwan or China.</p>
22072 ## Note that parsoid test runner does not support 'showtitle' option.
22074 Adding explicit conversion rule for title (T flag)
22076 language=zh variant=zh-tw showtitle
22078 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22083 <p>Should be stripped!
22084 </p><p>Taiwan is China.
22087 <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>
22088 <p>Taiwan is China.</p>
22092 Code coverage: T combined with H flag
22094 language=zh variant=zh-tw showtitle
22096 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22101 <p>Should be stripped!
22102 </p><p>Taiwan is Taiwan.
22105 <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>
22106 <p>Taiwan is China.</p>
22110 Code coverage: T with no variants
22112 language=zh variant=zh-tw showtitle
22114 -{H|zh:China; zh-tw:Taiwan}-
22115 Taiwan is China.-{T|Taiwan is China}-
22122 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22123 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22127 Code coverage: rules with no variants
22129 language=zh variant=zh-tw
22131 -{H|zh:China; zh-tw:Taiwan}-
22142 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22144 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22145 Taiwan is China.</p>
22150 Code coverage: D flag for conversion rule
22152 language=zh variant=zh-tw
22154 -{D|zh-cn:XA; zh-tw:YA}-
22155 -{A;D|zh-cn:XB; zh-tw:YB}-
22156 -{D;H|zh-cn:XC; zh-tw:YC}-
22158 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22164 XA XB XC YA YB YC FOO BAR BAT 012345
22169 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22173 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22176 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22177 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22178 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22179 <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>
22180 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22181 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22182 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22183 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22187 Code coverage: N flag for conversion rule
22189 language=zh variant=zh-cn
22199 </p><p>српски (ћирилица)
22202 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22203 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22204 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22207 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22209 Code coverage: N flag for conversion rule (wt2html only)
22211 language=zh variant=zh-cn
22212 parsoid=wt2html,html2html
22219 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22223 Testing that changing the language variant here in the tests actually works
22225 language=zh variant=zh showtitle
22227 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22230 <p>Should be stripped!
22233 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22237 Recursive conversion of alt and title attrs shouldn't clear converter state
22239 language=zh variant=zh-cn
22242 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22243 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22247 Should be stripped<span title="Exclamation">!</span>
22250 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22251 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>
22255 T26072: more test on conversion rule for title
22257 language=zh variant=zh-tw showtitle
22259 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22261 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22264 <p>This should be stripped!
22265 </p><p>This won't take interferes with the title rule.
22268 <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>
22269 <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>
22273 Partly disable title conversion if variant == main language code
22275 language=zh variant=zh title=[[ZH]] showtitle
22277 -{T|zh-cn:CN;zh-tw:TW}-
22283 <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>
22287 Partly disable title conversion if variant == main language code, more
22289 language=zh variant=zh title=[[ZH]] showtitle
22297 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22301 Raw output of variant escape tags (R flag)
22303 language=zh variant=zh-tw
22305 Raw: -{R|zh:China;zh-tw:Taiwan}-
22307 <p>Raw: zh:China;zh-tw:Taiwan
22310 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22313 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22315 Raw output of variant escape tags (R flag) (wt2html only)
22317 language=zh variant=zh-tw
22318 parsoid=wt2html,html2html
22320 -{Variant}- -{D|syntax}- -{D;R|options}-
22322 <p>Variant syntax options
22325 <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>
22329 Nested markup inside raw output of variant escape tags (R flag)
22331 language=zh variant=zh-tw
22333 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22335 <p>Nested raw: nested Taiwan nested
22338 <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>
22342 Nested markup and spaces inside raw output of variant escape tags (R flag)
22344 language=zh variant=zh-tw
22346 X-{ outer -{ inner }- outer }-X
22348 <p>X outer inner outer X
22351 <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>
22355 Templates inside raw output of variant escape tags (R flag)
22357 language=zh variant=zh-tw
22359 Nested raw: -{R|nested {{echo|hi}} templates}-
22361 <p>Nested raw: nested hi templates
22364 <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>
22368 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22370 language=zh variant=zh-cn
22372 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22377 <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>
22381 Conversion rules from [numeric-only string] to [something else] (T48634)
22383 language=zh variant=zh-cn
22385 -{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
22390 <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>
22394 Two-way converter rule entries with an empty value should be ignored (T53551)
22396 language=zh variant=zh-cn
22398 -{H|zh-cn:foo;zh-tw:;}-foobar
22403 <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>
22407 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22409 language=zh variant=zh-cn
22411 -{H|=>zh-cn:foo;}-foobar
22416 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22420 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22422 language=zh variant=zh-cn
22429 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22433 Nested using of manual convert syntax
22435 language=zh variant=zh-hk
22437 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22439 <p>Nested: Hello Hong Kong!
22442 <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>
22446 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22448 language=zh variant=zh-cn
22450 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22452 <p><span title="X">A</span>
22455 <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>
22459 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22461 language=zh variant=zh-cn
22463 -{<span title="-{X}-">A</span>}-
22464 !! html/php+disabled
22465 <p><span title="X">A</span>
22468 <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>
22471 # Parsoid and PHP disagree on how to parse this example: Parsoid
22472 # insists that the content of a language converter element be a valid
22473 # DOM fragment or attribute string
22475 Language converter markup with block content
22477 language=zh variant=zh-cn
22479 <span>a-{b<div>c}-d
22481 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22483 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22488 </span></div></span></div></span>
22490 <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>
22492 <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>
22494 <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>
22498 LanguageConverter selser (1)
22500 language=zh variant=zh-cn
22502 "modes": ["wt2wt", "selser"],
22504 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22514 LanguageConverter selser (2)
22516 language=zh variant=zh-cn
22518 "modes": ["wt2wt", "selser"],
22520 ["span[class='x']", "contents", "text", "-{foo}-"],
22521 ["a", "contents", "text", "-{"],
22522 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22526 <span class="x">TEXT1</span>
22527 [http://example.com TEXT2]
22531 <span class="x"><nowiki>-{foo}-</nowiki></span>
22532 [http://example.com -{]
22533 [[Foo|<nowiki>-{</nowiki>]]
22534 {{1x|<nowiki>-{</nowiki>}}
22537 # Tests LanguageVariantText in ConstrainedText
22539 LanguageConverter selser (3)
22541 language=zh variant=zh-cn
22543 "modes": ["wt2wt", "selser"],
22545 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22546 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22557 |<nowiki/>-{edited}-
22561 # Tests LanguageVariantText._fromSelSer
22563 LanguageConverter selser (4)
22565 language=zh variant=zh-cn
22567 "modes": ["wt2wt", "selser"],
22569 ["td > span.x", "remove"]
22575 |<span class="x">Foo</span>-{Bar}-
22576 ||<span class="x">Foo</span>-{Bar}-
22586 # Since Parsoid is starting to emit canonical wikitext for links,
22587 # [http://example.com http://example.com] will not RT back to that
22589 # Parsoid does not language-convert links (it is done in a
22590 # post-processing step)
22592 Proper conversion of text in external links
22594 language=sr variant=sr-ec
22597 http://www.google.com
22598 gopher://www.google.com
22599 [http://www.google.com http://www.google.com]
22600 [gopher://www.google.com gopher://www.google.com]
22601 [https://www.google.com irc://www.google.com]
22602 [ftp://www.google.com www.google.com/ftp://dir]
22603 [//www.google.com www.google.com]
22605 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22606 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22607 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22608 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22609 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22610 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22611 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22614 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22615 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22616 <a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22617 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22618 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22619 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22620 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22624 Do not convert roman numbers to language variants
22626 language=sr variant=sr-ec
22630 <p>Фридрих IV је цар.
22633 <p>Fridrih IV je car.</p>
22637 Unclosed language converter markup "-{"
22648 Don't convert raw rule "-{R|=>}-" to "=>"
22657 <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>
22661 Don't break link parsing if language converter markup is in the caption.
22663 language=sr variant=sr-ec
22665 [[Main Page|-{R|main page}-]]
22667 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22670 <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>
22674 T146304: Don't break template parsing if language converter markup is in the parameter.
22676 language=sr variant=sr-ec
22683 <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>
22687 T146305: Don't break image parsing if language converter markup is in the caption.
22691 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22693 <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>
22696 <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>
22700 T146305: Don't break image parsing if nested language converter markup is in the caption.
22702 language=zh variant=zh-cn
22704 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22706 <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>
22709 <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>
22712 # XXX html2wt disabled because rich markup in alt is not preserved.
22714 Don't break gallery if language converter markup is inside.
22719 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22720 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22723 <ul class="gallery mw-gallery-traditional">
22724 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22725 <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>
22726 <div class="gallerytext">
22727 <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>
22731 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22732 <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>
22733 <div class="gallerytext">
22734 <p>This is a test template
22741 <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"}}'>
22742 <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>
22743 <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>
22748 T153135: Don't break list handling if language converter markup is in the item.
22750 language=zh variant=zh-cn
22752 ;-{zh-cn:AAA;zh-tw:BBB}-
22756 <dt>foo:bar</dt></dl>
22759 <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>
22760 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22764 // Note that parsoid does not protect colons unless language converter
22765 // markup is properly nested, because it is a backtracking parser.
22767 T153135: Unclosed markup in definition list (code coverage)
22769 language=zh variant=zh-cn
22774 <dl><dt><b>foo:bar</b></dt><b>
22775 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22778 <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}'>
22779 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22780 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22785 T153135: Nested language converter markup in definition list (code coverage)
22787 language=zh variant=zh-cn
22789 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22791 <dl><dt>AAA foo:bar bat:baz</dt>
22795 <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>
22796 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22800 # html2wt mode disabled due to <nowiki> insertion.
22802 T153140: Don't break table handling if language converter markup is in the cell.
22804 language=sr variant=sr-ec
22805 parsoid=wt2html,wt2wt,html2html
22822 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22829 Language converter tricky html2wt cases (1)
22832 parsoid=html2wt,wt2wt
22834 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22836 -{<nowiki>}-</nowiki>}-
22843 Language converter tricky html2wt cases (2)
22846 parsoid=html2wt,wt2wt
22850 <nowiki>-{foo}-</nowiki>
22852 <p>-{foo}-
22857 Language converter tricky html2wt cases (3)
22860 parsoid=html2wt,wt2wt
22862 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22863 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22864 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22870 -{<nowiki>-{foo}-</nowiki>}-
22874 </p><p>-{foo}-
22879 Language converter tricky html2wt cases (4)
22882 parsoid=html2wt,wt2wt
22884 <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>
22892 # Note that the <nowiki> escaping added by parsoid for source text,
22893 # destination text, and language names only works on the PHP side
22894 # for *destination text*. (HTML entity escaping wouldn't work
22895 # any better.) This is probably a bug, at least for source texts.
22896 # (For language names PHP uses a precise regexp based on the languages
22897 # it currently knows have variants, which is fragile since this set
22898 # can grow/shrink over time.)
22900 Language converter tricky html2wt cases (5)
22902 language=zh variant=zh-cn
22904 <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>
22905 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22906 <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>
22907 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22910 -{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
22912 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22914 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22916 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22919 !! html/php+disabled
22920 <p>foobat;xyz=>zh-cn:abc
22924 </p><p>a:b=>c 0;zh-tw:bar
22929 T179579: Nowiki and lc interaction
22936 -{123<nowiki>|</nowiki>456}-
22938 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
22940 <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>
22944 T2529: Uncovered bullet
22954 T2529: Uncovered bullet in a deeply nested list
22956 *******Foo {{bullet}}
22958 <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>
22964 T2529: Uncovered table already at line-start
22987 T2529: Uncovered bullet in parser function result
22989 *Foo {{lc:{{bullet}} }}
22997 T7678: Double-parsed template argument
22999 {{lc:{{{1}}}|hello}}
23006 T7678: Double-parsed template invocation
23008 {{lc:{{paramtest {{!}} param = hello }} }}
23010 <p>{{paramtest | param = hello }}
23015 Case insensitivity of parser functions for non-ASCII characters (T10143)
23018 title=[[Main Page]]
23020 {{PRVNÍVELKÉ:ěščř}}
23021 {{prvnívelké:ěščř}}
23041 Morwen/13: Unclosed link followed by heading
23048 <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>
23053 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23060 <h1><span class="mw-headline" id="heading">heading</span></h1>
23065 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23072 <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>
23087 Paragraphs inside divs (no extra line breaks)
23099 Paragraphs inside divs (extra line break on open)
23114 Paragraphs inside divs (extra line break on close)
23129 Paragraphs inside divs (extra line break on open and close)
23145 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23146 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23148 Nesting tags, paragraphs on lines which begin with <div>
23150 <div></div><strong>A
23153 <div></div><p><strong>A
23154 </strong></p><strong></strong><p><strong>B</strong>
23163 # T8200: <blockquote> should behave like <div> with respect to line breaks
23165 T8200: paragraphs inside blockquotes (no extra line breaks)
23167 <blockquote>Line one
23169 Line two</blockquote>
23171 <blockquote>Line one
23172 Line two</blockquote>
23175 <blockquote><p>Line one
23176 Line two</p></blockquote>
23180 T8200: paragraphs inside blockquotes (extra line break on open)
23185 Line two</blockquote>
23190 Line two</blockquote>
23196 Line two</p></blockquote>
23199 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23201 T8200: paragraphs inside blockquotes (extra line break on close)
23203 <blockquote>Line one
23208 <blockquote>Line one
23214 <blockquote><p>Line one
23221 T8200: paragraphs inside blockquotes (extra line break on open and close)
23237 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23239 Paragraphs inside blockquotes/divs (no extra line breaks)
23241 <blockquote><div>Line one
23243 Line two</div></blockquote>
23245 <blockquote><div>Line one
23246 Line two</div></blockquote>
23251 Paragraphs inside blockquotes/divs (extra line break on open)
23256 Line two</div></blockquote>
23261 Line two</div></blockquote>
23266 Paragraphs inside blockquotes/divs (extra line break on close)
23268 <blockquote><div>Line one
23271 </div></blockquote>
23273 <blockquote><div>Line one
23276 </div></blockquote>
23281 Paragraphs inside blockquotes/divs (extra line break on open and close)
23287 </div></blockquote>
23293 </div></blockquote>
23298 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23300 wgLinkHolderBatchSize=0
23306 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23307 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23308 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23313 Free external link invading image caption
23315 [[Image:Foobar.jpg|thumb|http://x|hello]]
23317 <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>
23320 <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>
23324 T17196: localised external link numbers
23328 [http://en.wikipedia.org/]
23330 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23333 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23337 Multibyte character in padleft
23339 {{padleft:-Hello|7|Æ}}
23344 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23348 Multibyte character in padright
23350 {{padright:Hello-|7|Æ}}
23355 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23359 formatdate parser function
23361 {{#formatdate:2009-03-24}}
23363 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23368 formatdate parser function, with default format
23370 {{#formatdate:2009-03-24|mdy}}
23372 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23377 Spacing of numbers in formatted dates
23379 {{#formatdate:January 15}}
23381 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23386 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
23388 language=nl title=[[MediaWiki:Common.css]]
23390 {{#formatdate:2009-03-24|dmy}}
23392 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23405 Edit comment with link
23409 I like the [[Main Page]] a lot
23411 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23415 Edit comment with link and link text
23419 I like the [[Main Page|best pages]] a lot
23421 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23425 Edit comment with link and link text with suffix
23429 I like the [[Main Page|best page]]s a lot
23431 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23435 Edit comment with section link (non-local, eg in history list)
23437 comment title=[[Main Page]]
23439 /* External links */ removed bogus entries
23441 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23445 Edit comment with section link and text before it (non-local, eg in history list)
23447 comment title=[[Main Page]]
23449 pre-comment text /* External links */ removed bogus entries
23451 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>
23455 Edit comment with section link (local, eg in diff view)
23457 comment local title=[[Main Page]]
23459 /* External links */ removed bogus entries
23461 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23465 Edit comment with subpage link (T16080)
23469 title=[[Subpage test]]
23471 Poked at a [[/subpage]] here...
23473 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23477 Edit comment with subpage link and link text (T16080)
23481 title=[[Subpage test]]
23483 Poked at a [[/subpage|neat little page]] here...
23485 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23489 Edit comment with bogus subpage link in non-subpage NS (T16080)
23492 title=[[Subpage test]]
23494 Poked at a [[/subpage]] here...
23496 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23500 Edit comment with bare anchor link (local, as on diff)
23504 title=[[Main Page]]
23508 <a href="#section">#section</a>
23512 Edit comment with bare anchor link (non-local, as on history)
23515 title=[[Main Page]]
23519 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23523 Anchor starting with underscore
23529 <p><a href="#_ref">One</a>
23532 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23536 Id starting with underscore
23538 <div id="_ref"></div>
23540 <div id="_ref"></div>
23545 Edit comment with link with more than one pipe (T99346)
23549 [[Main Page|Many|pipes]]
23551 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23555 Complex edit comment with link with more than one pipe (T99346)
23559 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23561 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..."
23565 Space normalisation on autocomment (T24784)
23568 title=[[Main Page]]
23570 /* __hello__world__ */
23572 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23576 percent-encoding and + signs in comments (T28410)
23580 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23582 <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>
23585 # Parsoid doesn't support this yet: see T75581
23586 # but it *should* omit the 'src' attribute if the image is bad.
23587 # PHP side of tests was disabled in
23588 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23589 # because of issues in the PHP parserTests infrastructure
23590 # (but the output below is indeed what the PHP side emits)
23592 Bad images - basic functionality
23595 !! html/php+disabled
23597 <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>
23601 Bad images - T18039: text after bad image disappears
23606 !! html/php+disabled
23612 <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>
23617 Verify that displaytitle works (T24501) no displaytitle
23621 wgAllowDisplayTitle=true
23622 wgRestrictDisplayTitle=false
23624 this is not the the title
23627 <p>this is not the the title
23632 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23637 wgAllowDisplayTitle=true
23638 wgRestrictDisplayTitle=false
23640 this is not the the title
23641 {{DISPLAYTITLE:whatever}}
23644 <p>this is not the the title
23649 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23654 wgAllowDisplayTitle=true
23655 wgRestrictDisplayTitle=true
23657 this is not the the title
23658 {{DISPLAYTITLE:whatever}}
23661 <p>this is not the the title
23666 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23671 wgAllowDisplayTitle=true
23672 wgRestrictDisplayTitle=true
23674 this is not the the title
23675 {{DISPLAYTITLE:screen}}
23678 <p>this is not the the title
23683 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23688 wgAllowDisplayTitle=false
23690 this is not the the title
23691 {{DISPLAYTITLE:screen}}
23694 <p>this is not the the title
23695 <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>
23700 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23705 wgAllowDisplayTitle=false
23707 this is not the the title
23710 <p>this is not the the title
23715 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23720 wgAllowDisplayTitle=true
23721 wgRestrictDisplayTitle=true
23723 this is not the the title
23724 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23726 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23727 <p>this is not the the title
23732 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23737 wgAllowDisplayTitle=true
23738 wgRestrictDisplayTitle=true
23740 this is not the the title
23741 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23743 <span style="color: red;">s</span>creen
23744 <p>this is not the the title
23749 Page status indicators: Empty name is invalid
23753 <indicator name=" "></indicator>
23754 <indicator></indicator>
23756 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23757 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23762 Page status indicators: Weird syntaxes that are okay
23766 <indicator name="empty" />
23767 <indicator name="name"></indicator>
23776 Page status indicators: Torture test
23780 <indicator name="01">hello world</indicator>
23781 <indicator name="02">[[Main Page]]</indicator>
23782 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23783 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23784 <indicator name="05">*foo
23786 <indicator name="06"><nowiki>foo</nowiki></indicator>
23787 <indicator name="07"> Preformatted</indicator>
23788 <indicator name="08"><div>Broken tag</indicator>
23789 <indicator name="09">{| class=wikitable
23792 <indicator name="10">Two
23794 paragraphs</indicator>
23797 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23798 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" />
23799 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>
23800 05=<ul><li>foo</li>
23804 07=<pre>Preformatted
23806 08=<div>Broken tag</div>
23808 09=<table class="wikitable">
23825 preload: check <noinclude> and <includeonly>
23829 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23835 preload: check <onlyinclude>
23839 Goodbye <onlyinclude>Hello world</onlyinclude>
23845 preload: can pass tags through if we want to
23849 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23851 <includeonly>Hello world</includeonly>
23855 preload: check that it doesn't try to do tricks
23859 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23861 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23865 Play a bit with r67090 and T5158
23867 <div style="width:50% !important"> </div>
23868 <div style="width:50% !important"> </div>
23869 <div style="width:50% !important"> </div>
23870 <div style="border : solid;"> </div>
23872 <div style="width:50% !important"> </div>
23873 <div style="width:50% !important"> </div>
23874 <div style="width:50% !important"> </div>
23875 <div style="border : solid;"> </div>
23878 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23879 <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>
23880 <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>
23881 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23886 HTML5 data attributes
23888 <span data-foo="bar">Baz</span>
23889 <p data-abc-def_hij="">Quuz</p>
23891 <p><span data-foo="bar">Baz</span>
23893 <p data-abc-def_hij="">Quuz</p>
23896 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23897 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23901 Strip reserved data attributes
23903 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23905 <div data-ok="fred">d</div>
23908 <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>
23912 percent-encoding and + signs in internal links (T28410)
23914 [[User:+%]] [[Page+title%]]
23915 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23916 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23917 [[%33%45]] [[%33%45+]]
23919 <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>
23920 <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>
23921 <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>
23922 <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>
23925 <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>
23926 <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>
23927 <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>
23928 <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>
23932 Special characters in embedded file links (T29679)
23934 [[File:Contains & ampersand.jpg]]
23935 [[File:Does not exist.jpg|Title with & ampersand]]
23937 <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>
23938 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23941 <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>
23942 <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>
23946 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23948 Text's been normalized?
23950 <p>Text's been normalized?
23955 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23957 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23959 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23964 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23966 [http://www.example.org/ ideograms]
23968 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23973 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
23975 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
23977 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24001 T33098 Template which includes system messages which includes the template
24005 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24006 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24011 T33490 Turkish: ucfirst 'blah'
24022 T33490 Turkish: ucfirst 'ix'
24033 T33490 Turkish: lcfirst 'BLAH'
24044 T33490 Turkish: ucfırst (with a dotless i)
24050 <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>
24055 T33490 ucfırst (with a dotless i) with English language
24061 <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>
24065 # Note that Parsoid doesn't emit an explicit TOC.
24066 # Note also that the html2wt direction tends to emit an extra newline
24067 # between the __TOC__ magicword and the first heading unless *both*
24068 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24072 T28375: TOC with italics
24074 title=[[Main Page]]
24077 ==''Lost'' episodes==
24079 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24081 <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>
24085 <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>
24088 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24089 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24093 T28375: TOC with bold
24095 title=[[Main Page]]
24098 =='''should be bold''' then normal text==
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="#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>
24106 <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>
24109 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24110 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24114 T35845: Headings become cursive in TOC when they contain an image
24116 title=[[Main Page]]
24119 ==Image [[Image:foobar.jpg]]==
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="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24127 <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>
24130 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24131 <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>
24135 T35845 (2): Headings become bold in TOC when they contain a blockquote
24137 title=[[Main Page]]
24140 ==<blockquote>Quote</blockquote>==
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="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24148 <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>
24151 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24153 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24157 <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>
24159 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24160 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24164 Unclosed tags in TOC
24166 wgFragmentMode=[ 'html5', 'legacy' ]
24168 title=[[Main Page]]
24172 <small>Hanc marginis exiguitas non caperet.</small>
24175 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24177 <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>
24181 <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>
24182 <p><small>Hanc marginis exiguitas non caperet.</small>
24186 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24187 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24188 <p><small>Hanc marginis exiguitas non caperet.</small>
24193 Multiple tags in TOC
24196 ==<i>Foo</i> <b>Bar</b>==
24198 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24200 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24202 <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>
24203 <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>
24207 <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>
24208 <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>
24211 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24213 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
24214 <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>
24218 <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>
24219 <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>
24221 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24222 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24224 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24227 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24228 # html5 tag parsing.
24230 Tags with parameters in TOC
24235 ==<sup class="in-h2">Hello</sup>==
24237 ==<sup class="a > b">Evilbye</sup>==
24239 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24241 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24242 <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>
24246 <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>
24247 <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>
24250 <meta property="mw:PageProp/toc" />
24251 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24253 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24257 span tags with directionality in TOC
24260 ==<span dir="ltr">C++</span>==
24262 ==<span dir="rtl">זבנג!</span>==
24264 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24266 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24268 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24270 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24272 <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>
24273 <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>
24274 <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>
24275 <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>
24276 <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>
24280 <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>
24281 <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>
24282 <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>
24283 <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>
24284 <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>
24287 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24288 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24289 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24290 <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>
24291 <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>
24292 <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>
24296 T74884: bdi element in ToC
24299 ==<bdi>test</bdi>==
24301 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24303 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24307 <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>
24310 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24311 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24315 T35715: s/strike element in ToC
24318 ==<s>test</s> test <strike>test</strike>==
24320 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24322 <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>
24326 <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>
24329 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24330 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24334 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24339 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24341 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24345 <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>
24348 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24349 <h2 id="x" data-parsoid='{}'>x</h2>
24355 == {{int:headline_sample}} ==
24359 T34057: Title needed when expanding <h> nodes.
24361 title=[[Main Page]]
24365 <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>
24370 Strip marker in urlencode
24372 {{urlencode:x<nowiki/>y}}
24373 {{urlencode:x<nowiki/>y|wiki}}
24374 {{urlencode:x<nowiki/>y|path}}
24375 {{urlencode:x<pre id="one">two</pre>y}}
24403 Strip marker in formatNum
24405 {{formatnum:1<nowiki/>2}}
24406 {{formatnum:1<nowiki/>2|R}}
24414 Check noCommafy in formatNum
24418 {{formatnum:123456.78}}
24419 {{formatnum:123456.78|NOSEP}}
24427 Wrong option for formatNum (T58199)
24429 {{formatnum:1,234.56|Random}}
24430 {{formatnum:1,234.56|EVERYTHING}}
24431 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24440 Strip marker in grammar
24444 {{grammar:elative|foo<nowiki/>bar}}
24451 Strip marker in padleft
24453 {{padleft:|2|x<nowiki/>y}}
24460 Strip marker in padright
24462 {{padright:|2|x<nowiki/>y}}
24469 Strip marker in anchorencode
24471 {{anchorencode:x<nowiki/>y}}
24476 <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>
24480 nowiki inside link inside heading (T20295)
24482 ==[[foo|x<nowiki>y</nowiki>z]]==
24484 <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>
24489 new support for bdi element (T33817)
24491 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24493 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24498 Ignore pipe between table row attributes
24502 |- id=foo | style='color: red'
24510 <tr id="foo" style="color: red">
24517 Language parser function
24526 Padleft and padright (default 0-padding)
24535 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24536 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24540 Padleft and padright (partial fill)
24542 {{padleft:xyz|6|ab}}
24543 {{padright:xyz|6|ab}}
24549 <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>
24550 <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>
24554 Padleft and padright as substr
24556 {{padleft:|3|abcde}}
24557 {{padright:|3|abcde}}
24563 <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>
24564 <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>
24568 Special parser function
24570 {{#special:RandomPage}}
24571 {{#special:BaDtItLe}}
24572 {{#special:Foobar}}
24581 T36939 - Case insensitive link parsing ([HttP://])
24583 [HttP://MediaWiki.Org/]
24585 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24588 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24592 T36939 - Case insensitive link parsing ([HttP:// title])
24594 [HttP://MediaWiki.Org/ MediaWiki]
24596 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24601 T36939 - Case insensitive link parsing (HttP://)
24603 HttP://MediaWiki.Org/
24605 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24608 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24626 <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>
24627 <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>
24628 <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>
24629 <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>
24630 <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>
24636 ### Parsoid-specific tests
24637 ### Parsoid-PHP parser incompatibilities
24640 1. SOL-sensitive wikitext tokens as template-args
24642 parsoid=wt2html,wt2wt
24648 <span about="#mwt1" typeof="mw:Transclusion">
24649 </span><ul about="#mwt1"><li>a</li>
24651 <span about="#mwt2" typeof="mw:Transclusion">
24652 </span><ol about="#mwt2"><li>a</li>
24654 <span about="#mwt3" typeof="mw:Transclusion">
24655 </span><dl about="#mwt3"><dd>a</dd>
24659 #### -----------------------------------------------------------------
24660 #### Parsoid-specific functionality tests
24661 #### -----------------------------------------------------------------
24663 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24664 # We know wt2wt will fail, but we expect selser to pass.
24665 # Due to the nature of our testing, wt2wt and selser tests will enter the
24666 # blacklist and we'll catch selser regressions based on changes to the
24667 # blacklist entries for selser tests.
24669 1. Bad treebuilder fixup of formatting elt is cleaned up
24671 parsoid=wt2html,wt2wt
24676 [[Image:Foobar.jpg|right|Test]]
24683 <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>
24690 2. Bad treebuilder fixup of formatting elt is cleaned up
24692 parsoid=wt2html,wt2wt
24694 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24696 <small>[[Image:Foobar.jpg|right|300px]]</small>
24700 <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>
24702 <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>
24706 3. Bad treebuilder fixup of formatting elt is cleaned up
24708 parsoid=wt2html,wt2wt
24710 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24712 <p><small><b>foo</b></small></p>
24713 <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>
24714 <p><small><b>bar</b></small></p>
24718 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24720 parsoid=wt2html,wt2wt
24722 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24724 <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>
24727 #### ----------------------------------------------------------------
24728 #### Parsoid-only testing of Parsoid's impl of LST
24729 #### Not implemented yet, see
24730 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24731 #### ----------------------------------------------------------------
24733 ## We still need to support serializing the older format while content is stored.
24735 LST Sections: Backwards compatibility
24738 "suppressErrors": true,
24739 "modes": ["html2wt"]
24742 <section begin="2011-05-16" />
24743 <section end="2014-04-10 (MW 1.23wmf22)" />
24745 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24746 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24750 LST Sections: Newfangled approach
24752 <section begin="2011-05-16" />
24753 <section end="2014-04-10 (MW 1.23wmf22)" />
24755 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24757 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24761 #--------- Test stripping of empty nodes in template content ----------
24764 Empty LI and TR nodes should be stripped from template content
24769 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24773 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24786 Empty LI and TR nodes should not be stripped from top-level content
24800 <li class='mw-empty-elt'></li>
24805 <tr class='mw-empty-elt'></tr>
24814 Empty TR nodes should not be stripped if they have any attributes set
24816 {{EmptyTRWithHTMLAttrTest}}
24818 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24819 <tr align='center'></tr>
24820 <tr><td>foo</td></tr>
24821 <tr align='center'></tr>
24822 <tr><td>bar</td></tr>
24826 #### ----------------------------------------------------------------
24827 #### The following section of tests are primarily to test
24828 #### wikitext escaping capabilities of Parsoid. Given that
24829 #### escaping can be done any number of ways, the wikitext (input)
24830 #### is always adjusted to reflect how Parsoid adds nowiki
24833 #### We are marking several tests as parsoid-only since the
24834 #### HTML in the result section is different from what the
24835 #### PHP parser generates for it.
24836 #### ----------------------------------------------------------------
24839 #### --------------- Headings ---------------
24841 #### 1. Nested inside html <h1>=foo=</h1>
24842 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24843 #### 3. Nested inside html with wikitext split by html tags
24844 #### 4. No escape needed
24845 #### 5. Empty headings <h1></h1>
24846 #### 6. Heading chars in SOL context
24847 #### ----------------------------------------
24849 Headings: 0. Unnested
24859 <p>=foo<i>a</i>=</p>
24861 <nowiki>=foo=</nowiki>
24863 <nowiki> </nowiki>=foo=
24865 <nowiki>=foo=</nowiki>
24867 =foo''a''<nowiki>=</nowiki>
24870 # New headings and existing headings are handled differently
24872 Headings: 1. Nested inside html
24880 <h1 data-parsoid=''>=foo=</h1>
24881 <h2 data-parsoid=''>=foo=</h2>
24882 <h3 data-parsoid=''>=foo=</h3>
24883 <h4 data-parsoid=''>=foo=</h4>
24884 <h5 data-parsoid=''>=foo=</h5>
24885 <h6 data-parsoid=''>=foo=</h6>
24893 =<nowiki>=foo=</nowiki>=
24894 ==<nowiki>=foo=</nowiki>==
24895 ===<nowiki>=foo=</nowiki>===
24896 ====<nowiki>=foo=</nowiki>====
24897 =====<nowiki>=foo=</nowiki>=====
24898 ======<nowiki>=foo=</nowiki>======
24903 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24912 <nowiki>*</nowiki>bar
24918 <nowiki>=bar=</nowiki>
24922 Headings: 3. Nested inside html with wikitext split by html tags
24926 <h1>=<b>bold</b>foo=</h1>
24928 = ='''bold'''foo= =
24932 Headings: 4a. No escaping needed (testing just h1 and h2)
24943 <h1><i>=</i>foo=</h1>
24963 Headings: 4b. No escaping needed (inside p-tags)
24980 Headings: 4c. Short headings (1)
24987 <nowiki>===</nowiki>
24993 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
24995 Headings: 4d. Short headings (2)
24997 parsoid=wt2html,html2html
25008 <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>
25009 <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>
25010 <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>
25015 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25016 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25017 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25021 Headings: 5. Empty headings
25025 <h1 data-parsoid='{}'></h1>
25027 <h2 data-parsoid='{}'></h2>
25029 <h3 data-parsoid='{}'></h3>
25031 <h4 data-parsoid='{}'></h4>
25033 <h5 data-parsoid='{}'></h5>
25035 <h6 data-parsoid='{}'></h6>
25045 =====<nowiki/>=====
25047 ======<nowiki/>======
25051 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25061 <nowiki>=a=</nowiki>
25063 <nowiki>=a=</nowiki>
25065 <nowiki>=a=</nowiki>
25069 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25082 <nowiki>=a=</nowiki>
25085 <nowiki>=a=</nowiki>
25088 <nowiki>=a=</nowiki>
25093 Headings: 6c. Heading chars in SOL context (leading newline break)
25101 <nowiki>=b=</nowiki>
25105 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25109 <!--c0--><p>=a=</p>
25111 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25113 <!--c0--><nowiki>=a=</nowiki>
25115 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25119 Headings: 6d. Heading chars in SOL context (No escaping needed)
25129 Headings: 7. Insert a newline between new content and headings
25135 <h2 data-parsoid='{}'>A</h2>
25136 <p data-parsoid='{}'>a</p>
25147 Headings: Used as horizontal rule
25149 wgFragmentMode=[ 'html5', 'legacy' ]
25155 <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>
25158 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25161 #### --------------- Lists ---------------
25162 #### 0. Outside nests (*foo, etc.)
25163 #### 1. Nested inside html <ul><li>*foo</li></ul>
25164 #### 2. Inside definition lists
25165 #### 3. Only bullets at start should be escaped
25166 #### 4. No escapes needed
25167 #### 5. No unnecessary escapes
25168 #### 6. Escape bullets in SOL position
25169 #### 7. Escape bullets in a multi-line context
25170 #### ----------------------------------------
25173 Lists: 0. Outside nests
25183 <nowiki>*</nowiki>foo
25185 <nowiki>#</nowiki>foo
25187 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25190 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25191 ## to test wikitext escaping, and insignificant whitespace diffs
25192 ## cause PHP parser tests to barf
25194 Lists: 1. Nested inside html (No unnecessary escapes)
25203 <li data-parsoid='{}'>*foo</li>
25204 <li data-parsoid='{}'>#foo</li>
25205 <li data-parsoid='{}'>:foo</li>
25206 <li data-parsoid='{}'>;foo</li>
25214 <li data-parsoid='{}'>*foo</li>
25215 <li data-parsoid='{}'>#foo</li>
25216 <li data-parsoid='{}'>:foo</li>
25217 <li data-parsoid='{}'>;foo</li>
25224 *<nowiki>*foo</nowiki>
25225 *<nowiki>#foo</nowiki>
25226 *<nowiki>:foo</nowiki>
25227 *<nowiki>;foo</nowiki>
25233 #<nowiki>*foo</nowiki>
25234 #<nowiki>#foo</nowiki>
25235 #<nowiki>:foo</nowiki>
25236 #<nowiki>;foo</nowiki>
25240 Lists: 2. Inside definition lists
25244 <dl><dt>;foo</dt></dl>
25245 <dl><dt>:foo</dt></dl>
25248 <dl><dd>:foo</dd></dl>
25252 ; <nowiki>:foo</nowiki>
25254 ; <nowiki>:foo</nowiki>
25261 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25267 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25271 *<nowiki>*foo</nowiki>''it''*bar
25275 Lists: 4. No escapes needed
25288 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25292 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25306 Lists: 5. No unnecessary escapes
25310 <ul><li> bar <span>[[foo]]</span></li></ul>
25311 <ul><li> =bar <span>[[foo]]</span></li></ul>
25312 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25313 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25314 <ul><li> =bar <span>foo]]</span>=</li></ul>
25315 <ul><li> <s></s>: a</li></ul>
25316 <ul><li> <i>* foo</i></li></ul>
25319 * bar <span><nowiki>[[foo]]</nowiki></span>
25321 * =bar <span><nowiki>[[foo]]</nowiki></span>
25323 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25325 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25327 * =bar <span>foo]]</span>=
25335 Lists: 6. Escape bullets in SOL position
25339 <p><!--cmt-->*foo</p>
25341 <!--cmt--><nowiki>*</nowiki>foo
25345 Lists: 7. Escape bullets in a multi-line context
25354 <nowiki>*</nowiki>b
25358 Lists: 8. Escape colons only if not present in tags
25362 <dl><dt>a:b<i>c:d</i></dt></dl>
25364 ; <nowiki>a:b</nowiki>''c:d''
25367 #### --------------- HRs ---------------
25368 #### 1. Single line
25369 #### -----------------------------------
25372 HRs: 1. Single line
25380 ----<nowiki>----</nowiki>
25385 #### --------------- Tables ---------------
25386 #### 1a. Simple example
25387 #### 1b. No escaping needed (!foo)
25388 #### 1c. No escaping needed (|foo)
25389 #### 1d. No escaping needed (|}foo)
25391 #### 2a. Nested in td (<td>foo|bar</td>)
25392 #### 2b. Nested in td (<td>foo||bar</td>)
25393 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25395 #### 3a. Nested in th (<th>foo!bar</th>)
25396 #### 3b. Nested in th (<th>foo!!bar</th>)
25397 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25401 #### 4c. No escaping needed
25402 #### --------------------------------------
25405 Tables: 1a. Simple example
25413 <nowiki>{|</nowiki>
25418 Tables: 1b. No escaping needed
25429 Tables: 1c. No escaping needed
25440 Tables: 1d. No escaping needed
25451 Tables: 2a. Nested in td
25456 <td>foo|bar</td></tr>
25457 <tr><td>x<div>a|b</div></td>
25461 |<nowiki>foo|bar</nowiki>
25463 |x<div><nowiki>a|b</nowiki></div>
25471 <td>x<div>a|b</div>
25472 </td></tr></tbody></table>
25476 Tables: 2b. Nested in td
25482 <td>a<i>b||c</i></td>
25483 <td>a<i><div>b||c</div></i></td>
25484 </tr></tbody></table>
25487 |<nowiki>foo||bar</nowiki>
25488 |a''<nowiki>b||c</nowiki>''
25489 |a''<div><nowiki>b||c</nowiki></div>''
25498 <td>a<i><div>b||c</div></i>
25504 Tables: 2c. Nested in td -- no escaping needed
25520 Tables: 3a. Nested in th
25536 Tables: 3b. Nested in th
25541 <tr><th>foo!!bar</th>
25542 <th><i>foo|bar</i></th>
25543 <th><i>foo!!bar</i></th>
25544 <th><i><span>foo!!bar</span></i></th>
25545 </tr></tbody></table>
25548 !<nowiki>foo!!bar</nowiki>
25549 !''<nowiki>foo|bar</nowiki>''
25550 !''<nowiki>foo!!bar</nowiki>''
25551 !''<span><nowiki>foo!!bar</nowiki></span>''
25560 <th><i>foo!!bar</i>
25562 <th><i><span>foo!!bar</span></i>
25568 Tables: 3c. Nested in th
25573 <tr><th>foo||bar</th>
25574 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25575 </tr></tbody></table>
25578 !<nowiki>foo||bar</nowiki>
25579 !<nowiki>foo||bar</nowiki>
25592 Tables: 4a. Escape -
25608 |<nowiki>-bar</nowiki>
25613 Tables: 4b. Escape +
25629 |<nowiki>+bar</nowiki>
25634 Tables: 4c. No escaping needed
25639 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25640 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25646 <div>a|b</div></td>
25691 Tables: 4d. No escaping needed
25696 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25697 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25698 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25709 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25719 T97430: Don't emit empty nowiki pairs around marker meta tags
25723 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25724 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25726 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25727 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25731 Unclosed xmlish element in table line shouldn't eat end delimiters
25736 <tbody><tr><td> <foo</td>
25737 <td> bar></td></tr>
25754 #### --------------- Links ----------------
25755 #### 1. Quote marks in link text
25756 #### 2. Wikilinks: Escapes needed
25757 #### 3. Wikilinks: No escapes needed
25758 #### 4. Extlinks: Escapes needed
25759 #### 5. Extlinks: No escapes needed
25760 #### --------------------------------------
25762 Links 1. WikiLinks: No escapes needed
25766 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25767 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25768 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25772 [[Foo|x [Foobar] x]]
25774 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25775 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25776 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25781 Links 2. WikiLinks: Escapes needed
25785 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25786 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25787 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25788 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25789 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25790 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25791 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25792 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25793 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25794 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25796 [[Foo|<nowiki>Foobar]</nowiki>]]
25797 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25798 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25799 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25800 [[Foo|<nowiki>|Bar</nowiki>]]
25801 [[Foo|<nowiki>]]bar</nowiki>]]
25802 [[Foo|<nowiki>[[bar</nowiki>]]
25803 [[Foo|<nowiki>x [[ y</nowiki>]]
25804 [[Foo|<nowiki>x ]] y</nowiki>]]
25805 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25807 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25808 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25809 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25810 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25811 <a href="/wiki/Foo" title="Foo">|Bar</a>
25812 <a href="/wiki/Foo" title="Foo">]]bar</a>
25813 <a href="/wiki/Foo" title="Foo">[[bar</a>
25814 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25815 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25816 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25821 Links 3. WikiLinks: No escapes needed
25825 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25826 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25831 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25832 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25837 Links 4. ExtLinks: Escapes needed
25841 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25842 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25843 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25844 <p>[http://google.com]</p>
25845 <p>[http://google.com google]</p>
25846 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25847 <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>
25849 [http://google.com <nowiki>[google]</nowiki>]
25850 [http://google.com <nowiki>google]</nowiki>]
25851 [http://google.com <nowiki>goog] le</nowiki>]
25853 <nowiki>[http://google.com]</nowiki>
25855 <nowiki>[http://google.com google]</nowiki>
25857 [http://google.com<nowiki>]</nowiki>
25859 [{{echo|http://google.com}}<nowiki>]</nowiki>
25861 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25862 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25863 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25864 </p><p>[http://google.com]
25865 </p><p>[http://google.com google]
25866 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25867 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25872 Links 5. ExtLinks: No escapes needed
25876 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25877 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25879 [http://google.com [google]
25881 [[http://google.com]]
25883 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25884 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25889 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25893 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25894 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25895 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25896 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25897 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25898 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25899 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25900 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25901 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25902 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25903 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25904 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25905 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25908 x<nowiki/>http://example.com<nowiki/>y
25909 http://example.com<nowiki/>?x
25910 http://example.com<nowiki/>&x
25911 http://example.com<nowiki/>'x
25912 http://example.com<nowiki/>,x
25913 http://example.com<nowiki/>.x
25914 http://example.com<nowiki/>;x
25915 http://example.com<nowiki/>:x
25916 http://example.com<nowiki/>;x
25917 http://example.com<nowiki/>!x
25918 http://example.com<nowiki/>=x
25919 http://example.com<nowiki/>(x)
25920 http://example.com(x<nowiki/>)
25924 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25929 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25931 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25932 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25933 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25934 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25935 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25941 "http://example.com"
25942 (http://example.com)
25943 (http://example.com) foo
25944 http://example.com,
25945 http://example.com, foo
25948 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25950 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25951 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25952 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25953 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25954 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25959 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25963 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
25964 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
25966 http://example.com.,;:!?\
25967 -http://example.com:
25969 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
25970 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
25975 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
25979 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
25980 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
25981 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
25985 X<nowiki/>RFC 123<nowiki/>y
25989 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
25993 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
25994 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
25995 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26002 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26003 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26004 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26009 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26013 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26014 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26015 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26019 X<nowiki/>PMID 123<nowiki/>y
26023 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26027 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26028 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26029 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26036 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26037 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26038 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26043 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26047 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26048 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26049 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26052 ISBN 1234567890<nowiki/>1
26053 ISBN 1234567890<nowiki/>x
26054 a<nowiki/>ISBN 1234567890<nowiki/>b
26058 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26062 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26066 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26071 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26075 <p>this is not a link: http://example.com
26078 this is not a link: <nowiki>http://example.com</nowiki>
26082 Links 15. Link trails can't become link prefixes.
26087 <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>
26089 [[Söfnuður]]-[[00]]
26091 <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>
26095 #### --------------- Quotes ---------------
26096 #### 1. Quotes inside <b> and <i>
26097 #### 2. Link fragments separated by <i> and <b> tags
26098 #### 3. Link fragments inside <i> and <b>
26099 #### 4. No escaping needed
26100 #### --------------------------------------
26102 1a. Quotes inside <b> and <i>
26113 <b>foo'<i>bar'</i>baz</b>
26122 <i>fools'<span> errand</span></i>
26123 <i><span>fool</span>'s errand</i>
26124 '<i>foo</i> bar '<i>baz</i>
26125 a|!*#-:;+-~[]{}b'<i>x</i>
26129 ''<nowiki>''foo''</nowiki>''
26130 ''<nowiki>'''foo'''</nowiki>''
26132 '''<nowiki/>'foo''''
26133 '''<nowiki>''foo''</nowiki>'''
26134 '''<nowiki>'''foo'''</nowiki>'''
26135 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26136 '''foo'''<nowiki/>'s
26142 '''foo'''<nowiki/>'
26143 ''''foo'''<nowiki/>'
26144 ''fools'<span> errand</span>''
26145 ''<span>fool</span>'s errand''
26146 '<nowiki/>''foo'' bar '''baz''
26147 a|!*#-:;+-~[]{}b'''x''
26151 1b. Quotes inside <b> and <i> with other tags on same line
26155 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26156 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26157 <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>
26158 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26159 '<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>
26160 '<i>foo</i> <div title="name">test</div>
26161 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26162 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26163 <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>
26166 '''a'' foo ''[[bar]]''
26167 ''a''' foo ''[[bar]]''
26168 ''a''' foo '''{{echo|[[bar]]}}'''
26169 [[foo]] x'''[[bar]]''
26170 '''foo'' <ref>test</ref>
26171 '''foo'' <div title="name">test</div>
26172 '''foo'' and <br> bar
26177 2. Link fragments separated by <i> and <b> tags
26181 <p>[[<i>foo</i>hello]]</p>
26182 <p>[[<b>foo</b>hello]]</p>
26184 [[''foo''<nowiki>hello]]</nowiki>
26186 [['''foo'''<nowiki>hello]]</nowiki>
26189 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26190 # this is one of the shortcomings of this format
26192 3. Link fragments inside <i> and <b>
26196 <p><i>[[foo</i>]]</p>
26197 <p><b>[[foo</b>]]</p>
26199 ''[[foo''<nowiki>]]</nowiki>
26201 '''[[foo'''<nowiki>]]</nowiki>
26205 4. No escaping needed
26209 <p>'<span><i>bar</i></span>'
26210 '<span><b>bar</b></span>'
26214 '<span>''bar''</span>'
26215 '<span>'''bar'''</span>'
26219 #### ----------- Paragraphs ---------------
26220 #### 1. No unnecessary escapes
26221 #### --------------------------------------
26224 1. No unnecessary escapes
26228 <p>bar <span>[[foo]]</span>
26229 </p><p>=bar <span>[[foo]]</span>
26230 </p><p>[[bar <span>[[foo]]</span>
26231 </p><p>]]bar <span>[[foo]]</span>
26232 </p><p>=bar <span>foo]]</span>=
26235 bar <span><nowiki>[[foo]]</nowiki></span>
26237 =bar <span><nowiki>[[foo]]</nowiki></span>
26239 [[bar <span><nowiki>[[foo]]</nowiki></span>
26241 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26243 =bar <span>foo]]</span><nowiki>=</nowiki>
26246 #### ----------------------- PRE --------------------------
26247 #### 1. Leading whitespace in SOL context should be escaped
26248 #### ------------------------------------------------------
26250 1. Leading whitespace in SOL context should be escaped
26273 <nowiki> </nowiki>a
26275 <nowiki> </nowiki> a
26279 <nowiki> </nowiki> a
26281 <nowiki> </nowiki>a
26284 <nowiki> </nowiki>b
26307 2. Leading whitespace in non-indent-pre contexts should not be escaped
26311 <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>
26312 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26313 <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>
26323 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26342 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26346 <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>
26348 [[File:Foobar.jpg|thumb|caption]]
26352 5. Nowiki escaping should account for indent-pres
26362 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26375 #### --------------- Behavior Switches --------------------
26378 1. Valid behavior switches should be escaped
26385 <nowiki>__TOC__</nowiki>
26386 ''<nowiki>__TOC__</nowiki>''
26390 2. Invalid behavior switches should not be escaped
26401 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26403 Behavior switches should be SOL-transparent
26407 <meta property="mw:PageProp/toc" />
26409 <!-- this one's bogus -->
26412 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26414 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26418 <!-- this one's bogus -->
26427 #### --------------- HTML tags ---------------
26430 #### 3. multi-line html tag
26431 #### 4. extension tags
26432 #### -----------------------------------------
26438 <a href="http://google.com">google</a>
26440 <a href="http://google.com">google</a>
26448 <ul><li> <div>foo</div></li>
26449 <li> <div style="color:red">foo</div></li>
26450 <li> <td></li></ul>
26453 * <nowiki><div>foo</div></nowiki>
26454 * <nowiki><div style="color:red">foo</div></nowiki>
26455 * <nowiki><td></nowiki>
26459 3. multi-line html tag
26478 <p><ref>foo</ref>
26479 </p><p><ref>bar
26480 </p><p>baz</ref>
26483 <nowiki><ref>foo</ref></nowiki>
26485 <nowiki><ref>bar</nowiki>
26487 baz<nowiki></ref></nowiki>
26490 #### --------------- Others ---------------
26496 <p><nowiki>foo</nowiki>
26499 <nowiki>foo</nowiki>
26502 ## The quote-char in the input is necessary for triggering the bug
26504 (T54035) Nowiki-escaping should not get tripped by " :" in text
26513 #----------- End of wikitext escaping tests --------------
26517 Tag-like HTML structures are passed through as text
26539 </p><p>1<d e>f
26544 HTML tag with necessary entities in attributes
26546 <span title="&amp;">foo</span>
26548 <p><span title="&amp;">foo</span>
26553 HTML tag with 'unnecessary' entity encoding in attributes
26555 <span title="&">foo</span>
26557 <p><span title="&">foo</span>
26562 HTML tag with broken attribute value quoting
26564 parsoid=wt2html,html2html
26566 <span title="Hello world>Foo</span>
26568 <p><span title="Hello world">Foo</span>
26571 <p><span title="Hello world">Foo</span></p>
26575 Self-closed tag with broken attribute value quoting
26577 parsoid=wt2html,html2html
26579 <div title="Hello world />Foo
26581 <div title="Hello world"></div><p>Foo
26584 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26588 Table with broken attribute value quoting
26590 parsoid=wt2html,html2html
26593 | title="Hello world|Foo
26598 <td title="Hello world">Foo
26604 <td title="Hello world">Foo
26610 Table with broken attribute value quoting on consecutive lines
26612 parsoid=wt2html,html2html
26615 | title="Hello world|Foo
26616 | style="color:red|Bar
26621 <td title="Hello world">Foo
26623 <td style="color:red">Bar
26629 <td title="Hello world">Foo
26630 </td><td style="color: red">Bar
26631 </td></tr></tbody></table>
26636 Accept empty td cell attribute
26639 | align="center" |foo|| |
26644 <td align="center">foo</td>
26651 Non-empty attributes in th-cells
26654 !Foo!! style="color: red" |Bar
26660 <th style="color: red">Bar
26666 Accept empty attributes in th-cells
26681 Empty table rows go away
26702 ### Parsoid-centric tests for testing RTing of inter-element separators
26703 ### Edge cases not tested by existing parser tests and specific to
26704 ### Parsoid-specific serialization strategies.
26708 RT-ed inter-element separators should be valid separators
26720 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26724 # Parsoid-only test of a DOM pass
26726 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26738 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26739 <p>bar</p></small></td></tr>
26743 <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>
26747 # Note that the "style" attribute is really a template parameter here.
26748 # The = would have to be {{=}} if you wanted the literal.
26750 Empty TD followed by TD with tpl-generated attribute
26755 |{{echo|style='color:red'}}|foo
26769 Indented table with an empty td
26787 ## We have some newline diffs RT-ing this edge case
26788 ## and it is not important enough -- we seem to be emitting
26789 ## at most 2 newlines after a </tr> and this is unrelated to
26790 ## the issue from T85627 that this is testing.
26792 Indented table with blank lines in between (T85627)
26811 Indented block & table
26825 <div data-parsoid='{"stx":"html"}'>foo</div>
26827 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26832 Indent and comment before table row
26847 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26848 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26852 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26854 Empty TR followed by a template-generated TR
26860 {{echo|<tr><td>foo</td></tr>}}
26865 <tr class='mw-empty-elt'></tr>
26866 <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}}]}'>
26871 ## PHP and parsoid output differ for this, and since this is primarily
26872 ## for testing Parsoid's serializer, marking this Parsoid only
26874 Empty TR followed by mixed-ws-comment line should RT correctly
26887 <tr class='mw-empty-elt'></tr>
26890 <!--c--> </tr><!--d-->
26896 Multi-line image caption generated by templates with/without trailing newlines
26898 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26899 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26901 <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>
26902 <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>
26906 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26910 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26912 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26914 <includeonly>foo</includeonly>
26922 ## PHP emits broken html for this, and since this is primarily
26923 ## a Parsoid serializer test, marking this Parsoid only
26925 Improperly nested inline or quotes tags with whitespace in between
26927 <span> <s>x</span> </s>
26930 <p><span> <s>x</s></span><s> </s>
26931 <b> <i>x</i></b><i> </i>
26936 Encapsulate protected attributes from wt
26938 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26940 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26944 <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>
26946 <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">
26947 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26951 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26952 ## Having nested or stray pre tags results in the attempt to add duplicates,
26953 ## causing an assertion fail. This test tries to prevent that situation.
26955 Ensure ParagraphWrapper can deal with stray closing pre tags
26965 1. Ensure fostered text content is wrapped in element nodes
26969 <table>hi</table><table>ho</table>
26978 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
26980 parsoid=wt2html,wt2wt
26989 <tbody><tr><td> a</td></tr>
26994 Encapsulation properly handles null DSR information from foster box
26996 parsoid=wt2html,wt2wt
26998 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27000 <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>
27004 1. Encapsulate foster-parented transclusion content
27006 parsoid=wt2wt,wt2html
27008 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27010 <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>
27020 2. Encapsulate foster-parented transclusion content
27022 parsoid=wt2wt,wt2html
27024 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27026 <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>
27037 3. Encapsulate foster-parented transclusion content
27039 parsoid=wt2wt,wt2html
27041 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27043 <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>"]}">
27056 4. Encapsulate foster-parented transclusion content
27058 parsoid=wt2wt,wt2html
27060 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27062 <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>"]}">
27075 5. Encapsulate foster-parented transclusion content
27077 parsoid=wt2wt,wt2html
27079 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27081 <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>
27096 6. Encapsulate foster-parented transclusion content
27098 parsoid=wt2wt,wt2html
27100 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
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</tr></table>"}},"i":0}}]}">foo</p>
27118 7. Encapsulate foster-parented transclusion content
27120 parsoid=wt2wt,wt2html
27122 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27124 <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>
27134 # Note that the wt is broken on purpose: the = should be {{=}} if you
27135 # don't want it to be a template parameter key.
27137 8. Encapsulate foster-parented transclusion content
27139 parsoid=wt2wt,wt2html
27142 }}{|{{echo|style='color:red'}}
27147 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27149 <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>
27160 9. Encapsulate foster-parented transclusion content
27162 parsoid=wt2wt,wt2html
27164 <table>{{echo|hi</table>hello}}
27166 <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>
27170 Table in fosterable position
27181 <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">
27183 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27189 # Parsoid only for T66747
27191 Properly encapsulate empty-content transclusions in fosterable positions
27199 <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"}]]}'>
27205 Always encapsulate foster box when template range is expanded to table
27218 T115289: Unclosed table
27220 {{echo|<table>}}<!--c-->[[Category:Two]]
27222 <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>
27226 T115289: Don't migrate newlines out of tables with fostered content
27228 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27230 <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>
27234 T73074: More fostering fun
27236 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27238 <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>
27242 Support <object> element with .data attribute
27246 <object data="test.swf"></object>
27248 <object data="test.swf"></object>
27252 Don't block XML namespace declaration
27254 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27256 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27259 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27262 # -----------------------------------------------------------------
27263 # The following section of tests are primarily to spec requirements
27264 # around Parsoid's serialization (old, new, edited content)
27266 # All these tests are marked Parsoid html2wt and html2html only
27267 # ----------------------------------------------------------------
27270 Ignore rel attribute in a-tags during serialization to url-links
27274 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27275 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27276 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27278 http://en.wikipedia.org/wiki/Foobar
27279 http://en.wikipedia.org/wiki/Foobar
27280 http://en.wikipedia.org/wiki/Foobar
27283 # 'mi' is a localinterwiki prefix as well as a language
27285 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27289 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27295 Parsoid should accept interwiki shortcuts
27299 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27300 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27301 <a href='./fr:Foo'>Foo</a></p>
27302 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27303 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27304 <a href='fr%3AFoo'>Foo</a></p>
27305 <p><a href='FR%3AFoo'>Foo</a>
27306 <a href='./FR:Foo'>Foo</a></p>
27321 Parsoid should not accept invalid interwiki shortcuts
27325 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27326 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27327 <a href='news:Foo'>Foo</a></p>
27336 New wikilinks should be serialized properly
27340 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27341 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27342 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27343 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27344 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27348 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27349 http://en.wikipedia.org/wiki/Foo
27350 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27354 New wiki links (href variations)
27358 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27359 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27360 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27361 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27366 [[Toxine bactérienne]]
27370 New wiki links (content string variations)
27374 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27375 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27376 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27380 [[Foo_bar|./Foo_bar]]
27384 New category links (href variations)
27388 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27389 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27390 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27392 [[Category:Toxine bactérienne]]
27393 [[Category:Toxine bactérienne]]
27394 [[Category:Toxine bactérienne]]
27398 New sol transparent links don't need indent-pre nowiki protection
27403 <link rel="mw:PageProp/redirect" href="./Main_Page">
27404 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27405 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27407 #WEITERLEITUNG [[Main Page]]
27408 <!-- this is good --> [[Category:Good]]
27409 <!-- this is great --> [[Kategorie:Great]]
27413 New interlanguage links (href variations)
27417 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27418 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27419 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27421 [[es:Toxine bactérienne]]
27422 [[es:Toxine_bactérienne]]
27423 [[es:Toxine_bactérienne]]
27427 Image: Modifying size of an image (1)
27430 "modes": ["wt2wt"],
27432 ["img[height]", "attr", "height", "22"],
27433 ["img[width]", "attr", "width", "200"]
27437 [[Image:Foobar.jpg|230x230px]]
27439 [[Image:Foobar.jpg|200x200px]]
27443 Image: Modifying size of an image (2)
27446 "modes": ["wt2wt"],
27448 ["img[height]", "attr", "height", "100"],
27449 ["img[width]", "attr", "width", "500"]
27453 [[Image:Foobar.jpg|230x230px]]
27455 [[Image:Foobar.jpg|500x500px]]
27458 # Change in size is ignored so long as class='mw-default-size'
27460 Image: Modifying size of an image (3)
27463 "modes": ["wt2wt"],
27465 ["figure[class]", "removeClass", "mw-default-size"],
27466 ["figure img", "attr", "height", "19"],
27467 ["figure img", "attr", "width", "170"]
27471 [[Image:Foobar.jpg|thumb]]
27473 [[Image:Foobar.jpg|thumb|170x170px]]
27477 Image: Modifying alignment of an image (T50665)
27480 "modes": ["wt2wt"],
27482 ["figure[class]", "removeClass", "mw-halign-right"],
27483 ["figure[class]", "addClass", "mw-halign-left"]
27487 [[Image:Foobar.jpg|thumb|caption|right]]
27489 [[Image:Foobar.jpg|thumb|caption|left]]
27493 Image: Modifying mw-default-size of an frameless image (T64805)
27496 "modes": ["wt2wt"],
27498 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27502 [[Image:Foobar.jpg|frameless|right]]
27504 [[Image:Foobar.jpg|frameless|right|220x220px]]
27508 Image: Modifying valign of an image (T51221)
27511 "modes": ["wt2wt"],
27513 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27514 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27518 [[File:Foobar.jpg|20px|middle]]
27520 [[File:Foobar.jpg|20px|text-top]]
27524 Image: Modifying alt attribute of an image (T58400)
27527 "modes": ["wt2wt"],
27529 ["img[alt]", "attr", "alt", "some alternate edited text"]
27533 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27535 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27539 Image: Modifying caption of an image
27542 "modes": ["wt2wt"],
27544 ["figcaption", "text", "new caption"]
27548 [[Image:Foobar.jpg|thumb|original caption]]
27550 [[Image:Foobar.jpg|thumb|new caption]]
27554 Image: empty alt attribute (T50924)
27558 [[File:Foobar.jpg|thumb|alt=|bar]]
27560 <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>
27564 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27570 <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>
27572 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27576 Image: Block level image should have \n before and after
27579 [[File:Foobar.jpg|right|thumb|150x150px]]
27583 <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>
27588 Image: New block level image should have \n before and after (existing content)
27591 [[File:Foobar.jpg|right|thumb|150x150px]]
27595 <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>
27600 Image: upright option (parsoid)
27602 [[File:Foobar.jpg|thumb|upright|caption]]
27603 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27604 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27606 <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>
27607 <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>
27608 <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>
27612 Image: upright option is ignored on inline and frame images (parsoid)
27614 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27616 <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>
27620 Image: in template parameter with empty parameter
27622 {{echo|[[File:Foobar.jpg|link=]]}}
27624 <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>
27628 Image: from basic HTML (1)
27632 <span typeof="mw:Image">
27633 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27636 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27640 Image: from basic HTML (2)
27644 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27646 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27650 Image: from basic HTML (3)
27654 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27656 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27660 Image: from basic HTML (4)
27664 <img src="./File:Foobar.jpg">
27666 [[File:Foobar.jpg|link=]]
27670 Image: Invalid title as link
27672 [[File:Foobar.jpg|link=<]]
27674 <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>
27677 <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>
27681 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27686 <li><p>foo</p></li>
27693 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27697 <ul> <li>foo</li></ul>
27703 Don't strip leading whitespace when handling indent-pre suppressing tags
27708 <tr><td> indented row</td></tr>
27711 <b>This is very bold of you!</b>
27714 indented cell (no pre-wrapping!)
27724 '''This is very bold of you!'''
27728 indented cell (no pre-wrapping!)
27736 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27758 <nowiki> </nowiki></span>bar2
27761 <nowiki> </nowiki><span>bar</span>
27764 <nowiki> </nowiki><span>foo</span>
27769 Lists: Dont insert newlines in a serialized list item.
27773 <ul><li>a<br>b</li><li>c</li></ul>
27780 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27783 "modes": ["html2wt"],
27784 "scrubWikitext": false
27787 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27788 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27790 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27791 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27793 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27795 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27797 == hello there [[Category:A1]] ==
27799 == [[Category:A2]] hi pal ==
27801 == <!--foo--> [[Category:A3]] how goes it ==
27803 == it goes well [[Category:A4]] <!--bar--> ==
27805 ==howdy [[Category:A5]]==
27811 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27814 "modes": ["html2wt"],
27815 "scrubWikitext": true
27818 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27819 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27821 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27822 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27824 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27832 <!--foo--> [[Category:A3]]
27837 [[Category:A4]] <!--bar-->
27845 Headings: Don't hoist metas that come from templates
27848 "modes": ["html2wt"],
27849 "scrubWikitext": true
27852 <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>
27854 == {{echo|foo [[Category:Foo]]}} ==
27858 Headings: Category in ref isn't hoisted
27861 "modes": ["html2wt"],
27862 "scrubWikitext": true
27865 <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>
27867 <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>
27870 [[Category:Baz]] </ref> ==
27876 Parsoid: Serialize positional parameters with = in them as named parameter
27880 <p about="#mwt1" typeof="mw:Transclusion"
27881 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27883 <p about="#mwt1" typeof="mw:Transclusion"
27884 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27886 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27887 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27888 <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>
27892 {{echo|1=f=oo|2=bar}}
27894 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27895 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27896 {{echo|<nowiki>f=oo</nowiki>|bar}}
27900 Parsoid: Serialize positional parameters with = in extlink as named parameter
27904 <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>
27906 {{echo|1=http://stuff?is=ok}}
27910 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27914 <div>a<p>b</p></div>
27935 Substrings resembling wikitext in hrefs should not get nowiki escapes
27939 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27945 Enforce single-line context in the serializer
27952 <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">
27953 </span><span about="#mwt1">you</span> </h2>
27955 <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>
27957 <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
27958 there</span></li></ol>
27970 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
27977 </tbody></table></dd></dl>
27981 == hi {{bogus|there
27992 * foo '''bar''' baz
28004 Serialize new placeholder space without spans
28008 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28010 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28012 <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>
28018 <ref>foo : bar</ref>ok
28022 #-----------------------
28023 # Tag minimization tests
28024 #-----------------------
28027 1. I/B quote minimization: wikitext-only tags should be combined
28031 <p><i>A</i><i>B</i></p>
28032 <p><b>A</b><b>B</b></p>
28033 <p><i>A</i><b><i>B</i></b></p>
28034 <p><b>A</b><i><b>B</b></i></p>
28035 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28036 <p><i><b>A</b></i><i><b>B</b></i></p>
28037 <p><i><b>A</b></i><b><i>B</i></b></p>
28038 <p><b><i>A</i></b><i><b>B</b></i></p>
28058 2. I/B quote minimization: wikitext and html tags should not be combined
28062 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28063 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28067 ''A''<nowiki/>'''<i>B</i>'''
28071 3. I/B quote minimization: templated content stops minimization
28075 <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>
28076 <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>
28078 ''A''{{echo|''B''}}
28080 ''A''{{echo|'''''B'''''}}
28084 4. I/B quote minimization: new content should be mimimized with adjacent old content
28088 <p><i>A</i><i>B</i></p>
28089 <p><b>A</b><b>B</b></p>
28090 <p><i>A</i><b><i>B</i></b></p>
28100 5a. Merge adjacent quote nodes if they've been edited
28103 "modes": ["wt2wt", "selser"],
28105 ["p", "contents", "remove", ":contains('b')"]
28115 5b. Merge adjacent quote nodes if they've been edited
28118 "modes": ["wt2wt", "selser"],
28124 ''a''<span id="x">b</span>''c''
28130 1. Merge adjacent link nodes as long as at least one element is new
28133 "modes": ["html2wt"],
28134 "scrubWikitext": true
28137 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28138 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28139 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28143 [[Football|Foot]][[Football|ball]]
28147 2. Merge adjacent link nodes and enable additional normalizations
28150 "modes": ["html2wt"],
28151 "scrubWikitext": true
28154 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28156 [[Football|''Football'']]
28160 3. Don't merge adjacent link nodes if scrubWikitext is false
28163 "modes": ["html2wt"],
28164 "scrubWikitext": false
28167 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28169 [[Football|Foot]][[Football|ball]]
28172 #------------------------------
28173 # End of tag minimization tests
28174 #------------------------------
28177 T56262: New entities
28181 <span typeof="mw:Entity"> </span>
28186 ## Note that there is no wikitext output for 'unknownproperty' ##
28187 ## Unknown magic words are silently dropped ##
28194 <meta property='mw:PageProp/toc' />
28195 <meta property='mw:PageProp/notoc' />
28196 <meta property='mw:PageProp/forcetoc' />
28197 <meta property='mw:PageProp/index' />
28198 <meta property='mw:PageProp/noindex' />
28199 <meta property='mw:PageProp/nogallery' />
28200 <meta property='mw:PageProp/noeditsection' />
28201 <meta property='mw:PageProp/notitleconvert' />
28202 <meta property='mw:PageProp/nocontentconvert' />
28203 <meta property='mw:PageProp/unknownproperty' />
28213 __NOCONTENTCONVERT__
28217 Consecutive <pre>s should not get merged
28219 parsoid=html2wt,html2html
28221 <pre>a</pre><pre>b</pre>
28249 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28253 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28255 [[Special:BookSources/1234567890|ISBN 1234567895]]
28259 Edited RFC links not serializable as RFC links should serialize as extlinks
28263 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28265 [https://tools.ietf.org/html/rfc123 New RFC]
28269 Edited PMID links not serializable as PMID links should serialize as extlinks
28273 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28275 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28279 WTS of autolinks with trailing/surrounding context
28283 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28284 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28285 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28286 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28287 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28288 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28290 http://cscott.net'''foo'''
28292 http://cscott.net<b>foo</b>
28294 '''http://cscott.net'''
28296 '''http://cscott.net '''
28298 '''http://cscott.net<nowiki/>x'''
28300 http://cscott.net<nowiki/>x
28304 WTS of autolinks with nowikis (round-trip)
28306 x<nowiki/>http://cscott.net<nowiki/>x
28308 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28311 # this is the "easy" test because it leaves in place all the
28312 # data-parsoid information indicating this is an autolink
28314 WTS of autolinks with escapes (editing)
28317 "modes": ["wt2wt"],
28319 [ "span", "remove" ]
28323 x<nowiki/>http://cscott.net<nowiki/>x
28325 x<nowiki/>http://cscott.net<nowiki/>x
28329 WTS of edited autolink-like text (T103364)
28332 "modes": ["wt2wt"],
28334 [ "span[typeof]", "removeAttr", "typeof" ]
28338 Not a link: <nowiki>http://example.com</nowiki>.
28340 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28344 WTS of newly-authored autolink-like text (T103364)
28348 <p>http://example.com is not a link.</p>
28350 <nowiki>http://example.com</nowiki> is not a link.
28354 WTS of autolink-like text after an autolink (T108563)
28358 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28360 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28364 Magic links inside links (not autolinked)
28366 [[Foo|http://example.com]]
28369 [[Foo|ISBN 123456789x]]
28371 [http://foo.com http://example.com]
28372 [http://foo.com RFC 1234]
28373 [http://foo.com PMID 1234]
28374 [http://foo.com ISBN 123456789x]
28376 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28377 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28378 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28379 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28380 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28381 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28382 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28383 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28386 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28387 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28388 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28389 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28391 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28392 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28393 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28394 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28398 Magic links inside image captions (autolinked)
28400 [[File:Foobar.jpg|thumb|http://example.com]]
28401 [[File:Foobar.jpg|thumb|RFC 1234]]
28402 [[File:Foobar.jpg|thumb|PMID 1234]]
28403 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28405 <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>
28406 <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>
28407 <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>
28408 <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>
28410 <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>
28411 <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>
28412 <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>
28413 <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>
28417 WTS of magic word text (T109371)
28422 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28423 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28425 <nowiki>RFC 1234</nowiki>
28427 [http://foo.com RFC 1234]
28433 Edited Redirect link should emit a non-piped wikitext link
28437 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28443 T75121: Infer extension name from typeOf if data-mw is not present
28445 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28447 <div typeOf="mw:Extension/foo"></div>
28452 # Note that the <p> wrapping isn't present in PHP parser output
28453 # The important thing for this test is that P-wrapping doesn't
28454 # interfere with the <nowiki> protection for leading - in <td>
28455 # (which isn't necessary for <th>).
28457 T88318: p-wrapped dash in table.
28459 parsoid=html2wt,wt2wt
28462 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28463 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28464 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28471 |<nowiki>-</nowiki>
28472 |<nowiki>- </nowiki>
28493 <td><small>-</small>
28502 </td></tr></tbody></table>
28506 T149209: WTS: Handle newlines in table cells properly
28514 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28516 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28522 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28524 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28546 T149209: Selser: Handle newlines in table cells properly
28549 "modes": ["selser"],
28551 [ "#h1", "html", "a\nb\n" ],
28552 [ "#h2", "html", "a\nb\n" ],
28553 [ "#c1", "html", "a\nb\n" ],
28554 [ "#c2", "html", "<p>a</p>" ],
28555 [ "#c3", "html", "<p>a</p>" ],
28556 [ "#c4", "html", "edit-me<p>a</p>" ]
28561 ! id="h1" |edit-me!!1
28563 ! id="h2" |edit-me||2
28565 | id="c1" |edit-me||3
28567 | id="c2" |edit-me||4
28569 | id="c3" |edit-me||p||q||r
28571 | id="c4" |edit-me||p||q||r
28600 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28605 <td id='mwAc'>foo</td>
28606 <td id='serialize-this'>bar</td>
28611 | id="serialize-this" |bar
28616 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28620 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28622 <div id="hello">ok</div>
28629 "modes": ["wt2wt"],
28631 [ "#xyz", "before", "<b>before</b> stuff " ],
28632 [ "#xyz", "after", " stuff <i>after</i>" ],
28633 [ "#xyz", "html", "x <b>y</b> z" ]
28637 <span id="xyz">hello</span>
28639 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28643 Never serialize a-tag as html, regardless of what data-parsoid has to say
28645 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28647 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28652 ## SSS FIXME: This is broken output nevertheless.
28653 ## What might be a reasonable non-broken output for this?
28654 ## This is an edge case unlikely to be seen in production
28655 ## that I am not wasting more time on this right now.
28657 Never serialize a-tag as html, no matter what attributes it has
28659 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28661 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28663 [http://boo.org http://boohoo.org]
28666 # Misnested is an indication that selser can reuse the source but these have
28667 # shown to sneak through on occasion. See T101768.
28668 # The original wikitext here is: [http://test.com [[one]] two three]
28670 Strip span tags added to mark misnested links
28674 <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>
28676 [http://test.com][[one]] two three
28680 Catch regression when unpacking misnested links
28684 {{echo|hi}}[http://example.com [[ho]]]
28686 <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>
28690 Catch regression when unpacking with trailing content
28692 {{echo|Foo <references/> bar}}
28694 <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>
28698 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28702 <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|}"]}'>
28714 ## This test verifies the presence and computation of this attribute indirectly
28715 ## by making an edit and ensuring that the serialization is correct (which it would be
28716 ## only if firstWikitextNode is properly set).
28718 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28721 "modes": ["wt2wt"],
28723 [ "div#x", "remove" ],
28724 [ "div", "before", "<div>new</div>" ]
28728 <div id="x">foo</div>
28730 {{echo|<div>boo</div>
28738 {{echo|<div>boo</div>
28744 # --------------------------------------------
28745 # Tests spec'ing wikitext serialization norms |
28746 # --------------------------------------------
28749 Serialize multi-line indent-pre starting with wikitext syntax
28763 1. Categories should always be serialized on their own line
28767 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28775 2. Categories that are part of templates should not introduce a line break
28777 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28779 <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>
28782 # Careful while editing these next 2 tests. There are \u200f characters
28783 # before and after the <link> tags in the HTML and following some
28784 # of the categories in wikitext
28785 # Do not remove these characters in edits.
28787 # As part of the serialization, these bidi characters will get stripped.
28789 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28792 "modes": ["html2wt"],
28793 "scrubWikitext": true
28796 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28797 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28800 [[קטגוריה: שיטות משפט]]
28804 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28807 "modes": ["html2wt"],
28808 "scrubWikitext": true
28811 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28818 Lists: Add space after bullets
28825 <li><span> baz</span></li>
28830 * <span> baz</span>
28834 1. Headings: Add space before/after == (T53744)
28841 <h2><span> baz</span></h2>
28849 == <span> baz</span> ==
28853 2. Headings: Add space before/after == even after hoisted content
28856 "modes": ["html2wt"],
28857 "scrubWikitext": true
28860 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28868 1. Headings: suppress newly created empty headings
28871 "modes": ["html2wt"],
28872 "scrubWikitext": true
28880 2. Headings: don't suppress empty headings if scrubWikitext is false
28890 3. Headings: suppress empty headings on edits
28893 "modes": ["selser"],
28894 "scrubWikitext": true,
28900 ==<span id="x">foo</span>==
28905 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28908 "modes": ["html2wt"],
28909 "scrubWikitext": true
28912 <h2>foo<br/>bar</h2>
28913 <h2>foo <span><br/>bar</span> baz</h2>
28917 == foo <span> bar</span> baz ==
28921 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28924 "modes": ["html2wt"],
28925 "scrubWikitext": false
28928 <h2>foo<br/>bar</h2>
28930 == foo<br /> bar ==
28934 1. WT Quote Tags: suppress newly created empty style tags
28937 "modes": ["html2wt"],
28938 "scrubWikitext": true
28946 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28952 ''<nowiki/>'''''<nowiki/>'''
28956 3. WT Quote Tags: suppress empty style tags on edits
28959 "modes": ["selser"],
28960 "scrubWikitext": true,
28966 '''<span id="x">foo</span>'''
28971 1. Anchors: suppress newly created empty anchors
28974 "modes": ["html2wt"],
28975 "scrubWikitext": true
28978 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28983 2. Anchors: don't suppress empty anchors if scrubWikitext is false
28986 "modes": ["html2wt"],
28987 "scrubWikitext": false
28990 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28996 3. Anchors: suppress empty anchors on edits
28999 "modes": ["selser"],
29000 "scrubWikitext": true,
29006 [[Test|<span id="x">foo</span>]]
29011 3a. Anchors: do not suppress numbered extlinks
29014 "modes": ["wt2wt"],
29015 "scrubWikitext": true
29020 <a rel="mw:ExtLink" href="http://foo.com"></a>
29024 3b. Anchors: do not suppress numbered extlinks
29027 "modes": ["wt2wt"],
29028 "scrubWikitext": true,
29034 [http://foo.com <span id="x">foo</span>]
29040 Normalizations should be restricted to edited content
29043 "modes": ["selser"],
29044 "scrubWikitext": true,
29046 [ "h1", "before", "<i></i>"]
29060 1. Multiple normalizations (html2wt)
29063 "modes": ["html2wt"],
29064 "scrubWikitext": true
29068 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29069 </a><b><i></i></b>x</p>
29078 2. Multiple normalizations (selser)
29081 "modes": ["selser"],
29082 "scrubWikitext": true,
29084 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29088 <span id="x">foo</span>
29090 <span id="x">foo</span>
29096 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29099 "modes": ["html2wt"],
29100 "scrubWikitext": true
29112 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29119 <nowiki> </nowiki>hi
29121 <nowiki> </nowiki> hello
29125 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29128 "modes": ["html2wt"],
29129 "scrubWikitext": true
29138 baz bang</td></tr></table>
29144 bar<span>boo</span></p>
29160 bar<span>boo</span>
29164 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29167 "modes": ["selser"],
29168 "scrubWikitext": true,
29170 [ "p", "html", " a\n b" ]
29181 1. New links that end in spaces
29184 "modes": ["html2wt"],
29185 "scrubWikitext": false
29188 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29189 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29190 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29192 [[Berlin ]]<nowiki/>is the capital of Germany.
29196 [[Boston ]] is a city.
29200 2. New links that end in spaces
29203 "modes": ["html2wt"],
29204 "scrubWikitext": true
29207 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29208 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29209 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29211 [[Berlin]] is the capital of Germany.
29215 [[Boston]] is a city.
29219 1. Table cells with escapable prefixes
29222 "modes": ["html2wt"],
29223 "scrubWikitext": false
29227 <tr><td>a</td></tr>
29228 <tr><td>-</td></tr>
29229 <tr><td>+</td></tr>
29235 |<nowiki>-</nowiki>
29237 |<nowiki>+</nowiki>
29242 2. Table cells with escapable prefixes
29245 "modes": ["html2wt"],
29246 "scrubWikitext": true
29250 <tr><td>a</td></tr>
29251 <tr><td>-</td></tr>
29252 <tr><td>+</td></tr>
29265 3a. Table cells with escapable prefixes after edits
29268 "modes": ["selser"],
29269 "scrubWikitext": true,
29271 [ "table tbody tr:first-child td:first-child", "remove"]
29285 3b. Table cells with escapable prefixes after edits
29288 "modes": ["selser"],
29289 "scrubWikitext": true,
29291 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29298 |<span id="x">foo</span>+
29307 # FIXME: This test will fail because
29308 # normalization doesn't realize that the id attribute
29309 # will eliminate the escapable scenario
29311 4a. Table cells without escapable prefixes after edits
29314 "modes": ["selser"],
29315 "scrubWikitext": true,
29317 [ "#x", "html", "-" ]
29330 ## This tests normalizer's ability to discriminate between
29331 ## cells having identical content.
29333 4b. Table cells without escapable prefixes after edits
29336 "modes": ["selser"],
29337 "scrubWikitext": true,
29339 [ "td", "html", "-" ]
29352 ## This tests normalizer's ability to not be tripped by
29353 ## comments (and whitespace)
29355 4c. Table cells without escapable prefixes after edits
29358 "modes": ["selser"],
29359 "scrubWikitext": true,
29361 [ "table tbody tr td:first-child", "remove" ]
29376 ## This tests normalizer's ability to handle HTML cells
29378 4d. Table cells without escapable prefixes after edits
29381 "modes": ["selser"],
29382 "scrubWikitext": true,
29384 [ "td", "html", "-" ]
29389 <tr><td>a</td></tr>
29393 <tr><td>-</td></tr>
29397 ## T111151 Remove font elements without attributes
29399 5a. font tags without attributes should be dropped in scrubWikitext mode
29402 "modes": ["html2wt"],
29403 "scrubWikitext": true
29407 <font><font>bar</font></font>
29408 <font class="x">boo</font>
29412 <font class="x">boo</font>
29416 5b. font tags should not be dropped without scrubWikitext being enabled
29419 "modes": ["html2wt"],
29420 "scrubWikitext": false
29429 Escape nowiki DOM elements
29433 <nowiki><i>foo</i></nowiki>
29435 <nowiki>''foo''</nowiki>
29438 # This is meant to be an interim fix while we go about figuring out
29439 # how to not introduce these trailing <nowiki/>s in the first place.
29441 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29445 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29447 <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>
29448 <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>
29462 New list is serialized on newlines
29466 <p>The quick brown fox jumps over the lazy dog.</p><ul>
29470 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
29472 The quick brown fox jumps over the lazy dog.
29478 The quick onyx goblin jumps over the lazy dwarf.
29482 New lists in formatting elements serialized w/o newlines
29494 <small><ul><li>hi</li></ul></small>
29506 New list in table doesn't need newlines
29510 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
29519 # ---------------------------------------------------
29520 # End of tests spec'ing wikitext serialization norms |
29521 # ---------------------------------------------------
29525 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29533 <td><b>c</b><p>d</p></td>
29552 Anchor without href scenarios
29554 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29557 <a class="no">dice</a>
29562 <span name="foo"></span>
29566 New transclusion added after a list should be serialized after the list
29570 <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>
29576 # -----------------------------------------------------------------
29577 # End of section for Parsoid-only html2wt tests for serialization
29579 # -----------------------------------------------------------------
29581 # -----------------------------------------------------------------
29582 # The following section of tests are primarily to spec behavior of
29583 # the selective serializer. All these tests have manual selser
29584 # changes. The automated selser changes for all tests handle the
29585 # wide variation of changes, but these tests here capture specs
29586 # deterministically.
29587 # ----------------------------------------------------------------
29591 Selser: New comments should not be lost
29594 "modes": ["selser"],
29596 [ "#a", "after", "<!--c1-->" ],
29597 [ "#b", "before", "<!--c2-->" ]
29601 <span id="a">a</span>
29603 <span id="b">b</span>
29605 <span id="a">a</span><!--c1-->
29607 <!--c2--><span id="b">b</span>
29612 Selser: Check for validity of DSR before using it
29615 "modes": ["selser"],
29617 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29621 <span id="a">a</span>
29623 {{DISPLAYTITLE:foo}}
29624 <span id="a">a</span>
29628 1. DOMDiff: Changes to <ref> content should be looked up using id
29631 "modes": ["selser"],
29633 ["#X", "after", "bar"],
29634 ["#Y", "after", "baz"]
29638 X <ref><span id="X">foo</span></ref>
29641 <ref name="a"><span id="Y">foo</span></ref>
29644 X <ref><span id="X">foo</span>bar</ref>
29647 <ref name="a"><span id="Y">foo</span>baz</ref>
29652 2. DOMDiff: Changes to <ref> content should be looked up using id
29655 "modes": ["selser"],
29657 ["#Z", "after", "bar"]
29661 A <ref>foo bar for a</ref>
29662 B <ref group="X" name="b" />
29666 <references group="X">
29667 <ref name="b"><span id="Z">foo</span></ref>
29670 A <ref>foo bar for a</ref>
29671 B <ref group="X" name="b" />
29675 <references group="X">
29676 <ref name="b"><span id="Z">foo</span>bar</ref>
29681 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29684 "modes": ["selser"],
29686 [ "div:first-child", "text", "bar" ]
29690 <div style="{{1x|color:red;}}%">foo</div>
29692 <div style="{{1x|color:red;}}%">bar</div>
29704 <li class="mw-empty-elt"></li>
29705 <li class="mw-empty-elt"></li>
29712 [[File:Thumb.png|thumb]]
29714 <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>
29716 <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>
29720 unclosed internal link XSS (T137264)
29722 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29724 <p>[[#<script>alert(1)</script>|
29727 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29731 Validating that <style> isn't eaten by tidy (T167349)
29736 <style>.foo::before { content: "<foo>"; }</style>
29737 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29741 <style>.foo::before { content: "<foo>"; }</style>
29742 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29747 Validating that <style> isn't wrapped in a paragraph (T186965)
29751 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29753 <style>.foo::before { content: "<foo>"; }</style>
29755 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29757 But if it's on a line with other content, let it be wrapped.
29759 <style>.foo::before { content: "<foo>"; }</style> bar
29761 foo <style>.foo::before { content: "<foo>"; }</style>
29763 foo <style>.foo::before { content: "<foo>"; }</style> bar
29765 And the same if we have non-paragraph-breaking whitespace
29768 <style>.foo::before { content: "<foo>"; }</style>
29771 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29773 <style>.foo::before { content: "<foo>"; }</style>
29774 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29775 <p>But if it's on a line with other content, let it be wrapped.
29776 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
29777 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
29778 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
29779 </p><p>And the same if we have non-paragraph-breaking whitespace
29781 <style>.foo::before { content: "<foo>"; }</style>
29787 Validating that <link> isn't wrapped in a paragraph (T186965)
29791 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29793 <link rel="foo" href="bar"/>
29795 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29797 But if it's on a line with other content, let it be wrapped.
29799 <link rel="foo" href="bar"/> bar
29801 foo <link rel="foo" href="bar"/>
29803 foo <link rel="foo" href="bar"/> bar
29805 And the same if we have non-paragraph-breaking whitespace
29808 <link rel="foo" href="bar"/>
29811 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29813 <link rel="foo" href="bar"/>
29814 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29815 <p>But if it's on a line with other content, let it be wrapped.
29816 </p><p><link rel="foo" href="bar"/> bar
29817 </p><p>foo <link rel="foo" href="bar"/>
29818 </p><p>foo <link rel="foo" href="bar"/> bar
29819 </p><p>And the same if we have non-paragraph-breaking whitespace
29821 <link rel="foo" href="bar"/>
29827 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29829 wgFragmentMode=[ 'html5', 'legacy' ]
29831 ==A&B&C&amp;D&amp;amp;E==
29832 [[#A&B&C&amp;D&amp;amp;E]]
29834 <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>
29835 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29838 <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>
29839 <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>
29843 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29845 wgFragmentMode=[ 'legacy' ]
29847 ==A&B&C&amp;D&amp;amp;E==
29848 [[#A&B&C&amp;D&amp;amp;E]]
29850 <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>
29851 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29856 Decoding of HTML entities in embedded HTML tags
29858 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29860 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29863 <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>
29867 Decoding of HTML entities in indicator names for IDs (T104196)
29869 parsoid=wt2html,html2html
29872 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29874 1&2&3&4&amp;5=Indicator
29877 <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>
29880 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29882 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29886 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29888 1&2&3&4&amp;5=Indicator
29891 <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>
29894 # This fragment mode is what Parsoid supports.
29896 HTML5 ids: fallback to legacy
29898 wgFragmentMode=[ 'html5', 'legacy' ]
29910 ==Hey < # " > % : '==
29911 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29913 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29915 <!-- These two links should produce identical HTML -->
29916 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29919 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29921 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29922 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29923 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29924 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29925 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29926 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29930 <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>
29931 <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>
29932 <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>
29933 <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>
29934 <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>
29935 <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>
29936 <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>
29937 </p><p>💩 <span id="💩"></span>
29938 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29941 <h2 id="Foo_bar">Foo bar</h2>
29943 <h2 id="foo_Bar_2">foo Bar</h2>
29945 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
29947 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
29949 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
29951 <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>
29952 <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>
29954 <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>
29956 <!-- These two links should produce identical HTML -->
29957 <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>
29960 # Parsoid doesn't support this mode
29962 HTML5 ids: legacy with a fallback to modern
29964 wgFragmentMode=[ 'legacy', 'html5' ]
29976 ==Hey < # " > % : '==
29977 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29979 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29981 <!-- These two links should produce identical HTML -->
29982 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29985 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29987 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29988 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29989 <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>
29990 <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>
29991 <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>
29992 <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>
29996 <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>
29997 <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>
29998 <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>
29999 <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>
30000 <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>
30001 <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>
30002 <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>
30003 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30004 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30008 # Parsoid doesn't support this mode.
30010 HTML5 ids: no legacy
30012 wgFragmentMode=[ 'html5' ]
30024 ==Hey < # " > % : '==
30025 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30027 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30029 <!-- These two links should produce identical HTML -->
30030 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30033 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30035 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30036 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30037 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30038 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30039 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30040 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30044 <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>
30045 <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>
30046 <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>
30047 <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>
30048 <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>
30049 <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>
30050 <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>
30051 </p><p>💩 <span id="💩"></span>
30052 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30057 T90902: Normalize weird characters in section IDs
30059 wgFragmentMode=[ 'html5', 'legacy' ]
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 <p><a href="#Foo_bar">#Foo bar</a>
30069 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30070 <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>
30074 T51672: Test for brackets in attributes of elements in external link texts
30076 [http://example.com/ link <span title="title with [brackets]">span</span>]
30077 [http://example.com/ link <span title="title with [brackets]">span</span>]
30080 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30081 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30084 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30085 <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>
30089 T72875: Test for brackets in attributes of elements in internal link texts
30091 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30092 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30095 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30096 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30099 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30100 <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>
30104 T179544: {{anchorencode:}} output should be always usable in links
30106 wgFragmentMode=[ 'html5' ]
30108 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30110 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30113 <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>
30116 ## ------------------------------
30117 ## Parsoid section-wrapping tests
30118 ## ------------------------------
30120 Section wrapping for well-nested sections (no leading content)
30123 "wrapSections": true
30144 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30147 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30150 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30153 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30156 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30159 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30166 Section wrapping for well-nested sections (with leading content)
30169 "wrapSections": true
30174 Para 2 with a <div>nested in it</div>
30187 <section data-mw-section-id="0"><p>Para 1.</p>
30189 <p>Para 2 with a </p><div>nested in it</div>
30193 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30196 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30199 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30202 </section></section>
30206 Section wrapping with template-generated sections (good nesting 1)
30209 "wrapSections": true
30226 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30229 <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">
30230 </span><p about="#mwt1">b</p>
30231 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30234 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30238 # In this example, the template scope is mildly expanded to incorporate the
30239 # trailing newline after the transclusion since that is part of section 1.1.1
30241 Section wrapping with template-generated sections (good nesting 2)
30244 "wrapSections": true,
30245 "modes": ["wt2html", "wt2wt"]
30260 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30263 <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">
30264 </span><p about="#mwt1">b</p><span about="#mwt1">
30265 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30266 </span><p about="#mwt1">d</p><span about="#mwt1">
30267 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30271 # In this example, the template scope is mildly expanded to incorporate the
30272 # trailing newline after the transclusion since that is part of section 1.2.1
30274 Section wrapping with template-generated sections (good nesting 3)
30277 "wrapSections": true,
30278 "modes": ["wt2html", "wt2wt"]
30296 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30299 <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">
30300 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30301 </span><p about="#mwt1">b</p><span about="#mwt1">
30302 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30303 </span><p about="#mwt1">c</p><span about="#mwt1">
30304 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30305 </span><p about="#mwt1">d</p><span about="#mwt1">
30306 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30310 # Because of section-wrapping and template-wrapping interactions,
30311 # the scope of the template is expanded so that the template markup
30312 # is valid in the presence of <section> tags.
30313 # This exercises the s1 is null scenario in the wrapSections code
30315 Section wrapping with template-generated sections (bad nesting 1)
30318 "wrapSections": true
30332 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30335 <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"]}'>
30336 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30337 </span><p about="#mwt1">b
30338 </p><span about="#mwt1">
30340 </span><p about="#mwt1">c</p><span about="#mwt1">
30341 </span></section></div></section>
30344 # Because of section-wrapping and template-wrapping interactions,
30345 # the scope of the template is expanded so that the template markup
30346 # is valid in the presence of <section> tags.
30347 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30349 Section wrapping with template-generated sections (bad nesting 2)
30352 "wrapSections": true
30370 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30373 </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">
30374 </span><p about="#mwt1">b</p><span about="#mwt1">
30375 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30376 </span><p about="#mwt1">c</p><span about="#mwt1">
30378 </span><p about="#mwt1">d</p><span about="#mwt1">
30380 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30384 # Because of section-wrapping and template-wrapping interactions,
30385 # additional template wrappers are added to <section> tags
30386 # so that template wrapping semantics are valid whether section
30387 # tags are retained or stripped. But, the template scope can expand
30388 # greatly when accounting for section tags.
30389 # This exercises the s1 and s2 are in different subtrees scenario
30391 Section wrapping with template-generated sections (bad nesting 3)
30394 "wrapSections": true,
30395 "modes": ["wt2html", "wt2wt"]
30413 <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>
30416 <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">
30417 </span><p about="#mwt1">b</p><span about="#mwt1">
30418 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30419 </span><p about="#mwt1">c</p>
30422 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30427 Section wrapping with uneditable lead section + div wrapping multiple sections
30430 "wrapSections": true
30435 <div style="border:1px solid red;">
30452 <section data-mw-section-id="-1"><p>foo</p>
30454 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30455 <section data-mw-section-id="1"><h1 id="1">1</h1>
30458 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30461 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30465 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30468 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30470 </section></section>
30474 Section wrapping with editable lead section + div overlapping multiple sections
30477 "wrapSections": true
30484 <div style="border:1px solid red;">
30501 <section data-mw-section-id="0"><p>foo</p>
30503 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
30505 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30508 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30511 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30516 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30519 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30521 </section></section>
30525 HTML header tags should not be wrapped in section tags
30528 "wrapSections": true
30541 <section data-mw-section-id="0"><p>foo</p>
30543 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30545 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
30547 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30549 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
30553 Lead section containing only whitespace and comments.
30556 "wrapSections": true
30560 <!-- this is a comment, presumably significant to editors -->
30567 <section data-mw-section-id="0" data-parsoid="{}">
30568 <!-- this is a comment, presumably significant to editors -->
30569 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30572 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30577 Pseudo-sections emitted by templates should have id -2
30580 "wrapSections": true
30590 <section data-mw-section-id="-1"><p>foo</p>
30591 </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}}]}'>
30592 <section data-mw-section-id="-1"><h2 id="a">a</h2>
30593 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
30594 </section></div><span about="#mwt1">
30598 ##########################################################################
30599 Tests demonstrating white-space insensitivity in input wikitext
30600 for wikitext headings, wikitext list items, and wikitext table captions,
30601 headings, and cells. HTML versions of the same should preserve whitespace.
30602 ##########################################################################
30604 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
30607 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
30608 == <!--c2--> <!--c2--> Tabs <!--c3--><!--c4--> ==
30609 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
30610 ; <!--term to define--> term : <!--term's definition--> definition
30612 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
30614 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
30616 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30618 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
30620 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
30623 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30626 <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>
30627 <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>
30628 <ul><li>List item</li></ul>
30629 <dl><dt>term </dt>
30630 <dd>definition</dd></dl>
30632 <caption>Table Caption
30635 <th>Table Heading 1</th>
30636 <th>Table Heading 2
30639 <td>Table Cell 1</td>
30643 <td>class="foo"</td>
30647 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
30648 </td></tr></tbody></table>
30651 <td>Table Cell 1</td>
30653 </td></tr></tbody></table> foo</dd></dl>
30656 # Looks like <caption> is not accepted in HTML
30658 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
30661 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
30662 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
30664 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
30665 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
30668 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
30669 <ul><li> List item </li></ul>
30671 <tbody><tr><th> Table Heading </th><th></th></tr>
30672 <tr><td> Table Cell </td><th></th></tr>
30677 Do not trim whitespace in links and quotes
30679 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
30680 [[Foo| some text ]]
30682 <p>foo <i> italic </i> and <b> bold </b>
30683 <a href="/wiki/Foo" title="Foo"> some text </a>
30688 Remove p tags surrounding a single element in a figcaption
30692 [[File:Foobar.jpg|right|200x200px|Caption]]
30694 <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>
30698 Selser preserves lack of newline before list and allows newline after the list
30701 "modes": ["selser"],
30702 "scrubWikitext": true,
30704 [ "ul", "after", "<p>footer</p>" ]
30721 Selser does not introduce newlines between unedited paragraph preceding the list
30724 "modes": ["selser"],
30726 [ "table tbody tr td p:last-child", "empty" ]
30748 Selser does not introduce newlines between unedited paragraph following the list
30751 "modes": ["selser"],
30753 [ "table tbody tr td p:first-child", "empty" ]
30775 Remove a list item but do not insert newline above list
30778 "modes": ["selser"],
30780 [ "ul li:last-child", "remove" ]