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
2294 <p>Foo <del>bar</del> <ins>baz</ins> quux
2300 T17491: <ins>/<del> in blockquote (2)
2302 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2305 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2309 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2314 <pre> with attributes (T5202)
2316 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2318 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2323 <pre> with width attribute (T5202)
2325 <pre width="8">Narrow screen goodies</pre>
2327 <pre width="8">Narrow screen goodies</pre>
2332 <pre> with forbidden attribute (T5202)
2334 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2336 <pre width="8">Narrow screen goodies</pre>
2341 Entities inside <pre>
2350 <pre> with forbidden attribute values (T5202)
2352 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2354 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2359 <nowiki> inside <pre> (T15238)
2367 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2375 <pre><nowiki>Foo</nowiki></pre>
2380 <nowiki> inside of #tag:pre
2382 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2384 <pre>Foo →bar</pre>
2387 <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>
2390 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2391 ## aren't enclosed in nowikis.
2393 <nowiki> and <pre> preference (first one wins)
2424 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2429 <p><span typeof="mw:Nowiki">
2437 </pre> inside nowiki
2439 <nowiki></pre></nowiki>
2446 Empty pre; pre inside other HTML tags (T56946)
2463 <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
2465 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2469 HTML pre followed by indent-pre
2482 <p><pre>foo</pre></p>
2484 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2486 <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>
2490 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2498 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2508 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2520 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2541 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2545 {{echo| foo}}{{echo| bar}}
2550 {{echo|<!--cmt--> foo}}
2552 <!--cmt-->{{echo| foo}}
2554 {{echo|{{echo| }}bar}}
2572 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2608 ## Hmm, should Parsoid rt this?
2610 Pres with newline attributes
2612 parsoid=wt2html,html2html
2617 <pre class="one two">hi</pre>
2620 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2624 Things that look like <pre> tags aren't treated as such
2626 Barack Obama <President> of the United States
2627 <President></President>
2629 <p>Barack Obama <President> of the United States
2630 <President></President>
2635 Handle broken pre-like tags (T66025)
2639 {{echo|<pre <pre>x</pre>}}
2641 <table><pre </table>
2644 <table><pre </table>
2648 <pre <table></table>
2650 <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>
2659 Parsoid: handle pre with space after attribute
2663 <pre style="width:50%;" >{{echo|foo}}</pre>
2665 <pre style="width:50%;">{{echo|foo}}</pre>
2668 <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>
2671 # TODO / maybe: fix wt2wt for this
2673 Parsoid: Don't paragraph-wrap fosterable content
2706 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2710 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2738 #--------------------------------------------------------------------
2739 # Transclusion parameter whitespace stripping tests
2740 # Behavior is different for positional and named parameters
2741 #--------------------------------------------------------------------
2743 Templates: Strip leading and trailing whitespace from named-param values
2747 {{echo|1= {{echo|b}} }}
2765 Templates: Don't strip whitespace from positional-param values
2769 {{echo|{{echo|b}} }}
2809 Templates: Don't recognize targets split by newlines
2825 Templates: Recognize targets when newlines and comments don't split the target
2830 <!--X--> ech<!--X-->o<!--X-->
2838 <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>
2842 Templates: Handle empty comment-and-ws-only lines correctly
2845 <!--should be ignored-->
2846 <!--should be ignored as well-->
2853 <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>
2857 Templates: Handle comments in the target
2860 <!-- should be ignored -->
2864 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2867 {{echo<!-- should be ignored -->
2870 {{echo<!-- should be ignored -->|foo}}
2872 {{<!-- should be ignored -->echo|foo}}
2881 <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>
2883 <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>
2885 <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>
2887 <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>
2889 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2893 Templates: Handle comments in parameter names (T69657)
2896 <!-- should be ignored -->
2900 <!-- should be ignored -->
2903 {{echo|1<!-- should be ignored -->=foo}}
2905 {{echo|<!-- should be ignored -->1=foo}}
2913 <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>
2915 <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>
2917 <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>
2919 <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>
2923 Templates: Other wikitext in parameter names (T69657)
2930 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2934 Templates: With colons
2938 <p>Template with colon
2941 <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>
2944 #--------------------------------------------------------------------
2945 # Transclusion parameter escaping tests
2946 #--------------------------------------------------------------------
2949 Templates: Parsoid parameter escaping test 1
2951 {{echo|[foo]|{{echo|[bar]}}}}
2956 <p about="#mwt1" typeof="mw:Transclusion"
2957 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2961 Parsoid: Pipes in external links in template parameter
2963 {{echo|[{{echo|http://example.com}} link]}}
2965 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
2968 <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>
2972 Parsoid: pipe in transclusion parameter
2974 {{echo|http://foo.com/a|b}}
2976 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
2979 <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>
2983 Parsoid: Pipe in external link target and content in template parameter
2985 parsoid=html2wt,wt2wt
2987 {{echo|[http://foo.com/a|b a|b]}}
2989 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
2992 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2993 typeof="mw:Transclusion"
2994 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2995 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2999 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3003 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3005 <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>
3009 Templates: Don't escape already nowiki-escaped text in template parameters
3011 parsoid=html2wt,wt2wt
3013 {{echo|foo<nowiki>|</nowiki>bar}}
3014 {{echo|<nowiki><div></nowiki>}}
3015 {{echo|<nowiki></nowiki>}}
3022 <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>
3023 <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>
3024 <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>
3030 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3032 parsoid=html2wt,wt2wt
3034 {{echo|{{echo|1=bar}}}}
3039 <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>
3044 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3051 <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>
3056 Templates: Preserve blank parameter names
3063 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3067 Templates: Preserve blank parameter names in other positions
3069 {{blank_param|bar|=foo}}
3075 <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
3080 ### Parsoid-centric tests for testing RT edge cases for pre
3084 1a. Indent-Pre and Comments
3097 1b. Indent-Pre and Comments
3110 1c. Indent-Pre and Comments
3123 1d. Indent-Pre and Comments
3124 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3137 2a. Indent-Pre and tables
3158 2b. Indent-Pre and tables
3174 2c. Indent-Pre and tables (T44252)
3191 2d. Indent-Pre and tables
3208 <tbody><tr><td> b</td></tr>
3213 2e. Indent-Pre and table-line syntax
3226 2f. Indent-pre started by table-line syntax
3245 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3250 Text that should be rendered preformatted
3258 <pre>Text that should be rendered preformatted
3267 3a. Indent-Pre and block tags (single-line html)
3271 c <blockquote> foo </blockquote>
3276 c <blockquote> foo </blockquote>
3277 <pre><span> foo </span>
3280 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3281 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3282 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3283 <pre><span> foo </span>
3286 <p> a </p><p> foo </p><p>
3287 b </p><div> foo </div><p>
3288 c </p><blockquote><p> foo </p></blockquote>
3289 <pre><span> foo </span>
3294 3b. Indent-Pre and block tags (multi-line html)
3299 <pre>a <span>foo</span>
3304 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3305 b <div data-parsoid='{"stx":"html"}'> foo </div>
3307 <pre>a <span>foo</span>
3309 b </p><div> foo </div>
3313 3c. Indent-Pre and block tags (pre-content on separate line)
3377 4. Indent-Pre and extension tags
3388 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3392 5. Indent-Pre and html pre
3394 <pre class="123">hi</pre>
3396 <pre class="123">hi</pre>
3399 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3403 Render paragraphs when indent-pre is suppressed in blocklevels
3420 4. Multiple spaces at start-of-line
3438 ## NOTE: the leading white-space chars on empty line are significant
3440 5a. White-space in indent-pre
3452 ## NOTE: the leading white-space chars on empty line are significant
3454 5b. White-space in indent-pre
3473 5c. White-space in indent-pre
3486 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3509 7a. Indent-pre and category links
3511 parsoid=wt2html,wt2wt
3513 [[Category:foo]] <!-- No pre-wrapping -->
3514 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3517 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3518 <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 -->
3521 ## We used to, but no longer wt2wt this test since the default serializer
3522 ## will normalize all categories to serialize on their own line.
3523 ## This wikitext usage is going to be fairly uncommon in production and
3524 ## selser will take care of preserving formatting in those scenarios.
3526 7b. Indent-pre and category links
3531 [[Category:foo]] {{echo|b}}
3533 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3534 <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>
3538 Indent-Pre: Newlines in comments shouldn't affect sol state
3553 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3557 HTML-pre: 1. embedded newlines
3589 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3591 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3594 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3599 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3607 HTML-pre: big spaces
3643 <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"}}'>
3662 HTML-pre: 2: indented text
3675 HTML-pre: 3: other wikitext
3694 <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
3703 ### Definition lists
3710 <dl><dt>name </dt>
3711 <dd>Definition</dd></dl>
3716 Definition list for indentation only
3720 <dl><dd>Indented text</dd></dl>
3725 Definition list with no space
3730 <dd>Definition</dd></dl>
3735 Definition list with URL link
3737 ;http://example.com/ :definition
3739 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3740 <dd>definition</dd></dl>
3745 Definition list with bracketed URL link
3747 ;[http://www.example.com/ Example]:Something about it
3749 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3750 <dd>Something about it</dd></dl>
3755 Definition list with wikilink containing colon
3757 ; [[Help:FAQ]]:The least-read page on Wikipedia
3759 <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>
3760 <dd>The least-read page on Wikipedia</dd></dl>
3764 # At Brion's and JeLuF's insistence... :)
3766 Definition list with news link containing colon
3768 ;news:alt.wikipedia.rox: This isn't even a real newsgroup!
3770 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3771 <dd>This isn't even a real newsgroup!</dd></dl>
3774 <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>
3778 Malformed definition list with colon
3780 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3782 <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>
3787 Definition lists: colon in external link text
3789 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
3791 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
3792 <dd>OK, I made that up</dd></dl>
3797 Definition lists: colon in HTML attribute
3799 ;<b style="display: inline">bold</b>
3801 <dl><dt><b style="display: inline">bold</b></dt></dl>
3806 Definition lists: self-closed tag
3808 ;one<br/>two :two-line fun
3810 <dl><dt>one<br />two </dt>
3811 <dd>two-line fun</dd></dl>
3816 Definition lists: ignore colons inside tags
3818 ;one <b>two : tag <i>fun:</i>:</b>:def
3820 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3826 Definition lists: excess closed tags
3828 ;one</b>two :bad tag fun
3830 <dl><dt>onetwo </dt>
3831 <dd>bad tag fun</dd></dl>
3835 <dd>bad tag fun</dd>
3840 T13748: Literal closing tags
3844 <dd>test test test test test</dd>
3846 <dd>test test test test test</dd>
3851 <dd>test test test test test</dd>
3853 <dd>test test test test test</dd>
3859 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3867 <dl><dt>term </dt>
3868 <dd>description</dd></dl>
3869 <ul><li>unordered</li></ul>
3875 Definition list with empty definition and following paragraph
3888 Nested definition lists using html syntax
3901 Definition Lists: No nesting: Multiple dd's
3914 Definition Lists: Indentation: Regular
3922 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3927 Definition Lists: Indentation: Missing 1st level
3933 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3938 Definition Lists: Indentation: Multi-level indent
3942 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3947 Definition Lists: Hacky use to indent tables
3954 should be left alone
3956 <dl><dd><dl><dd><table>
3961 </td></tr></table></dd></dl></dd></dl>
3963 should be left alone
3968 Definition Lists: Hacky use to indent tables (with content following table)
3973 |} <!--c1--> this text should be part of the dl
3980 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
3987 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
3991 Definition Lists: Hacky use to indent tables, with comments (T65979)
3999 should be left alone
4002 <dl><dd><dl><dd><table><tr>
4005 </tr></table><!-- bar --></dd></dl></dd></dl>
4007 should be left alone</p>
4011 Definition Lists: Hacky use to indent tables, with comment before table
4017 <dl><dd><dl><dd><!-- foo --><table><tr>
4019 </tr></table></dd></dl></dd></dl>
4022 # The trailing whitespace in this test is to catch a regression in
4023 # Parsoid after T54473.
4025 Definition Lists: Hacky use to indent tables (WS-insensitive)
4034 </td></tr></table></dd></dl>
4038 <tbody><tr><td>a</td></tr>
4039 </tbody></table> </dd></dl>
4042 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4043 ## as an empty dt item. It also ignores all but the last ";" when followed
4044 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4045 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4048 ## Ex: ";;t2 ::d2" is transformed into:
4060 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4061 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4072 ## All Parsoid only definition list tests have this difference.
4074 ## See also: https://phabricator.wikimedia.org/T8569
4075 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4078 Table / list interaction: indented table with lists in table contents
4100 </td></tr></table></dd></dl>
4105 Table / list interaction: lists nested in tables nested in indented lists
4128 </td></tr></table></dd></dl>
4135 Definition Lists: Nesting: Multi-level (Parsoid only)
4163 Definition Lists: Nesting: Test 2
4170 <dl><dd>d2</dd></dl></dd></dl>
4175 Definition Lists: Nesting: Test 3
4180 <dl><dd><dl><dt>t1</dt>
4182 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4187 Definition Lists: Nesting: Test 4
4192 <dl><dd><dl><dd><dl><dt>t3</dt>
4193 <dd>d3</dd></dl></dd></dl></dd></dl>
4198 ## The Parsoid team believes the following three test exposes a
4199 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4200 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4201 ## It also exposes a "misfeature" in tidy, which doesn't like
4202 ## <dl> tags with a single <dt> child; it converts the <dt> into
4203 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4205 Definition Lists: Mixed Lists: Test 1
4211 <dl><dd><dl><dt><ul><li>foo</li>
4212 <li>bar</li></ul></dt></dl>
4213 <dl><dt>baz</dt></dl></dd></dl>
4216 <dl><dd><dl><dt><ul><li>foo</li>
4217 <li>bar</li></ul></dt></dl>
4218 <dl><dt>baz</dt></dl></dd></dl>
4236 Definition Lists: Mixed Lists: Test 2
4241 <ul><li><dl><dd>d1</dd>
4242 <dd>d2</dd></dl></li></ul>
4248 Definition Lists: Mixed Lists: Test 3
4253 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4254 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4260 Definition Lists: Mixed Lists: Test 4
4265 <ul><li><dl><dt>d1 </dt>
4268 <dd>d4</dd></dl></li></ul>
4274 Definition Lists: Mixed Lists: Test 5
4280 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4286 Definition Lists: Mixed Lists: Test 6
4291 <ol><li><ul><li><dl><dd>d1
4292 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4298 Definition Lists: Mixed Lists: Test 7
4303 <dl><dd><ul><li>d1</li>
4304 <li>d2</li></ul></dd></dl>
4310 Definition Lists: Mixed Lists: Test 8
4315 <dl><dd><ul><li>d1</li></ul>
4316 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4322 Definition Lists: Mixed Lists: Test 9
4326 <ul><li><dl><dt>foo </dt>
4327 <dd>bar</dd></dl></li></ul>
4333 Definition Lists: Mixed Lists: Test 10
4337 <ul><li><ol><li><dl><dt>foo </dt>
4338 <dd>bar</dd></dl></li></ol></li></ul>
4342 # The Parsoid team disagrees with the PHP parser's seemingly-random
4343 # rules regarding dd/dt on the next few tests. Parsoid is more
4344 # consistent, and recognizes the shared nesting and keeps the
4345 # still-open tags around until the nesting is complete.
4347 # This is a regression test for T175099
4349 Definition Lists: Mixed Lists: Test 11
4356 <ul><li>b</li></ul></dd></dl>
4360 <dd><ul><li>b</li></ul></dd></dl>
4363 # FIXME: Maybe get rid of this test?
4365 Definition Lists: Mixed Lists: Test 12
4370 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4371 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4372 <dl><dt>boo </dt>
4373 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4376 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4377 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4378 <dl><dt>boo </dt>
4379 <dd>baz</dd></dl></li></ol></li></ul>
4396 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4397 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4401 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4402 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4410 # FIXME: Maybe get rid of this test?
4412 # * The test is wrong, there are two colons where there should be :;
4413 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4415 Definition Lists: Weird Ones: Test 1
4417 *#;*::;;foo :bar (who uses this?)
4419 <ul><li><ol><li><dl><dt>foo </dt>
4420 <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>
4437 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4438 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4450 Definition Lists: colons occurring in tags
4467 <dt><span>a:b</span></dt>
4468 <dt><div>a:b</div></dt>
4469 <dt><div>a</div></dt>
4473 <dt><i>a:b</i></dt></dl>
4474 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4476 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4478 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4479 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4480 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4481 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4483 <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>
4484 <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>
4485 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4488 # Parsoid's output differs here again because it shares
4489 # nesting between the two lists unlike the PHP parser.
4490 # Unsure which is more desirable.
4492 Definition Lists: colons and tables 1
4504 </td></tr></table></dd></dl>
4508 </td></tr></table></dd></dl>
4514 </td></tr></table></dd>
4518 </td></tr></table></dd></dl>
4521 # FIXME: Does this need a html/php section?
4523 Definition Lists: template interaction
4525 ::{{definition_list}}
4528 ::{{definition_list}}
4533 <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">
4534 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4536 <dl><dd data-parsoid='{}'>one
4537 <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">
4538 </span><dd about="#mwt2">two
4540 <dd>three</dd></dl></dd>
4541 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4549 External links: non-bracketed
4551 Non-bracketed: http://example.com
4553 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4557 # parsoid doesn't explicitly mark autonumbered links, see T55505
4559 External links: numbered
4561 Numbered: [http://example.com]
4562 Numbered: [http://example.net]
4563 Numbered: [http://example.com]
4565 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4566 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4567 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4570 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4571 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4572 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4576 External links: specified text
4578 Specified text: [http://example.com link]
4580 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4585 External links: trail
4587 Linktrails should not work for external links: [http://example.com link]s
4589 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4594 External links: dollar sign in URL
4596 http://example.com/1$2345
4598 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4602 # parsoid doesn't explicitly mark autonumbered links, see T55505
4604 External links: dollar sign in URL (autonumber)
4606 [http://example.com/1$2345]
4608 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4611 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4615 External links: open square bracket forbidden in URL (T6377)
4617 parsoid=wt2html,wt2wt,html2html
4619 http://example.com/1[2345
4621 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4624 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4628 External links: open square bracket forbidden in URL (named) (T6377)
4630 parsoid=wt2html,html2html
4632 [http://example.com/1[2345]
4634 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4637 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4640 # parsoid adds a space before the link name
4642 External links: open square bracket forbidden in URL (named) (T6377)
4645 [http://example.com/1 [2345]
4647 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4652 External links: nowiki in URL link text (T8230)
4654 [http://example.com/ <nowiki>''example site''</nowiki>]
4656 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4661 External links: newline forbidden in text (T8230 regression check)
4663 [http://example.com/ first
4666 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4672 External links: Pipe char between url and text
4674 [http://example.com | link]
4676 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4681 External links: protocol-relative URL in brackets
4683 [//example.com/ Test]
4685 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4689 # parsoid doesn't explicitly mark autonumbered links, see T55505
4691 External links: protocol-relative URL in brackets without text
4695 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4698 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4702 External links: protocol-relative URL in free text is left alone
4706 <p>//example.com/Foo
4711 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4713 foo//example.com/Foo
4715 <p>foo//example.com/Foo
4719 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4721 External links: with no contents
4723 parsoid=wt2html,wt2wt
4725 [http://en.wikipedia.org/wiki/Foo]
4727 [[wikipedia:Foo|Bar]]
4729 [[wikipedia:Foo|<span>Bar</span>]]
4731 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4732 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4733 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4736 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4737 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4738 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4742 External links: Free with trailing punctuation
4752 http://example.com/url_with_(brackets)
4753 (http://example.com/url_without_brackets)
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
4758 http://example.com/url_with_entity 
4759 http://example.com/url_with_entity 
4760 http://example.com/url_with_entity<
4761 http://example.com/url_with_entity<
4762 http://example.com/url_with_entity<
4764 <p><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">http://example.com</a>.
4768 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4769 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4770 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4771 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4772 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4773 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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> 
4778 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4779 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4780 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4781 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4782 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4785 <p><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">http://example.com</a>.
4789 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
4790 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
4791 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
4792 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
4793 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4794 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4795 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4796 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4797 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
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":"&nbsp;","srcContent":" "}'> </span>
4799 <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>
4800 <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>
4801 <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>
4802 <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>
4803 <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>
4807 External links: tricky Parsoid html2html case
4809 parsoid=wt2html,wt2wt,html2html
4811 http://example.com/url_with_entity&amp;
4813 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4816 <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>
4820 External links: Free with trailing quotes (T113666)
4822 '''News:''' Stuff here
4826 <p><b>News:</b> Stuff here
4827 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4830 <p><b>News:</b> Stuff here</p>
4831 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4835 External links: with entity
4837 [http:// www.librarieswithoutborders.org Libraries without borders]
4839 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4842 <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>
4846 External links: Lone protocols are never linked (T105697)
4865 External links: No preceding word characters allowed (T67278)
4867 NOPEhttp://example.com
4868 N0http://example.com
4869 ok:http://example.com
4870 ok-http://example.com
4872 <p>NOPEhttp://example.com
4873 N0http://example.com
4874 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4875 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4880 External links: nofollow domain exception
4882 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4884 <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>.
4891 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4893 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4898 External image from https
4900 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4902 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4907 External image (when not allowed)
4909 wgAllowExternalImages=0
4911 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4913 <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>
4918 Link to non-http image, no img tag
4920 Link to non-http image, no img tag: ftp://example.com/test.jpg
4922 <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>
4927 External links: terminating separator
4929 Terminating separator: http://example.com/thing,
4931 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4936 External links: intervening separator
4938 Intervening separator: http://example.com/1,2,3
4940 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4945 External links: old bug with URL in query
4947 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4949 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4954 External links: old URL-in-URL bug, mixed protocols
4956 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4958 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4962 # Since Parsoid is starting to emit canonical wikitext for links,
4963 # [http://example.com http://example.com] will not RT back to that
4966 External links: URL in text
4970 URL in text: [http://example.com http://example.com]
4972 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
4975 <p>URL in text: <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
4979 External links: Clickable images
4981 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4983 <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>
4986 <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>
4990 External links: raw ampersand
4992 Old & use: http://x&y
4994 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4999 External links: encoded ampersand
5001 Old & use: http://x&y
5003 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5006 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5010 External links: encoded equals (T8102)
5012 http://example.com/?foo=bar
5014 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5017 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5021 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5022 ## does it number them. As discussed in T55505, we can identify
5023 ## autonumbered links via CSS.
5027 External links: [raw ampersand]
5029 Old & use: [http://x&y]
5031 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5034 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5037 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5038 # mode will return the [raw ampersand] wikitext
5040 External links: [encoded ampersand]
5042 parsoid=wt2html,wt2wt,html2html
5044 Old & use: [http://x&y]
5046 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5049 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5053 External links: [raw equals]
5055 [http://example.com/?foo=bar]
5057 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5060 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5063 # note that parsoid html is identical to [raw equals] case; so html2wt
5064 # mode will return the [raw equals] wikitext
5066 External links: [encoded equals] (T8102)
5068 parsoid=wt2html,wt2wt,html2html
5070 [http://example.com/?foo=bar]
5072 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5075 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5078 # xxx parsoid strips the IDN character, so the round-trip tests will
5079 # obviously fail and are disabled. --cscott
5081 External links: [IDN ignored character reference in hostname; strip it right off]
5083 parsoid=wt2html,wt2wt,html2html
5085 [http://e‌xample.com/]
5087 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5090 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5093 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5094 # Where an external link could easily circumvent the sanitization of the text of
5095 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5096 # test demands a higher standard. That's a bit strange.
5100 # http://example.com -> [http://example.com|http://example.com]
5101 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5103 # The first example is sanitized, but the second is not. Any security benefits
5104 # from this production are trivial to circumvent. Either remove this test and
5105 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5106 # the test accordingly.
5110 # xxx parsoid strips the IDN character, so the round-trip tests will
5111 # obviously fail and are disabled. --cscott
5113 External links: IDN ignored character reference in hostname; strip it right off
5115 parsoid=wt2html,html2html
5117 http://e‌xample.com/
5119 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5122 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5126 External links: www.jpeg.org (T2554)
5130 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5134 # parsoid doesn't explicitly mark autonumbered links, see T55505
5136 External links: URL within URL (T2002)
5138 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5140 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5143 <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>
5147 T2361: URL inside bracketed URL
5149 [http://www.example.com/foo http://www.example.com/bar]
5151 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5156 T2361: URL within URL, not bracketed
5158 http://www.example.com/foo?=http://www.example.com/bar
5160 <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>
5165 T2289: ">"-token in URL-tail
5167 http://www.example.com/<hello>
5169 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5174 T2289: literal ">"-token in URL-tail
5176 http://www.example.com/<b>html</b>
5178 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5181 <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>
5185 T2289: ">"-token in bracketed URL
5187 [http://www.example.com/<hello> stuff]
5189 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5194 T2289: literal ">"-token in bracketed URL
5196 [http://www.example.com/<b>html</b> stuff]
5198 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5203 T2289: literal double quote at end of URL
5205 http://www.example.com/"hello"
5207 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5212 T2289: literal double quote in bracketed URL
5214 [http://www.example.com/"hello" stuff]
5216 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5221 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5223 [http://www.example.com test]
5225 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5230 External links: link text with spaces
5232 [http://www.example.com a b c]
5233 [http://www.example.com ''a'' ''b'']
5235 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5236 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5240 # Note edge case difference between PHP and Parsoid here.
5242 External links: wiki links within external link (T5695)
5244 parsoid=wt2html,html2html
5246 [http://example.com [[wikilink]] embedded in ext link]
5248 [http://example.com test [[wikilink]] embedded in ext link]
5250 <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>
5251 </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>
5254 <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>
5255 <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>
5259 T2787: Links with one slash after the url protocol are invalid
5263 [http:/example.com title]
5265 <p>http:/example.com
5266 </p><p>[http:/example.com title]
5271 Bracketed external links with template-generated invalid target
5273 [{{echo|http:/example.com}} title]
5275 <p>[http:/example.com title]
5279 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5281 Broken wikilinks (but not external links) prevent templates from closing
5285 [http://example.com x
5287 {{echo|[http://example.com x}}
5293 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5294 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5296 </p><p>{{echo|[[Foo}}
5299 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5300 <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>
5302 <p>{{echo|[[Foo}}</p>
5306 Wikilinks with embedded newlines are not broken
5317 <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>
5329 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5333 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5334 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5338 T4702: Mismatched <i>, <b> and <a> tags are invalid
5340 ''[http://example.com text'']
5341 [http://example.com '''text]'''
5342 ''Something [http://example.com in italic'']
5343 ''Something [http://example.com mixed''''', even bold]'''
5344 '''''Now [http://example.com both''''']
5346 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5347 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5348 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5349 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5350 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5358 http://www.example.com/?title=AT%26T
5360 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5363 <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>
5366 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5367 # % is actually legal in HTML5. Any change in output would need testing though.
5369 T6781, T7267: %25 in URL
5371 http://www.example.com/?title=100%25_Bran
5373 <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>
5376 <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>
5380 T6781, T7267: %28, %29 in URL
5382 http://www.example.com/?title=Ben-Hur_%281959_film%29
5384 <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>
5387 <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>
5392 T6781: %26 in autonumber URL
5394 [http://www.example.com/?title=AT%26T]
5396 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5399 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5403 T6781, T7267: %26 in autonumber URL
5405 [http://www.example.com/?title=100%25_Bran]
5407 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5410 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5414 T6781, T7267: %28, %29 in autonumber URL
5416 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5418 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5421 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5426 T6781: %26 in bracketed URL
5428 [http://www.example.com/?title=AT%26T link]
5430 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5433 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5437 T6781, T7267: %25 in bracketed URL
5439 [http://www.example.com/?title=100%25_Bran link]
5441 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5446 T6781, T7267: %28, %29 in bracketed URL
5448 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5450 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5453 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5457 External link containing a period in the anchor. (T65947)
5459 [//foo.org/bar#baz. bang]
5461 [//foo.org/bar. bang]
5463 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5464 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5467 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5468 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5472 External link containing a single quote. (T65947)
5476 [//foo.org/bar'baz bang]
5478 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5479 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5482 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5483 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5487 External link containing double-single-quotes in text '' (T6598 sanity check)
5489 Some [http://example.com/ pretty ''italics'' and stuff]!
5491 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5496 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5498 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5500 <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>
5504 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5506 External link containing double-single-quotes with no space separating the url from text in italics
5508 [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]].]
5510 <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>.
5513 <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>
5517 External link with comments in link text
5519 [http://www.google.com Google <!-- comment -->]
5521 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5524 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5528 External link to bare IPv4 address
5530 [http://192.168.0.1 Link]
5532 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5535 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5539 URL-encoding in URL functions (single parameter)
5541 {{localurl:Some page|amp=&}}
5543 <p>/index.php?title=Some_page&amp=&
5548 URL-encoding in URL functions (multiple parameters)
5550 {{localurl:Some page|q=?&=&}}
5552 <p>/index.php?title=Some_page&q=?&amp=&
5559 http://example.com/index.php?foozoid%5B%5D=bar
5561 http://example.com/index.php?foozoid[]=bar
5563 <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>
5564 </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>
5567 <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>
5569 <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>
5573 IPv6 urls, autolink format (T23261)
5575 http://[2404:130:0:1000::187:2]/index.php
5577 Examples from RFC 2373, section 2.2:
5579 *http://[1080::8:800:200C:417A]/unicast
5580 *http://[FF01::101]/multicast
5581 *http://[::1]/loopback
5582 *http://[::]/unspecified
5583 *http://[::13.1.68.3]/ipv4compat
5584 *http://[::FFFF:129.144.52.38]/ipv4compat
5586 Examples from RFC 2732, section 2:
5588 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5589 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5590 *http://[3ffe:2a00:100:7031::1]
5591 *http://[1080::8:800:200C:417A]/foo
5592 *http://[::192.9.5.5]/ipng
5593 *http://[::FFFF:129.144.52.38]:80/index.html
5594 *http://[2010:836B:4179::836B:4179]
5596 <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>
5597 </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:
5599 <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>
5600 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5601 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5602 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5603 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5604 <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>
5605 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5607 <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>
5608 <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>
5609 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5610 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5611 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5612 <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>
5613 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5616 <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>
5618 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5619 <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>
5620 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5621 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5622 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5623 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5624 <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>
5626 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5627 <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>
5628 <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>
5629 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5630 <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>
5631 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5632 <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>
5633 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5637 IPv6 urls, bracketed format (T23261)
5639 [http://[2404:130:0:1000::187:2]/index.php test]
5641 Examples from RFC 2373, section 2.2:
5643 *[http://[1080::8:800:200C:417A] unicast]
5644 *[http://[FF01::101] multicast]
5645 *[http://[::1]/ loopback]
5646 *[http://[::] unspecified]
5647 *[http://[::13.1.68.3] ipv4compat]
5648 *[http://[::FFFF:129.144.52.38] ipv4compat]
5650 Examples from RFC 2732, section 2:
5652 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5653 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5654 *[http://[3ffe:2a00:100:7031::1] 3]
5655 *[http://[1080::8:800:200C:417A]/foo 4]
5656 *[http://[::192.9.5.5]/ipng 5]
5657 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5658 *[http://[2010:836B:4179::836B:4179] 7]
5660 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5661 </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:
5663 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5664 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5665 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5666 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5667 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5668 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5669 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5671 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5672 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5673 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5674 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5675 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5676 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5677 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5680 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5682 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5683 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5684 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5685 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5686 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5687 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5688 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5690 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5691 <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>
5692 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5693 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5694 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5695 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5696 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5697 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5701 Non-extlinks in brackets
5710 [{{echo|foo}} ''bar'']
5711 [{{echo|foo}}l's] errand
5712 [{{echo|foo}}l's errand]
5714 [url=http://example.com]
5715 [http:// bare protocols don't count]
5728 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5729 [http:// bare protocols don't count]
5737 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5738 [<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]
5739 [<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>]
5740 [<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
5741 [<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]
5742 [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>]
5743 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5744 [http:// bare protocols don't count]</p>
5748 Percent encoding in external links
5750 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5752 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5755 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5759 Use url link syntax for links where the content is equal the link target
5763 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5766 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5770 Parenthesis in external links, especially URL links
5774 http://example.com/test)
5776 http://example.com/(test)
5778 http://example.com/((test)
5780 (http://example.com/(test))
5782 (http://example.com/(test)))))
5784 http://example.com/a)b
5786 [http://example.com) foo]
5788 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5789 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5790 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5791 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5792 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5793 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5794 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5795 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5798 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
5799 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
5800 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
5801 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
5802 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
5803 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5804 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
5805 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
5809 Parenthesis in external links, w/ transclusion or comment
5811 (http://example.com/{{echo|hi}})
5813 (http://example.com<!-- hi -->)
5815 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5816 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5819 <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>
5821 <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>
5825 Serialize <a> tags with invalid link targets as plain text
5827 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5829 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5830 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5831 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5832 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5835 <nowiki>*</nowiki>text
5836 <nowiki>[[foo]]</nowiki>
5837 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5841 mw:ExtLink -vs- mw:WikiLink (T94723)
5845 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5846 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5847 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5848 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5850 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5851 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5859 [[:en:European_Robin|European Robin]]
5860 [[:en:European_Robin|European Robin]]
5864 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5868 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5870 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5881 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5883 Normal text. '''''Bold italic text.''''' Normal text.
5885 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5886 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5891 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5892 # parser strips. The wikitext contains just the first half of the bold
5895 Unclosed and unmatched quotes
5897 '''''Bold italic text '''with bold deactivated''' in between.'''''
5899 '''''Bold italic text ''with italic deactivated'' in between.'''''
5903 ..spanning two paragraphs (should not work).'''
5905 '''Bold tag left open
5907 ''Italic tag left open
5911 <!-- Unmatching number of opening, closing tags: -->
5912 '''This year''''s election ''should'' beat '''last year''''s.
5914 ''Tom'''s car is bigger than ''Susan'''s.
5916 Plain ''italic'''s plain
5918 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5919 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5920 </p><p><b>Bold text..</b>
5921 </p><p>..spanning two paragraphs (should not work).
5922 </p><p><b>Bold tag left open</b>
5923 </p><p><i>Italic tag left open</i>
5925 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5926 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5927 </p><p>Plain <i>italic'</i>s plain
5930 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5931 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5932 </p><p><b>Bold text..</b>
5933 </p><p>..spanning two paragraphs (should not work).<b></b>
5934 </p><p><b>Bold tag left open</b>
5935 </p><p><i>Italic tag left open</i>
5938 <!-- Unmatching number of opening, closing tags: -->
5939 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5940 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5941 </p><p>Plain <i>italic'</i>s plain
5948 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5951 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5952 # is the bare minimum required by the spec, see:
5953 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5954 # Parsoid team replies: empty table tags are legal in HTML5
5956 A table with no data.
5969 A table with stray table end tags on start tag line (wt2html)
5973 {|style="color: red;"|}
5975 {|style="color: red;" |}
5979 {|style="color: red;"|} id="foo"
5983 {|style="color: red;" |} id="foo"
5987 <table style="color: red;"></table>
5989 <table style="color: red;">
5995 <table style="color: red;" id="foo">
6001 <table style="color: red;" id="foo">
6010 A table with no data (take 2)
6018 # A table with nothing but a caption is invalid XHTML, we might want to render
6019 # this as <p>caption</p>
6020 # Parsoid team replies: table with only a caption is legal in HTML5
6022 A table with nothing but a caption
6030 </caption><tr><td></td></tr></table>
6033 <table><caption>caption</caption></table>
6037 A table with caption with default-spaced attributes and a table row
6040 |+ style="color: red;" | caption1
6046 <caption style="color: red;">caption1
6055 A table with captions with non-default spaced attributes and a table row
6058 |+style="color: red;"|caption2
6059 |+ style="color: red;"|caption3
6065 <caption style="color: red;">caption2
6067 <caption style="color: red;">caption3
6076 Table td-cell syntax variations
6081 |style='color:red;'|baz
6082 |style='color:red;'||baz
6089 <td>foo bar foo</td>
6092 <td style="color:red;">baz
6094 <td>style='color:red;'</td>
6122 Simple table but with multiple dashes for row wikitext
6141 Multiplication table
6143 {| border="1" cellpadding="2"
6144 |+Multiplication table
6164 <table border="1" cellpadding="2">
6165 <caption>Multiplication table
6212 Accept "||" in table headings
6227 Accept "!!" in table data
6241 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6246 Accept "||" in indented table headings
6256 </th></tr></table></dd></dl>
6261 Accept "!!" in templates
6275 <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>
6279 Accept "!!" in table headings after newline
6296 <p>b!!c</p></th></tr>
6301 Accept "!!" in table data of mixed wikitext / html syntax
6305 <tr><td>b!!c</td></tr>
6311 </th></tr><tr><td>b!!c</td></tr>
6315 <tbody><tr><th>a</th></tr>
6316 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6321 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6338 Accept "| !" at start of line in tables (ignore !-attribute)
6342 |!style="color:red"|bar
6354 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 +/-
6358 |style='color:red;'|+1
6359 |style='color:blue;'|-1
6371 <td style="color:red;">+1
6373 <td style="color:blue;">-1
6397 |rowspan=2|Cell 2, row 1 (and 2)
6408 <td rowspan="2">Cell 2, row 1 (and 2)
6426 {| bgcolor=#ABCDEF border=2
6431 |the original table again
6439 <table bgcolor="#ABCDEF" border="2">
6447 <td>the original table again
6453 Invalid attributes in table cell (T3830)
6467 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6471 | title="foo<nowiki>|</nowiki>" |bar
6472 | title="foo<nowiki>|</nowiki>" bar
6479 <td title="foo|">bar
6481 <td>title="foo|" bar
6486 <tbody><tr><td title="foo">bar</td>
6487 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6488 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6492 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6493 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6494 # *2wt modes will fail.
6496 Table security: embedded pipes
6498 parsoid=wt2html,html2html
6501 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6505 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6506 <td>]" onmouseover="alert(document.cookie)">test
6514 <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>
6518 Element attributes with double ! should not be broken up by <th>
6521 !hi <div class="!!">ha</div> ho
6526 <th>hi <div class="!!">ha</div> ho
6531 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6536 ! and || in element attributes should not be parsed as <th>/<td>
6539 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6544 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6549 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6553 # FIXME: The output seems broken. Filed as T110268.
6555 ! and || in td attributes should not be parsed as <th>/<td>
6560 |style="color: red !important;" data-contrived="put this here ||"|foo
6565 <td>style="color: red !important;" data-contrived="put this here</td>
6571 <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>
6576 Break on | in element attribute in template
6578 parsoid=wt2html,html2html
6580 {{echo|1=<div class="hi|ho">ha</div>}}
6582 <p>ho">ha</div>
6585 <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>
6589 Break on | in element attribute name in template
6591 {{echo|<div cla|ss="hiho">ha</div>}}
6593 <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>
6597 Don't break on | in extension attribute in template
6599 {{echo|<ref name="hi|ho">ha</ref>}}
6603 <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>
6605 <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>
6608 ## We don't support roundtripping of these attributes in Parsoid.
6609 ## Selective serialization takes care of preventing dirty diffs.
6610 ## But, on edits, we dirty-diff the invalid attribute text.
6612 Invalid text in table attributes should be discarded
6616 {| <span>boo</span> style='border:1px solid black'
6617 | <span>boo</span> style='color:blue' |1
6618 |<span>boo</span> style='color:blue'|2
6621 <table style="border:1px solid black">
6623 <td style="color:blue">1
6625 <td style="color:blue">2
6629 <table style="border:1px solid black">
6631 <td style="color:blue">1</td>
6632 <td style="color:blue">2</td>
6638 Invalid text in table attributes should be preserved by selective serializer
6641 "modes": ["selser"],
6643 ["td:first-child", "text", "abc"],
6644 ["td + td", "text", "xyz"]
6648 {| <span>boo</span> style='border:1px solid black'
6649 | <span>boo</span> style='color:blue' | 1
6650 |<span>boo</span> style='color:blue'| 2
6653 {| <span>boo</span> style='border:1px solid black'
6654 | <span>boo</span> style='color:blue' |abc
6655 |<span>boo</span> style='color:blue'|xyz
6660 1. Template-generated table cell attributes and cell content
6665 || {{table_attribs_5}}
6666 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6667 |align=center {{table_attribs}}
6668 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6673 <td style="color:red;">Foo
6675 <td style="color:red;">Foo
6677 <td>style="color:red;"</td>
6680 <td style="color:red;">Foo
6682 <td align="center" style="color:red;">Foo
6684 <td align="center" style="color:red;">Foo
6690 2. Template-generated table cell attributes and cell content
6693 |{{table_attribs_2}}
6698 <td style="color:red;">Foo
6706 <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>
6707 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6712 3. Template-generated table cell attributes and cell content
6715 !align=center {{table_header_cells}}
6717 |align=center {{table_cells}}
6722 <th align="center" style="color:red;">Foo</th>
6723 <th style="color:red;"><i>Bar</i></th>
6724 <th style="color:brown;"><i>Foo</i> and Baz
6727 <td align="center" style="color:red;">Foo</td>
6728 <td style="color:red;"><i>Bar</i></td>
6729 <td style="color:brown;"><i>Foo</i> and Baz
6734 <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>
6735 <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>
6740 4. Template-generated table cell attributes and cell content inside a templated table
6743 !align=center {{table_header_cells}}
6745 |align=center {{table_cells}}
6750 <th align="center" style="color:red;">Foo</th>
6751 <th style="color:red;"><i>Bar</i></th>
6752 <th style="color:brown;"><i>Foo</i> and Baz
6755 <td align="center" style="color:red;">Foo</td>
6756 <td style="color:red;"><i>Bar</i></td>
6757 <td style="color:brown;"><i>Foo</i> and Baz
6761 <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}}]}'>
6762 <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>
6764 <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>
6768 ## Edge case fix to prevent future regressions
6770 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6773 |{{table_attribs_7}}
6778 <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>
6780 <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>
6784 Table with row followed by newlines and table heading
6786 parsoid=wt2html,html2html
6804 Table with empty line following the start tag
6806 parsoid=wt2html,html2html
6824 Table attributes with empty value
6826 parsoid=wt2html,html2html
6839 <tbody><tr><td style="">hello</td></tr>
6844 Wikitext table with a lot of comments
6867 Wikitext table comments represented in parsoid dom
6869 {|<!--c1--><!--c2-->
6878 </td></tr></tbody></table>
6880 <table><!--c1--><!--c2-->
6881 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6882 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
6887 Wikitext table with double-line table cell
6904 Table cell with a single comment
6921 Table-cell after a comment-only-empty-line
6938 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6940 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
6946 Build table with {{!}}
6948 {{{!}} class="wikitable"
6951 {{!}}- style="color:red;"
6952 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
6955 <table class="wikitable">
6961 <tr style="color:red;">
6963 <td style="color:red;">second data
6969 Build table with pipe as data
6971 {| class="wikitable"
6974 |- style="color:red;"
6975 |data|| style="color:red;" |second data
6977 | style="color:red;" |data with | || style="color:red;" | second data with |
6979 ||data with | |||second data with |
6982 <table class="wikitable">
6988 <tr style="color:red;">
6990 <td style="color:red;">second data
6993 <td style="color:red;">data with |</td>
6994 <td style="color:red;">second data with |
6997 <td>data with |</td>
6998 <td>second data with |
7004 Build table with wikilink
7006 {| class="wikitable"
7007 !header||second header
7008 |- style="color:red;"
7009 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7011 |data||second data [[Main Page|link|text with pipe]]
7014 <table class="wikitable">
7019 <tr style="color:red;">
7020 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7021 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7025 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7030 # The expected HTML structure in this test is debatable. The PHP parser does
7031 # not parse this kind of table at all. The main focus for Parsoid is on
7032 # round-tripping, so this output is ok for now. TODO: revisit!
7034 Wikitext table with html-syntax row
7044 <td>foo</td></tr></tbody></table>
7048 Fostered content in tables: Plain text
7050 parsoid=wt2html,html2html
7068 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7069 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7071 </tr></tbody></table>
7075 Fostered content in tables: Lists
7077 parsoid=wt2html,html2html
7090 <ul><li>a</li></ul><table>
7095 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7096 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7098 </tr></tbody></table>
7102 Template generated table cell with attributes
7106 {{table_attribs_4}} ||a||b
7112 <td style="background-color:#DC241f;" width="10px"></td>
7115 </td></tr></tbody></table>
7118 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7119 <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>
7123 Parsoid: Round-trip tables directly followed by content (T53219)
7125 parsoid=wt2html,wt2wt
7138 </td></tr></tbody></table><p> bar
7142 </td></tr></tbody></table><p><b>quux</b>
7147 Parsoid: Default to a newline after tables in new content (T53219)
7152 <tr><td>foo</td></tr></tbody></table> bar
7154 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7159 <nowiki> </nowiki>bar
7167 Parsoid: newline inducing block nodes don't suppress <nowiki>
7179 Parsoid: Row-syntax table headings followed by comment & table cells
7181 parsoid=wt2html,wt2wt
7185 <!-- foo --> ||baz||quux
7199 <tbody><tr><th> foo </th><th> bar
7200 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7205 Parsoid: Recover better from broken table attributes
7219 </td></tr></tbody></table>
7224 <p>foo</p></td></tr>
7229 Tables: Digest broken attributes on table and tr tag
7240 <tr class='mw-empty-elt'></tr>
7241 <tr class='mw-empty-elt'></tr>
7245 # T137406: Whitespace in the HTML
7247 1. Generate correct wikitext for tables with thead/tbody/tfoot
7252 <caption>Test</caption>
7314 </td></tr></tbody></table>
7317 # T137406: No whitespace in the HTML
7319 2. Generate correct wikitext for tables with thead/tbody/tfoot
7323 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7333 Testing serialization after deletion in references
7342 hi <ref><div id="x">ho</div></ref>
7352 Testing serialization after deletion of table cells
7355 "modes": ["wt2wt", "selser"],
7363 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7373 Testing selser after addition of new row before first row (T125419)
7376 "modes": ["wt2wt", "selser"],
7378 [ "tr", "before", "<tr><td>X</td></tr>" ]
7394 Serialize new table rows in a HTML table using HTML tags
7397 "modes": ["wt2wt", "selser"],
7399 [ "tr", "before", "<tr><td>X</td></tr>" ]
7403 <table><tr><td>a</td></tr></table>
7405 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7409 Serialize new table cells in a HTML row using HTML tags
7412 "modes": ["wt2wt", "selser"],
7414 [ "td", "before", "<td>X</td>" ]
7418 <table><tr><td>a</td></tr></table>
7420 <table><tr><td>X</td><td>a</td></tr></table>
7424 Wikitext tables can be nested inside HTML tables
7428 <table data-parsoid='{"stx":"html"}'>
7431 <tr><td>foo</td></tr>
7446 Serialize wikitext list items as HTML list items when embedded in a HTML list
7450 <ul data-parsoid='{"stx": "html"}'>
7451 <li data-parsoid='{}'>a</li>
7461 # SSS FIXME: Is this actually a good thing given the
7462 # odd nested list output that is generated by MW?
7463 # <ul><li>foo<ul>..</ul></li></ul> instead of
7464 # <ul><li>foo</li><ul>..</ul></ul>
7466 Wikitext lists can be nested inside HTML lists
7470 <ul data-parsoid='{"stx": "html"}'>
7471 <li data-parsoid='{"stx": "html"}'>a
7476 <ul data-parsoid='{"stx": "html"}'>
7499 Plain link, capitalized
7503 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7508 Plain link, uncapitalized
7512 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7519 [[Main Page|The Main Page]]
7521 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7526 Piped link with comment in link text
7528 [[Main Page|The Main<!--front--> Page]]
7530 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7535 Piped link with multiple pipe characters in link text
7537 [[Main Page||The|Main|Page|]]
7539 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7542 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7546 Piped link with no link text
7548 [[Thomas Bek (bishop of St David's)|]]
7550 <p>[[Thomas Bek (bishop of St David's)|]]
7553 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7557 Piped link with empty link text
7559 [[Main Page|<nowiki/>]] - empty nowiki
7560 [[Main Page| ]] - empty space
7561 [[Main Page| ]] - empty non breaking space
7563 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7564 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7565 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7568 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7569 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7570 <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>
7578 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7583 Broken link with fragment
7585 [[Zigzagzogzagzig#zug]]
7587 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7592 Special page link with fragment
7594 [[Special:Version#anchor]]
7596 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7601 Nonexistent special page link with fragment
7603 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7605 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7612 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7614 <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>
7621 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7623 <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>!!!
7634 T45661: Piped links with identical prefixes
7636 [[prefixed article|prefixed articles with spaces]]
7638 [[prefixed article|prefixed articlesaoeu]]
7640 [[Main Page|Main Page test]]
7642 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7643 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7644 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7650 Link with HTML entity in suffix / tail
7652 [[Main Page]]", [[Main Page]]a
7654 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7657 <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>
7661 Link with 3 brackets
7672 Link with 4 brackets
7676 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7681 Piped link with 3 brackets
7683 [[[main page|the main page]]]
7685 <p>[[[main page|the main page]]]
7690 Piped link with extlink-like text
7693 [[Main Page|This is a [bar]]]
7696 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7697 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7698 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7701 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7702 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7703 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7707 Link with multiple pipes
7709 [[Main Page|The|Main|Page]]
7711 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7716 Anchor containing a #. (T65430)
7718 wgFragmentMode=[ 'html5', 'legacy' ]
7720 [[Main Page#And#Link]]
7722 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7725 <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>
7731 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7733 <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>
7738 Link with space in namespace
7740 [[User talk:Foo bar]]
7742 <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>
7747 MemoryAlpha:AlphaTest
7749 This is an article in the MemoryAlpha namespace
7750 (which shadows the memoryalpha interwiki link).
7754 Namespace takes precedence over interwiki link (T53680)
7756 [[MemoryAlpha:AlphaTest]]
7758 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7762 # The previous test doesn't work correctly in html2*, due to not recognizing the
7763 # link as an internal one. This one checks for the correct behavior.
7765 Link to namespace preferred over interwiki with correct rel attribute
7767 parsoid=html2wt,html2html
7769 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7771 [[MemoryAlpha:AlphaTest]]
7775 Piped link to namespace
7777 [[Meta:Disclaimers|The disclaimers]]
7779 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7786 [[Usually caused by a typo (oops}]]
7788 <p>[[Usually caused by a typo (oops}]]
7795 Just a test of an article title containing a percent.
7799 Link containing % (not as a hex sequence)
7802 [[7% Solution|7%25 Solution]]
7804 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7805 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7808 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7809 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7812 # note that the parsoid HTML is identical to the previous test output,
7813 # so the previous test ensures that the html2wt mode will generate the
7814 # "not as a hex sequence" wikitext.
7816 Link containing % as a single hex sequence interpreted to char
7818 parsoid=wt2wt,wt2html,html2html
7821 [[7%25 Solution|7%25 Solution]]
7823 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7824 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7827 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7828 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7832 Link containing % as a double hex sequence interpreted to hex sequence
7836 <p>[[7%2525 Solution]]
7840 ## Example for such a section: == < ==
7842 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7844 wgFragmentMode=[ 'html5', 'legacy' ]
7846 [[%23%3c]][[%23%3e]]
7848 <p><a href="#<">#<</a><a href="#>">#></a>
7851 <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>
7854 ## Example for such a section: == < ==
7856 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7858 wgFragmentMode=[ 'legacy' ]
7860 [[%23%3c]][[%23%3e]]
7862 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7867 Link containing "<#" and ">#" as a hex sequences
7869 [[%3c%23]][[%3e%23]]
7871 <p>[[%3c%23]][[%3e%23]]
7876 Link containing an equals sign
7878 [[Special:BookSources/isbn=4-00-026157-6]]
7880 <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>
7883 <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>
7889 Just a test of an article title containing a tilde.
7892 # note that links containing signatures, like [[Foo~~~~]], are
7893 # massaged by the pre-save transform (PST) and so the tildes are never
7894 # seen by the parser.
7896 Link containing a tilde
7900 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7903 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7907 Link containing double-single-quotes '' (T6598)
7909 [[Lista d''e paise d''o munno]]
7911 <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>
7914 <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>
7918 Link containing double quotes and spaces
7922 <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>
7925 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7929 File containing double quotes and spaces
7931 [[File:Cool "Gator".png]]
7933 <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>
7937 Redirect containing double quotes and spaces
7939 #REDIRECT [[Cool "Gator"]]
7941 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7945 Link containing double-single-quotes '' in text (T6598 sanity check)
7947 Some [[Link|pretty ''italics'' and stuff]]!
7949 <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>!
7952 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7956 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7958 ''Some [[Link|pretty ''italics'' and stuff]]!''
7960 <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>
7965 Link with double quotes in title part (literal) and alternate part (interpreted)
7967 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7971 [[''Pentecoste''|Pentecoste]]
7973 [[''Pentecoste''|''Pentecoste'']]
7975 <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>
7976 </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>
7977 </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>
7978 </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>
7981 <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>
7982 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7983 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7984 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7988 Broken image links with HTML captions (T41700)
7990 [[File:Nonexistent|<script></script>]]
7991 [[File:Nonexistent|100x100px|<script></script>]]
7992 [[File:Nonexistent|<]]
7993 [[File:Nonexistent|a<i>b</i>c]]
7995 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7996 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7997 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7998 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8001 <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>
8002 <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>
8003 <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>
8004 <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>
8010 [[http://www.example.com]]
8012 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8015 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8019 Plain link to URL with link text
8021 [[http://www.example.com Link text]]
8023 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8028 Plain link to protocol-relative URL
8030 [[//www.example.com]]
8032 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8035 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8039 Plain link to protocol-relative URL with link text
8041 [[//www.example.com Link text]]
8043 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8048 Plain link to page with question mark in title
8054 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8055 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8059 # I'm fairly sure the expected result here is wrong.
8060 # We want these to be URL links, not pseudo-pages with URLs for titles....
8061 # However the current output is also pretty screwy.
8064 # I'm changing it to match the current output--it arguably makes more
8065 # sense in the light of the test above. Old expected result was:
8066 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8068 # But I think this test is bordering on "garbage in, garbage out" anyway.
8073 Piped link to URL: [[http://www.example.com|an example URL]]
8075 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8078 <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>
8082 Plain link in template argument
8086 {{echo|[http://www.example.com |123]}}
8088 {{echo|[[http://www.example.com |123]]}}
8090 {{echo|[[http://www.example.com |123]}}
8092 {{echo|[http://www.example.com |123]]}}
8094 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8095 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8096 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8097 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8100 <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>
8102 <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>
8104 <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>
8106 <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>
8110 T2002: [[page|http://url/]] should link to page, not http://url/
8112 [[Main Page|http://url/]]
8114 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8117 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8120 # Parsoid does not mark self-links, by design.
8122 T2337: Escaped self-links should be bold
8126 [[Bug462]] [[Bug462]]
8128 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8131 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8135 Self-link to section should not be bold
8139 [[Main Page#section]]
8141 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8152 Self-link to numeric title
8158 <p><a class="mw-selflink selflink">0</a>
8163 Link to numeric-equivalent title
8169 <p><a href="/wiki/00" title="00">00</a>
8174 <nowiki> inside a link
8176 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8178 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8183 Non-breaking spaces in title
8185 [[ Main Page ]]
8187 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8191 # Add new article for the test below so that it doesn't red-link
8199 Multiple spaces in titles should normalize to a single underscore
8201 parsoid=wt2html,wt2wt
8207 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8208 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8209 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8212 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8213 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8214 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8219 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8225 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8230 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8236 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8241 Internal link with en linktrail: no apostrophes (T29473)
8247 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8252 Internal link with ca linktrail with apostrophes (T29473)
8258 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8263 Internal link with kaa linktrail with apostrophes (T29473)
8269 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8274 Link with multiple ":" in a subpage-supporting namespace (T65636)
8276 [[User:Foo/Test/63636:Bar|Test]]
8278 <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>
8281 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8284 ## Mainly a sanity check for Parsoid
8286 Handle title parsing for subpages
8306 Link to a subpage from a namespace other than main
8313 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8316 <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>
8320 Ensure that transclusion titles are not url-decoded
8322 subpage title=[[Test]]
8325 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8327 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8330 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8334 Purely hash wikilink
8336 title=[[User:Test/123]]
8341 <p><a href="#a">b</a>
8344 <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>
8348 Serialization of purely hash wikilink
8350 title=[[User:Test/123]]
8354 <p><a href="#a">[[</a></p>
8356 [[#a|<nowiki>[[</nowiki>]]
8358 <p><a href="#a">[[</a>
8363 1. Interaction of linktrail and template encapsulation
8367 <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>
8371 2. Interaction of linktrail and template encapsulation
8375 {{echo|Some [[Fool]]}}s
8377 <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>
8381 3. Interaction of linktrail and template encapsulation
8385 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8387 <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>
8397 Internal link with is link prefix
8401 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8403 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8414 Internal link with is link trail and link prefix
8418 [[mótmælendatrú|xxx]]ar
8420 mótmælenda[[söfnuður]]
8421 mótmælenda[[söfnuður|söfnuðir]]
8422 mótmælenda[[söfnuður|söfnuðir]]xxx
8424 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8425 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8426 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8427 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8428 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8433 Parsoid link trail escaping
8435 parsoid=html2wt,html2html
8437 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8443 Parsoid link prefix escaping
8446 parsoid=html2wt,html2html
8448 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8450 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8454 Parsoid link bracket escaping
8456 parsoid=html2wt,html2html
8458 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8459 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8460 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8461 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8462 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8463 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8471 [[[<nowiki/>[[Test]]]]]
8475 [[[[[<nowiki/>[[Test]]]]]]]
8479 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8487 [http://wp.org ''foo'']
8489 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8490 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8491 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8492 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8497 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8499 [[Foo|{{echo|a}} b {{echo|c}}]]
8501 <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>
8505 Link with angle bracket after anchor
8507 wgFragmentMode=[ 'html5', 'legacy' ]
8511 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8514 <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>
8518 Link with angle bracket after anchor (legacy)
8520 wgFragmentMode=[ 'legacy' ]
8524 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8529 ### Interwiki links (see maintenance/interwiki.sql)
8533 Inline interwiki link
8535 parsoid=wt2html,wt2wt,html2html
8537 [[MeatBall:SoftSecurity]]
8539 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8542 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8546 Inline interwiki link with empty title (T4372)
8548 parsoid=wt2html,wt2wt,html2html
8552 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8555 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8558 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8560 Interwiki link encoding conversion (T3636)
8562 parsoid=wt2html,wt2wt
8564 *[[Wikipedia:ro:Olteniţa]]
8565 *[[Wikipedia:ro:Olteniţa]]
8567 <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>
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></ul>
8572 <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>
8573 <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>
8577 <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 <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>
8583 Interwiki link with fragment (T4130)
8585 [[MeatBall:SoftSecurity#foo]]
8587 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8592 Link scenarios with escaped fragments
8594 wgFragmentMode=[ 'html5', 'legacy' ]
8597 [[Foo#Is this great?]]
8598 [[meatball:Foo#Is this great?]]
8600 <p><a href="#Is_this_great?">#Is this great?</a>
8601 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8602 <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>
8605 <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>
8606 <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>
8607 <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>
8611 Link scenarios with escaped fragments (legacy)
8613 wgFragmentMode=[ 'legacy' ]
8616 [[Foo#Is this great?]]
8617 [[meatball:Foo#Is this great?]]
8619 <p><a href="#Is_this_great.3F">#Is this great?</a>
8620 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8621 <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>
8625 # Ideally the wikipedia: prefix here should be proto-relative too
8626 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8627 # define the 'en' prefix, and originally the test used 'wikipedia',
8628 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8631 Different interwiki prefixes mapping to the same URL
8639 [[:wikipedia:Foo|Foo]]
8641 [[wikipedia:en:Foo]]
8643 [[:wikipedia:en:Foo]]
8647 <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>
8649 <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>
8651 <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>
8653 <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>
8655 <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>
8657 <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>
8659 <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>
8663 Interwiki links that cannot be represented in wiki syntax
8666 [[meatball:ok#foo|ok with fragment]]
8667 [[meatball:ok_as_well?|ok ending with ? mark]]
8668 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8669 [http://de.wikipedia.org/wiki/#foo is just fragment]
8672 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8673 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8674 <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>
8675 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8676 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8679 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8680 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8681 <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>
8682 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8683 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8687 Interwiki links: trail
8689 [[wikipedia:Foo|Ba]]r
8691 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8694 <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>
8698 Local interwiki link
8700 parsoid=wt2html,wt2wt,html2html
8702 [[local:Template:Foo]]
8704 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8707 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8710 # Parsoid does not mark self-links, by design.
8712 Local interwiki link: self-link to current page
8715 parsoid=wt2html,wt2wt,html2html
8719 <p><a class="mw-selflink selflink">local:Main Page</a>
8722 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8726 Local interwiki link: prefix only (T66167)
8728 parsoid=wt2html,wt2wt,html2html
8732 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8735 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8739 Local interwiki link: with additional interwiki prefix (T63357)
8741 parsoid=wt2html,wt2wt,html2html
8743 [[local:meatball:Hello]]
8745 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8748 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8752 Multiple local interwiki link prefixes
8754 [[local:local:local:local:mi:local:Foo]]
8756 parsoid=wt2html,wt2wt,html2html
8758 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8761 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8765 ### Interlanguage links
8766 ### Language links (so that searching for '### language' matches..)
8778 <p>Blah blah blah</p>
8779 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8782 ## parsoid html2wt will lose the space variations
8784 Interlanguage link with spacing
8786 parsoid=wt2html,wt2wt,html2html
8794 <p>Blah blah blah</p>
8795 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8799 Double interlanguage link
8808 <p>Blah blah blah</p>
8809 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8810 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8813 ## parsoid html2wt will lose the space variations
8815 Interlanguage link variations
8817 parsoid=wt2html,wt2wt,html2html
8827 <p>Blah blah blah</p>
8828 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8829 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8830 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8834 Escaping of interlanguage links (T129218, T156308)
8838 [[ : zh : Chinese ]]
8841 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8842 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8846 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8847 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8851 Multiple colons escaping interlanguage links
8859 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8864 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8866 [[:::es:Spanish]]</p>
8869 ## parsoid html2wt will normalize the space to _
8871 Space and question mark encoding in interlanguage links (T95473)
8873 parsoid=wt2html,wt2wt,html2html
8881 <p>Blah blah blah</p>
8882 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8886 Interlanguage link, with prefix links
8896 <p>Blah blah blah</p>
8897 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8901 Double interlanguage link, with prefix links (T10897)
8912 <p>Blah blah blah</p>
8913 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8914 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8918 "Extra" interlanguage links (T34189 / gerrit 111390)
8926 <p>Blah blah blah</p>
8927 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8930 ## PHP parser tests script needs an update
8931 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8933 Language links render as inline links if $wgInterwikiMagic=false
8935 wgInterwikiMagic=false
8936 parsoid=wt2html,wt2wt,html2html
8941 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8944 ## PHP parser tests script needs an update
8945 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8947 Language links render as inline links in the Talk namespace
8950 parsoid=wt2html,wt2wt,html2html
8955 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8959 Parsoid-specific test: Wikilinks with should RT properly
8965 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8970 Parsoid T55221: Wikilinks should be properly entity-escaped
8972 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8974 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8975 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8977 He&nbsp;llo [[Foo|He&nbsp;llo]]
8979 He&nbsp;llo He&nbsp;llo
8981 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8982 </p><p>He&nbsp;llo He&nbsp;llo
8986 # html2wt will fail because of title normalization without data-parsoid
8988 Parsoid: handle constructor well
8990 parsoid=wt2html,wt2wt
8996 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8997 </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>
9000 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9002 <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>
9011 # Note that `ko` isn't a known interlanguage prefix
9013 Parsoid: recognize interlanguage links without a target page
9023 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9025 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9028 # Note that `ko` isn't a known interwiki prefix
9030 Parsoid: recognize interwiki links without a target page
9032 parsoid=wt2html,wt2wt,html2html
9038 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9039 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9042 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9043 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9047 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9051 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9054 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9058 Interlanguage link with preceding local interwiki link (T70085)
9060 parsoid=wt2html,wt2wt,html2html
9063 [[local:es:Spanish]]
9066 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9070 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9074 Looks like an interlanguage link, but is actually a local interwiki
9076 parsoid=wt2html,wt2wt,html2html
9082 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9086 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9090 ### Redirects, Parsoid-only
9094 1. Simple redirect to page
9096 #REDIRECT [[Main Page]]
9098 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9102 2. Other redirect variants
9104 #REDIRECT [[Main_Page]]
9106 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9109 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9110 # This tests the Parsoid bail-out code.
9112 3. Other redirect variants
9116 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9118 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9122 4. Redirect to a templated destination
9124 #REDIRECT [[{{echo|Foo}}bar]]
9126 <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"}]]}'/>
9132 parsoid=wt2html,wt2wt
9137 <li>REDIRECT [[]]</li></ol>
9141 Optional colon in #REDIRECT
9143 # the colon is archaic syntax. we support it for wt2html, but we
9144 # don't care that it roundtrips back to the modern syntax.
9145 parsoid=wt2html,html2html
9147 #REDIRECT:[[Main Page]]
9149 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9153 Whitespace in #REDIRECT with optional colon
9155 # the colon and gratuitous whitespace is archaic syntax. we support
9156 # it for wt2html, but we don't care that it roundtrips back to the
9157 # modern syntax (without extra whitespace)
9158 parsoid=wt2html,html2html
9165 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9169 Piped link in #REDIRECT
9171 # content after piped link is ignored. we support this syntax,
9172 # but don't care that the piped link is lost when we roundtrip this.
9175 #REDIRECT [[Main Page|bar]]
9177 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9181 Redirect to category (T104502)
9183 parsoid=wt2html,wt2wt
9185 #REDIRECT [[Category:Foo]]
9187 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9191 Redirect to category with URL encoding (T104502)
9195 #REDIRECT [[Category%3AFoo]]
9197 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9201 Redirect to category page
9203 #REDIRECT [[:Category:Foo]]
9205 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9209 Redirect to image page (1)
9211 #REDIRECT [[File:Wiki.png]]
9213 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9217 Redirect to image page (2)
9219 #REDIRECT [[Image:Wiki.png]]
9221 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9224 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9225 # Next test confirms this.
9227 Redirect to language (1) (T104918)
9229 parsoid=wt2html,wt2wt,html2html
9231 #REDIRECT [[en:File:Wiki.png]]
9233 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9237 Redirect to language (2) (T104918)
9239 #REDIRECT [[:en:File:Wiki.png]]
9241 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9245 Redirect to interwiki (T104918)
9247 #REDIRECT [[meatball:File:Wiki.png]]
9249 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9253 Non-English #REDIRECT
9257 #TILVÍSUN [[Main Page]]
9259 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9263 Redirect syntax under text isn't considered a redirect
9267 #redirect [[Main Page]]
9270 <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>
9278 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9285 Redirect followed by block on the same line
9289 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9291 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9295 Redirect followed by a newline
9297 #REDIRECT [[Main Page]]
9300 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9305 Redirect followed by multiple newlines
9307 #REDIRECT [[Main Page]]
9312 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9319 Drop duplicate redirects
9323 <link rel="mw:PageProp/redirect" href="./Foo"/>
9324 <link rel="mw:PageProp/redirect" href="./Bar"/>
9325 <link rel="mw:PageProp/redirect" href="./Baz"/>
9344 Broken br tag sanitization
9352 # TODO: Fix html2html mode (T53055)!
9354 Parsoid: Broken br tag recognition
9368 Incorrecly removing closing slashes from correctly formed XHTML
9370 <br style="clear:both;" />
9372 <p><br style="clear:both;" />
9377 Failing to transform badly formed HTML into correct XHTML
9379 <br style="clear: left;">
9380 <br style="clear: right;">
9381 <br style="clear: both;">
9383 <p><br style="clear: left;" />
9384 <br style="clear: right;" />
9385 <br style="clear: both;" />
9389 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9390 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9392 Handling html with a div self-closing tag
9401 <p><div title />
9405 <p><div title=bar />
9406 <div title=bar/>
9408 <div title="bar/"></div>
9412 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9413 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9414 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9415 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9416 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9417 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9421 Handling html with a br self-closing tag
9448 Horizontal ruler (should it add that extra space?)
9457 foo </p><hr /><p> bar
9462 Horizontal ruler -- 4+ dashes render hr
9471 Horizontal ruler -- eats additional dashes on the same line
9480 Horizontal ruler -- does not collapse dashes on consecutive lines
9491 Horizontal ruler -- <4 dashes render as plain text
9500 Horizontal ruler -- Supports content following dashes on same line
9512 ### Block-level elements
9521 <ul><li>Common list</li>
9523 <li>item 3</li></ul>
9534 <ol><li>Numbered list</li>
9536 <li>item 3</li></ol>
9540 # the switch from level 3 to ordered should not introduce a newline between
9551 ***#Number on level 4
9553 **#Number on level 3
9554 **#Number on level 3
9558 #**Level 3, but ordered
9561 <ol><li>with numbers</li></ol>
9562 <ul><li>and bullets</li></ul>
9563 <ol><li>and numbers</li></ol></li>
9565 <ul><li>bullet level 2
9566 <ul><li>bullet level 3
9567 <ol><li>Number on level 4</li></ol></li></ul></li>
9569 <ol><li>Number on level 3</li>
9570 <li>Number on level 3</li></ol></li></ul>
9571 <ol><li>number level 2</li></ol></li>
9573 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9574 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9579 1. Nested mixed wikitext and html list
9582 *<ul><li>ho</li></ul>
9587 <li><ul><li>ho</li></ul></li>
9589 <ul><li>ho</li></ul></li></ul>
9593 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9595 <ul><li>ho</li></ul></li></ul>
9599 2. Nested mixed wikitext and html list (incompatible)
9602 :{{echo|<li>ho</li>}}
9605 <dd><li>ho</li></dd></dl>
9609 <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>
9619 <ul><li>bar</li></ul></li></ul>
9629 <ul><li><ul><li>foo</li></ul></li>
9635 Nested lists 3 (first element empty)
9641 <ul><li>bar</li></ul></li></ul>
9646 Nested lists 4 (first element empty)
9651 <ul><li><ul><li></li></ul></li>
9657 Nested lists 5 (both elements empty)
9662 <ul><li><ul><li></li></ul></li>
9668 Nested lists 6 (both elements empty)
9674 <ul><li></li></ul></li></ul>
9679 Nested lists 7 (skip initial nesting levels)
9683 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9688 Nested lists 8 (multiple nesting transitions)
9696 <ul><li><ul><li>bar</li></ul></li>
9697 <li>baz</li></ul></li>
9703 Nested lists 9 (extension interaction)
9709 <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>
9713 1. Lists with start-of-line-transparent tokens before bullets: Comments
9726 2. Lists with start-of-line-transparent tokens before bullets: Template close
9731 <ul><li>foo bar</li>
9737 List items are not parsed correctly following a <pre> block (T2785)
9743 <ul><li><pre>foo</pre></li>
9744 <li><pre>bar</pre></li>
9748 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9749 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9753 # FIXME: Might benefit from a html/parsoid since this has a template
9755 List items from template
9766 *notSOL{{inner list}}
9770 <li>item 2</li></ul>
9773 <li>item 2</li></ul>
9777 <li>item 2</li></ul>
9782 List interrupted by empty line or heading
9790 <ul><li>foo</li></ul>
9791 <ul><li><ul><li>bar</li></ul></li></ul>
9792 <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>
9793 <ul><li>Another list item</li></ul>
9798 Multiple list tags generated by templates
9816 <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
9817 </li><li about="#mwt1">b
9818 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9822 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9825 <!--This line will NOT split the list-->
9827 <!--This line will NOT split the list either-->
9829 <!--foo--> <!----> <!--This line NOT split the list either-->
9840 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9843 <!--This line will NOT split the list-->
9845 <!--This line will NOT split the list either-->
9847 <!--foo--> <!----> <!--This line NOT split the list
9858 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9859 # That pass could possibly be removed.
9861 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9863 parsoid=wt2html,wt2wt
9867 *{{echo|<li>templated li-hack}}
9868 *<!--foo--><li> unsupported li-hack with preceding comments
9871 <li><li>not a li-hack
9876 <li class="mw-empty-elt"></li><li>li-hack</li>
9877 <li class="mw-empty-elt"></li><li>templated li-hack</li>
9878 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
9880 <li class="mw-empty-elt"></li><li>not a li-hack
9885 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
9886 <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>
9887 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
9889 <ul data-parsoid='{"stx":"html"}'>
9890 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9897 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9926 Parsoid: Test of whitespace serialization with Templated bullets
9933 <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>
9937 # ------------------------------------------------------------------------
9938 # The next set of tests are about Parsoid's ability to handle badly nested
9939 # tags (parse, minimize scope of fixup, and roundtrip back)
9940 # ------------------------------------------------------------------------
9942 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
9943 # Parsoid's list handling is more aware of block structure.
9945 Unbalanced closing block tags break a list
9952 <ul><li>a</li></ul></div><div>
9964 Unbalanced closing non-block tags don't break a list
9972 <ul><li>a<span></span></li>
9977 <li>a<span></span></li>
9983 # Parsoid does some post-dom-building cleanup
9984 # which is why its output differs from Remex.
9986 Unclosed formatting tags that straddle lists are closed and reopened
9988 parsoid=wt2html,wt2wt,html2html
9993 <ol><li><s> a</s></li><s>
9994 </s><li><s>b </s></li></ol>
9996 <ol><li><s> a</s></li>
9997 <li><s>b </s></li></ol>
10000 # Output is ugly because of all the misnested tag fixups.
10001 # Remex is wrapping p-tags around empty elements.
10002 # Parsoid has special-case handling of this pattern of
10003 # wrapping lists in formatting tags.
10004 # FIXME: Should we remove this code from Parsoid? Or add
10005 # special support in Remex? If the latter, maybe just wait
10006 # for Parsoid to become the default parser.
10009 1. List embedded in a formatting tag
10016 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10026 # Output is ugly because of all the misnested tag fixups
10027 # Remex is wrapping p-tags around empty elements.
10028 # Parsoid has code that strips useless p-tags.
10030 2. List embedded in a formatting tag in a misnested way
10037 </small></p><small></small><ul><small><li>a</li>
10038 </small><li><small>b</small></li></ul>
10044 <li><small>b</small></li>
10049 Table with missing opening <tr> tag
10051 parsoid=wt2html,wt2wt
10059 <tbody><tr><td>foo</td>
10068 # Note that the current date is hard-coded as
10069 # 1970-01-01T00:02:03Z (a Thursday)
10070 # when running parser tests. The timezone is also fixed to GMT, so
10071 # local date will be identical to current date.
10074 Magic Word: {{CURRENTDAY}}
10083 Magic Word: {{CURRENTDAY2}}
10092 Magic Word: {{CURRENTDAYNAME}}
10101 Magic Word: {{CURRENTDOW}}
10110 Magic Word: {{CURRENTMONTH}}
10119 Magic Word: {{CURRENTMONTH1}}
10128 Magic Word: {{CURRENTMONTHABBREV}}
10130 {{CURRENTMONTHABBREV}}
10137 Magic Word: {{CURRENTMONTHNAME}}
10139 {{CURRENTMONTHNAME}}
10146 Magic Word: {{CURRENTMONTHNAMEGEN}}
10148 {{CURRENTMONTHNAMEGEN}}
10155 Magic Word: {{CURRENTTIME}}
10164 Magic Word: {{CURRENTHOUR}}
10173 Magic Word: {{CURRENTWEEK}} (T6594)
10182 Magic Word: {{CURRENTYEAR}}
10191 Magic Word: {{CURRENTTIMESTAMP}}
10193 {{CURRENTTIMESTAMP}}
10200 Magic Words LOCAL (UTC)
10204 *{{LOCALMONTHNAME}}
10205 *{{LOCALMONTHNAMEGEN}}
10206 *{{LOCALMONTHABBREV}}
10215 *{{LOCALTIMESTAMP}}
10230 <li>19700101000203</li></ul>
10235 Magic Word: {{FULLPAGENAME}}
10237 title=[[User:Ævar Arnfjörð Bjarmason]]
10238 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10242 <p>User:Ævar Arnfjörð Bjarmason
10247 Magic Word: {{FULLPAGENAMEE}}
10249 title=[[User:Ævar Arnfjörð Bjarmason]]
10250 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10254 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10259 Magic Word: {{TALKSPACE}}
10261 title=[[User:Ævar Arnfjörð Bjarmason]]
10262 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10271 Magic Word: {{TALKSPACE}}, same namespace
10273 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10274 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10283 Magic Word: {{TALKSPACE}}, main namespace
10285 title=[[Parser Test]]
10286 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10295 Magic Word: {{TALKSPACEE}}
10297 title=[[User:Ævar Arnfjörð Bjarmason]]
10298 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10307 Magic Word: {{SUBJECTSPACE}}
10309 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10310 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10319 Magic Word: {{SUBJECTSPACE}}, same namespace
10321 title=[[User:Ævar Arnfjörð Bjarmason]]
10322 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10331 Magic Word: {{SUBJECTSPACE}}, main namespace
10333 title=[[Parser Test]]
10334 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10342 Magic Word: {{SUBJECTSPACEE}}
10344 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10345 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10354 Magic Word: {{NAMESPACE}}
10356 title=[[User:Ævar Arnfjörð Bjarmason]]
10357 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10366 Magic Word: {{NAMESPACEE}}
10368 title=[[User:Ævar Arnfjörð Bjarmason]]
10369 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10378 Magic Word: {{NAMESPACENUMBER}}
10380 title=[[User:Ævar Arnfjörð Bjarmason]]
10381 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10383 {{NAMESPACENUMBER}}
10390 Magic Word: {{SUBPAGENAME}}
10392 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10393 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10402 Magic Word: {{SUBPAGENAMEE}}
10404 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10405 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10414 Magic Word: {{ROOTPAGENAME}}
10416 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10417 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10421 <p>Ævar Arnfjörð Bjarmason
10426 Magic Word: {{ROOTPAGENAMEE}}
10428 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10429 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10433 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10438 Magic Word: {{BASEPAGENAME}}
10440 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10441 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10445 <p>Ævar Arnfjörð Bjarmason
10450 Magic Word: {{BASEPAGENAMEE}}
10452 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10453 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10457 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10462 Magic Word: {{TALKPAGENAME}}
10464 title=[[User:Ævar Arnfjörð Bjarmason]]
10465 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10469 <p>User talk:Ævar Arnfjörð Bjarmason
10474 Magic Word: {{TALKPAGENAMEE}}
10476 title=[[User:Ævar Arnfjörð Bjarmason]]
10477 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10481 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10486 Magic Word: {{SUBJECTPAGENAME}}
10488 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10489 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10491 {{SUBJECTPAGENAME}}
10493 <p>User:Ævar Arnfjörð Bjarmason
10498 Magic Word: {{SUBJECTPAGENAMEE}}
10500 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10501 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10503 {{SUBJECTPAGENAMEE}}
10505 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10510 Magic Word: {{NUMBEROFFILES}}
10512 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10521 Magic Word: {{PAGENAME}}
10523 title=[[User:Ævar Arnfjörð Bjarmason]]
10524 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10528 <p>Ævar Arnfjörð Bjarmason
10533 Magic Word: {{PAGENAME}} with metacharacters
10535 title=[['foo & bar = baz']]
10536 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10540 <p><i>'foo & bar = baz'</i>
10545 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10547 title=[[*RFC 1234 http://example.com/]]
10548 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10552 <p>*RFC 1234 http://example.com/
10557 Magic Word: {{PAGENAMEE}}
10559 title=[[User:Ævar Arnfjörð Bjarmason]]
10560 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10564 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10569 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10571 title=[[*RFC 1234 http://example.com/]]
10572 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10576 <p>*RFC_1234_http://example.com/
10581 Magic Word: {{REVISIONID}}
10583 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10590 flags=vary-revision-id
10594 Magic Word: {{SCRIPTPATH}}
10596 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10604 Magic Word: {{STYLEPATH}}
10606 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10615 Magic Word: {{SERVER}}
10617 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10621 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10626 Magic Word: {{SERVERNAME}}
10628 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10637 Magic Word: {{SITENAME}}
10639 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10648 Magic Word: {{PAGELANGUAGE}}
10651 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10660 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10662 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10671 Case-sensitive magic words, when cased differently, should just be template transclusions
10678 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10679 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10680 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10681 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10686 Case-insensitive magic words should still work with weird casing.
10696 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10700 # From plwiki:PLOS_ONE
10702 Parsoid: Page property magic word with magic word contents
10704 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10706 <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>"}]]}'/>
10709 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10710 # But, this is a limitation of our representation and is documented in
10711 # TemplateHandler.js in processSpecialMagicWord
10713 Parsoid: Template-generated DISPLAYTITLE
10715 {{{{echo|DISPLAYTITLE}}:Foo}}
10719 wgAllowDisplayTitle=true
10720 wgRestrictDisplayTitle=false
10725 <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"}]]}'/>
10729 Namespace 1 {{ns:1}}
10738 Namespace 1 {{ns:01}}
10747 Namespace 0 {{ns:0}} (T6783)
10755 Namespace 0 {{ns:00}} (T6783)
10763 Namespace -1 {{ns:-1}}
10772 Namespace User {{ns:User}}
10781 Namespace User talk {{ns:User_talk}}
10790 Namespace User talk {{ns:uSeR tAlK}}
10799 Namespace File {{ns:File}}
10808 Namespace File {{ns:Image}}
10817 Namespace (lang=de) Benutzer {{ns:User}}
10828 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10834 <p>Benutzer Diskussion
10841 {{urlencode:hi world?!}}
10842 {{urlencode:hi world?!|WIKI}}
10843 {{urlencode:hi world?!|PATH}}
10844 {{urlencode:hi world?!|QUERY}}
10854 Magic Word: prioritize type info over data-parsoid
10858 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10864 Magic Word: serialize on separate line (parsoid)
10866 parsoid=wt2wt,html2wt
10872 foo<meta property="mw:PageProp/notoc"/>bar
10876 Magic Word: rt non-english wikis
10883 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10887 __proto__ is treated as normal wikitext (T105997)
10899 Magic links: internal link to RFC (T2479)
10903 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10906 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10910 Magic links: RFC (T2479)
10914 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10917 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a></p>
10921 Magic links: RFC (T67278)
10923 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10925 <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.
10928 <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>
10932 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10934 RFC      822
10938 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10943 <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>
10949 Magic links: ISBN (T3937)
10953 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10956 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10960 Magic links: ISBN (T67278)
10962 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10964 <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.
10967 <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>
10971 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10973 ISBN      978 0 316 09811 3
10979 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10986 <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>
10994 Magic links: PMID incorrectly converts space to underscore
10998 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11001 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></p>
11005 Magic links: PMID (T67278)
11007 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11009 <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.
11012 <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>
11016 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11018 PMID      1234
11022 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11027 <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>
11032 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11033 # since these are ExtLinkText, not MagicLinkText
11035 Magic links: use appropriate serialization for "almost" magic links.
11037 X[[Special:BookSources/0978739256|foo]]
11039 X[https://tools.ietf.org/html/rfc1234 foo]
11041 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11042 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11045 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11046 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11050 Magic links: All disabled (T47942)
11052 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11058 <p>ISBN 0-306-40615-2
11069 Nonexistent template
11071 {{thistemplatedoesnotexist}}
11073 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11078 Template with invalid target containing tags
11080 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11082 <p>{{a<b>b</b>|foo|a=b|a = b}}
11087 Template with invalid target containing unclosed tag
11089 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11091 <p>{{a<b>|foo|a=b|a = b}}</b>
11096 Template with invalid target containing wikilink
11100 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11103 <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>
11107 Template with just whitespace in it, T70421
11111 <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>
11117 This is a test template
11125 <p>This is a test template
11130 Template with explicit namespace
11134 <p>This is a test template
11142 This is a test template with parameter {{{param}}}
11148 {{paramtest|param=foo}}
11150 <p>This is a test template with parameter foo
11155 Template:paramtestnum
11157 [[{{{1}}}|{{{2}}}]]
11161 Template unnamed parameter
11163 {{paramtestnum|Main Page|the main page}}
11165 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11170 Template:templatesimple
11176 Template:templateredirect
11178 #redirect [[Template:templatesimple]]
11182 Template:templateasargtestnum
11188 Template:templateasargtest
11190 {{template{{{templ}}}}}
11194 Template:templateasargtest2
11200 Template with template name as unnamed argument
11202 {{templateasargtestnum|templatesimple}}
11209 Template with template name as argument
11211 {{templateasargtest|templ=simple}}
11218 Template with template name as argument (2)
11220 {{templateasargtest2|templ=templatesimple}}
11227 Template:templateasargtestdefault
11229 {{{{{templ|templatesimple}}}}}
11239 Template with default value
11241 {{templateasargtestdefault}}
11248 Template with default value (value set)
11250 {{templateasargtestdefault|templ=templa}}
11259 {{templateredirect}}
11264 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11268 Template with argument in separate line
11270 {{ templateasargtest |
11278 Template with complex template as argument
11281 param ={{ templateasargtest |
11282 templ = simple }}}}
11284 <p>This is a test template with parameter (test)
11289 Templates with templated name
11291 {{{{echo|echo}}|foo}}
11292 {{{{echo|inner list}} }}
11296 <ul><li>item 1</li></ul>
11299 <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>
11300 <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>
11303 ## Regression test; the output here isn't really that interesting.
11305 Templates with templated name and top level template args
11307 {{1{{2{{{3}}}|4=5}}}}
11309 <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>
11312 # Parsoid markup is deliberate "broken". This is an edge case.
11313 # See long comment in TemplateHandler.js:convertAttribsToString.
11315 Templates with invalid templated targets
11326 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11331 Template with thumb image (with link in description)
11333 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11335 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>
11338 <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>
11340 <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>
11344 Template:complextemplate
11346 {{{1}}} {{paramtest|
11347 param ={{{param}}}}}
11351 Template with complex arguments
11354 param ={{ templateasargtest |
11355 templ = simple }}|[[Template:complextemplate|link]]}}
11357 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11362 T2553: link with two variables in a piped link
11365 |[[{{{1}}}|{{{2}}}]]
11370 <td>[[{{{1}}}|{{{2}}}]]
11375 <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>
11381 Abort table cell attribute parsing on wikilink
11384 |testing [[one|two]] |three||four
11385 |testing one two |three||four
11386 |testing="[[one|two]]" |three||four
11391 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11397 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11403 <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>
11404 <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>
11405 <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>
11410 Don't abort table cell attribute parsing if wikilink is found in template arg
11413 |Test {{#tag:ref|One two "[[three]]" four}}
11417 <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>
11422 Magic variable as template parameter
11424 {{paramtest|param={{SITENAME}}}}
11426 <p>This is a test template with parameter MediaWiki
11433 [[{{{param}}}|link]]
11437 Template parameter as link source
11439 {{linktest|param=Main Page}}
11441 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11446 Template:paramtest2
11448 including another template, {{paramtest|param={{{arg}}}}}
11452 Template passing argument to another template
11454 {{paramtest2|arg='hmm'}}
11456 <p>including another template, This is a test template with parameter 'hmm'
11467 Template as link source
11471 [[{{linktest2}}|Main Page]]
11473 [[{{linktest2}}]]Page
11475 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11476 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11477 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11495 Template infinite loop
11499 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11504 Template from main namespace
11523 T2529: Template with table, not included at beginning of line
11542 T2523: Template shouldn't eat newline (or add an extra one before table)
11562 T2041: Template parameters shown as broken links
11571 Template with targets containing wikilinks
11577 {{[[{{echo|foo}}]]}}
11579 {{{{echo|[[foo}}]]}}
11581 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11582 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11586 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11587 <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>
11588 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11598 Templates: Double quotes as template target
11605 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11609 ## This test is about making sure Parsoid's data-mw is well formed in the
11610 ## face of multiple templates with intersecting and overlapping ranges. The
11611 ## wikitext itself is wretched.
11613 Templates with intersecting and overlapping ranges
11624 </table><p>ho</p><table>
11628 </td></tr></tbody></table>
11630 <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":""}]]}'>
11632 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11634 <tbody><tr><td>hi</td></tr>
11639 Template:MSGNW test
11641 ''None'' of '''this''' should be
11643 but rather passed unmodified
11651 # hmm, fix this or just deprecate msgnw and document its behavior?
11655 {{msgnw:MSGNW test}}
11657 <p>''None'' of '''this''' should be
11659  but rather passed unmodified
11660 {{test}}
11664 <!-- comment -->
11671 {{int:youhavenewmessages|lots of money|not!}}
11673 <p>You have lots of money (not!).
11678 int keyword - non-existing message
11689 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11693 <includeonly> and <noinclude> being included
11704 <onlyinclude>Foo</onlyinclude>bar
11708 <onlyinclude> being included
11720 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11724 <onlyinclude> and <includeonly> being included
11733 <includeonly> and <noinclude> on a page
11735 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11742 Un-closed <noinclude>
11749 <onlyinclude> on a page
11751 <onlyinclude>Foo</onlyinclude>bar
11758 Un-closed <onlyinclude>
11765 Self-closed noinclude, includeonly, onlyinclude tags
11776 Unbalanced includeonly and noinclude tags
11780 |b</noinclude></noinclude>
11781 |c</noinclude></includeonly>
11782 |d</includeonly></includeonly>
11791 <td>c</includeonly>
11793 <td>d</includeonly></includeonly>
11799 Template:Includeonly section
11802 ==Includeonly section==
11808 T8563: Edit link generation for section shown by <includeonly>
11810 {{includeonly section}}
11812 <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>
11813 <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>
11817 # Uses same input as the contents of [[Template:Includeonly section]]
11819 T8563: Section extraction for section shown by <includeonly>
11824 ==Includeonly section==
11832 T8563: Edit link generation for section suppressed by <includeonly>
11835 ==Includeonly section==
11839 <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>
11844 T8563: Section extraction for section suppressed by <includeonly>
11849 ==Includeonly section==
11857 Un-closed <includeonly>
11862 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11865 ## We used to, but no longer wt2wt this test since the default serializer
11866 ## will normalize the include directives to serialize on their own line.
11867 ## Selser will take care of preserving formatting in scenarios where they
11868 ## intermingled with other wikitext.
11870 Includes and comments at SOL
11872 parsoid=wt2html,html2html
11874 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
11881 <includeonly>can have stuff</includeonly>===here===
11884 <h2><span class="mw-headline" id="hu">hu</span></h2>
11889 <h3><span class="mw-headline" id="here">here</span></h3>
11892 <!-- 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>
11894 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11896 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
11899 <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>
11903 # TODO: test with DOM fragment reuse!
11905 Parsoid: DOM fragment reuse
11907 parsoid=wt2wt,wt2html
11909 a{{echo|b<table></table>c}}d
11921 <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>
11923 <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">
11924 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11925 </span><p about="#mwt2">cd</p>
11927 <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">
11929 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11931 </span><p about="#mwt3">b</p>
11935 Parsoid: Merge double tds (T52603)
11940 |{{echo|{{!}} foo}}
11944 <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>
11949 Parsoid: Merge double tds in nested transclusion content (T52603)
11955 |{{echo|{{!}} foo}}
11959 <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}}]}'>
11961 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11967 ### <includeonly> and <noinclude> in attributes
11970 0. includeonly around the entire attribute
11972 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11974 <p><span id="v2">bar</span>
11979 1. includeonly in html attr key
11981 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11983 <p><span id="foo">bar</span>
11988 2. includeonly in html attr value
11990 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11991 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11993 <p><span id="v1">bar</span>
11994 <span id="v1">bar</span>
11999 3. includeonly in part of an attr value
12001 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12003 <p><span style="color:red;">bar</span>
12008 4. includeonly in table attributes
12032 ### Preprocessor precedence tests
12033 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12035 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12037 Preprocessor precedence 1: link is rightmost opening
12043 But close-brace is not a valid character in a link title:
12046 However, we can still tell this was handled as a link in the preprocessor:
12047 {{echo|[[Foo}}|bar]]|bat}}
12049 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12050 </p><p>But close-brace is not a valid character in a link title:
12052 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12056 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12057 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12058 <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>
12062 Preprocessor precedence 2: template is rightmost opening
12071 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12075 Preprocessor precedence 3: language converter is rightmost opening
12091 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12092 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12093 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12097 Preprocessor precedence 4: left-most angle bracket
12108 Template:Precedence5
12114 Preprocessor precedence 5: tplarg takes precedence over template
12116 {{Precedence5|Bullet}}
12118 <ul><li>Bar</li></ul>
12121 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12125 Preprocessor precedence 6: broken link is rightmost opening
12131 {{echo|[[Foo|bar|bat=baz}}
12134 </p><p>{{echo|[[Foo|bar|bat=baz}}
12137 <p>{{echo|[[Foo}}</p>
12138 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12141 # This next test exposes a difference between PHP and Parsoid:
12142 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12143 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12144 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12145 # outer `[[Foo` extends until the `y]]`
12146 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12147 # intermediate result (after template expansion), and link processing
12148 # happens on this intermediate result, which moves the wikilink
12149 # boundary leftward to `[[Foo|Bar]]`
12150 # 2b) Parsoid works in a single step, so it's going to keep the
12151 # wikilink as extending to the `y]]`
12152 # 3a) Then PHP does linktrail processing which slurps up the trailing
12153 # `xy` inside the link.
12154 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12155 # `z` inside the link.
12156 # This is "correct" behavior. Parsoid's basic worldview is that the
12157 # `]]` inside the template shouldn't be allowed to leak out to affect
12158 # the surrounding wikilink. PHP may match Parsoid (in the future)
12159 # if you use {{#balance}} (T114445).
12162 Preprocessor precedence 7: broken template is rightmost opening
12168 [[Foo|{{echo|Bar]]-x}}-y]]-z
12170 Careful: linktrails can move the end of the wikilink:
12171 [[Foo|{{echo|y']]a}}l]]l
12173 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12174 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12175 </p><p>Careful: linktrails can move the end of the wikilink:
12176 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12179 <p>[[Foo|{{echo|Bar]]</p>
12180 <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>
12181 <p>Careful: linktrails can move the end of the wikilink:
12182 <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>
12186 Preprocessor precedence 8: broken language converter is rightmost opening
12197 Template:Preprocessor_precedence_9
12202 ;7: {{{{{{{4}}}}}}}
12206 Preprocessor precedence 9: groups of braces
12208 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12214 <ul><li>Bar</li></ul>
12218 <dd>{Bullet}</dd></dl>
12221 <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}}]}'>
12226 </dl><ul about="#mwt1">
12228 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12237 Template:Preprocessor_precedence_10
12244 ;6: -{{{{{{4}}}}}}-
12245 ;7: -{{{{{{{5}}}}}}}-
12249 Preprocessor precedence 10: groups of braces with leading dash
12253 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12259 <ul><li>Bar-</li></ul>
12266 <ul><li>Bar-</li></ul>
12273 <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}}]}'>
12275 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12278 </dl><ul about="#mwt1">
12280 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12284 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12287 </dl><ul about="#mwt1">
12289 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12293 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12298 Preprocessor precedence 11: found during visual diff testing
12300 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12302 {{echo|-{{echo|-{{echo|x}}}}}}
12304 {{echo|-{{echo|x}}}}
12306 <p><span>-<span>-x</span></span>
12311 <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>
12313 <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>
12315 <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>
12319 Preprocessor precedence 12: broken language converter closed by brace.
12323 This form breaks the template, which is unfortunate:
12324 *{{echo|foo-{bar}bat}}
12326 But if the broken language converter markup is inside an extension
12327 tag, nothing bad happens:
12328 *<nowiki>foo-{bar}bat</nowiki>
12329 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12330 *<pre>foo-{bar}bat</pre>
12331 *{{echo|<pre>foo-{bar}bat</pre>}}
12333 <tag>foo-{bar}bat</tag>
12334 {{echo|<tag>foo-{bar}bat</tag>}}
12337 <p>This form breaks the template, which is unfortunate:
12339 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12340 <p>But if the broken language converter markup is inside an extension
12341 tag, nothing bad happens:
12343 <ul><li>foo-{bar}bat</li>
12344 <li>foo-{bar}bat</li>
12345 <li><pre>foo-{bar}bat</pre></li>
12346 <li><pre>foo-{bar}bat</pre></li></ul>
12347 <pre>'foo-{bar}bat'
12351 <pre>'foo-{bar}bat'
12356 <p>This form breaks the template, which is unfortunate:</p>
12358 <li>{{echo|foo-{bar}bat}}</li>
12360 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12362 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12363 <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>
12364 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12365 <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>
12367 <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>
12371 Preprocessor precedence 13: broken language converter in external link
12375 *[http://example.com/-{foo Example in URL]
12376 *[http://example.com Example in -{link} description]
12377 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12379 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12380 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12381 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12384 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12385 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12386 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12391 Preprocessor precedence 14: broken language converter in comment
12393 *<!--{{foo}}-->...should be ok
12394 *<!---{{foo}}-->...extra dashes
12395 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12397 <ul><li>...should be ok</li>
12398 <li>...extra dashes</li>
12399 <li>foobat...should be ok</li></ul>
12402 <li><!--{{foo}}-->...should be ok</li>
12403 <li><!---{{foo}}-->...extra dashes</li>
12404 <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>
12409 Preprocessor precedence 15: broken brace markup in headings
12411 wgFragmentMode=[ 'html5', 'legacy' ]
12415 __NOTOC__ __NOEDITSECTION__
12424 ===5 foo{{{bar 5===
12429 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12432 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12435 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12438 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12441 <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>
12444 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12448 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12449 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12451 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12453 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12455 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12457 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12459 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12464 Preprocessor precedence 16: matching closing braces to opening braces
12469 -{{{echo|foo}}bar}-
12474 <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>
12478 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12487 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12491 Preprocessor precedence 18: another rightmost wins scenario
12495 {{ -{{{{1|tplarg}}} }} }-
12497 <p>{{ -{tplarg }} }-
12500 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12504 Preprocessor precedence 19: break syntax
12517 ### Token Stream Patcher tests
12519 ### These tests won't always pass wt2wt and other modes because
12520 ### on serialization, the table will be output on a new line.
12521 ### For now, we are blacklisting them, and using this to test selser.
12525 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12527 parsoid=wt2html,wt2wt
12529 {{echo|}}{| width = '100%'
12533 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12534 <tbody><tr><td>foo</td></tr>
12538 ## We used to, but no longer wt2wt this test since the default serializer
12539 ## will normalize the include directives to serialize on their own line.
12540 ## Selser will take care of preserving formatting in scenarios where they
12541 ## intermingled with other wikitext.
12543 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12547 <includeonly>a</includeonly>{| {{{b}}}
12551 <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":""}]]}'>
12552 <tbody><tr><td>c</td></tr>
12557 Table wikitext syntax outside wiki-tables
12561 ! not a table heading
12564 | class="foo bar" | baz
12572 ! not a table heading
12575 | class="foo bar" | baz
12584 ### Testing parsing of templates where a template arg
12585 ### has the same name as the template itself.
12591 {{{quote|{{{1}}}}}}
12595 Templates: Template Name/Arg clash: 1. Use of positional param
12604 Templates: Template Name/Arg clash: 2. Use of named param
12606 {{quote|quote=foo}}
12613 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12622 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12626 Templates: 1. Simple use
12635 Templates: 2. Inside a block tag
12637 <div>{{echo|Foo}}</div>
12638 <blockquote>{{echo|Foo}}</blockquote>
12641 <blockquote>Foo</blockquote>
12645 <blockquote><p>Foo</p></blockquote>
12649 Templates: P-wrapping: 1a. Templates on consecutive lines
12660 Templates: P-wrapping: 1b. Templates on consecutive lines
12674 Templates: P-wrapping: 1c. Templates on consecutive lines
12677 {{echo|bar}} <div>baz</div>
12686 bar </p><div>baz</div>
12690 Templates: P-wrapping: 1d. Template preceded by comment-only line
12699 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12703 Templates: Inline Text: 1. Multiple template uses
12705 {{echo|Foo}}bar{{echo|baz}}
12712 Templates: Inline Text: 2. Back-to-back template uses
12714 {{echo|Foo}}{{echo|bar}}
12721 Templates: Block Tags: 1. Multiple template uses
12723 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12725 <div>Foo</div><div>bar</div><div>baz</div>
12730 Templates: Block Tags: 2. Back-to-back template uses
12732 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12734 <div>Foo</div><div>bar</div>
12738 # This is an edge case relating to paragraph wrapping.
12740 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12745 <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
12750 Templates: Links: 1. Simple example
12752 {{echo|[[Foo|bar]]}}
12754 <p><a href="/wiki/Foo" title="Foo">bar</a>
12759 Templates: Links: 2. Generation of link href
12761 [[{{echo|Foo}}|bar]]
12763 <p><a href="/wiki/Foo" title="Foo">bar</a>
12768 Templates: Links: 3. Generation of part of a link href
12770 [[Fo{{echo|o}}|bar]]
12772 [[Foo{{echo|bar}}]]
12774 [[Foo{{echo|bar}}baz]]
12776 [[Foo{{echo|bar}}|bar]]
12778 [[:Foo{{echo|bar}}]]
12780 [[:Foo{{echo|bar}}|bar]]
12782 <p><a href="/wiki/Foo" title="Foo">bar</a>
12783 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12784 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12785 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12786 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12787 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12792 Templates: Links: 4. Multiple templates generating link href
12794 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12796 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12801 Templates: Links: 5. Generation of link text
12803 [[Foo|{{echo|bar}}]]
12805 <p><a href="/wiki/Foo" title="Foo">bar</a>
12810 Templates: Links: 5. Nested templates (only outermost template should be marked)
12812 {{echo|[[{{echo|Foo}}|bar]]}}
12814 <p><a href="/wiki/Foo" title="Foo">bar</a>
12819 Templates: HTML Tag: 1. Generation of HTML attr. key
12821 <div {{echo|style}}="color:red;">foo</div>
12823 <div style="color:red;">foo</div>
12828 Templates: HTML Tag: 2. Generation of HTML attr. value
12830 <div style={{echo|'color:red;'}}>foo</div>
12832 <div style="color:red;">foo</div>
12837 Templates: HTML Tag: 3. Generation of HTML attr key and value
12839 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12841 <div style="color:red;">foo</div>
12846 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12848 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12850 <div title="This is a long title with just one piece templated">foo</div>
12855 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12857 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12859 <div title="This is a long title with just one piece templated">foo</div>
12864 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12866 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12868 <div title="This is a long title with just one piece templated">foo</div>
12872 # SSS FIXME: While it is great we added support for all this,
12873 # do we want to make this part of the spec? Maybe we want to
12874 # deprecate this kind of usage in the future?
12876 Templates: HTML Tag: 7. Generation of partial attribute key string
12878 <div st{{echo|yle}}="color:red;">foo</div>
12880 <div style="color:red;">foo</div>
12885 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12887 <div {{echo|1=id="v1"}}>bar</div>
12889 <div id="v1">bar</div>
12894 Templates: HTML Tag: 9. Multiple template-generated attributes
12896 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12898 <div id="v1" title="foo">bar</div>
12903 Templates: Support for templates generating attributes and content
12905 {| {{mixed_attr_content_template}}
12910 <table style="color:red;" title="T48811">
12920 <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|}"]}'>
12929 1. Entities and nowikis inside templated attributes should be handled correctly
12931 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12933 <div style="background:#f9f9f9;">foo</div>
12936 <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>
12940 2. Entities and nowikis inside templated attributes should be handled correctly
12943 |{{table_attribs_3}}
12948 <td style="background:#f9f9f9;">Foo
12953 <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>
12958 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12961 |{{table_attribs_3}}
12966 <td style="background:#f9f9f9;">Foo
12970 <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}}]}'>
12971 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12977 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12980 |{{table_attribs_6}} hi
12985 <td style="background: red;">hi
12990 <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>
12995 Templates: HTML Tables: 1. Generating start of a HTML table
12997 {{echo|<table><tr><td>foo</td>}}</tr></table>
12999 <table><tr><td>foo</td></tr></table>
13004 Templates: HTML Tables: 2a. Generating middle of a HTML table
13006 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13008 <table><tr><td>foo</td></tr></table>
13013 Templates: HTML Tables: 2b. Generating middle of a HTML table
13015 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13017 <table><tr><td>foo</td></tr></table>
13022 Templates: HTML Tables: 3. Generating end of a HTML table
13024 <table><tr>{{echo|<td>foo</td></tr></table>}}
13026 <table><tr><td>foo</td></tr></table>
13031 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13033 {{echo|<table>}}<tr><td>foo</td></tr></table>
13035 <table><tr><td>foo</td></tr></table>
13040 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13042 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13044 <table><tr><td>foo</td></tr></table>
13049 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13051 <table><tr>{{echo|<td>}}foo</td></tr></table>
13053 <table><tr><td>foo</td></tr></table>
13058 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13060 <table><tr><td>foo{{echo|</td>}}</tr></table>
13062 <table><tr><td>foo</td></tr></table>
13067 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13069 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13071 <table><tr><td>foo</td></tr></table>
13076 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13078 <table><tr><td>foo</td></tr>{{echo|</table>}}
13080 <table><tr><td>foo</td></tr></table>
13085 Templates: HTML Tables: 5. Proper fostering of categories from inside
13087 parsoid=wt2html,wt2wt
13089 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13090 <!--Two categories (T52330)-->
13091 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13093 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13094 <!--Two categories (T52330)-->
13095 <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>
13099 Templates: Wiki Tables: 1a. Fostering of entire template content
13107 <tr><td></td></tr></table>
13112 <table><tbody><tr><td></td></tr></tbody></table>
13114 <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">
13120 Templates: Wiki Tables: 1b. Fostering of entire template content
13133 <tr><td></td></tr></table>
13141 <tbody><tr><td></td></tr></tbody></table>
13143 <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|}"]}'>
13145 </div><table about="#mwt3">
13151 Templates: Wiki Tables: 2. Fostering of partial template content
13161 <tr><td></td></tr></table>
13166 <div>b</div><table>
13167 <tbody><tr><td></td></tr></tbody></table>
13169 <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">
13176 Templates: Wiki Tables: 3. td-content via multiple templates
13179 {{echo|{{pipe}}a}}{{echo|b}}
13190 Templates: Wiki Tables: 4. Templated tags, no content
13196 <tr><td></td></tr></table>
13201 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13215 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13228 ## This test case is very specific to Parsoid's internals
13229 ## and is hence only tested for Parsoid's code. Parsoid uses
13230 ## a <meta> marker tag for <ref> tags and they are expanded
13231 ## much later. We are verifying that this <meta> tag usage
13232 ## doesn't prevent foster parenting.
13234 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13236 {{PartialTable}}<ref>foo</ref>
13241 <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">
13245 <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>
13249 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13259 <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{{!}}}"]}'>
13260 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13264 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13269 Templates: Lists: Multi-line list-items via templates
13271 *{{echo|a {{nonexistent|
13273 *{{echo|b {{nonexistent|
13276 <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>
13277 <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>
13282 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13284 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13286 <p><i>ab</i>c<i>d</i>e
13291 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13292 (PHP parser generates misnested html)
13294 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13296 <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>
13300 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13301 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13303 parsoid=wt2html,wt2wt
13305 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13307 <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>
13308 <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>
13309 <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>
13313 Templates: Ugly nesting: 4. Divs opened/closed across templates
13315 a<div>b{{echo|c</div>d}}e
13320 <p>a</p><div>bc</div><p>de
13325 Templates: Ugly templates: 3. newline-only template parameter
13334 # This looks like a bug: a single newline triggers p/br for some reason.
13336 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13345 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13346 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13348 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13354 <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
13355 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13359 # T66017 -- ugly wikitext with fostered content generates two template ranges
13360 # that are "identical" and generate nesting cycles in the algorithm
13362 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13364 {{echo|<table><tr><td><table>}}
13368 <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"}'>
13369 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13370 </table></td></tr></tbody></table>
13374 Templates: Parameters substituted at the top-level
13376 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13380 <p><i>who</i> me? <b>never!</b>
13384 <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>
13386 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13390 Templates: Param with empty arg in the final position
13394 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13398 Parser Functions: 1. Simple example
13407 Parser Functions: 2. Nested use (only outermost should be marked up)
13416 ### Pre-save transform tests
13419 pre-save transform: subst:
13425 This is a test template
13429 pre-save transform: normal template
13439 pre-save transform: nonexistent template
13443 {{thistemplatedoesnotexist}}
13445 {{thistemplatedoesnotexist}}
13449 pre-save transform: subst magic variables
13458 # This is T2089, which I fixed. -- wtm
13460 pre-save transform: subst: templates with parameters
13464 {{subst:paramtest|param="something else"}}
13466 This is a test template with parameter "something else"
13470 Template:nowikitest
13472 <nowiki>'''not wiki'''</nowiki>
13476 pre-save transform: nowiki in subst (T3188)
13480 {{subst:nowikitest}}
13482 <nowiki>'''not wiki'''</nowiki>
13486 Template:commenttest
13488 This template has <!-- a comment --> in it.
13492 pre-save transform: comment in subst (T3936)
13496 {{subst:commenttest}}
13498 This template has <!-- a comment --> in it.
13502 pre-save transform: unclosed tag
13506 <nowiki>'''not wiki'''
13508 <nowiki>'''not wiki'''
13512 pre-save transform: mixed tag case
13516 <NOwiki>'''not wiki'''</noWIKI>
13518 <NOwiki>'''not wiki'''</noWIKI>
13522 pre-save transform: unclosed comment in <nowiki>
13526 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13528 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13531 # Leading @ in this template definition works around a limitation
13532 # in parsoid's parserTests which otherwise strips the <span> from the
13533 # result (confusing it for a template wrapper)
13537 @<span onmouseover="alert('crap')">Oh no</span>
13541 (confirming safety of fix for subst T3936)
13543 {{Template:dangerous}}
13545 <p>@<span>Oh no</span>
13550 pre-save transform: comment containing gallery (T7024)
13554 <!-- <gallery>data</gallery> -->
13556 <!-- <gallery>data</gallery> -->
13560 pre-save transform: comment containing extension
13564 <!-- <tag>data</tag> -->
13566 <!-- <tag>data</tag> -->
13570 pre-save transform: comment containing nowiki
13574 <!-- <nowiki>data</nowiki> -->
13576 <!-- <nowiki>data</nowiki> -->
13580 pre-save transform: <noinclude> in subst (T5298)
13590 pre-save transform: <onlyinclude> in subst (T5298)
13594 {{subst:Includes2}}
13602 {{<includeonly>subst:</includeonly>Includes}}
13606 Template:SafeSubstTest
13608 {{<includeonly>safesubst:</includeonly>Includes}}
13612 T24297: safesubst: works during PST
13616 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13622 T24297: safesubst: works during normal parse
13631 subst: does not work during normal parse
13635 <p>{{subst:Includes}}
13640 pre-save transform: context links ("pipe trick")
13644 [[Article (context)|]]
13647 [[Bar:Article (context)|]]
13648 [[:Bar:Article (context)|]]
13650 [[|Article (context)]]
13654 [[Article (context)|Article]]
13655 [[Bar:Article|Article]]
13656 [[:Bar:Article|Article]]
13657 [[Bar:Article (context)|Article]]
13658 [[:Bar:Article (context)|Article]]
13660 [[Article (context)]]
13661 [[Bar:X (Y) Z|X (Y) Z]]
13662 [[:Bar:X (Y) Z|X (Y) Z]]
13666 pre-save transform: context links ("pipe trick") with interwiki prefix
13670 [[interwiki:Article|]]
13671 [[:interwiki:Article|]]
13672 [[interwiki:Bar:Article|]]
13673 [[:interwiki:Bar:Article|]]
13675 [[interwiki:Article|Article]]
13676 [[:interwiki:Article|Article]]
13677 [[interwiki:Bar:Article|Bar:Article]]
13678 [[:interwiki:Bar:Article|Bar:Article]]
13682 pre-save transform: context links ("pipe trick") with parens in title
13684 pst title=[[Somearticle (context)]]
13688 [[Article (context)|Article]]
13692 pre-save transform: context links ("pipe trick") with comma in title
13694 pst title=[[Someplace, Somewhere]]
13697 [[Otherplace, Elsewhere|]]
13698 [[Otherplace, Elsewhere, Anywhere|]]
13700 [[Otherplace, Somewhere|Otherplace]]
13701 [[Otherplace, Elsewhere|Otherplace]]
13702 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13706 pre-save transform: context links ("pipe trick") with parens and comma
13708 pst title=[[Someplace (IGNORED), Somewhere]]
13711 [[Otherplace (place), Elsewhere|]]
13713 [[Otherplace, Somewhere|Otherplace]]
13714 [[Otherplace (place), Elsewhere|Otherplace]]
13718 pre-save transform: context links ("pipe trick") with comma and parens
13720 pst title=[[Who, me? (context)]]
13723 [[Me, Myself, and I (1937 song)|]]
13725 [[Yes, you. (context)|Yes, you.]]
13726 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13730 pre-save transform: context links ("pipe trick") with namespace
13732 pst title=[[Ns:Somearticle]]
13736 [[Ns:Article|Article]]
13740 pre-save transform: context links ("pipe trick") with namespace and parens
13742 pst title=[[Ns:Somearticle (context)]]
13746 [[Ns:Article (context)|Article]]
13750 pre-save transform: context links ("pipe trick") with namespace and comma
13752 pst title=[[Ns:Somearticle, Context, Whatever]]
13756 [[Ns:Article, Context, Whatever|Article]]
13760 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13762 pst title=[[Ns:Somearticle, Context (context)]]
13766 [[Ns:Article (context)|Article]]
13770 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13772 pst title=[[Ns:Somearticle (IGNORED), Context]]
13776 [[Ns:Article, Context|Article]]
13780 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13784 [[Article(context)|]]
13785 [[Bar:Article(context)|]]
13786 [[:Bar:Article(context)|]]
13787 [[|Article(context)]]
13791 [[Article(context)|Article]]
13792 [[Bar:Article(context)|Article]]
13793 [[:Bar:Article(context)|Article]]
13794 [[Article(context)]]
13795 [[Bar:X(Y)Z|X(Y)Z]]
13796 [[:Bar:X(Y)Z|X(Y)Z]]
13800 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13804 [[Article (context)|]]
13805 [[Bar:Article (context)|]]
13806 [[:Bar:Article (context)|]]
13807 [[|Article (context)]]
13811 [[Article (context)|Article]]
13812 [[Bar:Article (context)|Article]]
13813 [[:Bar:Article (context)|Article]]
13814 [[Article (context)]]
13815 [[Bar:X (Y) Z|X (Y) Z]]
13816 [[:Bar:X (Y) Z|X (Y) Z]]
13820 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13824 [[Article(context)|]]
13825 [[Bar:Article(context)|]]
13826 [[:Bar:Article(context)|]]
13827 [[|Article(context)]]
13831 [[Article(context)|Article]]
13832 [[Bar:Article(context)|Article]]
13833 [[:Bar:Article(context)|Article]]
13834 [[Article(context)]]
13835 [[Bar:X(Y)Z|X(Y)Z]]
13836 [[:Bar:X(Y)Z|X(Y)Z]]
13840 pre-save transform: context links ("pipe trick") with commas (T23660)
13844 [[Article (context), context|]]
13845 [[Article (context),context|]]
13846 [[Bar:Article (context), context|]]
13847 [[Bar:Article (context),context|]]
13848 [[:Bar:Article (context), context|]]
13849 [[:Bar:Article (context),context|]]
13851 [[Article (context), context|Article]]
13852 [[Article (context),context|Article]]
13853 [[Bar:Article (context), context|Article]]
13854 [[Bar:Article (context),context|Article]]
13855 [[:Bar:Article (context), context|Article]]
13856 [[:Bar:Article (context),context|Article]]
13860 Parsoid: backwards pipe trick
13867 <p>[[|<b>bar</b>]]</p>
13871 pre-save transform: trim trailing empty lines
13875 Empty lines are trimmed
13881 Empty lines are trimmed
13885 pre-save transform: Signature expansion
13892 * <noinclude>~~~</noinclude>
13893 * <includeonly>~~~</includeonly>
13894 * <onlyinclude>~~~</onlyinclude>
13896 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13897 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13898 * 00:02, 1 January 1970 (UTC)
13899 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13900 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13901 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13906 ParserOutput flags from signature expansion (T84843)
13913 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13914 flags=user-signature
13919 pre-save transform: Signature expansion in nowiki tags (T2093)
13925 <nowiki>~~~~</nowiki>
13927 <includeonly><nowiki>~~~~</nowiki></includeonly>
13929 <noinclude><nowiki>~~~~</nowiki></noinclude>
13931 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13933 {{subst:Foo}} shall be converted to FOO
13935 As well as inside noinclude/onlyinclude
13936 <noinclude>{{subst:Foo}}</noinclude>
13937 <onlyinclude>{{subst:Foo}}</onlyinclude>
13939 But not inside includeonly
13940 <includeonly>{{subst:Foo}}</includeonly>
13944 <nowiki>~~~~</nowiki>
13946 <includeonly><nowiki>~~~~</nowiki></includeonly>
13948 <noinclude><nowiki>~~~~</nowiki></noinclude>
13950 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13952 FOO shall be converted to FOO
13954 As well as inside noinclude/onlyinclude
13955 <noinclude>FOO</noinclude>
13956 <onlyinclude>FOO</onlyinclude>
13958 But not inside includeonly
13959 <includeonly>{{subst:Foo}}</includeonly>
13963 Parsoid: Recognize nowiki with trailing space in tags
13967 <nowiki ><div>[[foo]]</nowiki >
13975 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13982 Parsoid: Recognize nowiki with odd capitalization
13986 <noWikI ><div>[[foo]]</Nowiki >
13988 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13993 Parsoid: Escape nowiki with trailing space in tags
13997 <p><nowiki > foo </nowiki ></p>
13998 <p>a<nowiki />b</p>
13999 <p>c<nowiki/ >d</p>
14001 <nowiki > foo </nowiki >
14009 Parsoid: Escape weird noWikI capitalizations
14013 <p><noWikI > foo </NoWikI ></p>
14015 <noWikI > foo </NoWikI >
14019 ### Message transform tests
14022 message transform: magic variables
14032 message transform: should not transform wiki markup
14042 message transform: <noinclude> in transcluded template (T6926)
14052 message transform: <onlyinclude> in transcluded template (T6926)
14062 {{#special:}} page name, known
14066 {{#special:Recentchanges}}
14068 Special:RecentChanges
14072 {{#special:}} page name with subpage, known
14076 {{#special:Recentchanges/param}}
14078 Special:RecentChanges/param
14082 {{#special:}} page name, unknown
14086 {{#special:foobar nonexistent}}
14088 Special:Foobar nonexistent
14092 {{#speciale:}} page name, known
14096 {{#speciale:Recentchanges}}
14098 Special:RecentChanges
14102 {{#speciale:}} page name with subpage, known
14106 {{#speciale:Recentchanges/param}}
14108 Special:RecentChanges/param
14112 {{#speciale:}} page name, unknown
14116 {{#speciale:foobar nonexistent}}
14118 Special:Foobar_nonexistent
14124 ### For Parsoid-specific tests, see
14125 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14130 parsoid=wt2html,wt2wt,html2html
14132 [[Image:foobar.jpg]]
14134 <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>
14137 <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>
14141 Serialize simple image with span wrapper
14145 <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>
14147 [[File:Foobar.jpg]]
14151 Simple image (using File: namespace, now canonical)
14153 [[File:Foobar.jpg]]
14155 <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>
14158 <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>
14162 Right-aligned image
14164 [[File:Foobar.jpg|right]]
14166 <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>
14169 <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>
14175 [[File:Foobar.jpg|right|Caption text]]
14177 <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>
14180 <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>
14184 Image with caption, T55312 #1
14186 [[File:Foobar.jpg|right|Caption page stuff]]
14188 <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>
14191 <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>
14195 Image with caption, T55312 #2
14197 [[File:Foobar.jpg|right|Caption page=]]
14199 <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>
14202 <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>
14206 Image with caption, T55312 #3
14208 [[File:Foobar.jpg|right|Caption page=stuff]]
14210 <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>
14213 <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>
14217 Image caption with pipe entity
14219 [[File:Foobar.jpg|thumb|one | two]]
14220 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14222 <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>
14223 <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>
14226 <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>
14227 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14231 Allow empty links in image captions (T62753)
14235 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14240 <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>
14243 <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>
14245 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14246 </figcaption></figure>
14250 Titles in unlinked images (T23454)
14252 [[File:Foobar.jpg|link=|stuff]]
14254 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14257 <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>
14261 Link with empty target
14270 Image with link trail
14272 Linktrails should not work for images: [[File:Foobar.jpg]]s
14274 <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
14277 <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>
14281 Image with empty attribute
14283 parsoid=wt2html,wt2wt,html2html
14285 [[File:Foobar.jpg|right||Caption text]]
14287 <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>
14290 <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>
14294 1. Block image with individual attributes from templates
14296 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14298 <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>
14301 <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>
14305 2. Block Image with individual attributes from templates
14307 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14309 <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>
14312 <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>
14316 3. Inline image with individual attributes from templates
14318 [[File:Foobar.jpg|{{echo|50px}}]]
14320 <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>
14323 <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>
14326 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14327 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14329 Image with multiple attributes from the same template
14331 [[File:Foobar.jpg|{{image_attribs}}]]
14333 <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>
14336 <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>
14340 Image with link tails
14344 123[[File:Foobar.jpg]]456
14345 123[[File:Foobar.jpg|right]]456
14346 123[[File:Foobar.jpg|thumb]]456
14348 <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
14350 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
14351 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
14354 <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
14356 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
14357 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
14360 <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>
14361 <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>
14362 <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>
14366 Image with multiple captions -- only last one is accepted
14368 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14370 <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>
14373 <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>
14377 Image with multiple widths -- use last
14379 [[File:Foobar.jpg|200px|300px|caption]]
14381 <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>
14384 <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>
14388 Image with multiple alignments -- use first (T50664)
14392 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14394 [[File:Foobar.jpg|middle|text-top|caption]]
14396 <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>
14397 <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>
14400 <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>
14401 <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>
14405 Image with width attribute at different positions
14407 [[File:Foobar.jpg|200px|right|Caption]]
14408 [[File:Foobar.jpg|right|200px|Caption]]
14409 [[File:Foobar.jpg|right|Caption|200px]]
14411 <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>
14412 <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>
14413 <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>
14416 <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>
14417 <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>
14418 <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>
14421 # a sad bit of backward-compatibility
14423 Image with size specified with pxpx (T15500, T53628)
14425 parsoid=wt2html,wt2wt,html2html
14427 [[File:Foobar.jpg|20pxpx]]
14428 [[File:Foobar.jpg|200x20pxpx]]
14430 <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>
14431 <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>
14434 <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>
14438 Image with link parameter, wiki target
14440 [[File:Foobar.jpg|link=Main Page]]
14442 <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>
14445 <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>
14448 # parsoid T51293 (part 1)
14450 Image with link parameter, URL target
14452 [[File:Foobar.jpg|link=http://example.com/]]
14454 <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>
14457 <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>
14460 # parsoid T51293 (part 2)
14462 Image with link parameter, protocol-less URL target
14464 [[File:Foobar.jpg|link=//example.com/]]
14466 <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>
14469 <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>
14473 Escaping non-block captions (T107435)
14476 "modes": ["wt2wt"],
14478 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14482 [[Image:Foobar.jpg|caption]]
14484 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14487 # wgExternalLinkTarget not supported by Parsoid
14489 Image with link parameter, wgExternalLinkTarget
14491 [[Image:foobar.jpg|link=http://example.com/]]
14493 wgExternalLinkTarget='foobar'
14495 <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>
14500 Image with link parameter, wgNoFollowLinks set to false
14502 [[Image:foobar.jpg|link=http://example.com/]]
14504 wgNoFollowLinks=false
14506 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14511 Image with link parameter, wgNoFollowDomainExceptions
14513 [[Image:foobar.jpg|link=http://example.com/]]
14515 wgNoFollowDomainExceptions='example.com'
14517 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14521 # wgExternalLinkTarget not supported by Parsoid
14523 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14525 [[Image:foobar.jpg|link=http://example.com/|Title]]
14527 wgExternalLinkTarget='foobar'
14529 <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>
14534 Image with empty link parameter
14536 [[File:Foobar.jpg|link=]]
14538 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14541 <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>
14545 Image with link parameter (wiki target) and unnamed parameter
14547 [[File:Foobar.jpg|link=Main_Page|Title]]
14549 <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>
14552 <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>
14556 Image with link parameter (URL target) and unnamed parameter
14558 [[File:Foobar.jpg|link=http://example.com/|Title]]
14560 <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>
14563 <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>
14567 Thumbnail image with link parameter
14570 parsoid=wt2html,wt2wt,html2html
14572 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14574 <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>
14577 <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>
14581 Manually-specified thumbnail image
14585 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14587 <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>
14590 <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>
14594 Manually-specified thumbnail image with explicit link to wiki page
14597 parsoid=wt2html,wt2wt,html2html
14599 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14601 <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>
14604 <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>
14608 Manually-specified thumbnail image with explicit link to url
14611 parsoid=wt2html,wt2wt,html2html
14613 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14615 <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>
14618 <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>
14622 Manually-specified thumbnail image with explicit no link
14625 parsoid=wt2html,wt2wt,html2html
14627 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14629 <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>
14632 <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>
14636 Manually-specified thumbnail image with explicit link and alt text
14639 parsoid=wt2html,wt2wt,html2html
14641 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14643 <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>
14646 <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>
14650 Image with frame and link
14652 parsoid=wt2html,wt2wt,html2html
14654 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14656 <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>
14659 <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>
14663 Image with frame and link and explicit alt
14665 parsoid=wt2html,wt2wt,html2html
14667 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14669 <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>
14672 <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>
14676 Image with wiki markup in implicit alt
14678 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14680 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14682 <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>
14683 </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>
14686 <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>
14688 <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>
14692 Alt image option should handle most kinds of wikitext without barfing
14694 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14696 <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>
14699 <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>
14703 Image with table with attributes in caption
14705 parsoid=wt2html,html2html
14707 [[File:Foobar.jpg|thumb|
14714 <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>
14715 <table class="123">
14716 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14719 </figcaption></figure>
14723 Image with table with rows from templates in caption
14725 [[File:Foobar.jpg|thumb|
14731 <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>
14733 <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>
14735 </figcaption></figure>
14739 Image with nested tables in caption
14741 [[File:Foobar.jpg|thumb|Foo<br />
14750 <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}'/>
14754 <tbody><tr><td>z</td></tr>
14755 </tbody></table></td></tr>
14757 </figcaption></figure>
14760 ###################
14761 # Conflicting image format options.
14762 # First option specified should 'win'.
14763 # All three cases in each test should be identical.
14766 Image with 'frameless' first.
14768 parsoid=wt2html,wt2wt,html2html
14770 [[File:Foobar.jpg|frameless|caption]]
14772 [[File:Foobar.jpg|frameless|frame|caption]]
14774 [[File:Foobar.jpg|frameless|thumb|caption]]
14776 <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>
14777 </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>
14778 </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>
14781 <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 <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>
14783 <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>
14787 Image with 'frame' first.
14789 parsoid=wt2html,wt2wt,html2html
14791 [[File:Foobar.jpg|frame|caption]]
14792 [[File:Foobar.jpg|frame|frameless|caption]]
14793 [[File:Foobar.jpg|frame|thumb|caption]]
14795 <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>
14796 <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>
14797 <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>
14800 <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 <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>
14802 <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>
14806 Image with 'thumb' first.
14808 parsoid=wt2html,wt2wt,html2html
14810 [[File:Foobar.jpg|thumb|caption]]
14811 [[File:Foobar.jpg|thumb|frameless|caption]]
14812 [[File:Foobar.jpg|thumb|frame|caption]]
14814 <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>
14815 <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>
14816 <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>
14819 <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>
14820 <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>
14821 <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>
14824 ###################
14826 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14827 # and https://phabricator.wikimedia.org/T64258
14828 # Foobar has actual size of 1941x220
14829 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14830 # a scalable format.
14831 # 2. Framed images always ignore size options; always render at default size.
14832 # 3. "Unspecified format" and border are the only types which can be
14836 Image: unspecified format and border enlarge
14838 parsoid=wt2html,wt2wt,html2html
14840 [[File:Foobar.jpg|2000px]]
14842 [[File:Foobar.jpg|border|2000px]]
14844 <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>
14845 </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>
14848 <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>
14849 <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>
14853 Image: "unspecified format" and border reduce
14855 parsoid=wt2html,wt2wt,html2html
14857 [[File:Foobar.jpg|1000px]]
14859 [[File:Foobar.jpg|border|1000px]]
14861 <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>
14862 </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>
14865 <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>
14866 <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>
14870 Image: thumbs reduce
14872 parsoid=wt2html,wt2wt,html2html
14874 [[File:Foobar.jpg|thumb|50px]]
14876 <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>
14879 <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>
14883 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14885 parsoid=wt2html,wt2wt,html2html
14887 [[File:Foobar.jpg|thumb|2000px]]
14889 [[File:Foobar.svg|thumb|2000px]]
14891 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
14892 <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>
14895 <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>
14896 <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>
14900 Image: frameless can reduce in size
14902 parsoid=wt2html,wt2wt,html2html
14904 [[File:Foobar.jpg|frameless|50px]]
14906 <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>
14909 <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>
14913 Image: bitmap frameless can't be enlarged past original size, but vector can
14915 parsoid=wt2html,wt2wt,html2html
14917 [[File:Foobar.jpg|frameless|2000px]]
14919 [[File:Foobar.svg|frameless|2000px]]
14921 <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>
14922 </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>
14925 <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>
14926 <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>
14930 Image: framed images are always unscaled.
14932 parsoid=wt2html,wt2wt,html2html
14934 [[File:Foobar.jpg|frame]]
14936 [[File:Foobar.jpg|frame|50px]]
14938 [[File:Foobar.jpg|frame|50x50px]]
14940 [[File:Foobar.jpg|frame|2000px]]
14942 <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 <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>
14944 <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>
14945 <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>
14948 <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>
14949 <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>
14950 <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>
14951 <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>
14954 ###################
14957 Link to image page- image page normally doesn't exists, hence edit link
14958 Add test with existing image page
14959 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14963 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14968 T20784 Link to non-existent image page with caption should use caption as link text
14970 [[:Image:test|caption]]
14972 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14977 Frameless image caption with a free URL
14979 [[File:Foobar.jpg|http://example.com]]
14981 <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>
14984 <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>
14988 Thumbnail image caption with a free URL
14992 [[File:Foobar.jpg|thumb|http://example.com]]
14994 <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>
14997 <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>
15001 Thumbnail image caption with a free URL and explicit alt
15004 parsoid=wt2html,wt2wt,html2html
15006 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15008 <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>
15011 <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>
15015 SVG thumbnails with no language set
15018 [[File:Foobar.svg|thumb|caption]]
15020 <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>
15023 <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>
15027 SVG thumbnails with language de
15029 parsoid=wt2html,wt2wt,html2html
15031 [[File:Foobar.svg|thumb|caption|lang=de]]
15033 <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>
15036 <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>
15040 SVG thumbnails with invalid language code
15042 parsoid=wt2html,wt2wt,html2html
15044 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15046 <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>
15049 <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>
15053 T3887: A ISBN with a thumbnail
15055 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15057 <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>
15060 <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>
15064 T3887: A RFC with a thumbnail
15066 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15068 <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>
15071 <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>
15075 T3887: A mailto link with a thumbnail
15077 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15079 <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>
15082 <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>
15085 # Pending resolution to T2368
15087 T2648: Frameless image caption with a link
15089 [[File:Foobar.jpg|text with a [[link]] in it]]
15091 <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>
15094 <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>
15098 T2648: Frameless image caption with a link (suffix)
15100 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15102 <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>
15105 <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>
15109 T2648: Frameless image caption with an interwiki link
15111 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15113 <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>
15116 <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>
15120 T2648: Frameless image caption with a piped interwiki link
15122 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15124 <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>
15127 <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>
15131 T107474: Frameless image caption with <nowiki>
15133 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15135 <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>
15139 Escape HTML special chars in image alt text
15141 [[File:Foobar.jpg|& < > "]]
15143 <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>
15146 <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>
15150 Escape HTML special chars in image alt text with LanguageConverter
15154 [[File:Foobar.jpg|& < > "]]
15156 <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>
15159 <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>
15163 Entities in file name and attributes
15165 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15167 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15170 <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>
15174 T2499: Alt text should have Ӓ, not &1234;
15176 [[File:Foobar.jpg|♀]]
15178 <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>
15181 <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>
15185 Broken image caption with link
15187 parsoid=wt2html,wt2wt,html2html
15189 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15191 <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.
15194 <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>
15198 Image caption containing another image
15200 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15202 <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>
15205 <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>
15209 Image: caption containing a newline
15211 [[File:Foobar.jpg|This
15214 <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>
15217 <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>
15221 Image: caption containing leading space
15222 (The leading space should not trigger nowiki escaping in wt2wt mode)
15224 [[File:Foobar.jpg|thumb| bar]]
15226 <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>
15229 <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>
15232 # html/php output not have newlines after table, td, th, etc. because
15233 # Linker::makeThumbLink2() replaces the newlines with spaces since
15234 # the table is inside a caption.
15235 # FIXME: Verify if that circa 2004 fix is still required.
15237 Image: caption containing a table
15239 parsoid=wt2html,wt2wt,html2html
15241 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15247 and some more text.]]
15249 <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>
15252 <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
15255 <tr><th>Foo</th><th>Bar</th></tr>
15258 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15262 T5090: External links other than http: in image captions
15264 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15266 <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>
15269 <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>
15275 parsoid=wt2html,wt2wt,html2html
15277 [[Image:foobar.jpg|a|class=b]]
15279 <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>
15282 <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>
15286 Localized image handling (1).
15288 parsoid=wt2html,wt2wt,html2html
15291 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15293 <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>
15296 <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>
15300 Localized image handling (2).
15303 parsoid=wt2html,wt2wt,html2html
15306 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15308 <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>
15311 <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>
15315 Localized image handling (3).
15320 <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>
15322 [[File:Foobar.jpg|بندانگشتی]]
15326 "border", "frameless" and "class" attributes on an image.
15329 parsoid=wt2html,wt2wt,html2html
15331 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15333 <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>
15336 <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>
15339 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15341 Invalid image attributes (T64500)
15344 parsoid=wt2html,wt2wt,html2html
15346 [[File:Foobar.jpg|thumb|float|left|caption]]
15348 [[File:Foobar.jpg|thumb|righ|caption]]
15350 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15352 <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>
15353 <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>
15354 <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>
15357 <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>
15358 <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>
15359 <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>
15365 #REDIRECT [[File:Barfoo.jpg]]
15368 # FIXME: Parsoid should run this test -- but we'd need to teach the
15369 # mockAPI about the redirected Barfoo.jpg image.
15373 [[Image:Barfoo.jpg]]
15375 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15380 Missing image with uploads disabled
15384 [[File:Foobaz.jpg]]
15386 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15389 <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>
15392 # Parsoid-specific testing for images
15393 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15394 # Currently imperfect due to a flaw in the Parsoid testrunner
15396 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15400 Parsoid-specific image handling - simple image with size and middle alignment
15402 [[File:Foobar.jpg|middle|50px]]
15404 <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>
15408 Parsoid-specific image handling - simple image with size, middle alignment,
15409 non-standard namespace alias
15411 parsoid=wt2wt,wt2html,html2html
15413 [[Image:Foobar.jpg|middle|50px]]
15415 <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>
15419 Parsoid-specific image handling - simple image with size and middle alignment
15422 [[File:Foobar.jpg|50px|middle]]
15424 <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>
15428 Parsoid-specific image handling - simple image with size and middle alignment
15429 and non-standard namespace name
15431 parsoid=wt2html,wt2wt,html2html
15433 [[Image:Foobar.jpg|50px|middle]]
15435 <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>
15439 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15441 [[File:Foobar.jpg|500x10px|baseline|caption]]
15443 <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>
15447 Parsoid-specific image handling - simple image with border and size spec
15449 [[File:Foobar.jpg|50px|border|caption]]
15451 <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>
15455 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15457 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15459 <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>
15463 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15466 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15468 <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>
15472 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15474 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15476 <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>
15480 Parsoid-specific image handling - thumbnail with specific size, halign,
15481 valign, and caption (existing content)
15483 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15485 <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>
15489 Parsoid-specific image handling - framed image with specific size and caption
15492 parsoid=wt2html,wt2wt,html2html
15494 [[File:Foobar.jpg|frame|500x50px|caption]]
15496 <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>
15500 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15503 parsoid=wt2html,wt2wt,html2html
15505 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15507 <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>
15511 Parsoid-specific image handling - frameless image with specific size, border, and caption
15513 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15515 <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>
15519 Parsoid-specific image handling - simple image with a formatted caption
15521 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15523 <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>
15527 Parsoid-specific image handling - caption with a template in it
15529 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15531 <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>
15535 Parsoid-specific image handling - caption with unbalanced tags in it
15537 parsoid=wt2html,wt2wt,html2html
15540 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15544 <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>
15549 Parsoid-specific image handling - empty caption (1)
15551 parsoid=wt2html,wt2wt
15553 [[File:Foobar.jpg|thumb|]]
15555 <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>
15558 # empty captions don't get serialized unless we're in the "round trip" case
15560 Parsoid-specific image handling - empty caption (2)
15564 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15565 <a href="./File:Foobar.jpg">
15566 <img resource="./File:Foobar.jpg"
15567 src="//example.com/images/3/3a/Foobar.jpg"
15568 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15569 height="25" width="220"/>
15571 <figcaption></figcaption>
15574 [[File:Foobar.jpg|thumb]]
15578 Parsoid-specific image handling - whitespace caption
15580 [[File:Foobar.jpg|thumb| ]]
15582 <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>
15586 Parsoid-specific image handling - lang option
15589 [[File:Foobar.svg|lang=de|caption]]
15593 <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>
15597 ## Edge case bugs in Parsoid from T93580
15599 T93580: 1. Templated <ref> inside block images
15601 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15605 <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>
15607 <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>
15611 T93580: 2. <ref> inside inline images
15613 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15617 <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>
15619 <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>
15623 T93580: 3. Templated <ref> inside inline images
15625 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15629 <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>
15631 <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>
15638 Subpage test/subpage
15646 subpage title=[[Subpage test]]
15650 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15655 Subpage noslash link
15657 subpage title=[[Subpage test]]
15661 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15666 Subpage test/1/2/subpage
15672 Relative subpage noslash link
15674 parsoid=wt2wt,wt2html,html2html
15675 subpage title=[[Subpage test/1/2/3/4]]
15681 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15682 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15685 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15686 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15690 Parsoid: dot-slash prefixed wikilinks
15700 </p><p>[[././baz/]]
15705 </p><p>[[././baz/]]
15710 Render invalid page names as plain text (T53090)
15722 [[foo[http://example.com]xyz]]
15724 [[{{echo|./../foo}}|bar]]
15725 [[{{echo|foo/.}}|bar]]
15726 [[{{echo|foo/..}}|bar]]
15727 [[{{echo|foo~~~~bar}}]]
15728 [[{{echo|foo>bar}}]]
15729 [[{{echo|foo././bar}}]]
15730 [[{{echo|foo{bar}}]]
15731 [[{{echo|foo}bar}}]]
15732 [[{{echo|foo[bar}}]]
15733 [[{{echo|foo]bar}}]]
15734 [[{{echo|foo<bar}}]]
15736 <p>[[./../foo|bar]]
15746 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15747 </p><p>[[./../foo|bar]]
15760 <p>[[./../foo|bar]]
15770 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15772 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15773 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15774 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
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>]]
15778 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15779 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15780 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15781 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15782 [[<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>
15790 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15795 T2561: {{/Subpage}}
15797 subpage title=[[Page]]
15801 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15809 Category:MediaWiki User's Guide
15817 [[:Category:MediaWiki User's Guide]]
15819 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15828 [[Category:MediaWiki User's Guide]]
15830 cat=MediaWiki_User's_Guide sort=
15832 <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"}}'/>
15836 PAGESINCATEGORY invalid title fatal (r33546 fix)
15838 {{PAGESINCATEGORY:<bogus>}}
15845 Category with different sort key
15849 [[Category:MediaWiki User's Guide|Foo]]
15851 cat=MediaWiki_User's_Guide sort=Foo
15853 <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"}}'/>
15857 Category with identical sort key
15861 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15863 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15865 <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"}}'/>
15869 Category with empty sort key
15874 [[Category:MediaWiki User's Guide|]]
15876 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15880 Category with empty sort key and parentheses
15885 [[Category:Foo (bar)|]]
15887 [[Category:Foo (bar)|Foo]]
15891 Category with link tail
15896 123[[Category:Foo]]456
15898 123[[Category:Foo]]456
15902 Category with template
15907 [[Category:{{echo|Foo}}]]
15909 [[Category:{{echo|Foo}}]]
15913 Category with template in sort key
15918 [[Category:Foo|{{echo|Bar}}]]
15920 [[Category:Foo|{{echo|Bar}}]]
15924 Category with template in sort key and title
15929 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15931 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15934 ## We used to, but no longer wt2wt this test since the default serializer
15935 ## will normalize all categories to serialize on their own line.
15936 ## This wikitext usage is going to be fairly uncommon in production and
15937 ## selser will take care of preserving formatting in those scenarios.
15939 Category / paragraph interactions
15943 Foo [[Category:Baz]] Bar
15945 Foo [[Category:Baz]]
15953 [[Category:Baz]] Bar
15966 {{echo|[[Category:Baz]]}}
15979 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15980 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15981 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15982 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15983 <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>
15984 <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}}]}'/>
15985 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15988 ## We used to, but no longer wt2wt this test since the default serializer
15989 ## will normalize all categories to serialize on their own line.
15990 ## This wikitext usage is going to be fairly uncommon in production and
15991 ## selser will take care of preserving formatting in those scenarios.
15993 ## The whitespace on the empty line is part of the test. Please do not delete
15995 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16001 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16003 {{echo|[[Category:Foo]] and so should this!}}
16005 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16010 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16012 <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>
16015 ## Parsoid will not try to wt2wt this while preserving newlines because
16016 ## it suppresses excess newlines within list items -- and we don't want to
16017 ## introduce a special case just for categories, which is, in reality somewhat
16018 ## odd behavior -- categories are unlikely to be used in list items like this
16019 ## in top-level pages and are only likely to show up in template-generated
16020 ## list items where this RT-ing is a non-issue.
16022 ## The whitespace on the empty line is part of the test. Please do not delete
16024 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16030 [[Category:Foo]] and this should be part of the same list item
16033 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16035 <ul><li>This and this should be part of the same list item</li>
16036 <li>So should this and this should be part of the same list item</li></ul>
16039 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16040 <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>
16044 ## Newlines and categories that follow the last item of a list
16045 ## are treated differently because this (list followed by categories)
16046 ## is an extremely common pattern on wikis.
16048 3. Categories and newlines: newline suppression for last list item should RT properly
16061 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16063 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16064 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16068 4. Categories and newlines: newline suppression for last list item should RT properly
16076 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16078 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16081 ## only wt2html for this to make sure the algo only applies to the rightmost path
16083 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16096 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16098 <ul><li> d</li></ul></li></ul>
16099 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16102 ## We used to, but no longer wt2wt this test since the default serializer
16103 ## will normalize all categories to serialize on their own line.
16104 ## This wikitext usage is going to be fairly uncommon in production and
16105 ## selser will take care of preserving formatting in those scenarios.
16107 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16111 * a [[Category:Foo]]
16113 <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>
16116 # This test also demonstrates because of newline+category tunneling
16117 # through the list hander, template wrapping doesn't expand to the
16118 # containing list when the list item swallows the category.
16120 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16125 <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
16126 </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>
16130 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16134 {{echo|[[Category:Foo]]
16138 <ul><li> a</li></ul>
16140 <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">
16141 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16142 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16146 9. Categories and newlines: should behave properly with linkprefix (T87753)
16161 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16162 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16166 10. No regressions on internal links following category (T174639)
16168 parsoid=wt2html,html2html
16170 [[Category:Foo]]<div>a
16175 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16178 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16180 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16183 # Note that Parsoid differs slightly from PHP due to T175421
16185 11. Special case where only newlines separate links (T175416)
16187 parsoid=wt2html,html2html
16191 [[Foo]][[es:Alimento]]
16196 <a href="/wiki/Foo" title="Foo">Foo</a>
16197 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16200 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16202 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16204 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16208 Category links with multiple namespaces
16210 [[Category:Project:Foo]]
16212 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16216 Parsoid: Serialize link to category page with colon escape
16222 [[:Category:Foo|Bar]]
16225 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16226 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16230 # We used to, but no longer wt2wt this test since the default serializer
16231 # will normalize all categories to serialize on their own line.
16232 # This wikitext usage is going to be fairly uncommon in production and
16233 # selser will take care of preventing whitespace insertion if this
16234 # occurs in an article.
16236 # html2html disabled for the same reason (whitespace insertion between
16239 # html2wt disabled because it localizes the "Category" namespace.
16241 Link prefix/suffixes aren't applied to category links
16251 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16255 Link prefix/suffixes aren't applied to language links
16265 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16269 Parsoid: Serialize link to file page with colon escape
16275 [[:File:Foo.png|Bar]]
16278 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16279 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16284 Parsoid: Serialize a genuine category link without colon escape
16289 [[Category:Foo|Bar]]
16291 <link rel="mw:PageProp/Category" href="./Category:Foo">
16292 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16296 Normalize hrefs properly before testing for invalid link targets (T72894)
16300 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16302 [[Category:Toxine bactérienne]]
16306 Parsoid: Defaultsort
16308 {{DEFAULTSORT:Foo}}
16310 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16313 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16314 # But, this is a limitation of our representation and is documented in
16315 # TemplateHandler.js in processSpecialMagicWord
16317 Parsoid: Defaultsort (template-generated)
16319 {{{{echo|DEFAULTSORT}}:Foo}}
16321 <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"}]]}'/>
16325 ### Inter-language links
16328 Interlanguage links
16336 es:Alimento fr:Nourriture zh:食品
16338 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16339 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16340 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16344 Duplicate interlanguage links (T26502)
16355 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16356 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16357 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16358 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16365 Basic section headings
16372 ===Smaller headline===
16375 <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>
16378 <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>
16381 <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>
16387 Section headings with TOC
16390 ===Subheadline 1===
16391 =====Skipping a level=====
16392 ======Skipping a level======
16396 ===Another headline===
16398 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16400 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16402 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16404 <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>
16406 <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>
16413 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16415 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16421 <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>
16422 <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>
16423 <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>
16424 <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>
16425 <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>
16428 <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>
16433 TOC anchors don't collide
16441 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16443 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16444 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16445 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16446 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16450 <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>
16451 <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>
16452 <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>
16453 <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>
16457 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16458 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16460 Handling of sections up to level 6 and beyond
16465 ==Level 2 Heading==
16466 ===Level 3 Heading===
16467 ====Level 4 Heading====
16468 =====Level 5 Heading=====
16469 ======Level 6 Heading======
16470 =======Level 7 Heading=======
16471 ========Level 8 Heading========
16472 =========Level 9 Heading=========
16473 ==========Level 10 Heading==========
16475 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16477 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16479 <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>
16481 <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>
16483 <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>
16485 <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>
16487 <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>
16488 <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>
16489 <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>
16490 <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>
16491 <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>
16505 <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>
16506 <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>
16507 <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>
16508 <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>
16509 <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>
16510 <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>
16511 <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>
16512 <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>
16513 <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>
16514 <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>
16517 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16518 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16519 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16520 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16521 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16522 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16523 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16524 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16525 <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>
16526 <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>
16530 TOC regression (T11764)
16534 ====title 1.1.1====
16539 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16541 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16543 <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>
16545 <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>
16548 <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>
16551 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16553 <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>
16559 <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>
16560 <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>
16561 <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>
16562 <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>
16563 <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>
16564 <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>
16569 TOC for heading containing <span id="..."></span> (T96153)
16572 ==<span id="old-anchor"></span>New title==
16574 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16576 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16580 <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>
16585 TOC with wgMaxTocLevel=3 (T8204)
16591 ====title 1.1.1====
16596 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16598 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16600 <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>
16601 <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>
16604 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16606 <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>
16612 <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>
16613 <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>
16614 <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>
16615 <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>
16616 <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>
16617 <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>
16622 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16628 ====Section 1.1.1====
16629 ====Section 1.1.1.1====
16632 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16634 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16636 <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>
16639 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16643 <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>
16644 <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>
16645 <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>
16646 <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>
16647 <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>
16653 Resolving duplicate section names
16658 <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>
16659 <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>
16664 Resolving duplicate section names with differing case (T12721)
16669 <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>
16670 <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>
16682 Template with sections, __NOTOC__
16689 <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>
16690 <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>
16691 <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>
16692 <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>
16697 __NOEDITSECTION__ keyword
16703 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16704 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16709 Link inside a section heading
16711 ==Section with a [[Main Page|link]] in it==
16713 <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>
16718 TOC regression (T14077)
16725 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16727 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16729 <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>
16732 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16736 <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>
16737 <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>
16738 <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>
16743 T3219 URL next to image (good)
16745 http://example.com [[File:Foobar.jpg]]
16747 <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>
16750 <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>
16753 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16755 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16757 parsoid=wt2html,html2html
16760 The line above must have a trailing space!
16763 But just in case it doesn't...
16765 <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>
16766 <p>The line above must have a trailing space!
16768 <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>
16769 <p>But just in case it doesn't...
16772 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16773 <p>The line above must have a trailing space!</p>
16774 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16776 <p>But just in case it doesn't...</p>
16780 Header with special characters (T27462)
16782 The tooltips shall not show entities to the user (ie. be double escaped)
16799 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16801 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16803 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16804 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16805 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16806 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16807 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16811 <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>
16814 <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>
16817 <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>
16820 <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>
16823 <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>
16827 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16829 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
16832 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
16835 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
16838 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
16841 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
16846 Header with space, plus and underscore as entity
16848 Id should not contain + for spaces
16850 ==Space between Text==
16853 ==Space-Entity between Text==
16856 ==Plus+between+Text==
16859 ==Plus-Entity+between+Text==
16862 ==Underscore_between_Text==
16865 ==Underscore-Entity_between_Text==
16868 [[#Space between Text]]
16869 [[#Space-Entity between Text]]
16870 [[#Plus+between+Text]]
16871 [[#Plus-Entity+between+Text]]
16872 [[#Underscore_between_Text]]
16873 [[#Underscore-Entity_between_Text]]
16875 <p>Id should not contain + for spaces
16877 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16879 <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>
16880 <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>
16881 <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>
16882 <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>
16883 <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>
16884 <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>
16888 <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>
16891 <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>
16894 <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>
16897 <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>
16900 <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>
16903 <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>
16905 </p><p><a href="#Space_between_Text">#Space between Text</a>
16906 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16907 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16908 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16909 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16910 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16913 <p>Id should not contain + for spaces</p>
16915 <h2 id="Space_between_Text">Space between Text</h2>
16918 <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>
16921 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
16924 <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>
16927 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
16930 <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>
16933 <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>
16934 <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>
16935 <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>
16936 <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>
16937 <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>
16938 <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>
16941 # Parsoid html2wt disabled because it adds padding spaces around =
16943 Headers with excess '=' characters
16944 (Are similar tests necessary beyond the 1st level?)
16946 parsoid=wt2html,wt2wt,html2html
16950 =''italic'' heading==
16951 ==''italic'' heading=
16953 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16955 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16956 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16957 <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>
16958 <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>
16962 <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>
16963 <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>
16964 <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>
16965 <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>
16968 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
16969 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
16970 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
16971 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
16975 HTML headers vs TOC (T25393)
16976 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16988 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16990 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16992 <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>
16993 <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>
16996 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16998 <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>
16999 <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>
17005 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17006 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17007 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17008 <h1><span class="mw-headline" id="Header_2">Header 2
17010 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17011 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17014 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17015 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17016 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17018 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17020 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17021 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17022 <meta property="mw:PageProp/noeditsection"/>
17026 Single-line or multiline-comments can follow headings
17028 parsoid=wt2html,wt2wt
17036 <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>
17037 <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>
17038 <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>
17041 <h2 id="foo">foo</h2><!---->
17042 <h2 id="bar">bar</h2><!--c1-->
17043 <h2 id="baz">baz</h2><!--
17049 T3219 URL next to image (broken)
17051 http://example.com[[File:Foobar.jpg]]
17053 <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>
17056 <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>
17060 T3186 news: in the middle of text
17062 http://en.wikinews.org/wiki/Wikinews:Workplace
17064 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17070 Namespaced link must have a title
17079 Namespaced link must have a title (bad fragment version)
17081 [[Project:#fragment]]
17083 <p>[[Project:#fragment]]
17089 ### HTML tags and HTML attributes
17093 div with no attributes
17095 <div>HTML rocks</div>
17097 <div>HTML rocks</div>
17102 div with double-quoted attribute
17104 <div id="rock">HTML rocks</div>
17106 <div id="rock">HTML rocks</div>
17111 div with single-quoted attribute
17113 <div id='rock'>HTML rocks</div>
17115 <div id="rock">HTML rocks</div>
17120 div with unquoted attribute
17122 <div id=rock>HTML rocks</div>
17124 <div id="rock">HTML rocks</div>
17129 div with illegal double attributes
17131 <div id="a" id="b">HTML rocks</div>
17133 <div id="b">HTML rocks</div>
17138 div with empty attribute value, space before equals
17140 parsoid=wt2html,html2html
17142 <div class =>HTML rocks</div>
17144 <div class="">HTML rocks</div>
17147 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17151 div with multiple empty attribute values
17153 wgFragmentMode=[ 'html5', 'legacy' ]
17155 parsoid=wt2html,html2html
17157 <div id= title=>HTML rocks</div>
17159 <div id="title=">HTML rocks</div>
17162 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17165 # FIXME Parsoid doesn't actually match PHP here.
17166 # Probably we should use the synthetic <foo /> or <indicator>
17167 # extensions for this test, which are enabled when running parser tests.
17169 Extension tag in attribute value
17171 <span title="<translate>123</translate>">ok</span>
17172 !! html/php+disabled
17173 <p><span title="<translate>123</translate>">ok</span>
17176 <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>
17180 table with multiple empty attribute values
17182 parsoid=wt2html,html2html
17188 <table title="id=">
17194 <table title="id=">
17195 <tbody><tr><td>hi</td></tr>
17200 div with braces in attribute value
17202 <div title="{}">Foo</div>
17204 <div title="{}">Foo</div>
17207 <div title="{}">Foo</div>
17211 div with empty attribute value, no space before equals
17213 parsoid=wt2html,html2html
17215 <div class=>HTML rocks</div>
17217 <div class="">HTML rocks</div>
17220 <div class="">HTML rocks</div>
17224 HTML multiple attributes correction
17226 <p class="error" class="awesome">Awesome!</p>
17228 <p class="awesome">Awesome!</p>
17233 Table multiple attributes correction
17236 !+ class="error" class="awesome"|status
17241 <th class="awesome">status
17249 <DIV ID="x">HTML ROCKS</DIV>
17251 <div id="x">HTML ROCKS</div>
17256 Non-ASCII pseudo-tags are rendered as text
17265 Pseudo-tag with URL 'name' renders as url link
17267 <http://example.com/>
17269 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17274 text with amp in the middle of nowhere
17278 <p>Remember AT&T?
17283 text with character entity: eacute
17285 I always thought é was a cute letter.
17287 <p>I always thought é was a cute letter.
17292 text with entity-escaped character entity-like string: eacute
17294 I always thought &eacute; was a cute letter.
17296 <p>I always thought &eacute; was a cute letter.
17301 text with undefined character entity: xacute
17303 I always thought &xacute; was a cute letter.
17305 <p>I always thought &xacute; was a cute letter.
17312 <data value="5">five</data>
17313 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17314 <mark>This highlighted text</mark>
17316 <p><data value="5">five</data>
17317 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17318 <mark>This highlighted text</mark>
17323 HTML tag with leading space is parsed as text
17327 <p>< div>foo< /div>
17331 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17332 ## the HTML5 parsing spec.
17334 Element with broken attribute syntax
17338 <div style=" style="123">hi</div>
17341 <div style="123">hi</div>
17345 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17346 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17350 ### Nesting tests (see T43545, T52604, T53081)
17353 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17354 # Note that html2wt is considerably more difficult if we use <b> in
17355 # the test case, instead of <small>
17357 Ensure that HTML adoption agency algorithm is properly implemented.
17359 <small>X<small>Y</small>Z</small>
17361 <p><small>X<small>Y</small>Z</small>
17365 # This was T43545 in the PHP parser.
17369 <kbd>X<kbd>Y</kbd>Z</kbd>
17371 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17375 # The following cases were T53081 in the PHP parser.
17376 # Note that there are some other nestable tags (b, i, etc) which are
17377 # not covered; see T53081 for discussion.
17382 <em>X<em>Y</em>Z</em>
17384 <p><em>X<em>Y</em>Z</em>
17389 Nesting of <strong>
17391 <strong>X<strong>Y</strong>Z</strong>
17393 <p><strong>X<strong>Y</strong>Z</strong>
17402 <p><q>X<q>Y</q>Z</q>
17409 <ruby>X<ruby>Y</ruby>Z</ruby>
17411 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17418 <bdo>X<bdo>Y</bdo>Z</bdo>
17420 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17432 [[Media:Foobar.jpg]]
17433 [[Media:Video.ogv]]
17434 [[:Media:Video.ogv]]
17436 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17437 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17438 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17441 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17442 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17443 <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>
17447 Media link with text
17449 [[Media:Foobar.jpg|A neat file to look at]]
17451 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17454 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17457 # FIXME: this is still bad HTML tag nesting
17458 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17459 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17461 Media link with nasty text
17463 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17465 <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>
17468 <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>
17470 <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>
17475 Media link to nonexistent file (T3702)
17477 [[Media:No such.jpg]]
17478 [[Media:No_such file.jpg]]
17480 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17481 <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>
17484 <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>
17485 <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>
17489 Image link to nonexistent file (T3850 - good)
17491 [[File:No_such.jpg]]
17493 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17496 <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>
17500 :Image link to nonexistent file (T3850 - bad)
17502 [[:Image:No such.jpg]]
17504 <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>
17507 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17511 Character reference normalization in link text (T3938)
17513 [[Main Page|this&that]]
17515 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17522 Test for unicode normalization
17524 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17528 (T21451) Links should refer to the normalized form.
17536 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17537 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17538 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17539 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17540 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17545 Empty attribute crash test (T4067)
17547 <font color="">foo</font>
17549 <p><font color="">foo</font>
17554 Empty attribute crash test single-quotes (T4067)
17556 <font color=''>foo</font>
17558 <p><font color="">foo</font>
17563 Attribute test: equals, then nothing
17565 parsoid=wt2html,html2html
17567 <font color=>foo</font>
17569 <p><font color="">foo</font>
17572 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17576 Attribute test: unquoted value
17578 parsoid=wt2html,html2html
17580 <font color=x>foo</font>
17582 <p><font color="x">foo</font>
17585 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17589 Attribute test: unquoted but illegal value (hash)
17591 <font color=#x>foo</font>
17593 <p><font color="#x">foo</font>
17597 # Parsoid does not serialize to empty attribute syntax,
17598 # so wt2wt and html2wt cases are skipped
17600 Attribute test: no value (T54330)
17602 parsoid=wt2html,html2html
17604 <font color>foo</font>
17606 <p><font color="">foo</font>
17609 <p><font color="">foo</font></p>
17613 T4095: link with three closing brackets
17617 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17620 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17624 T4095: link with pipe and three closing brackets
17626 [[Main Page|link]]]
17628 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17631 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17635 T4095: link with pipe and three closing brackets, version 2
17637 [[Main Page|[http://example.com/]]]
17639 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17642 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17651 Template:Dangerous attribute
17653 " onmouseover="alert(document.cookie)
17657 Template:Dangerous style attribute
17659 border-size: expression(alert(document.cookie))
17665 <div style="float: right; {{{1}}}">Magic div</div>
17669 T4304: HTML attribute safety (safe template; regression T4309)
17671 <div title="{{test}}"></div>
17673 <div title="This is a test template"></div>
17676 <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>
17679 # Parsoid has enough context to handle this case
17681 T4304: HTML attribute safety (dangerous template; 2309)
17683 <div title="{{dangerous attribute}}"></div>
17685 <div title=""></div>
17688 <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>
17692 T4304: HTML attribute safety (dangerous style template; 2309)
17694 <div style="{{dangerous style attribute}}"></div>
17696 <div style="/* insecure input */"></div>
17699 <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>
17703 T4304: HTML attribute safety (safe parameter; 2309)
17705 {{div style|width: 200px}}
17707 <div style="float: right; width: 200px">Magic div</div>
17710 <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>
17714 T4304: HTML attribute safety (unsafe parameter; 2309)
17716 {{div style|width: expression(alert(document.cookie))}}
17718 <div style="/* insecure input */">Magic div</div>
17721 <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>
17724 ## Parsoid output here differs; needs investigation.
17726 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17728 {{div style|"><script>alert(document.cookie)</script>}}
17730 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17734 ## Parsoid output here differs; needs investigation.
17736 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17738 {{div style|" ><script>alert(document.cookie)</script>}}
17740 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17745 T4304: HTML attribute safety (link)
17747 <div title="[[Main Page]]"></div>
17749 <div title="[[Main Page]]"></div>
17752 <div title="[[Main Page]]"></div>
17756 T4304: HTML attribute safety (italics)
17758 <div title="''foobar''"></div>
17760 <div title="''foobar''"></div>
17765 T4304: HTML attribute safety (bold)
17767 <div title="'''foobar'''"></div>
17769 <div title="'''foobar'''"></div>
17774 T4304: HTML attribute safety (ISBN)
17776 <div title="ISBN 1234567890"></div>
17778 <div title="ISBN 1234567890"></div>
17783 T4304: HTML attribute safety (RFC)
17785 <div title="RFC 1234"></div>
17787 <div title="RFC 1234"></div>
17792 T4304: HTML attribute safety (PMID)
17794 <div title="PMID 1234567890"></div>
17796 <div title="PMID 1234567890"></div>
17801 T4304: HTML attribute safety (web link)
17803 <div title="http://example.com/"></div>
17805 <div title="http://example.com/"></div>
17810 T4304: HTML attribute safety (named web link)
17812 <div title="[http://example.com/ link]"></div>
17814 <div title="[http://example.com/ link]"></div>
17817 <div title="[http://example.com/ link]"></div>
17821 T5244: HTML attribute safety (extension; safe)
17823 <div style="<nowiki>background:blue</nowiki>"></div>
17825 <div style="background:blue"></div>
17828 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17832 T5244: HTML attribute safety (extension; unsafe)
17834 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17836 <div style="/* insecure input */"></div>
17839 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17842 # More MSIE fun discovered by Tom Gilder
17845 MSIE CSS safety test: spurious slash
17847 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17849 <div style="/* insecure input */">evil</div>
17852 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17856 MSIE CSS safety test: hex code
17858 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17860 <div style="/* insecure input */">evil</div>
17863 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17867 MSIE CSS safety test: comment in url
17869 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17871 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17874 <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>
17878 MSIE CSS safety test: comment in expression
17880 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17882 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17885 <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>
17889 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17891 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17893 <p style="/* invalid control char */">A</p>
17896 <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>
17900 MSIE 6 CSS safety test: Fullwidth (T57332)
17902 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17903 <div style="top:EXPRESSION(alert())">B</div>
17905 <p style="/* insecure input */">A</p>
17906 <div style="/* insecure input */">B</div>
17909 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17910 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17914 MSIE 6 CSS safety test: IPA extensions (T57332)
17916 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17917 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17919 <div style="/* insecure input */">A</div>
17920 <p style="/* insecure input */">B</p>
17923 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17924 <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>
17928 MSIE 6 CSS safety test: sup/sub script (T57332)
17930 <div style="background-image:url⁽javascript:alert())">A</div>
17931 <div style="background-image:url₍javascript:alert())">B</div>
17932 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17934 <div style="/* insecure input */">A</div>
17935 <div style="/* insecure input */">B</div>
17936 <p style="/* insecure input */">C</p>
17939 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17940 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17941 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17947 parsoid=wt2html,html2html
17950 title="data:text/html,<img src=1 onerror=alert(1)>"
17951 style="-o-link:attr(title);-o-link-source:current">X</div>
17953 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17956 <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>
17960 MSIE 6 CSS safety test: Repetition markers (T57332)
17962 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17963 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17964 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17965 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17966 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17967 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17968 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17970 <p style="/* insecure input */">A</p>
17971 <p style="/* insecure input */">B</p>
17972 <p style="/* insecure input */">C</p>
17973 <p style="/* insecure input */">D</p>
17974 <p style="/* insecure input */">E</p>
17975 <p style="/* insecure input */">F</p>
17976 <p style="/* insecure input */">G</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')"}}'>A</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')"}}'>B</p>
17981 <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>
17982 <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>
17983 <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>
17984 <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>
17985 <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>
17989 Table attribute legitimate extension
17992 !+ style="<nowiki>color:blue</nowiki>"|status
17997 <th style="color:blue">status
18003 Table attribute safety
18006 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18011 <th style="/* insecure input */">status
18017 CSS line continuation 1
18019 <div style="background-image: u\ rl(test.jpg);"></div>
18021 <div style="/* insecure input */"></div>
18026 CSS line continuation 2
18028 <div style="background-image: u\ rl(test.jpg); "></div>
18030 <div style="/* invalid control char */"></div>
18041 Expansion of multi-line templates in attribute values (T8255)
18043 <div style="background: {{identity|#00FF00}}">-</div>
18045 <div style="background: #00FF00">-</div>
18050 Expansion of multi-line templates in attribute values (T8255 sanity check)
18052 <div style="background:
18055 <div style="background: #00FF00">-</div>
18058 <div style="background:
18063 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18065 <div style="background: #00FF00">-</div>
18067 <div style="background: #00FF00">-</div>
18072 Tags which are hidden from tidiers cannot pass through the Sanitizer
18074 <mw:toc><script>alert();</script></mw:toc>
18076 <p><mw:toc><script>alert();</script></mw:toc>
18081 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18085 Parser hook: empty input
18096 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18099 ## Don't expect parsoid to rt this form.
18101 Parser hook: empty input using terminated empty elements
18103 parsoid=wt2html,html2html
18114 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18118 Parser hook: empty input using terminated empty elements (space before)
18129 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18133 Parser hook: basic input
18144 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18147 ## Don't expect parsoid to rt this form.
18149 Parser hook: case insensitive
18151 parsoid=wt2html,html2html
18162 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18165 ## Don't expect parsoid to rt this form.
18167 Parser hook: case insensitive, redux
18169 parsoid=wt2html,html2html
18180 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18184 Parser hook: nested tags
18186 <tag><tag></tag></tag>
18195 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18199 Parser hook: basic arguments
18201 <tag width="200" height="100" depth="50" square=""></tag>
18214 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18217 ## Don't expect parsoid to rt this form.
18219 Parser hook: basic arguments, variations
18221 parsoid=wt2html,html2html
18223 <tag width=200 height = "100" depth = '50' square></tag>
18236 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18240 Parser hook: argument containing a forward slash (T7344)
18242 <tag filename="/tmp/bla"></tag>
18247 'filename' => '/tmp/bla',
18252 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18255 ## Don't expect parsoid to rt this form.
18257 Parser hook: empty input using terminated empty elements (T4374)
18259 parsoid=wt2html,html2html
18271 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18274 ## </tag> should be output literally since there is no matching tag that begins it
18275 ## Don't expect parsoid to rt this form.
18277 Parser hook: basic arguments using terminated empty elements (T4374)
18281 <tag width=200 height = "100" depth = '50' square/>
18298 <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
18302 ## Don't expect parsoid to rt this form.
18304 Parser hook: Don't allow unclosed extension tags
18310 this is a '''test'''
18312 <p>test <tag>123
18313 </p><p>this is a <b>test</b>
18316 <p>test <tag>123</p>
18318 <p>this is a <b>test</b></p>
18322 Parser hook: horizontal rule inside extension tag that outputs <pre>
18343 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18347 Parser hook: static parser hook not inside a comment
18349 <statictag>hello, world</statictag>
18351 <statictag action="flush" />
18357 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18358 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18362 Parser hook: static parser hook inside a comment
18364 <!-- <statictag>hello, world</statictag> -->
18365 <statictag action="flush" />
18370 <!-- <statictag>hello, world</statictag> -->
18371 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18374 # Nested template calls; this case was broken by Parser.php rev 1.506,
18378 Template:One-parameter
18380 (My parameter is: {{{1}}})
18384 Template:Map-one-parameter
18386 {{{{{1}}}|{{{2}}}}}
18390 Nested template calls
18392 {{Map-one-parameter|One-parameter|param}}
18394 <p>(My parameter is: param)
18403 # Remex wraps empty tag runs with p-tags.
18404 # Parsoid strips them out during p-wrapping.
18406 Sanitizer: Closing of open tags
18408 <s></s><table></table>
18410 <p><s></s></p><table></table>
18412 <s></s><table></table>
18416 Sanitizer: Closing of open but not closed tags
18425 Sanitizer: Closing of closed but not open tags
18431 <p class="mw-empty-elt">
18437 Sanitizer: Closing of closed but not open table tags
18441 Table not started</td></tr></table>
18443 <p>Table not started
18448 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18450 wgFragmentMode=[ 'html5', 'legacy' ]
18452 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18454 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18457 <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>
18461 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18463 wgFragmentMode=[ 'legacy' ]
18465 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18467 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18471 # In HTML5, the restrictions are that id must contain at least one character,
18472 # and must not contain any space characters.
18474 Sanitizer: Validating the contents of the id attribute (T6515)
18478 <br id="" /><br id="a space" />
18483 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18485 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18489 <br id="foo" /><br id="foo" />
18491 Something need to be done. foo-2 ?
18495 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18498 <meta itemprop="hello" content="world">
18499 <meta http-equiv="refresh" content="5">
18500 <meta itemprop="hello" http-equiv="refresh" content="5">
18501 <link itemprop="hello" href="{{SERVER}}">
18502 <link rel="stylesheet" href="{{SERVER}}">
18503 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18507 <p> <meta itemprop="hello" content="world" />
18508 <meta http-equiv="refresh" content="5">
18509 <meta itemprop="hello" content="5" />
18510 <link itemprop="hello" href="http://example.org" />
18511 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18512 <link itemprop="hello" href="http://example.org" />
18519 Sanitizer: Strip comments from CSS attributes
18521 parsoid=wt2html,wt2wt
18523 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18525 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18528 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18532 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18534 [[meatball:Soft"Security]]
18536 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18539 <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>
18543 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18545 [[meatball:Foo<Bar]]
18546 [[meatball:Foo>Bar]]
18547 [[meatball:Foo<bar]]
18548 [[meatball:Foo>bar]]
18550 <p>[[meatball:Foo<Bar]]
18551 [[meatball:Foo>Bar]]
18552 [[meatball:Foo<bar]]
18553 [[meatball:Foo>bar]]
18556 <p>[[meatball:Foo<Bar]]
18557 [[meatball:Foo>Bar]]
18558 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18559 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18563 Language converter: output gets cut off unexpectedly (T7757)
18567 this bit is safe: }-
18569 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18571 then we get cut off here: }-
18573 all additional text is vanished
18575 <p>this bit is safe: }-
18576 </p><p>but if we add a conversion instance: xxx
18577 </p><p>then we get cut off here: }-
18578 </p><p>all additional text is vanished
18581 <p>this bit is safe: }-</p>
18582 <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>
18583 <p>then we get cut off here: }-</p>
18584 <p>all additional text is vanished</p>
18588 Language converter glossary rules inside attributes (T119158)
18590 language=sr variant=sr-el
18592 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18594 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18597 </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>
18600 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18602 <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>
18606 Self closed html pairs (T7487)
18608 <center><font id="bug" />Centered text</center>
18609 <div><font id="bug2" />In div text</div>
18611 <center><font id="bug"></font>Centered text</center>
18612 <div><font id="bug2"></font>In div text</div>
18616 Punctuation: nbsp before exclamation
18620 <p>C'est grave !
18625 Punctuation: CSS !important (T13874)
18627 <div style="width:50% !important">important</div>
18629 <div style="width:50% !important">important</div>
18634 Punctuation: CSS ! important (T13874; with space after)
18636 <div style="width:50% ! important">important</div>
18638 <div style="width:50% ! important">important</div>
18643 HTML bullet list, closed tags (T7497)
18656 <ul data-parsoid='{"stx":"html"}'>
18657 <li data-parsoid='{"stx":"html"}'>One</li>
18658 <li data-parsoid='{"stx":"html"}'>Two</li>
18664 HTML bullet list, unclosed tags (T7497)
18676 <ul data-parsoid='{"stx":"html"}'>
18677 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18678 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18684 HTML ordered list, closed tags (T7497)
18697 <ol data-parsoid='{"stx":"html"}'>
18698 <li data-parsoid='{"stx":"html"}'>One</li>
18699 <li data-parsoid='{"stx":"html"}'>Two</li>
18705 HTML ordered list, unclosed tags (T7497)
18718 <ol data-parsoid='{"stx":"html"}'>
18719 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18720 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18726 HTML nested bullet list, closed tags (T7497)
18749 <ul data-parsoid='{"stx":"html"}'>
18750 <li data-parsoid='{"stx":"html"}'>One</li>
18751 <li data-parsoid='{"stx":"html"}'>Two:
18752 <ul data-parsoid='{"stx":"html"}'>
18753 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18754 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18761 HTML nested bullet list, open tags (T7497)
18783 HTML nested ordered list, closed tags (T7497)
18808 HTML nested ordered list, open tags (T7497)
18845 HTML ordered list item with parameters oddity
18847 <ol><li id="fragment">One</li>
18850 <ol><li id="fragment">One</li>
18855 # parsoid doesn't explicitly mark autonumbered links, see T55505
18857 T7918: autonumbering
18859 [http://first/] [http://second] [ftp://ftp]
18863 [mailto:enclosed@mail.tld With target]
18865 [mailto:enclosed@mail.tld]
18867 mailto:inline@mail.tld
18869 <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>
18870 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18871 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18872 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18873 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18876 <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>
18877 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
18878 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
18879 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
18880 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18885 # Security and HTML correctness
18886 # From Nick Jenkins' fuzz testing
18890 Fuzz testing: Parser13
18904 # Note that Parsoid output differs from the PHP parser here: the PHP
18905 # parser breaks the URL for the magic word, while in Parsoid the URL
18906 # production takes precedence.
18908 Fuzz testing: Parser14
18913 <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>
18914 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18916 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18922 <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>
18923 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18925 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18929 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
18930 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
18934 Fuzz testing: Parser14-table
18936 parsoid=wt2html,html2html
18941 <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>
18942 <table style="__TOC__">
18947 <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>
18948 <table style="__TOC__">
18955 <table style="__TOC__"></table>
18958 # Known to produce bogus xml (extra </td>)
18959 # Don't add the html/php section since it generates broken HTML
18961 Fuzz testing: Parser16
18978 Fuzz testing: Parser21
18981 !irc://{{ftp://a" onmouseover="alert('hello world');"
18986 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18996 Fuzz testing: Parser22
18998 http://===r:::https://b
19002 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19010 # Known to produce bad XML for now
19012 Fuzz testing: Parser24
19019 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19020 <br style="onmouseover='alert(document.cookie);' " />
19022 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19027 <u class="|">}}}} >
19028 <br style="onmouseover='alert(document.cookie);'" />
19030 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19038 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19039 <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>"}'/>}}}} >
19040 <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}'>
19044 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19047 # Note: the current result listed for this is not what the original one was,
19048 # but the original bug was JavaScript injection, which is fixed in any case.
19049 # It's not clear that the original result listed was any more correct than the
19050 # current one. Original result:
19053 # <li class="||">
19054 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19056 Fuzz testing: Parser25 (T8055)
19062 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19064 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19067 <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"]}'>
19068 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19072 Fuzz testing: URL adjacent extension (with space, clean)
19074 http://example.com <nowiki>junk</nowiki>
19076 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19079 <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>
19083 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19085 http://example.com<nowiki>junk</nowiki>
19087 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19090 <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>
19094 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19096 http://example.com<pre>junk</pre>
19098 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19101 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19103 <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>
19107 Fuzz testing: image with bogus manual thumbnail
19109 [[Image:foobar.jpg|thumbnail= ]]
19111 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19114 <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>
19117 # Parsoid will emit the newline literally in wt2wt; see next test case.
19119 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19123 <pre dir=" "></pre>
19125 <pre dir=" "></pre>
19128 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19129 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19133 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19137 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19138 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19148 Templates in extension attributes are not expanded
19150 <pre dir="{{echo|ltr}}"></pre>
19152 <pre dir="{{echo|ltr}}"></pre>
19155 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19159 Parsing optional HTML elements (T8171)
19164 <td> Some tabular data</td>
19165 <td> More tabular data ...
19166 <td> And yet som tabular data</td>
19172 <td> Some tabular data</td>
19173 <td> More tabular data ...
19174 </td><td> And yet som tabular data</td>
19181 Correct handling of <td>, <tr> (T8171)
19186 <td> Some tabular data</td>
19187 <td> More tabular data ...</td>
19188 <td> And yet som tabular data</td>
19194 <td> Some tabular data</td>
19195 <td> More tabular data ...</td>
19196 <td> And yet som tabular data</td>
19204 Parsing crashing regression (fr:JavaScript)
19208 <p></body></x>
19213 Inline wiki vs wiki block nesting
19219 <p><b>Bold paragraph</b>
19220 </p><p>New wiki paragraph
19224 # FIXME: The current php output is documented
19225 # and desired output is the parsoid target.
19227 Inline HTML vs wiki block nesting
19233 <p><b>Bold paragraph
19234 </p><p>New wiki paragraph</b>
19237 <p><b>Bold paragraph</b>
19238 </p><p>New wiki paragraph
19242 # Original result was this:
19243 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19245 # While that might be marginally more intuitive, maybe, the six-apostrophe
19246 # construct is clearly pathological and the result stated here (which is what
19247 # the parser actually does) is about as reasonable as anything.
19249 Mixing markup for italics and bold
19252 '''bold''''''bold''bolditalics'''''
19254 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19262 Article for special page transclusion test
19266 Special page transclusion
19269 {{Special:Prefixindex/Xyzzyx}}
19271 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19277 Special page transclusion twice (T7021)
19280 {{Special:Prefixindex/Xyzzyx}}
19281 {{Special:Prefixindex/Xyzzyx}}
19283 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19285 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19291 Transclusion of default MediaWiki message
19293 {{MediaWiki:Mainpage}}
19300 Transclusion of nonexistent MediaWiki message
19302 {{MediaWiki:Mainpagexxx}}
19304 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19309 Transclusion of MediaWiki message with underscore
19311 {{MediaWiki:history_short}}
19318 Transclusion of MediaWiki message with space
19320 {{MediaWiki:history short}}
19327 Invalid header with following text
19337 Section extraction test (section 0)
19357 Section extraction test (section 1)
19379 Section extraction test (section 2)
19400 Section extraction test (section 3)
19420 Section extraction test (section 4)
19444 Section extraction test (section 5)
19464 Section extraction test (section 6)
19485 Section extraction test (section 7)
19505 Section extraction test (section 8)
19525 Section extraction test (section 9)
19546 Section extraction test (section 10)
19566 Section extraction test (nonexistent section 11)
19585 Section extraction test with bogus heading (section 1)
19590 ==bogus== not a legal section
19594 ==bogus== not a legal section
19598 Section extraction test with bogus heading (section 2)
19603 ==bogus== not a legal section
19610 Section extraction test with comment after heading (section 1)
19622 Section extraction test with comment after heading (section 2)
19634 Section extraction test with bogus <nowiki> heading (section 1)
19639 ==bogus== <nowiki>not a legal section</nowiki>
19643 ==bogus== <nowiki>not a legal section</nowiki>
19647 Section extraction test with bogus <nowiki> heading (section 2)
19652 ==bogus== <nowiki>not a legal section</nowiki>
19658 # Formerly testing for T4587, now resolved by the use of unmarked sections
19659 # instead of respecting commented sections
19661 Section extraction prefixed by comment (section 1)
19672 Section extraction prefixed by comment (section 2)
19682 # Formerly testing for T4607, now resolved by the use of unmarked sections
19683 # instead of respecting HTML-style headings
19685 Section extraction, mixed wiki and html (section 1)
19701 Section extraction, mixed wiki and html (section 2)
19717 # Formerly testing for T5342
19719 Section extraction, heading surrounded by <noinclude>
19723 <noinclude>==unmarked==</noinclude>
19729 # Test behavior of T21910
19731 Sectiion with all-equals
19736 The line above must have a trailing space
19739 But just in case it doesn't...
19743 But just in case it doesn't...
19747 Section replacement test (section 0)
19778 Section replacement test (section 1)
19807 Section replacement test (section 2)
19837 Section replacement test (section 3)
19868 Section replacement test (section 4)
19895 Section replacement test (section 5)
19926 Section replacement test (section 6)
19956 Section replacement test (section 7)
19987 Section replacement test (section 8)
20018 Section replacement test (section 9)
20047 Section replacement test (section 10)
20077 Section replacement test with initial whitespace (T15728)
20081 Preformatted initial line
20085 Preformatted initial line
20092 Section extraction, heading followed by pre with 20 spaces (T8398)
20104 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20117 Section extraction, <pre> around bogus header (T12309)
20134 Section replacement, <pre> around bogus header (T12309)
20155 Handling of 
 in URLs
20159 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20162 <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>
20166 Handling of %0A in URLs
20170 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20173 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20176 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20178 5 quotes, code coverage +1 line
20188 # same html as previous, but wikitext adjusted to match parsoid html2wt
20189 # note that wt2html and html2html will put the <i> before the <b>
20191 5 quotes, code coverage +1 line w/ nowiki (1)
20193 parsoid=wt2wt,html2wt
20195 '''''<nowiki/>'''''
20200 <p><b><i></i></b></p>
20203 # same as previous, just swapping the <i> and <b>
20205 5 quotes, code coverage +1 line w/ nowiki (2)
20207 '''''<nowiki/>'''''
20212 <p><i><b></b></i></p>
20216 Special:Search page linking.
20220 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20225 {{!}} is a magic word
20227 {{!}} is a magic word there and {{!}} is still a magic word here
20228 | is not a magic word here but {{!}} is still a magic word here
20230 <p>| is a magic word there and | is still a magic word here
20231 | is not a magic word here but | is still a magic word here
20234 <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
20235 | 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>
20241 title=[[Parser test]]
20255 *{{SUBJECTPAGENAME}}
20256 *{{SUBJECTPAGENAMEE}}
20259 *{{NAMESPACENUMBER}}
20264 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20266 <ul><li>Parser test</li>
20267 <li>Parser_test</li>
20268 <li>Parser test</li>
20269 <li>Parser_test</li>
20270 <li>Parser test</li>
20271 <li>Parser_test</li>
20272 <li>Parser test</li>
20273 <li>Parser_test</li>
20274 <li>Parser test</li>
20275 <li>Parser_test</li>
20276 <li>Talk:Parser test</li>
20277 <li>Talk:Parser_test</li>
20278 <li>Parser test</li>
20279 <li>Parser_test</li>
20287 <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>
20290 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20293 Gallery with valid attributes
20295 <gallery type="123" summary="345">
20296 File:File:Foobar.jpg
20299 <ul class="gallery mw-gallery-traditional" type="123">
20300 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20301 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20302 <div class="gallerytext">
20308 <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"}}'>
20309 <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>
20313 ## Parsoid thinks the "centre" here is a property, not a caption.
20318 "modes": ["wt2html"],
20319 "nativeGallery": true
20327 image4 |300px| centre
20328 image5.svg| http://///////
20333 <ul class="gallery mw-gallery-traditional">
20334 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20335 <div class="thumb" style="height: 150px;">Image1.png</div>
20336 <div class="gallerytext">
20339 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20340 <div class="thumb" style="height: 150px;">Image2.gif</div>
20341 <div class="gallerytext">
20344 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20345 <div class="thumb" style="height: 150px;">Image3</div>
20346 <div class="gallerytext">
20349 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20350 <div class="thumb" style="height: 150px;">Image4</div>
20351 <div class="gallerytext">
20356 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20357 <div class="thumb" style="height: 150px;">Image5.svg</div>
20358 <div class="gallerytext">
20359 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20363 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20364 <div class="thumb" style="height: 150px;">* image6</div>
20365 <div class="gallerytext">
20371 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20372 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20373 <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>
20374 <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>
20375 <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>
20376 <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>
20377 <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>
20382 Gallery (with options, html)
20385 "modes": ["wt2html", "html2html"],
20386 "nativeGallery": true
20389 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20390 File:Nonexistent.jpg|caption
20391 File:Nonexistent.jpg
20392 image:foobar.jpg|some '''caption''' [[Main Page]]
20394 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20397 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20398 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20399 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20400 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20401 <div class="gallerytext">
20406 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20407 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20408 <div class="gallerytext">
20411 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20412 <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>
20413 <div class="gallerytext">
20414 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20418 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20419 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20420 <div class="gallerytext">
20423 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20424 <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>
20425 <div class="gallerytext">
20433 <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":{}}'>
20434 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20435 <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>
20436 <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>
20437 <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>
20438 <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>
20439 <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>
20444 Gallery (with options, extsrc)
20447 "nativeGallery": false
20450 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20451 File:Nonexistent.jpg|caption
20452 File:Nonexistent.jpg
20453 image:foobar.jpg|some '''caption''' [[Main Page]]
20455 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20458 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20459 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20460 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20461 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20462 <div class="gallerytext">
20467 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20468 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20469 <div class="gallerytext">
20472 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20473 <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>
20474 <div class="gallerytext">
20475 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20479 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20480 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20481 <div class="gallerytext">
20484 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20485 <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>
20486 <div class="gallerytext">
20494 <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"}}'>
20495 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20496 <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>
20497 <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>
20498 <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>
20499 <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 <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>
20505 Gallery (without px units)
20507 <gallery widths="70" heights="40">
20511 <ul class="gallery mw-gallery-traditional">
20512 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20513 <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>
20514 <div class="gallerytext">
20520 <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"}}'>
20521 <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>
20526 Gallery (with invalid units)
20528 <gallery widths="70em" heights="40em">
20532 <ul class="gallery mw-gallery-traditional">
20533 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20534 <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>
20535 <div class="gallerytext">
20541 <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"}}'>
20542 <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>
20547 Gallery with link that has fragment
20550 "modes": ["wt2html", "html2html"],
20551 "nativeGallery": true
20555 image:foobar.jpg|link=Main_Page
20556 image:foobar.jpg|link=Main_Page#section
20557 image:foobar.jpg|link=Main Page#section|caption
20560 <ul class="gallery mw-gallery-traditional">
20561 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20562 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20563 <div class="gallerytext">
20566 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20567 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="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>
20568 <div class="gallerytext">
20571 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20572 <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>
20573 <div class="gallerytext">
20581 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20582 <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>
20583 <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>
20584 <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>
20588 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20590 Gallery with template inside caption
20593 "nativeGallery": true
20596 <gallery caption="{{echo|hi}}">
20597 File:Foobar.jpg|{{echo|ho}}
20600 <ul class="gallery mw-gallery-traditional">
20601 <li class='gallerycaption'>{{echo|hi}}</li>
20602 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20603 <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>
20604 <div class="gallerytext">
20612 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20613 <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>
20614 <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>
20619 Gallery with wikitext inside caption
20622 "nativeGallery": true
20626 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20627 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20630 <ul class="gallery mw-gallery-traditional">
20631 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20632 <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>
20633 <div class="gallerytext">
20634 <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>
20638 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20639 <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>
20640 <div class="gallerytext">
20641 <p>This is a test template
20648 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20649 <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>
20650 <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>
20655 Gallery (with showfilename option)
20658 "nativeGallery": true
20661 <gallery showfilename="">
20662 File:Nonexistent.jpg|caption
20663 File:Nonexistent.jpg
20664 File:Foobar.jpg|some '''caption''' [[Main Page]]
20668 <ul class="gallery mw-gallery-traditional">
20669 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20670 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20671 <div class="gallerytext">
20672 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20677 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20678 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20679 <div class="gallerytext">
20680 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20684 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20685 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20686 <div class="gallerytext">
20687 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20688 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20692 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20693 <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>
20694 <div class="gallerytext">
20695 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20702 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20703 <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>
20704 <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>
20705 <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>
20706 <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>
20710 ## Should Parsoid be preserving these variations? See T151367
20712 Gallery (with namespace-less filenames)
20715 "modes": ["wt2html", "html2html"],
20716 "nativeGallery": true
20720 File:Nonexistent.jpg
20726 <ul class="gallery mw-gallery-traditional">
20727 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20728 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20729 <div class="gallerytext">
20732 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20733 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20734 <div class="gallerytext">
20737 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20738 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20739 <div class="gallerytext">
20742 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20743 <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>
20744 <div class="gallerytext">
20750 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20751 <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>
20752 <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>
20753 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20754 <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>
20759 Gallery override link with wikilink (T36852)
20762 "nativeGallery": true
20766 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20769 <ul class="gallery mw-gallery-traditional">
20770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20771 <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>
20772 <div class="gallerytext">
20778 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20779 <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>
20784 Gallery override link with absolute external link (T36852)
20787 "nativeGallery": true
20791 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20794 <ul class="gallery mw-gallery-traditional">
20795 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20796 <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>
20797 <div class="gallerytext">
20803 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20804 <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>
20809 Gallery override link with absolute external link with LanguageConverter
20814 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20817 <ul class="gallery mw-gallery-traditional">
20818 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20819 <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>
20820 <div class="gallerytext">
20828 <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"}}'>
20829 <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>
20834 Gallery override link with malicious javascript (T36852)
20837 "modes": ["wt2html", "html2html"],
20838 "nativeGallery": true
20842 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20845 <ul class="gallery mw-gallery-traditional">
20846 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20847 <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>
20848 <div class="gallerytext">
20854 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20855 <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>
20859 # Note that parsoid uses the invalid link as a caption, PHP does not.
20861 Gallery with invalid title as link (T45964)
20864 "modes": ["wt2html", "html2html"],
20865 "nativeGallery": true
20869 File:Foobar.jpg|link=<
20872 <ul class="gallery mw-gallery-traditional">
20873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20874 <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>
20875 <div class="gallerytext">
20881 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20882 <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>
20887 Serialize gallery without attrs in data-mw
20890 "modes": ["html2wt"],
20891 "nativeGallery": true
20894 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20895 <li class="gallerycaption">123</li>
20896 <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>
20899 <gallery caption="123">
20905 Gallery with class and style attributes
20908 "nativeGallery": true
20911 <gallery class="center" style="text-align: center;">
20915 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20916 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20917 <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>
20918 <div class="gallerytext">
20924 <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":{}}'>
20925 <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>
20930 Gallery in slideshow mode
20933 "nativeGallery": true
20936 <gallery mode="slideshow" showthumbnails="">
20940 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20941 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20942 <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>
20943 <div class="gallerytext">
20949 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20950 <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>
20955 HTML Hex character encoding (spells the word "JavaScript")
20957 parsoid=wt2html,wt2wt,html2html
20959 JavaScript
20961 <p>JavaScript
20964 <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>
20968 HTML Hex character encoding bogus encoding (T28437 regression check)
20972 <p>&#xsee;&#XSEE;
20977 HTML Hex character encoding mixed case
20979 parsoid=wt2html,wt2wt,html2html
20986 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20989 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20990 # Note that U+000C (form feed) is not a valid XML character, so
20991 # it is banned even though allowed in HTML5.
20993 Illegal character references (T106578)
20998 ; Control (low): 
20999 ; Control (high):  Ÿ
21000 ; Surrogate: ��
21001 ; This is an okay astral character: 💩
21009 <dt>Control (low)</dt>
21011 <dt>Control (high)</dt>
21012 <dd>&#x7F; &#x9F;</dd>
21014 <dd>&#xD83D;&#xDCA9;</dd>
21015 <dt>This is an okay astral character</dt>
21016 <dd>💩</dd></dl>
21020 __FORCETOC__ override
21032 ISBN 978-0-1234-56 789
21034 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21037 <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>
21041 ISBN followed by 5 spaces
21052 ISBN ISBN 1234567890
21054 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21057 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21060 # Uppercase X and lowercase x as well
21071 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21072 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21073 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21074 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21075 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21076 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21079 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21080 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21081 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21082 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21083 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21084 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21088 ISBN with empty prefix (parsoid test)
21092 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21095 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21099 T24905: <abbr> followed by ISBN followed by </a>
21101 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21103 <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>
21106 <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>
21114 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21119 Double RFC with a wiki link
21123 <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>
21132 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21135 <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>
21139 Centre-aligned image
21141 [[Image:foobar.jpg|centre]]
21143 <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>
21146 <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>
21152 [[Image:foobar.jpg|none]]
21154 <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>
21157 <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>
21161 Width + Height sized image (using px) (height is ignored)
21163 [[Image:foobar.jpg|640x480px]]
21165 <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>
21168 <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>
21172 Width-sized image (using px, no following whitespace)
21174 [[Image:foobar.jpg|640px]]
21176 <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>
21179 <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>
21183 Width-sized image (using px, with following whitespace - test regression from r39467)
21185 [[Image:foobar.jpg|640px ]]
21187 <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>
21190 <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>
21194 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21196 [[Image:foobar.jpg| 640px]]
21198 <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>
21201 <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>
21205 Image with page parameter
21209 [[File:LoremIpsum.djvu|page=2]]
21211 <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>
21214 <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>
21218 Another italics / bold test
21226 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21232 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21235 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21239 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21241 Images with the "|" character in the comment
21243 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21245 <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>
21248 <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>
21252 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21254 <html><script>alert(1);</script></html>
21256 <p><html><script>alert(1);</script></html>
21261 HTML with raw HTML ($wgRawHtml==true)
21265 <html><script>alert(1);</script></html>
21267 <p><script>alert(1);</script>
21272 Parents of subpages, one level up
21274 subpage title=[[Subpage test/L1/L2/L3]]
21278 <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>
21284 Parents of subpages, one level up, not named
21286 subpage title=[[Subpage test/L1/L2/L3]]
21290 <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>
21297 Parents of subpages, two levels up
21299 subpage title=[[Subpage test/L1/L2/L3]]
21305 <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
21306 </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>
21311 Parents of subpages, two levels up, without trailing slash or name.
21313 subpage title=[[Subpage test/L1/L2/L3]]
21322 Parents of subpages, two levels up, with lots of extra trailing slashes.
21324 subpage title=[[Subpage test/L1/L2/L3]]
21328 <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>
21333 Subpage test/L1/L2/L3Sibling
21339 Transclusion of a sibling page (one level up)
21341 subpage title=[[Subpage test/L1/L2/L3]]
21350 Transclusion of a child page
21352 subpage title=[[Subpage test/L1/L2]]
21360 # This is wt2html only in Parsoid because we add <nowiki>
21361 # because of {{..}} and we don't expect to fix that to
21362 # eliminate the nowikis selective for {{..}} markup.
21364 Non-transclusion because of too many up levels
21366 subpage title=[[Subpage test/L1/L2/L3]]
21369 {{../../../../More than parent}}
21371 <p>{{../../../../More than parent}}
21374 <p>{{../../../../More than parent}}</p>
21378 Definition list code coverage
21384 <dl><dt>title  </dt>
21386 <dt>title </dt>
21392 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21393 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21394 <dt>title</dt><dd> def</dd></dl>
21398 Don't fall for the self-closing div
21400 <div>hello world</div/>
21402 <div>hello world</div>
21411 <p>[[:Template:Msg]]
21420 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21424 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21426 Always escape literal '>' in output, not just after '<'
21440 <p>This is a test template
21441 This is a test template
21453 Inclusion of !userCanEdit() content
21457 <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>
21463 Out-of-order TOC heading levels
21472 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21474 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21476 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21477 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21480 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21482 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21483 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21489 <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>
21490 <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>
21491 <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>
21492 <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>
21493 <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>
21494 <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>
21500 ISBN with a dummy number
21510 ISBN with space-delimited number
21514 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21517 <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>
21522 ISBN with multiple spaces, no number
21541 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21542 </p><p>ISBN 12345678901
21545 <p>ISBN 123456789</p>
21547 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21549 <p>ISBN 12345678901</p>
21554 ISBN with trailing year (T9110)
21556 ISBN 1-234-56789-0 - 2006
21558 ISBN 1 234 56789 0 - 2006
21560 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21561 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21564 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21566 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21573 wgFragmentMode=[ 'html5', 'legacy' ]
21575 {{anchorencode:foo bar©#%n}}
21580 <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>
21584 anchorencode (legacy)
21586 wgFragmentMode=[ 'legacy' ]
21588 {{anchorencode:foo bar©#%n}}
21590 <p>foo_bar.C2.A9.23.25n
21595 anchorencode trims spaces
21597 wgFragmentMode=[ 'html5', 'legacy' ]
21599 {{anchorencode: __pretty__please__}}
21604 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21608 anchorencode deals with links
21610 wgFragmentMode=[ 'html5', 'legacy' ]
21612 {{anchorencode: [[hello|world]] [[hi]]}}
21617 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21621 anchorencode deals with templates
21623 wgFragmentMode=[ 'html5', 'legacy' ]
21625 {{anchorencode: {{Foo}} x}}
21630 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21634 anchorencode encodes like the TOC generator: (T20431)
21636 wgFragmentMode=[ 'html5', 'legacy' ]
21638 ===_ +:.3A%3A _ &&]] x===
21639 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21642 <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>
21643 <p>+:.3A%3A_&&]]_x
21646 <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>
21647 <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>
21648 <meta property="mw:PageProp/noeditsection"/>
21652 anchorencode encodes like the TOC generator: (T20431) (legacy)
21654 wgFragmentMode=[ 'legacy' ]
21656 ===_ +:.3A%3A&&]]===
21657 {{anchorencode: _ +:.3A%3A&&]] }}
21660 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21661 <p>.2B:.3A.253A.26.26.5D.5D
21666 T8200: blockquotes and paragraph formatting
21687 T10293: Use of center tag ruins paragraph formatting
21708 Parsing of overlapping (improperly nested) inline html tags
21710 <span><s>x</span></s>
21712 <p><span><s>x</span></s></span>
21715 <p><span><s>x</s></span>
21720 ### Language variants related tests
21723 # Parsoid does not mark self-links.
21724 # Parsoid does not convert links; PHP will do any necessary redirects.
21727 Self-link in language variants
21729 title=[[Dunav]] language=sr
21731 Both [[Dunav]] and [[Дунав]] are names for this river.
21733 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21736 <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>
21746 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21748 title=[[Duna]] language=sr
21750 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21752 <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.
21755 <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>
21759 Link to a section of a variant of this title shouldn't be parsed as self-link
21761 title=[[Duna]] language=sr
21763 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21765 <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.
21768 <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>
21772 Link to pages in language variants
21776 Main Page can be written as [[Маин Паге]]
21778 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21781 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21786 Multiple links to pages in language variants
21790 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21792 <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>.
21795 <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>
21800 Simple template in language variants
21806 <p>This is a test template
21812 Template with explicit namespace in language variants
21818 <p>This is a test template
21824 Basic test for template parameter in language variants
21828 {{парамтест|param=foo}}
21830 <p>This is a test template with parameter foo
21835 Simple category in language variants
21839 [[Category:МедиаWики Усер'с Гуиде]]
21841 cat=МедиаWики_Усер'с_Гуиде sort=
21843 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21858 ## We used to, but no longer wt2wt this test since the default serializer
21859 ## will normalize all categories to serialize on their own line.
21860 ## This wikitext usage is going to be fairly uncommon in production and
21861 ## selser will take care of preserving formatting in those scenarios.
21863 Don't convert blue categorylinks to another variant (T35210)
21869 [[A]][[Category:分类]]
21873 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21874 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21878 Stripping -{}- tags (language variants)
21882 Latin proverb: -{Ne nuntium necare}-
21884 <p>Latin proverb: Ne nuntium necare
21887 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21892 Prevent conversion with -{}- tags (language variants)
21894 language=sr variant=sr-ec
21896 Latinski: -{Ne nuntium necare}-
21898 <p>Латински: Ne nuntium necare
21901 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21906 Prevent conversion of text with -{}- tags (language variants)
21908 language=sr variant=sr-ec
21910 Latinski: -{Ne nuntium necare}-
21912 <p>Латински: Ne nuntium necare
21915 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21920 Prevent conversion of links with -{}- tags (language variants)
21922 language=sr variant=sr-ec
21926 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21929 <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>
21934 -{}- tags within headlines (within html for parserConvert())
21936 wgFragmentMode=[ 'html5', 'legacy' ]
21938 language=sr variant=sr-ec
21942 Note that even an unprotected headline ID is not affected by language
21947 <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>
21948 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21951 <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>
21954 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21956 <p>Note that even an unprotected headline ID is not affected by language
21959 <h2 id="Latinski">Latinski</h2>
21963 Explicit definition of language variant alternatives
21965 language=zh variant=zh-tw
21967 -{zh:China;zh-tw:Taiwan}-, not China
21969 <p>Taiwan, not China
21972 <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>
21976 Filter syntax for language variants
21978 language=zh variant=zh-tw
21980 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21982 <p>fooblog, WEBJOURNAL, WEBLOGquux
21985 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21988 # Note that Parsoid post-processing for language variants needs to
21989 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21991 Conversion around HTML tags
21993 language=sr variant=sr-ec
21995 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21996 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21999 <span title="ЛаCтин">ски</span>
22002 <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"}]}'/>
22003 <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>
22007 Explicit session-wise two-way language variant mapping (A flag and - flag)
22009 language=zh variant=zh-tw
22011 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22013 Taiwan is not China.
22015 But -{A|zh:China; zh-tw:Taiwan}- is China,
22017 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22019 and -{China}- is China.
22021 <p>This is Taiwan, but we'll forget that now.
22022 </p><p>Taiwan is not China.
22023 </p><p>But Taiwan is Taiwan,
22024 </p><p>(This should be stripped!)
22025 </p><p>and China is China.
22028 <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>
22029 <p>Taiwan is not China.</p>
22030 <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>
22031 <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>
22032 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22036 Explicit session-wise one-way language variant mapping (A flag and - flag)
22038 language=zh variant=zh-tw
22040 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22042 COUNTRY is China or Taiwan.
22044 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22046 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22048 and -{COUNTRY}- is COUNTRY.
22050 <p>This is Taiwan, but we'll forget that now.
22051 </p><p>COUNTRY is China or Taiwan.
22052 </p><p>But Taiwan is Taiwan,
22053 </p><p>(This should be stripped!)
22054 </p><p>and COUNTRY is COUNTRY.
22057 <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>
22058 <p>COUNTRY is China or Taiwan.</p>
22059 <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>
22060 <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>
22061 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22065 Explicit session-wise two-way language variant mapping (H flag for hide)
22067 language=zh variant=zh-tw
22069 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22073 <p>(This should be stripped!)
22074 </p><p>Taiwan is Taiwan.
22077 <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>
22078 <p>Taiwan is China.</p>
22082 Explicit session-wise one-way language variant mapping (H flag for hide)
22084 language=zh variant=zh-tw
22086 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22088 COUNTRY is Taiwan or China.
22090 <p>(This should be stripped!)
22091 </p><p>Taiwan is Taiwan or China.
22094 <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>
22095 <p>COUNTRY is Taiwan or China.</p>
22098 ## Note that parsoid test runner does not support 'showtitle' option.
22100 Adding explicit conversion rule for title (T flag)
22102 language=zh variant=zh-tw showtitle
22104 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22109 <p>Should be stripped!
22110 </p><p>Taiwan is China.
22113 <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>
22114 <p>Taiwan is China.</p>
22118 Code coverage: T combined with H flag
22120 language=zh variant=zh-tw showtitle
22122 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22127 <p>Should be stripped!
22128 </p><p>Taiwan is Taiwan.
22131 <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>
22132 <p>Taiwan is China.</p>
22136 Code coverage: T with no variants
22138 language=zh variant=zh-tw showtitle
22140 -{H|zh:China; zh-tw:Taiwan}-
22141 Taiwan is China.-{T|Taiwan is China}-
22148 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22149 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22153 Code coverage: rules with no variants
22155 language=zh variant=zh-tw
22157 -{H|zh:China; zh-tw:Taiwan}-
22168 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22170 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22171 Taiwan is China.</p>
22176 Code coverage: D flag for conversion rule
22178 language=zh variant=zh-tw
22180 -{D|zh-cn:XA; zh-tw:YA}-
22181 -{A;D|zh-cn:XB; zh-tw:YB}-
22182 -{D;H|zh-cn:XC; zh-tw:YC}-
22184 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22190 XA XB XC YA YB YC FOO BAR BAT 012345
22195 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22199 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22202 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22203 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22204 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22205 <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>
22206 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22207 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22208 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22209 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22213 Code coverage: N flag for conversion rule
22215 language=zh variant=zh-cn
22225 </p><p>српски (ћирилица)
22228 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22229 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22230 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22233 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22235 Code coverage: N flag for conversion rule (wt2html only)
22237 language=zh variant=zh-cn
22238 parsoid=wt2html,html2html
22245 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22249 Testing that changing the language variant here in the tests actually works
22251 language=zh variant=zh showtitle
22253 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22256 <p>Should be stripped!
22259 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22263 Recursive conversion of alt and title attrs shouldn't clear converter state
22265 language=zh variant=zh-cn
22268 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22269 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22273 Should be stripped<span title="Exclamation">!</span>
22276 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22277 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>
22281 T26072: more test on conversion rule for title
22283 language=zh variant=zh-tw showtitle
22285 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22287 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22290 <p>This should be stripped!
22291 </p><p>This won't take interferes with the title rule.
22294 <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>
22295 <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>
22299 Partly disable title conversion if variant == main language code
22301 language=zh variant=zh title=[[ZH]] showtitle
22303 -{T|zh-cn:CN;zh-tw:TW}-
22309 <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>
22313 Partly disable title conversion if variant == main language code, more
22315 language=zh variant=zh title=[[ZH]] showtitle
22323 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22327 Raw output of variant escape tags (R flag)
22329 language=zh variant=zh-tw
22331 Raw: -{R|zh:China;zh-tw:Taiwan}-
22333 <p>Raw: zh:China;zh-tw:Taiwan
22336 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22339 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22341 Raw output of variant escape tags (R flag) (wt2html only)
22343 language=zh variant=zh-tw
22344 parsoid=wt2html,html2html
22346 -{Variant}- -{D|syntax}- -{D;R|options}-
22348 <p>Variant syntax options
22351 <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>
22355 Nested markup inside raw output of variant escape tags (R flag)
22357 language=zh variant=zh-tw
22359 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22361 <p>Nested raw: nested Taiwan nested
22364 <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>
22368 Nested markup and spaces inside raw output of variant escape tags (R flag)
22370 language=zh variant=zh-tw
22372 X-{ outer -{ inner }- outer }-X
22374 <p>X outer inner outer X
22377 <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>
22381 Templates inside raw output of variant escape tags (R flag)
22383 language=zh variant=zh-tw
22385 Nested raw: -{R|nested {{echo|hi}} templates}-
22387 <p>Nested raw: nested hi templates
22390 <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>
22394 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22396 language=zh variant=zh-cn
22398 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22403 <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>
22407 Conversion rules from [numeric-only string] to [something else] (T48634)
22409 language=zh variant=zh-cn
22411 -{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
22416 <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>
22420 Two-way converter rule entries with an empty value should be ignored (T53551)
22422 language=zh variant=zh-cn
22424 -{H|zh-cn:foo;zh-tw:;}-foobar
22429 <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>
22433 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22435 language=zh variant=zh-cn
22437 -{H|=>zh-cn:foo;}-foobar
22442 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22446 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22448 language=zh variant=zh-cn
22455 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22459 Nested using of manual convert syntax
22461 language=zh variant=zh-hk
22463 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22465 <p>Nested: Hello Hong Kong!
22468 <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>
22472 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22474 language=zh variant=zh-cn
22476 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22478 <p><span title="X">A</span>
22481 <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>
22485 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22487 language=zh variant=zh-cn
22489 -{<span title="-{X}-">A</span>}-
22490 !! html/php+disabled
22491 <p><span title="X">A</span>
22494 <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>
22497 # Parsoid and PHP disagree on how to parse this example: Parsoid
22498 # insists that the content of a language converter element be a valid
22499 # DOM fragment or attribute string
22501 Language converter markup with block content
22503 language=zh variant=zh-cn
22505 <span>a-{b<div>c}-d
22507 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22509 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22514 </span></div></span></div></span>
22516 <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>
22518 <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>
22520 <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>
22524 LanguageConverter selser (1)
22526 language=zh variant=zh-cn
22528 "modes": ["wt2wt", "selser"],
22530 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22540 LanguageConverter selser (2)
22542 language=zh variant=zh-cn
22544 "modes": ["wt2wt", "selser"],
22546 ["span[class='x']", "contents", "text", "-{foo}-"],
22547 ["a", "contents", "text", "-{"],
22548 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22552 <span class="x">TEXT1</span>
22553 [http://example.com TEXT2]
22557 <span class="x"><nowiki>-{foo}-</nowiki></span>
22558 [http://example.com -{]
22559 [[Foo|<nowiki>-{</nowiki>]]
22560 {{1x|<nowiki>-{</nowiki>}}
22563 # Tests LanguageVariantText in ConstrainedText
22565 LanguageConverter selser (3)
22567 language=zh variant=zh-cn
22569 "modes": ["wt2wt", "selser"],
22571 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22572 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22583 |<nowiki/>-{edited}-
22587 # Tests LanguageVariantText._fromSelSer
22589 LanguageConverter selser (4)
22591 language=zh variant=zh-cn
22593 "modes": ["wt2wt", "selser"],
22595 ["td > span.x", "remove"]
22601 |<span class="x">Foo</span>-{Bar}-
22602 ||<span class="x">Foo</span>-{Bar}-
22612 # Since Parsoid is starting to emit canonical wikitext for links,
22613 # [http://example.com http://example.com] will not RT back to that
22615 # Parsoid does not language-convert links (it is done in a
22616 # post-processing step)
22618 Proper conversion of text in external links
22620 language=sr variant=sr-ec
22623 http://www.google.com
22624 gopher://www.google.com
22625 [http://www.google.com http://www.google.com]
22626 [gopher://www.google.com gopher://www.google.com]
22627 [https://www.google.com irc://www.google.com]
22628 [ftp://www.google.com www.google.com/ftp://dir]
22629 [//www.google.com www.google.com]
22631 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22632 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22633 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22634 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22635 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22636 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22637 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22640 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22641 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22642 <a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22643 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22644 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22645 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22646 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22650 Do not convert roman numbers to language variants
22652 language=sr variant=sr-ec
22656 <p>Фридрих IV је цар.
22659 <p>Fridrih IV je car.</p>
22663 Unclosed language converter markup "-{"
22674 Don't convert raw rule "-{R|=>}-" to "=>"
22683 <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>
22687 Don't break link parsing if language converter markup is in the caption.
22689 language=sr variant=sr-ec
22691 [[Main Page|-{R|main page}-]]
22693 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22696 <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>
22700 T146304: Don't break template parsing if language converter markup is in the parameter.
22702 language=sr variant=sr-ec
22709 <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>
22713 T146305: Don't break image parsing if language converter markup is in the caption.
22717 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22719 <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>
22722 <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>
22726 T146305: Don't break image parsing if nested language converter markup is in the caption.
22728 language=zh variant=zh-cn
22730 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22732 <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>
22735 <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>
22738 # XXX html2wt disabled because rich markup in alt is not preserved.
22740 Don't break gallery if language converter markup is inside.
22745 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22746 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22749 <ul class="gallery mw-gallery-traditional">
22750 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22751 <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>
22752 <div class="gallerytext">
22753 <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>
22757 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22758 <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>
22759 <div class="gallerytext">
22760 <p>This is a test template
22767 <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"}}'>
22768 <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>
22769 <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>
22774 T153135: Don't break list handling if language converter markup is in the item.
22776 language=zh variant=zh-cn
22778 ;-{zh-cn:AAA;zh-tw:BBB}-
22782 <dt>foo:bar</dt></dl>
22785 <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>
22786 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22790 // Note that parsoid does not protect colons unless language converter
22791 // markup is properly nested, because it is a backtracking parser.
22793 T153135: Unclosed markup in definition list (code coverage)
22795 language=zh variant=zh-cn
22800 <dl><dt><b>foo:bar</b></dt><b>
22801 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22804 <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}'>
22805 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22806 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22811 T153135: Nested language converter markup in definition list (code coverage)
22813 language=zh variant=zh-cn
22815 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22817 <dl><dt>AAA foo:bar bat:baz</dt>
22821 <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>
22822 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22826 # html2wt mode disabled due to <nowiki> insertion.
22828 T153140: Don't break table handling if language converter markup is in the cell.
22830 language=sr variant=sr-ec
22831 parsoid=wt2html,wt2wt,html2html
22848 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22855 Language converter tricky html2wt cases (1)
22858 parsoid=html2wt,wt2wt
22860 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22862 -{<nowiki>}-</nowiki>}-
22869 Language converter tricky html2wt cases (2)
22872 parsoid=html2wt,wt2wt
22876 <nowiki>-{foo}-</nowiki>
22878 <p>-{foo}-
22883 Language converter tricky html2wt cases (3)
22886 parsoid=html2wt,wt2wt
22888 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22889 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22890 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22896 -{<nowiki>-{foo}-</nowiki>}-
22900 </p><p>-{foo}-
22905 Language converter tricky html2wt cases (4)
22908 parsoid=html2wt,wt2wt
22910 <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>
22918 # Note that the <nowiki> escaping added by parsoid for source text,
22919 # destination text, and language names only works on the PHP side
22920 # for *destination text*. (HTML entity escaping wouldn't work
22921 # any better.) This is probably a bug, at least for source texts.
22922 # (For language names PHP uses a precise regexp based on the languages
22923 # it currently knows have variants, which is fragile since this set
22924 # can grow/shrink over time.)
22926 Language converter tricky html2wt cases (5)
22928 language=zh variant=zh-cn
22930 <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>
22931 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22932 <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>
22933 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22936 -{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
22938 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22940 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22942 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22945 !! html/php+disabled
22946 <p>foobat;xyz=>zh-cn:abc
22950 </p><p>a:b=>c 0;zh-tw:bar
22955 T179579: Nowiki and lc interaction
22962 -{123<nowiki>|</nowiki>456}-
22964 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
22966 <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>
22970 T2529: Uncovered bullet
22980 T2529: Uncovered bullet in a deeply nested list
22982 *******Foo {{bullet}}
22984 <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>
22990 T2529: Uncovered table already at line-start
23013 T2529: Uncovered bullet in parser function result
23015 *Foo {{lc:{{bullet}} }}
23023 T7678: Double-parsed template argument
23025 {{lc:{{{1}}}|hello}}
23032 T7678: Double-parsed template invocation
23034 {{lc:{{paramtest {{!}} param = hello }} }}
23036 <p>{{paramtest | param = hello }}
23041 Case insensitivity of parser functions for non-ASCII characters (T10143)
23044 title=[[Main Page]]
23046 {{PRVNÍVELKÉ:ěščř}}
23047 {{prvnívelké:ěščř}}
23067 Morwen/13: Unclosed link followed by heading
23074 <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>
23079 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23086 <h1><span class="mw-headline" id="heading">heading</span></h1>
23091 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23098 <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>
23113 Paragraphs inside divs (no extra line breaks)
23125 Paragraphs inside divs (extra line break on open)
23140 Paragraphs inside divs (extra line break on close)
23155 Paragraphs inside divs (extra line break on open and close)
23171 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23172 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23174 Nesting tags, paragraphs on lines which begin with <div>
23176 <div></div><strong>A
23179 <div></div><p><strong>A
23180 </strong></p><strong></strong><p><strong>B</strong>
23189 # T8200: <blockquote> should behave like <div> with respect to line breaks
23191 T8200: paragraphs inside blockquotes (no extra line breaks)
23193 <blockquote>Line one
23195 Line two</blockquote>
23197 <blockquote>Line one
23198 Line two</blockquote>
23201 <blockquote><p>Line one
23202 Line two</p></blockquote>
23206 T8200: paragraphs inside blockquotes (extra line break on open)
23211 Line two</blockquote>
23216 Line two</blockquote>
23222 Line two</p></blockquote>
23225 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23227 T8200: paragraphs inside blockquotes (extra line break on close)
23229 <blockquote>Line one
23234 <blockquote>Line one
23240 <blockquote><p>Line one
23247 T8200: paragraphs inside blockquotes (extra line break on open and close)
23263 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23265 Paragraphs inside blockquotes/divs (no extra line breaks)
23267 <blockquote><div>Line one
23269 Line two</div></blockquote>
23271 <blockquote><div>Line one
23272 Line two</div></blockquote>
23277 Paragraphs inside blockquotes/divs (extra line break on open)
23282 Line two</div></blockquote>
23287 Line two</div></blockquote>
23292 Paragraphs inside blockquotes/divs (extra line break on close)
23294 <blockquote><div>Line one
23297 </div></blockquote>
23299 <blockquote><div>Line one
23302 </div></blockquote>
23307 Paragraphs inside blockquotes/divs (extra line break on open and close)
23313 </div></blockquote>
23319 </div></blockquote>
23324 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23326 wgLinkHolderBatchSize=0
23332 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23333 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23334 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23339 Free external link invading image caption
23341 [[Image:Foobar.jpg|thumb|http://x|hello]]
23343 <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>
23346 <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>
23350 T17196: localised external link numbers
23354 [http://en.wikipedia.org/]
23356 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23359 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23363 Multibyte character in padleft
23365 {{padleft:-Hello|7|Æ}}
23370 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23374 Multibyte character in padright
23376 {{padright:Hello-|7|Æ}}
23381 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23385 formatdate parser function
23387 {{#formatdate:2009-03-24}}
23389 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23394 formatdate parser function, with default format
23396 {{#formatdate:2009-03-24|mdy}}
23398 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23403 Spacing of numbers in formatted dates
23405 {{#formatdate:January 15}}
23407 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23412 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
23414 language=nl title=[[MediaWiki:Common.css]]
23416 {{#formatdate:2009-03-24|dmy}}
23418 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23431 Edit comment with link
23435 I like the [[Main Page]] a lot
23437 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23441 Edit comment with link and link text
23445 I like the [[Main Page|best pages]] a lot
23447 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23451 Edit comment with link and link text with suffix
23455 I like the [[Main Page|best page]]s a lot
23457 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23461 Edit comment with section link (non-local, eg in history list)
23463 comment title=[[Main Page]]
23465 /* External links */ removed bogus entries
23467 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23471 Edit comment with section link and text before it (non-local, eg in history list)
23473 comment title=[[Main Page]]
23475 pre-comment text /* External links */ removed bogus entries
23477 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>
23481 Edit comment with section link (local, eg in diff view)
23483 comment local title=[[Main Page]]
23485 /* External links */ removed bogus entries
23487 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23491 Edit comment with subpage link (T16080)
23495 title=[[Subpage test]]
23497 Poked at a [[/subpage]] here...
23499 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23503 Edit comment with subpage link and link text (T16080)
23507 title=[[Subpage test]]
23509 Poked at a [[/subpage|neat little page]] here...
23511 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23515 Edit comment with bogus subpage link in non-subpage NS (T16080)
23518 title=[[Subpage test]]
23520 Poked at a [[/subpage]] here...
23522 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23526 Edit comment with bare anchor link (local, as on diff)
23530 title=[[Main Page]]
23534 <a href="#section">#section</a>
23538 Edit comment with bare anchor link (non-local, as on history)
23541 title=[[Main Page]]
23545 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23549 Anchor starting with underscore
23555 <p><a href="#_ref">One</a>
23558 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23562 Id starting with underscore
23564 <div id="_ref"></div>
23566 <div id="_ref"></div>
23571 Edit comment with link with more than one pipe (T99346)
23575 [[Main Page|Many|pipes]]
23577 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23581 Complex edit comment with link with more than one pipe (T99346)
23585 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23587 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..."
23591 Space normalisation on autocomment (T24784)
23594 title=[[Main Page]]
23596 /* __hello__world__ */
23598 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23602 percent-encoding and + signs in comments (T28410)
23606 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23608 <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>
23611 # Parsoid doesn't support this yet: see T75581
23612 # but it *should* omit the 'src' attribute if the image is bad.
23613 # PHP side of tests was disabled in
23614 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23615 # because of issues in the PHP parserTests infrastructure
23616 # (but the output below is indeed what the PHP side emits)
23618 Bad images - basic functionality
23621 !! html/php+disabled
23623 <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>
23627 Bad images - T18039: text after bad image disappears
23632 !! html/php+disabled
23638 <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>
23643 Verify that displaytitle works (T24501) no displaytitle
23647 wgAllowDisplayTitle=true
23648 wgRestrictDisplayTitle=false
23650 this is not the the title
23653 <p>this is not the the title
23658 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23663 wgAllowDisplayTitle=true
23664 wgRestrictDisplayTitle=false
23666 this is not the the title
23667 {{DISPLAYTITLE:whatever}}
23670 <p>this is not the the title
23675 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23680 wgAllowDisplayTitle=true
23681 wgRestrictDisplayTitle=true
23683 this is not the the title
23684 {{DISPLAYTITLE:whatever}}
23687 <p>this is not the the title
23692 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23697 wgAllowDisplayTitle=true
23698 wgRestrictDisplayTitle=true
23700 this is not the the title
23701 {{DISPLAYTITLE:screen}}
23704 <p>this is not the the title
23709 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23714 wgAllowDisplayTitle=false
23716 this is not the the title
23717 {{DISPLAYTITLE:screen}}
23720 <p>this is not the the title
23721 <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>
23726 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23731 wgAllowDisplayTitle=false
23733 this is not the the title
23736 <p>this is not the the title
23741 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23746 wgAllowDisplayTitle=true
23747 wgRestrictDisplayTitle=true
23749 this is not the the title
23750 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23752 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23753 <p>this is not the the title
23758 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23763 wgAllowDisplayTitle=true
23764 wgRestrictDisplayTitle=true
23766 this is not the the title
23767 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23769 <span style="color: red;">s</span>creen
23770 <p>this is not the the title
23775 Page status indicators: Empty name is invalid
23779 <indicator name=" "></indicator>
23780 <indicator></indicator>
23782 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23783 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23788 Page status indicators: Weird syntaxes that are okay
23792 <indicator name="empty" />
23793 <indicator name="name"></indicator>
23802 Page status indicators: Torture test
23806 <indicator name="01">hello world</indicator>
23807 <indicator name="02">[[Main Page]]</indicator>
23808 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23809 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23810 <indicator name="05">*foo
23812 <indicator name="06"><nowiki>foo</nowiki></indicator>
23813 <indicator name="07"> Preformatted</indicator>
23814 <indicator name="08"><div>Broken tag</indicator>
23815 <indicator name="09">{| class=wikitable
23818 <indicator name="10">Two
23820 paragraphs</indicator>
23823 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23824 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" />
23825 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>
23826 05=<ul><li>foo</li>
23830 07=<pre>Preformatted
23832 08=<div>Broken tag</div>
23834 09=<table class="wikitable">
23851 preload: check <noinclude> and <includeonly>
23855 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23861 preload: check <onlyinclude>
23865 Goodbye <onlyinclude>Hello world</onlyinclude>
23871 preload: can pass tags through if we want to
23875 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23877 <includeonly>Hello world</includeonly>
23881 preload: check that it doesn't try to do tricks
23885 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23887 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23891 Play a bit with r67090 and T5158
23893 <div style="width:50% !important"> </div>
23894 <div style="width:50% !important"> </div>
23895 <div style="width:50% !important"> </div>
23896 <div style="border : solid;"> </div>
23898 <div style="width:50% !important"> </div>
23899 <div style="width:50% !important"> </div>
23900 <div style="width:50% !important"> </div>
23901 <div style="border : solid;"> </div>
23904 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23905 <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>
23906 <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>
23907 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23912 HTML5 data attributes
23914 <span data-foo="bar">Baz</span>
23915 <p data-abc-def_hij="">Quuz</p>
23917 <p><span data-foo="bar">Baz</span>
23919 <p data-abc-def_hij="">Quuz</p>
23922 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23923 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23927 Strip reserved data attributes
23929 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23931 <div data-ok="fred">d</div>
23934 <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>
23938 percent-encoding and + signs in internal links (T28410)
23940 [[User:+%]] [[Page+title%]]
23941 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23942 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23943 [[%33%45]] [[%33%45+]]
23945 <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>
23946 <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>
23947 <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>
23948 <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>
23951 <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>
23952 <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>
23953 <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>
23954 <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>
23958 Special characters in embedded file links (T29679)
23960 [[File:Contains & ampersand.jpg]]
23961 [[File:Does not exist.jpg|Title with & ampersand]]
23963 <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>
23964 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23967 <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>
23968 <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>
23972 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23974 Text's been normalized?
23976 <p>Text's been normalized?
23981 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23983 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23985 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23990 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23992 [http://www.example.org/ ideograms]
23994 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23999 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24001 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24003 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24027 T33098 Template which includes system messages which includes the template
24031 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24032 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24037 T33490 Turkish: ucfirst 'blah'
24048 T33490 Turkish: ucfirst 'ix'
24059 T33490 Turkish: lcfirst 'BLAH'
24070 T33490 Turkish: ucfırst (with a dotless i)
24076 <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>
24081 T33490 ucfırst (with a dotless i) with English language
24087 <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>
24091 # Note that Parsoid doesn't emit an explicit TOC.
24092 # Note also that the html2wt direction tends to emit an extra newline
24093 # between the __TOC__ magicword and the first heading unless *both*
24094 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24098 T28375: TOC with italics
24100 title=[[Main Page]]
24103 ==''Lost'' episodes==
24105 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24107 <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>
24111 <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>
24114 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24115 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24119 T28375: TOC with bold
24121 title=[[Main Page]]
24124 =='''should be bold''' then normal text==
24126 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24128 <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>
24132 <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>
24135 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24136 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24140 T35845: Headings become cursive in TOC when they contain an image
24142 title=[[Main Page]]
24145 ==Image [[Image:foobar.jpg]]==
24147 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24149 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24153 <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>
24156 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24157 <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>
24161 T35845 (2): Headings become bold in TOC when they contain a blockquote
24163 title=[[Main Page]]
24166 ==<blockquote>Quote</blockquote>==
24168 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24170 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24174 <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>
24177 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24179 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24183 <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>
24185 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24186 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24190 Unclosed tags in TOC
24192 wgFragmentMode=[ 'html5', 'legacy' ]
24194 title=[[Main Page]]
24198 <small>Hanc marginis exiguitas non caperet.</small>
24201 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24203 <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>
24207 <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>
24208 <p><small>Hanc marginis exiguitas non caperet.</small>
24212 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24213 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24214 <p><small>Hanc marginis exiguitas non caperet.</small>
24219 Multiple tags in TOC
24222 ==<i>Foo</i> <b>Bar</b>==
24224 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24226 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24228 <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>
24229 <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>
24233 <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>
24234 <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>
24237 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24239 <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>
24240 <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>
24244 <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>
24245 <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>
24247 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24248 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24250 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24253 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24254 # html5 tag parsing.
24256 Tags with parameters in TOC
24261 ==<sup class="in-h2">Hello</sup>==
24263 ==<sup class="a > b">Evilbye</sup>==
24265 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24267 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24268 <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>
24272 <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>
24273 <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>
24276 <meta property="mw:PageProp/toc" />
24277 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24279 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24283 span tags with directionality in TOC
24286 ==<span dir="ltr">C++</span>==
24288 ==<span dir="rtl">זבנג!</span>==
24290 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24292 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24294 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24296 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24298 <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>
24299 <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>
24300 <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>
24301 <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>
24302 <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>
24306 <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>
24307 <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>
24308 <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>
24309 <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>
24310 <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>
24313 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24314 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24315 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24316 <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>
24317 <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>
24318 <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>
24322 T74884: bdi element in ToC
24325 ==<bdi>test</bdi>==
24327 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24329 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24333 <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>
24336 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24337 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24341 T35715: s/strike element in ToC
24344 ==<s>test</s> test <strike>test</strike>==
24346 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24348 <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>
24352 <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>
24355 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24356 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24360 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24365 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24367 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24371 <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>
24374 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24375 <h2 id="x" data-parsoid='{}'>x</h2>
24381 == {{int:headline_sample}} ==
24385 T34057: Title needed when expanding <h> nodes.
24387 title=[[Main Page]]
24391 <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>
24396 Strip marker in urlencode
24398 {{urlencode:x<nowiki/>y}}
24399 {{urlencode:x<nowiki/>y|wiki}}
24400 {{urlencode:x<nowiki/>y|path}}
24401 {{urlencode:x<pre id="one">two</pre>y}}
24429 Strip marker in formatNum
24431 {{formatnum:1<nowiki/>2}}
24432 {{formatnum:1<nowiki/>2|R}}
24440 Check noCommafy in formatNum
24444 {{formatnum:123456.78}}
24445 {{formatnum:123456.78|NOSEP}}
24453 Wrong option for formatNum (T58199)
24455 {{formatnum:1,234.56|Random}}
24456 {{formatnum:1,234.56|EVERYTHING}}
24457 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24466 Strip marker in grammar
24470 {{grammar:elative|foo<nowiki/>bar}}
24477 Strip marker in padleft
24479 {{padleft:|2|x<nowiki/>y}}
24486 Strip marker in padright
24488 {{padright:|2|x<nowiki/>y}}
24495 Strip marker in anchorencode
24497 {{anchorencode:x<nowiki/>y}}
24502 <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>
24506 nowiki inside link inside heading (T20295)
24508 ==[[foo|x<nowiki>y</nowiki>z]]==
24510 <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>
24515 new support for bdi element (T33817)
24517 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24519 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24524 Ignore pipe between table row attributes
24528 |- id=foo | style='color: red'
24536 <tr id="foo" style="color: red">
24543 Language parser function
24552 Padleft and padright (default 0-padding)
24561 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24562 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24566 Padleft and padright (partial fill)
24568 {{padleft:xyz|6|ab}}
24569 {{padright:xyz|6|ab}}
24575 <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>
24576 <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>
24580 Padleft and padright as substr
24582 {{padleft:|3|abcde}}
24583 {{padright:|3|abcde}}
24589 <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>
24590 <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>
24594 Padleft and padright with non-numerical length (T180403)
24596 {{padleft:abcdef|junk}}
24597 {{padright:abcdef|junk}}
24605 Special parser function
24607 {{#special:RandomPage}}
24608 {{#special:BaDtItLe}}
24609 {{#special:Foobar}}
24618 T36939 - Case insensitive link parsing ([HttP://])
24620 [HttP://MediaWiki.Org/]
24622 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24625 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24629 T36939 - Case insensitive link parsing ([HttP:// title])
24631 [HttP://MediaWiki.Org/ MediaWiki]
24633 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24638 T36939 - Case insensitive link parsing (HttP://)
24640 HttP://MediaWiki.Org/
24642 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24645 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24663 <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>
24664 <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>
24665 <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>
24666 <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>
24667 <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>
24673 ### Parsoid-specific tests
24674 ### Parsoid-PHP parser incompatibilities
24677 1. SOL-sensitive wikitext tokens as template-args
24679 parsoid=wt2html,wt2wt
24685 <span about="#mwt1" typeof="mw:Transclusion">
24686 </span><ul about="#mwt1"><li>a</li>
24688 <span about="#mwt2" typeof="mw:Transclusion">
24689 </span><ol about="#mwt2"><li>a</li>
24691 <span about="#mwt3" typeof="mw:Transclusion">
24692 </span><dl about="#mwt3"><dd>a</dd>
24696 #### -----------------------------------------------------------------
24697 #### Parsoid-specific functionality tests
24698 #### -----------------------------------------------------------------
24700 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24701 # We know wt2wt will fail, but we expect selser to pass.
24702 # Due to the nature of our testing, wt2wt and selser tests will enter the
24703 # blacklist and we'll catch selser regressions based on changes to the
24704 # blacklist entries for selser tests.
24706 1. Bad treebuilder fixup of formatting elt is cleaned up
24708 parsoid=wt2html,wt2wt
24713 [[Image:Foobar.jpg|right|Test]]
24720 <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>
24727 2. Bad treebuilder fixup of formatting elt is cleaned up
24729 parsoid=wt2html,wt2wt
24731 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24733 <small>[[Image:Foobar.jpg|right|300px]]</small>
24737 <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>
24739 <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>
24743 3. Bad treebuilder fixup of formatting elt is cleaned up
24745 parsoid=wt2html,wt2wt
24747 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24749 <p><small><b>foo</b></small></p>
24750 <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>
24751 <p><small><b>bar</b></small></p>
24755 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24757 parsoid=wt2html,wt2wt
24759 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24761 <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>
24764 #### ----------------------------------------------------------------
24765 #### Parsoid-only testing of Parsoid's impl of LST
24766 #### Not implemented yet, see
24767 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24768 #### ----------------------------------------------------------------
24770 ## We still need to support serializing the older format while content is stored.
24772 LST Sections: Backwards compatibility
24775 "suppressErrors": true,
24776 "modes": ["html2wt"]
24779 <section begin="2011-05-16" />
24780 <section end="2014-04-10 (MW 1.23wmf22)" />
24782 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24783 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24787 LST Sections: Newfangled approach
24789 <section begin="2011-05-16" />
24790 <section end="2014-04-10 (MW 1.23wmf22)" />
24792 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24794 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24798 #--------- Test stripping of empty nodes in template content ----------
24801 Empty LI and TR nodes should be stripped from template content
24806 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24810 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24823 Empty LI and TR nodes should not be stripped from top-level content
24837 <li class='mw-empty-elt'></li>
24842 <tr class='mw-empty-elt'></tr>
24851 Empty TR nodes should not be stripped if they have any attributes set
24853 {{EmptyTRWithHTMLAttrTest}}
24855 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24856 <tr align='center'></tr>
24857 <tr><td>foo</td></tr>
24858 <tr align='center'></tr>
24859 <tr><td>bar</td></tr>
24863 #### ----------------------------------------------------------------
24864 #### The following section of tests are primarily to test
24865 #### wikitext escaping capabilities of Parsoid. Given that
24866 #### escaping can be done any number of ways, the wikitext (input)
24867 #### is always adjusted to reflect how Parsoid adds nowiki
24870 #### We are marking several tests as parsoid-only since the
24871 #### HTML in the result section is different from what the
24872 #### PHP parser generates for it.
24873 #### ----------------------------------------------------------------
24876 #### --------------- Headings ---------------
24878 #### 1. Nested inside html <h1>=foo=</h1>
24879 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24880 #### 3. Nested inside html with wikitext split by html tags
24881 #### 4. No escape needed
24882 #### 5. Empty headings <h1></h1>
24883 #### 6. Heading chars in SOL context
24884 #### ----------------------------------------
24886 Headings: 0. Unnested
24896 <p>=foo<i>a</i>=</p>
24898 <nowiki>=foo=</nowiki>
24900 <nowiki> </nowiki>=foo=
24902 <nowiki>=foo=</nowiki>
24904 =foo''a''<nowiki>=</nowiki>
24907 # New headings and existing headings are handled differently
24909 Headings: 1. Nested inside html
24917 <h1 data-parsoid=''>=foo=</h1>
24918 <h2 data-parsoid=''>=foo=</h2>
24919 <h3 data-parsoid=''>=foo=</h3>
24920 <h4 data-parsoid=''>=foo=</h4>
24921 <h5 data-parsoid=''>=foo=</h5>
24922 <h6 data-parsoid=''>=foo=</h6>
24930 =<nowiki>=foo=</nowiki>=
24931 ==<nowiki>=foo=</nowiki>==
24932 ===<nowiki>=foo=</nowiki>===
24933 ====<nowiki>=foo=</nowiki>====
24934 =====<nowiki>=foo=</nowiki>=====
24935 ======<nowiki>=foo=</nowiki>======
24940 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24949 <nowiki>*</nowiki>bar
24955 <nowiki>=bar=</nowiki>
24959 Headings: 3. Nested inside html with wikitext split by html tags
24963 <h1>=<b>bold</b>foo=</h1>
24965 = ='''bold'''foo= =
24969 Headings: 4a. No escaping needed (testing just h1 and h2)
24980 <h1><i>=</i>foo=</h1>
25000 Headings: 4b. No escaping needed (inside p-tags)
25017 Headings: 4c. Short headings (1)
25024 <nowiki>===</nowiki>
25030 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25032 Headings: 4d. Short headings (2)
25034 parsoid=wt2html,html2html
25045 <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>
25046 <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>
25047 <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>
25052 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25053 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25054 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25058 Headings: 5. Empty headings
25062 <h1 data-parsoid='{}'></h1>
25064 <h2 data-parsoid='{}'></h2>
25066 <h3 data-parsoid='{}'></h3>
25068 <h4 data-parsoid='{}'></h4>
25070 <h5 data-parsoid='{}'></h5>
25072 <h6 data-parsoid='{}'></h6>
25082 =====<nowiki/>=====
25084 ======<nowiki/>======
25088 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25098 <nowiki>=a=</nowiki>
25100 <nowiki>=a=</nowiki>
25102 <nowiki>=a=</nowiki>
25106 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25119 <nowiki>=a=</nowiki>
25122 <nowiki>=a=</nowiki>
25125 <nowiki>=a=</nowiki>
25130 Headings: 6c. Heading chars in SOL context (leading newline break)
25138 <nowiki>=b=</nowiki>
25142 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25146 <!--c0--><p>=a=</p>
25148 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25150 <!--c0--><nowiki>=a=</nowiki>
25152 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25156 Headings: 6d. Heading chars in SOL context (No escaping needed)
25166 Headings: 7. Insert a newline between new content and headings
25172 <h2 data-parsoid='{}'>A</h2>
25173 <p data-parsoid='{}'>a</p>
25184 Headings: Used as horizontal rule
25186 wgFragmentMode=[ 'html5', 'legacy' ]
25192 <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>
25195 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25198 #### --------------- Lists ---------------
25199 #### 0. Outside nests (*foo, etc.)
25200 #### 1. Nested inside html <ul><li>*foo</li></ul>
25201 #### 2. Inside definition lists
25202 #### 3. Only bullets at start should be escaped
25203 #### 4. No escapes needed
25204 #### 5. No unnecessary escapes
25205 #### 6. Escape bullets in SOL position
25206 #### 7. Escape bullets in a multi-line context
25207 #### ----------------------------------------
25210 Lists: 0. Outside nests
25220 <nowiki>*</nowiki>foo
25222 <nowiki>#</nowiki>foo
25224 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25227 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25228 ## to test wikitext escaping, and insignificant whitespace diffs
25229 ## cause PHP parser tests to barf
25231 Lists: 1. Nested inside html (No unnecessary escapes)
25240 <li data-parsoid='{}'>*foo</li>
25241 <li data-parsoid='{}'>#foo</li>
25242 <li data-parsoid='{}'>:foo</li>
25243 <li data-parsoid='{}'>;foo</li>
25251 <li data-parsoid='{}'>*foo</li>
25252 <li data-parsoid='{}'>#foo</li>
25253 <li data-parsoid='{}'>:foo</li>
25254 <li data-parsoid='{}'>;foo</li>
25261 *<nowiki>*foo</nowiki>
25262 *<nowiki>#foo</nowiki>
25263 *<nowiki>:foo</nowiki>
25264 *<nowiki>;foo</nowiki>
25270 #<nowiki>*foo</nowiki>
25271 #<nowiki>#foo</nowiki>
25272 #<nowiki>:foo</nowiki>
25273 #<nowiki>;foo</nowiki>
25277 Lists: 2. Inside definition lists
25281 <dl><dt>;foo</dt></dl>
25282 <dl><dt>:foo</dt></dl>
25285 <dl><dd>:foo</dd></dl>
25289 ; <nowiki>:foo</nowiki>
25291 ; <nowiki>:foo</nowiki>
25298 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25304 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25308 *<nowiki>*foo</nowiki>''it''*bar
25312 Lists: 4. No escapes needed
25325 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25329 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25343 Lists: 5. No unnecessary escapes
25347 <ul><li> bar <span>[[foo]]</span></li></ul>
25348 <ul><li> =bar <span>[[foo]]</span></li></ul>
25349 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25350 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25351 <ul><li> =bar <span>foo]]</span>=</li></ul>
25352 <ul><li> <s></s>: a</li></ul>
25353 <ul><li> <i>* foo</i></li></ul>
25356 * bar <span><nowiki>[[foo]]</nowiki></span>
25358 * =bar <span><nowiki>[[foo]]</nowiki></span>
25360 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25362 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25364 * =bar <span>foo]]</span>=
25372 Lists: 6. Escape bullets in SOL position
25376 <p><!--cmt-->*foo</p>
25378 <!--cmt--><nowiki>*</nowiki>foo
25382 Lists: 7. Escape bullets in a multi-line context
25391 <nowiki>*</nowiki>b
25395 Lists: 8. Escape colons only if not present in tags
25399 <dl><dt>a:b<i>c:d</i></dt></dl>
25401 ; <nowiki>a:b</nowiki>''c:d''
25404 #### --------------- HRs ---------------
25405 #### 1. Single line
25406 #### -----------------------------------
25409 HRs: 1. Single line
25417 ----<nowiki>----</nowiki>
25422 #### --------------- Tables ---------------
25423 #### 1a. Simple example
25424 #### 1b. No escaping needed (!foo)
25425 #### 1c. No escaping needed (|foo)
25426 #### 1d. No escaping needed (|}foo)
25428 #### 2a. Nested in td (<td>foo|bar</td>)
25429 #### 2b. Nested in td (<td>foo||bar</td>)
25430 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25432 #### 3a. Nested in th (<th>foo!bar</th>)
25433 #### 3b. Nested in th (<th>foo!!bar</th>)
25434 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25438 #### 4c. No escaping needed
25439 #### --------------------------------------
25442 Tables: 1a. Simple example
25450 <nowiki>{|</nowiki>
25455 Tables: 1b. No escaping needed
25466 Tables: 1c. No escaping needed
25477 Tables: 1d. No escaping needed
25488 Tables: 2a. Nested in td
25493 <td>foo|bar</td></tr>
25494 <tr><td>x<div>a|b</div></td>
25498 |<nowiki>foo|bar</nowiki>
25500 |x<div><nowiki>a|b</nowiki></div>
25508 <td>x<div>a|b</div>
25509 </td></tr></tbody></table>
25513 Tables: 2b. Nested in td
25519 <td>a<i>b||c</i></td>
25520 <td>a<i><div>b||c</div></i></td>
25521 </tr></tbody></table>
25524 |<nowiki>foo||bar</nowiki>
25525 |a''<nowiki>b||c</nowiki>''
25526 |a''<div><nowiki>b||c</nowiki></div>''
25535 <td>a<i><div>b||c</div></i>
25541 Tables: 2c. Nested in td -- no escaping needed
25557 Tables: 3a. Nested in th
25573 Tables: 3b. Nested in th
25578 <tr><th>foo!!bar</th>
25579 <th><i>foo|bar</i></th>
25580 <th><i>foo!!bar</i></th>
25581 <th><i><span>foo!!bar</span></i></th>
25582 </tr></tbody></table>
25585 !<nowiki>foo!!bar</nowiki>
25586 !''<nowiki>foo|bar</nowiki>''
25587 !''<nowiki>foo!!bar</nowiki>''
25588 !''<span><nowiki>foo!!bar</nowiki></span>''
25597 <th><i>foo!!bar</i>
25599 <th><i><span>foo!!bar</span></i>
25605 Tables: 3c. Nested in th
25610 <tr><th>foo||bar</th>
25611 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25612 </tr></tbody></table>
25615 !<nowiki>foo||bar</nowiki>
25616 !<nowiki>foo||bar</nowiki>
25629 Tables: 4a. Escape -
25645 |<nowiki>-bar</nowiki>
25650 Tables: 4b. Escape +
25666 |<nowiki>+bar</nowiki>
25671 Tables: 4c. No escaping needed
25676 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25677 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25683 <div>a|b</div></td>
25728 Tables: 4d. No escaping needed
25733 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25734 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25735 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25746 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25756 T97430: Don't emit empty nowiki pairs around marker meta tags
25760 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25761 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25763 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25764 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25768 Unclosed xmlish element in table line shouldn't eat end delimiters
25773 <tbody><tr><td> <foo</td>
25774 <td> bar></td></tr>
25791 #### --------------- Links ----------------
25792 #### 1. Quote marks in link text
25793 #### 2. Wikilinks: Escapes needed
25794 #### 3. Wikilinks: No escapes needed
25795 #### 4. Extlinks: Escapes needed
25796 #### 5. Extlinks: No escapes needed
25797 #### --------------------------------------
25799 Links 1. WikiLinks: No escapes needed
25803 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25804 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25805 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25809 [[Foo|x [Foobar] x]]
25811 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25812 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25813 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25818 Links 2. WikiLinks: Escapes needed
25822 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25823 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25824 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25825 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25826 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25827 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25828 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25829 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25830 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25831 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25833 [[Foo|<nowiki>Foobar]</nowiki>]]
25834 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25835 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25836 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25837 [[Foo|<nowiki>|Bar</nowiki>]]
25838 [[Foo|<nowiki>]]bar</nowiki>]]
25839 [[Foo|<nowiki>[[bar</nowiki>]]
25840 [[Foo|<nowiki>x [[ y</nowiki>]]
25841 [[Foo|<nowiki>x ]] y</nowiki>]]
25842 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25844 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25845 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25846 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25847 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25848 <a href="/wiki/Foo" title="Foo">|Bar</a>
25849 <a href="/wiki/Foo" title="Foo">]]bar</a>
25850 <a href="/wiki/Foo" title="Foo">[[bar</a>
25851 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25852 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25853 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25858 Links 3. WikiLinks: No escapes needed
25862 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25863 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25868 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25869 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25874 Links 4. ExtLinks: Escapes needed
25878 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25879 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25880 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25881 <p>[http://google.com]</p>
25882 <p>[http://google.com google]</p>
25883 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25884 <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>
25886 [http://google.com <nowiki>[google]</nowiki>]
25887 [http://google.com <nowiki>google]</nowiki>]
25888 [http://google.com <nowiki>goog] le</nowiki>]
25890 <nowiki>[http://google.com]</nowiki>
25892 <nowiki>[http://google.com google]</nowiki>
25894 [http://google.com<nowiki>]</nowiki>
25896 [{{echo|http://google.com}}<nowiki>]</nowiki>
25898 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25899 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25900 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25901 </p><p>[http://google.com]
25902 </p><p>[http://google.com google]
25903 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25904 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25909 Links 5. ExtLinks: No escapes needed
25913 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25914 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25916 [http://google.com [google]
25918 [[http://google.com]]
25920 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25921 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25926 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25930 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25931 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25932 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25933 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25934 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25935 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25936 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25937 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25938 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25939 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25940 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25941 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25942 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25945 x<nowiki/>http://example.com<nowiki/>y
25946 http://example.com<nowiki/>?x
25947 http://example.com<nowiki/>&x
25948 http://example.com<nowiki/>'x
25949 http://example.com<nowiki/>,x
25950 http://example.com<nowiki/>.x
25951 http://example.com<nowiki/>;x
25952 http://example.com<nowiki/>:x
25953 http://example.com<nowiki/>;x
25954 http://example.com<nowiki/>!x
25955 http://example.com<nowiki/>=x
25956 http://example.com<nowiki/>(x)
25957 http://example.com(x<nowiki/>)
25961 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25966 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25968 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25969 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25970 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25971 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25972 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25978 "http://example.com"
25979 (http://example.com)
25980 (http://example.com) foo
25981 http://example.com,
25982 http://example.com, foo
25985 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25987 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25988 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25989 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25990 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25991 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25996 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26000 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26001 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26003 http://example.com.,;:!?\
26004 -http://example.com:
26006 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26007 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26012 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26016 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26017 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26018 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26022 X<nowiki/>RFC 123<nowiki/>y
26026 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26030 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26031 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26032 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26039 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26040 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26041 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26046 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26050 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26051 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26052 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26056 X<nowiki/>PMID 123<nowiki/>y
26060 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26064 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26065 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26066 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26073 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26074 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26075 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26080 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26084 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26085 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26086 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26089 ISBN 1234567890<nowiki/>1
26090 ISBN 1234567890<nowiki/>x
26091 a<nowiki/>ISBN 1234567890<nowiki/>b
26095 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26099 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26103 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26108 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26112 <p>this is not a link: http://example.com
26115 this is not a link: <nowiki>http://example.com</nowiki>
26119 Links 15. Link trails can't become link prefixes.
26124 <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>
26126 [[Söfnuður]]-[[00]]
26128 <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>
26132 #### --------------- Quotes ---------------
26133 #### 1. Quotes inside <b> and <i>
26134 #### 2. Link fragments separated by <i> and <b> tags
26135 #### 3. Link fragments inside <i> and <b>
26136 #### 4. No escaping needed
26137 #### --------------------------------------
26139 1a. Quotes inside <b> and <i>
26150 <b>foo'<i>bar'</i>baz</b>
26159 <i>fools'<span> errand</span></i>
26160 <i><span>fool</span>'s errand</i>
26161 '<i>foo</i> bar '<i>baz</i>
26162 a|!*#-:;+-~[]{}b'<i>x</i>
26166 ''<nowiki>''foo''</nowiki>''
26167 ''<nowiki>'''foo'''</nowiki>''
26169 '''<nowiki/>'foo''''
26170 '''<nowiki>''foo''</nowiki>'''
26171 '''<nowiki>'''foo'''</nowiki>'''
26172 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26173 '''foo'''<nowiki/>'s
26179 '''foo'''<nowiki/>'
26180 ''''foo'''<nowiki/>'
26181 ''fools'<span> errand</span>''
26182 ''<span>fool</span>'s errand''
26183 '<nowiki/>''foo'' bar '''baz''
26184 a|!*#-:;+-~[]{}b'''x''
26188 1b. Quotes inside <b> and <i> with other tags on same line
26192 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26193 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26194 <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>
26195 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26196 '<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>
26197 '<i>foo</i> <div title="name">test</div>
26198 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26199 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26200 <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>
26203 '''a'' foo ''[[bar]]''
26204 ''a''' foo ''[[bar]]''
26205 ''a''' foo '''{{echo|[[bar]]}}'''
26206 [[foo]] x'''[[bar]]''
26207 '''foo'' <ref>test</ref>
26208 '''foo'' <div title="name">test</div>
26209 '''foo'' and <br> bar
26214 2. Link fragments separated by <i> and <b> tags
26218 <p>[[<i>foo</i>hello]]</p>
26219 <p>[[<b>foo</b>hello]]</p>
26221 [[''foo''<nowiki>hello]]</nowiki>
26223 [['''foo'''<nowiki>hello]]</nowiki>
26226 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26227 # this is one of the shortcomings of this format
26229 3. Link fragments inside <i> and <b>
26233 <p><i>[[foo</i>]]</p>
26234 <p><b>[[foo</b>]]</p>
26236 ''[[foo''<nowiki>]]</nowiki>
26238 '''[[foo'''<nowiki>]]</nowiki>
26242 4. No escaping needed
26246 <p>'<span><i>bar</i></span>'
26247 '<span><b>bar</b></span>'
26251 '<span>''bar''</span>'
26252 '<span>'''bar'''</span>'
26256 #### ----------- Paragraphs ---------------
26257 #### 1. No unnecessary escapes
26258 #### --------------------------------------
26261 1. No unnecessary escapes
26265 <p>bar <span>[[foo]]</span>
26266 </p><p>=bar <span>[[foo]]</span>
26267 </p><p>[[bar <span>[[foo]]</span>
26268 </p><p>]]bar <span>[[foo]]</span>
26269 </p><p>=bar <span>foo]]</span>=
26272 bar <span><nowiki>[[foo]]</nowiki></span>
26274 =bar <span><nowiki>[[foo]]</nowiki></span>
26276 [[bar <span><nowiki>[[foo]]</nowiki></span>
26278 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26280 =bar <span>foo]]</span><nowiki>=</nowiki>
26283 #### ----------------------- PRE --------------------------
26284 #### 1. Leading whitespace in SOL context should be escaped
26285 #### ------------------------------------------------------
26287 1. Leading whitespace in SOL context should be escaped
26310 <nowiki> </nowiki>a
26312 <nowiki> </nowiki> a
26316 <nowiki> </nowiki> a
26318 <nowiki> </nowiki>a
26321 <nowiki> </nowiki>b
26344 2. Leading whitespace in non-indent-pre contexts should not be escaped
26348 <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>
26349 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26350 <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>
26360 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26379 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26383 <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>
26385 [[File:Foobar.jpg|thumb|caption]]
26389 5. Nowiki escaping should account for indent-pres
26399 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26412 #### --------------- Behavior Switches --------------------
26415 1. Valid behavior switches should be escaped
26422 <nowiki>__TOC__</nowiki>
26423 ''<nowiki>__TOC__</nowiki>''
26427 2. Invalid behavior switches should not be escaped
26438 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26440 Behavior switches should be SOL-transparent
26444 <meta property="mw:PageProp/toc" />
26446 <!-- this one's bogus -->
26449 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26451 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26455 <!-- this one's bogus -->
26464 #### --------------- HTML tags ---------------
26467 #### 3. multi-line html tag
26468 #### 4. extension tags
26469 #### -----------------------------------------
26475 <a href="http://google.com">google</a>
26477 <a href="http://google.com">google</a>
26485 <ul><li> <div>foo</div></li>
26486 <li> <div style="color:red">foo</div></li>
26487 <li> <td></li></ul>
26490 * <nowiki><div>foo</div></nowiki>
26491 * <nowiki><div style="color:red">foo</div></nowiki>
26492 * <nowiki><td></nowiki>
26496 3. multi-line html tag
26515 <p><ref>foo</ref>
26516 </p><p><ref>bar
26517 </p><p>baz</ref>
26520 <nowiki><ref>foo</ref></nowiki>
26522 <nowiki><ref>bar</nowiki>
26524 baz<nowiki></ref></nowiki>
26527 #### --------------- Others ---------------
26533 <p><nowiki>foo</nowiki>
26536 <nowiki>foo</nowiki>
26539 ## The quote-char in the input is necessary for triggering the bug
26541 (T54035) Nowiki-escaping should not get tripped by " :" in text
26550 #----------- End of wikitext escaping tests --------------
26554 Tag-like HTML structures are passed through as text
26576 </p><p>1<d e>f
26581 HTML tag with necessary entities in attributes
26583 <span title="&amp;">foo</span>
26585 <p><span title="&amp;">foo</span>
26590 HTML tag with 'unnecessary' entity encoding in attributes
26592 <span title="&">foo</span>
26594 <p><span title="&">foo</span>
26599 HTML tag with broken attribute value quoting
26601 parsoid=wt2html,html2html
26603 <span title="Hello world>Foo</span>
26605 <p><span title="Hello world">Foo</span>
26608 <p><span title="Hello world">Foo</span></p>
26612 Self-closed tag with broken attribute value quoting
26614 parsoid=wt2html,html2html
26616 <div title="Hello world />Foo
26618 <div title="Hello world"></div><p>Foo
26621 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26625 Table with broken attribute value quoting
26627 parsoid=wt2html,html2html
26630 | title="Hello world|Foo
26635 <td title="Hello world">Foo
26641 <td title="Hello world">Foo
26647 Table with broken attribute value quoting on consecutive lines
26649 parsoid=wt2html,html2html
26652 | title="Hello world|Foo
26653 | style="color:red|Bar
26658 <td title="Hello world">Foo
26660 <td style="color:red">Bar
26666 <td title="Hello world">Foo
26667 </td><td style="color: red">Bar
26668 </td></tr></tbody></table>
26673 Accept empty td cell attribute
26676 | align="center" |foo|| |
26681 <td align="center">foo</td>
26688 Non-empty attributes in th-cells
26691 !Foo!! style="color: red" |Bar
26697 <th style="color: red">Bar
26703 Accept empty attributes in th-cells
26718 Empty table rows go away
26739 ### Parsoid-centric tests for testing RTing of inter-element separators
26740 ### Edge cases not tested by existing parser tests and specific to
26741 ### Parsoid-specific serialization strategies.
26745 RT-ed inter-element separators should be valid separators
26757 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26761 # Parsoid-only test of a DOM pass
26763 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26775 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26776 <p>bar</p></small></td></tr>
26780 <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>
26784 # Note that the "style" attribute is really a template parameter here.
26785 # The = would have to be {{=}} if you wanted the literal.
26787 Empty TD followed by TD with tpl-generated attribute
26792 |{{echo|style='color:red'}}|foo
26806 Indented table with an empty td
26824 ## We have some newline diffs RT-ing this edge case
26825 ## and it is not important enough -- we seem to be emitting
26826 ## at most 2 newlines after a </tr> and this is unrelated to
26827 ## the issue from T85627 that this is testing.
26829 Indented table with blank lines in between (T85627)
26848 Indented block & table
26862 <div data-parsoid='{"stx":"html"}'>foo</div>
26864 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26869 Indent and comment before table row
26884 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26885 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26889 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26891 Empty TR followed by a template-generated TR
26897 {{echo|<tr><td>foo</td></tr>}}
26902 <tr class='mw-empty-elt'></tr>
26903 <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}}]}'>
26908 ## PHP and parsoid output differ for this, and since this is primarily
26909 ## for testing Parsoid's serializer, marking this Parsoid only
26911 Empty TR followed by mixed-ws-comment line should RT correctly
26924 <tr class='mw-empty-elt'></tr>
26927 <!--c--> </tr><!--d-->
26933 Multi-line image caption generated by templates with/without trailing newlines
26935 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26936 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26938 <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>
26939 <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>
26943 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26947 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26949 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26951 <includeonly>foo</includeonly>
26959 ## PHP emits broken html for this, and since this is primarily
26960 ## a Parsoid serializer test, marking this Parsoid only
26962 Improperly nested inline or quotes tags with whitespace in between
26964 <span> <s>x</span> </s>
26967 <p><span> <s>x</s></span><s> </s>
26968 <b> <i>x</i></b><i> </i>
26973 Encapsulate protected attributes from wt
26975 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26977 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26981 <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>
26983 <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">
26984 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26988 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26989 ## Having nested or stray pre tags results in the attempt to add duplicates,
26990 ## causing an assertion fail. This test tries to prevent that situation.
26992 Ensure ParagraphWrapper can deal with stray closing pre tags
27002 1. Ensure fostered text content is wrapped in element nodes
27006 <table>hi</table><table>ho</table>
27015 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27017 parsoid=wt2html,wt2wt
27026 <tbody><tr><td> a</td></tr>
27031 Encapsulation properly handles null DSR information from foster box
27033 parsoid=wt2html,wt2wt
27035 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27037 <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>
27041 1. Encapsulate foster-parented transclusion content
27043 parsoid=wt2wt,wt2html
27045 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27047 <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>
27057 2. Encapsulate foster-parented transclusion content
27059 parsoid=wt2wt,wt2html
27061 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27063 <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>
27074 3. Encapsulate foster-parented transclusion content
27076 parsoid=wt2wt,wt2html
27078 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27080 <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>"]}">
27093 4. Encapsulate foster-parented transclusion content
27095 parsoid=wt2wt,wt2html
27097 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27099 <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>"]}">
27112 5. Encapsulate foster-parented transclusion content
27114 parsoid=wt2wt,wt2html
27116 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27118 <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>
27133 6. Encapsulate foster-parented transclusion content
27135 parsoid=wt2wt,wt2html
27137 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27139 <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>
27155 7. Encapsulate foster-parented transclusion content
27157 parsoid=wt2wt,wt2html
27159 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27161 <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>
27171 # Note that the wt is broken on purpose: the = should be {{=}} if you
27172 # don't want it to be a template parameter key.
27174 8. Encapsulate foster-parented transclusion content
27176 parsoid=wt2wt,wt2html
27179 }}{|{{echo|style='color:red'}}
27184 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27186 <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>
27197 9. Encapsulate foster-parented transclusion content
27199 parsoid=wt2wt,wt2html
27201 <table>{{echo|hi</table>hello}}
27203 <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>
27207 Table in fosterable position
27218 <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">
27220 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27226 # Parsoid only for T66747
27228 Properly encapsulate empty-content transclusions in fosterable positions
27236 <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"}]]}'>
27242 Always encapsulate foster box when template range is expanded to table
27255 T115289: Unclosed table
27257 {{echo|<table>}}<!--c-->[[Category:Two]]
27259 <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>
27263 T115289: Don't migrate newlines out of tables with fostered content
27265 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27267 <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>
27271 T73074: More fostering fun
27273 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27275 <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>
27279 Support <object> element with .data attribute
27283 <object data="test.swf"></object>
27285 <object data="test.swf"></object>
27289 Don't block XML namespace declaration
27291 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27293 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27296 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27299 # -----------------------------------------------------------------
27300 # The following section of tests are primarily to spec requirements
27301 # around Parsoid's serialization (old, new, edited content)
27303 # All these tests are marked Parsoid html2wt and html2html only
27304 # ----------------------------------------------------------------
27307 Ignore rel attribute in a-tags during serialization to url-links
27311 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27312 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27313 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27315 http://en.wikipedia.org/wiki/Foobar
27316 http://en.wikipedia.org/wiki/Foobar
27317 http://en.wikipedia.org/wiki/Foobar
27320 # 'mi' is a localinterwiki prefix as well as a language
27322 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27326 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27332 Parsoid should accept interwiki shortcuts
27336 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27337 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27338 <a href='./fr:Foo'>Foo</a></p>
27339 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27340 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27341 <a href='fr%3AFoo'>Foo</a></p>
27342 <p><a href='FR%3AFoo'>Foo</a>
27343 <a href='./FR:Foo'>Foo</a></p>
27358 Parsoid should not accept invalid interwiki shortcuts
27362 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27363 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27364 <a href='news:Foo'>Foo</a></p>
27373 New wikilinks should be serialized properly
27377 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27378 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27379 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27380 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27381 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27385 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27386 http://en.wikipedia.org/wiki/Foo
27387 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27391 New wiki links (href variations)
27395 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27396 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27397 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27398 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27403 [[Toxine bactérienne]]
27407 New wiki links (content string variations)
27411 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27412 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27413 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27417 [[Foo_bar|./Foo_bar]]
27421 New category links (href variations)
27425 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27426 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27427 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27429 [[Category:Toxine bactérienne]]
27430 [[Category:Toxine bactérienne]]
27431 [[Category:Toxine bactérienne]]
27435 New sol transparent links don't need indent-pre nowiki protection
27440 <link rel="mw:PageProp/redirect" href="./Main_Page">
27441 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27442 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27444 #WEITERLEITUNG [[Main Page]]
27445 <!-- this is good --> [[Category:Good]]
27446 <!-- this is great --> [[Kategorie:Great]]
27450 New interlanguage links (href variations)
27454 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27455 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27456 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27458 [[es:Toxine bactérienne]]
27459 [[es:Toxine_bactérienne]]
27460 [[es:Toxine_bactérienne]]
27464 Image: Modifying size of an image (1)
27467 "modes": ["wt2wt"],
27469 ["img[height]", "attr", "height", "22"],
27470 ["img[width]", "attr", "width", "200"]
27474 [[Image:Foobar.jpg|230x230px]]
27476 [[Image:Foobar.jpg|200x200px]]
27480 Image: Modifying size of an image (2)
27483 "modes": ["wt2wt"],
27485 ["img[height]", "attr", "height", "100"],
27486 ["img[width]", "attr", "width", "500"]
27490 [[Image:Foobar.jpg|230x230px]]
27492 [[Image:Foobar.jpg|500x500px]]
27495 # Change in size is ignored so long as class='mw-default-size'
27497 Image: Modifying size of an image (3)
27500 "modes": ["wt2wt"],
27502 ["figure[class]", "removeClass", "mw-default-size"],
27503 ["figure img", "attr", "height", "19"],
27504 ["figure img", "attr", "width", "170"]
27508 [[Image:Foobar.jpg|thumb]]
27510 [[Image:Foobar.jpg|thumb|170x170px]]
27514 Image: Modifying alignment of an image (T50665)
27517 "modes": ["wt2wt"],
27519 ["figure[class]", "removeClass", "mw-halign-right"],
27520 ["figure[class]", "addClass", "mw-halign-left"]
27524 [[Image:Foobar.jpg|thumb|caption|right]]
27526 [[Image:Foobar.jpg|thumb|caption|left]]
27530 Image: Modifying mw-default-size of an frameless image (T64805)
27533 "modes": ["wt2wt"],
27535 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27539 [[Image:Foobar.jpg|frameless|right]]
27541 [[Image:Foobar.jpg|frameless|right|220x220px]]
27545 Image: Modifying valign of an image (T51221)
27548 "modes": ["wt2wt"],
27550 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27551 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27555 [[File:Foobar.jpg|20px|middle]]
27557 [[File:Foobar.jpg|20px|text-top]]
27561 Image: Modifying alt attribute of an image (T58400)
27564 "modes": ["wt2wt"],
27566 ["img[alt]", "attr", "alt", "some alternate edited text"]
27570 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27572 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27576 Image: Modifying caption of an image
27579 "modes": ["wt2wt"],
27581 ["figcaption", "text", "new caption"]
27585 [[Image:Foobar.jpg|thumb|original caption]]
27587 [[Image:Foobar.jpg|thumb|new caption]]
27591 Image: empty alt attribute (T50924)
27595 [[File:Foobar.jpg|thumb|alt=|bar]]
27597 <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>
27601 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27607 <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>
27609 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27613 Image: Block level image should have \n before and after
27616 [[File:Foobar.jpg|right|thumb|150x150px]]
27620 <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>
27625 Image: New block level image should have \n before and after (existing content)
27628 [[File:Foobar.jpg|right|thumb|150x150px]]
27632 <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>
27637 Image: upright option (parsoid)
27639 [[File:Foobar.jpg|thumb|upright|caption]]
27640 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27641 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27643 <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>
27644 <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>
27645 <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>
27649 Image: upright option is ignored on inline and frame images (parsoid)
27651 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27653 <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>
27657 Image: in template parameter with empty parameter
27659 {{echo|[[File:Foobar.jpg|link=]]}}
27661 <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>
27665 Image: from basic HTML (1)
27669 <span typeof="mw:Image">
27670 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27673 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27677 Image: from basic HTML (2)
27681 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27683 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27687 Image: from basic HTML (3)
27691 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27693 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27697 Image: from basic HTML (4)
27701 <img src="./File:Foobar.jpg">
27703 [[File:Foobar.jpg|link=]]
27707 Image: Invalid title as link
27709 [[File:Foobar.jpg|link=<]]
27711 <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>
27714 <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>
27718 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27723 <li><p>foo</p></li>
27730 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27734 <ul> <li>foo</li></ul>
27740 Don't strip leading whitespace when handling indent-pre suppressing tags
27745 <tr><td> indented row</td></tr>
27748 <b>This is very bold of you!</b>
27751 indented cell (no pre-wrapping!)
27761 '''This is very bold of you!'''
27765 indented cell (no pre-wrapping!)
27773 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27795 <nowiki> </nowiki></span>bar2
27798 <nowiki> </nowiki><span>bar</span>
27801 <nowiki> </nowiki><span>foo</span>
27806 Lists: Dont insert newlines in a serialized list item.
27810 <ul><li>a<br>b</li><li>c</li></ul>
27817 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27820 "modes": ["html2wt"],
27821 "scrubWikitext": false
27824 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27825 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27827 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27828 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27830 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27832 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27834 == hello there [[Category:A1]] ==
27836 == [[Category:A2]] hi pal ==
27838 == <!--foo--> [[Category:A3]] how goes it ==
27840 == it goes well [[Category:A4]] <!--bar--> ==
27842 ==howdy [[Category:A5]]==
27848 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27851 "modes": ["html2wt"],
27852 "scrubWikitext": true
27855 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27856 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27858 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27859 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27861 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27869 <!--foo--> [[Category:A3]]
27874 [[Category:A4]] <!--bar-->
27882 Headings: Don't hoist metas that come from templates
27885 "modes": ["html2wt"],
27886 "scrubWikitext": true
27889 <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>
27891 == {{echo|foo [[Category:Foo]]}} ==
27895 Headings: Category in ref isn't hoisted
27898 "modes": ["html2wt"],
27899 "scrubWikitext": true
27902 <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>
27904 <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>
27907 [[Category:Baz]] </ref> ==
27913 Parsoid: Serialize positional parameters with = in them as named parameter
27917 <p about="#mwt1" typeof="mw:Transclusion"
27918 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27920 <p about="#mwt1" typeof="mw:Transclusion"
27921 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27923 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27924 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27925 <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>
27929 {{echo|1=f=oo|2=bar}}
27931 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27932 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27933 {{echo|<nowiki>f=oo</nowiki>|bar}}
27937 Parsoid: Serialize positional parameters with = in extlink as named parameter
27941 <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>
27943 {{echo|1=http://stuff?is=ok}}
27947 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27951 <div>a<p>b</p></div>
27972 Substrings resembling wikitext in hrefs should not get nowiki escapes
27976 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27982 Enforce single-line context in the serializer
27989 <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">
27990 </span><span about="#mwt1">you</span> </h2>
27992 <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>
27994 <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
27995 there</span></li></ol>
28007 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28014 </tbody></table></dd></dl>
28018 == hi {{bogus|there
28029 * foo '''bar''' baz
28041 Serialize new placeholder space without spans
28045 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28047 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28049 <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>
28055 <ref>foo : bar</ref>ok
28059 #-----------------------
28060 # Tag minimization tests
28061 #-----------------------
28064 1. I/B quote minimization: wikitext-only tags should be combined
28068 <p><i>A</i><i>B</i></p>
28069 <p><b>A</b><b>B</b></p>
28070 <p><i>A</i><b><i>B</i></b></p>
28071 <p><b>A</b><i><b>B</b></i></p>
28072 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28073 <p><i><b>A</b></i><i><b>B</b></i></p>
28074 <p><i><b>A</b></i><b><i>B</i></b></p>
28075 <p><b><i>A</i></b><i><b>B</b></i></p>
28095 2. I/B quote minimization: wikitext and html tags should not be combined
28099 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28100 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28104 ''A''<nowiki/>'''<i>B</i>'''
28108 3. I/B quote minimization: templated content stops minimization
28112 <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>
28113 <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>
28115 ''A''{{echo|''B''}}
28117 ''A''{{echo|'''''B'''''}}
28121 4. I/B quote minimization: new content should be mimimized with adjacent old content
28125 <p><i>A</i><i>B</i></p>
28126 <p><b>A</b><b>B</b></p>
28127 <p><i>A</i><b><i>B</i></b></p>
28137 5a. Merge adjacent quote nodes if they've been edited
28140 "modes": ["wt2wt", "selser"],
28142 ["p", "contents", "remove", ":contains('b')"]
28152 5b. Merge adjacent quote nodes if they've been edited
28155 "modes": ["wt2wt", "selser"],
28161 ''a''<span id="x">b</span>''c''
28167 1. Merge adjacent link nodes as long as at least one element is new
28170 "modes": ["html2wt"],
28171 "scrubWikitext": true
28174 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28175 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28176 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28180 [[Football|Foot]][[Football|ball]]
28184 2. Merge adjacent link nodes and enable additional normalizations
28187 "modes": ["html2wt"],
28188 "scrubWikitext": true
28191 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28193 [[Football|''Football'']]
28197 3. Don't merge adjacent link nodes if scrubWikitext is false
28200 "modes": ["html2wt"],
28201 "scrubWikitext": false
28204 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28206 [[Football|Foot]][[Football|ball]]
28209 #------------------------------
28210 # End of tag minimization tests
28211 #------------------------------
28214 T56262: New entities
28218 <span typeof="mw:Entity"> </span>
28223 ## Note that there is no wikitext output for 'unknownproperty' ##
28224 ## Unknown magic words are silently dropped ##
28231 <meta property='mw:PageProp/toc' />
28232 <meta property='mw:PageProp/notoc' />
28233 <meta property='mw:PageProp/forcetoc' />
28234 <meta property='mw:PageProp/index' />
28235 <meta property='mw:PageProp/noindex' />
28236 <meta property='mw:PageProp/nogallery' />
28237 <meta property='mw:PageProp/noeditsection' />
28238 <meta property='mw:PageProp/notitleconvert' />
28239 <meta property='mw:PageProp/nocontentconvert' />
28240 <meta property='mw:PageProp/unknownproperty' />
28250 __NOCONTENTCONVERT__
28254 Consecutive <pre>s should not get merged
28256 parsoid=html2wt,html2html
28258 <pre>a</pre><pre>b</pre>
28286 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28290 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28292 [[Special:BookSources/1234567890|ISBN 1234567895]]
28296 Edited RFC links not serializable as RFC links should serialize as extlinks
28300 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28302 [https://tools.ietf.org/html/rfc123 New RFC]
28306 Edited PMID links not serializable as PMID links should serialize as extlinks
28310 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28312 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28316 WTS of autolinks with trailing/surrounding context
28320 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28321 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28322 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28323 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28324 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28325 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28327 http://cscott.net'''foo'''
28329 http://cscott.net<b>foo</b>
28331 '''http://cscott.net'''
28333 '''http://cscott.net '''
28335 '''http://cscott.net<nowiki/>x'''
28337 http://cscott.net<nowiki/>x
28341 WTS of autolinks with nowikis (round-trip)
28343 x<nowiki/>http://cscott.net<nowiki/>x
28345 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28348 # this is the "easy" test because it leaves in place all the
28349 # data-parsoid information indicating this is an autolink
28351 WTS of autolinks with escapes (editing)
28354 "modes": ["wt2wt"],
28356 [ "span", "remove" ]
28360 x<nowiki/>http://cscott.net<nowiki/>x
28362 x<nowiki/>http://cscott.net<nowiki/>x
28366 WTS of edited autolink-like text (T103364)
28369 "modes": ["wt2wt"],
28371 [ "span[typeof]", "removeAttr", "typeof" ]
28375 Not a link: <nowiki>http://example.com</nowiki>.
28377 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28381 WTS of newly-authored autolink-like text (T103364)
28385 <p>http://example.com is not a link.</p>
28387 <nowiki>http://example.com</nowiki> is not a link.
28391 WTS of autolink-like text after an autolink (T108563)
28395 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28397 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28401 Magic links inside links (not autolinked)
28403 [[Foo|http://example.com]]
28406 [[Foo|ISBN 123456789x]]
28408 [http://foo.com http://example.com]
28409 [http://foo.com RFC 1234]
28410 [http://foo.com PMID 1234]
28411 [http://foo.com ISBN 123456789x]
28413 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28414 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28415 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28416 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28417 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28418 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28419 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28420 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28423 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28424 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28425 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28426 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28428 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28429 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28430 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28431 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28435 Magic links inside image captions (autolinked)
28437 [[File:Foobar.jpg|thumb|http://example.com]]
28438 [[File:Foobar.jpg|thumb|RFC 1234]]
28439 [[File:Foobar.jpg|thumb|PMID 1234]]
28440 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28442 <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>
28443 <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>
28444 <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>
28445 <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>
28447 <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>
28448 <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>
28449 <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>
28450 <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>
28454 WTS of magic word text (T109371)
28459 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28460 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28462 <nowiki>RFC 1234</nowiki>
28464 [http://foo.com RFC 1234]
28470 Edited Redirect link should emit a non-piped wikitext link
28474 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28480 T75121: Infer extension name from typeOf if data-mw is not present
28482 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28484 <div typeOf="mw:Extension/foo"></div>
28489 # Note that the <p> wrapping isn't present in PHP parser output
28490 # The important thing for this test is that P-wrapping doesn't
28491 # interfere with the <nowiki> protection for leading - in <td>
28492 # (which isn't necessary for <th>).
28494 T88318: p-wrapped dash in table.
28496 parsoid=html2wt,wt2wt
28499 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28500 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28501 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28508 |<nowiki>-</nowiki>
28509 |<nowiki>- </nowiki>
28530 <td><small>-</small>
28539 </td></tr></tbody></table>
28543 T149209: WTS: Handle newlines in table cells properly
28551 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28553 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28559 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28561 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28583 T149209: Selser: Handle newlines in table cells properly
28586 "modes": ["selser"],
28588 [ "#h1", "html", "a\nb\n" ],
28589 [ "#h2", "html", "a\nb\n" ],
28590 [ "#c1", "html", "a\nb\n" ],
28591 [ "#c2", "html", "<p>a</p>" ],
28592 [ "#c3", "html", "<p>a</p>" ],
28593 [ "#c4", "html", "edit-me<p>a</p>" ]
28598 ! id="h1" |edit-me!!1
28600 ! id="h2" |edit-me||2
28602 | id="c1" |edit-me||3
28604 | id="c2" |edit-me||4
28606 | id="c3" |edit-me||p||q||r
28608 | id="c4" |edit-me||p||q||r
28637 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28642 <td id='mwAc'>foo</td>
28643 <td id='serialize-this'>bar</td>
28648 | id="serialize-this" |bar
28653 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28657 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28659 <div id="hello">ok</div>
28666 "modes": ["wt2wt"],
28668 [ "#xyz", "before", "<b>before</b> stuff " ],
28669 [ "#xyz", "after", " stuff <i>after</i>" ],
28670 [ "#xyz", "html", "x <b>y</b> z" ]
28674 <span id="xyz">hello</span>
28676 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28680 Never serialize a-tag as html, regardless of what data-parsoid has to say
28682 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28684 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28689 ## SSS FIXME: This is broken output nevertheless.
28690 ## What might be a reasonable non-broken output for this?
28691 ## This is an edge case unlikely to be seen in production
28692 ## that I am not wasting more time on this right now.
28694 Never serialize a-tag as html, no matter what attributes it has
28696 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28698 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28700 [http://boo.org http://boohoo.org]
28703 # Misnested is an indication that selser can reuse the source but these have
28704 # shown to sneak through on occasion. See T101768.
28705 # The original wikitext here is: [http://test.com [[one]] two three]
28707 Strip span tags added to mark misnested links
28711 <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>
28713 [http://test.com][[one]] two three
28717 Catch regression when unpacking misnested links
28721 {{echo|hi}}[http://example.com [[ho]]]
28723 <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>
28727 Catch regression when unpacking with trailing content
28729 {{echo|Foo <references/> bar}}
28731 <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>
28735 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28739 <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|}"]}'>
28751 ## This test verifies the presence and computation of this attribute indirectly
28752 ## by making an edit and ensuring that the serialization is correct (which it would be
28753 ## only if firstWikitextNode is properly set).
28755 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28758 "modes": ["wt2wt"],
28760 [ "div#x", "remove" ],
28761 [ "div", "before", "<div>new</div>" ]
28765 <div id="x">foo</div>
28767 {{echo|<div>boo</div>
28775 {{echo|<div>boo</div>
28781 # --------------------------------------------
28782 # Tests spec'ing wikitext serialization norms |
28783 # --------------------------------------------
28786 Serialize multi-line indent-pre starting with wikitext syntax
28800 1. Categories should always be serialized on their own line
28804 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28812 2. Categories that are part of templates should not introduce a line break
28814 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28816 <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>
28819 # Careful while editing these next 2 tests. There are \u200f characters
28820 # before and after the <link> tags in the HTML and following some
28821 # of the categories in wikitext
28822 # Do not remove these characters in edits.
28824 # As part of the serialization, these bidi characters will get stripped.
28826 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28829 "modes": ["html2wt"],
28830 "scrubWikitext": true
28833 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28834 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28837 [[קטגוריה: שיטות משפט]]
28841 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28844 "modes": ["html2wt"],
28845 "scrubWikitext": true
28848 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28855 Lists: Add space after bullets
28862 <li><span> baz</span></li>
28867 * <span> baz</span>
28871 1. Headings: Add space before/after == (T53744)
28878 <h2><span> baz</span></h2>
28886 == <span> baz</span> ==
28890 2. Headings: Add space before/after == even after hoisted content
28893 "modes": ["html2wt"],
28894 "scrubWikitext": true
28897 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28905 1. Headings: suppress newly created empty headings
28908 "modes": ["html2wt"],
28909 "scrubWikitext": true
28917 2. Headings: don't suppress empty headings if scrubWikitext is false
28927 3. Headings: suppress empty headings on edits
28930 "modes": ["selser"],
28931 "scrubWikitext": true,
28937 ==<span id="x">foo</span>==
28942 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28945 "modes": ["html2wt"],
28946 "scrubWikitext": true
28949 <h2>foo<br/>bar</h2>
28950 <h2>foo <span><br/>bar</span> baz</h2>
28954 == foo <span> bar</span> baz ==
28958 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28961 "modes": ["html2wt"],
28962 "scrubWikitext": false
28965 <h2>foo<br/>bar</h2>
28967 == foo<br /> bar ==
28971 1. WT Quote Tags: suppress newly created empty style tags
28974 "modes": ["html2wt"],
28975 "scrubWikitext": true
28983 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28989 ''<nowiki/>'''''<nowiki/>'''
28993 3. WT Quote Tags: suppress empty style tags on edits
28996 "modes": ["selser"],
28997 "scrubWikitext": true,
29003 '''<span id="x">foo</span>'''
29008 1. Anchors: suppress newly created empty anchors
29011 "modes": ["html2wt"],
29012 "scrubWikitext": true
29015 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29020 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29023 "modes": ["html2wt"],
29024 "scrubWikitext": false
29027 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29033 3. Anchors: suppress empty anchors on edits
29036 "modes": ["selser"],
29037 "scrubWikitext": true,
29043 [[Test|<span id="x">foo</span>]]
29048 3a. Anchors: do not suppress numbered extlinks
29051 "modes": ["wt2wt"],
29052 "scrubWikitext": true
29057 <a rel="mw:ExtLink" href="http://foo.com"></a>
29061 3b. Anchors: do not suppress numbered extlinks
29064 "modes": ["wt2wt"],
29065 "scrubWikitext": true,
29071 [http://foo.com <span id="x">foo</span>]
29077 Normalizations should be restricted to edited content
29080 "modes": ["selser"],
29081 "scrubWikitext": true,
29083 [ "h1", "before", "<i></i>"]
29097 1. Multiple normalizations (html2wt)
29100 "modes": ["html2wt"],
29101 "scrubWikitext": true
29105 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29106 </a><b><i></i></b>x</p>
29115 2. Multiple normalizations (selser)
29118 "modes": ["selser"],
29119 "scrubWikitext": true,
29121 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29125 <span id="x">foo</span>
29127 <span id="x">foo</span>
29133 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29136 "modes": ["html2wt"],
29137 "scrubWikitext": true
29149 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29156 <nowiki> </nowiki>hi
29158 <nowiki> </nowiki> hello
29162 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29165 "modes": ["html2wt"],
29166 "scrubWikitext": true
29175 baz bang</td></tr></table>
29181 bar<span>boo</span></p>
29197 bar<span>boo</span>
29201 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29204 "modes": ["selser"],
29205 "scrubWikitext": true,
29207 [ "p", "html", " a\n b" ]
29218 1. New links that end in spaces
29221 "modes": ["html2wt"],
29222 "scrubWikitext": false
29225 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29226 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29227 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29229 [[Berlin ]]<nowiki/>is the capital of Germany.
29233 [[Boston ]] is a city.
29237 2. New links that end in spaces
29240 "modes": ["html2wt"],
29241 "scrubWikitext": true
29244 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29245 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29246 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29248 [[Berlin]] is the capital of Germany.
29252 [[Boston]] is a city.
29256 1. Table cells with escapable prefixes
29259 "modes": ["html2wt"],
29260 "scrubWikitext": false
29264 <tr><td>a</td></tr>
29265 <tr><td>-</td></tr>
29266 <tr><td>+</td></tr>
29272 |<nowiki>-</nowiki>
29274 |<nowiki>+</nowiki>
29279 2. Table cells with escapable prefixes
29282 "modes": ["html2wt"],
29283 "scrubWikitext": true
29287 <tr><td>a</td></tr>
29288 <tr><td>-</td></tr>
29289 <tr><td>+</td></tr>
29302 3a. Table cells with escapable prefixes after edits
29305 "modes": ["selser"],
29306 "scrubWikitext": true,
29308 [ "table tbody tr:first-child td:first-child", "remove"]
29322 3b. Table cells with escapable prefixes after edits
29325 "modes": ["selser"],
29326 "scrubWikitext": true,
29328 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29335 |<span id="x">foo</span>+
29344 # FIXME: This test will fail because
29345 # normalization doesn't realize that the id attribute
29346 # will eliminate the escapable scenario
29348 4a. Table cells without escapable prefixes after edits
29351 "modes": ["selser"],
29352 "scrubWikitext": true,
29354 [ "#x", "html", "-" ]
29367 ## This tests normalizer's ability to discriminate between
29368 ## cells having identical content.
29370 4b. Table cells without escapable prefixes after edits
29373 "modes": ["selser"],
29374 "scrubWikitext": true,
29376 [ "td", "html", "-" ]
29389 ## This tests normalizer's ability to not be tripped by
29390 ## comments (and whitespace)
29392 4c. Table cells without escapable prefixes after edits
29395 "modes": ["selser"],
29396 "scrubWikitext": true,
29398 [ "table tbody tr td:first-child", "remove" ]
29413 ## This tests normalizer's ability to handle HTML cells
29415 4d. Table cells without escapable prefixes after edits
29418 "modes": ["selser"],
29419 "scrubWikitext": true,
29421 [ "td", "html", "-" ]
29426 <tr><td>a</td></tr>
29430 <tr><td>-</td></tr>
29434 ## T111151 Remove font elements without attributes
29436 5a. font tags without attributes should be dropped in scrubWikitext mode
29439 "modes": ["html2wt"],
29440 "scrubWikitext": true
29444 <font><font>bar</font></font>
29445 <font class="x">boo</font>
29449 <font class="x">boo</font>
29453 5b. font tags should not be dropped without scrubWikitext being enabled
29456 "modes": ["html2wt"],
29457 "scrubWikitext": false
29466 Escape nowiki DOM elements
29470 <nowiki><i>foo</i></nowiki>
29472 <nowiki>''foo''</nowiki>
29475 # This is meant to be an interim fix while we go about figuring out
29476 # how to not introduce these trailing <nowiki/>s in the first place.
29478 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29482 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29484 <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>
29485 <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>
29499 New list is serialized on newlines
29503 <p>The quick brown fox jumps over the lazy dog.</p><ul>
29507 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
29509 The quick brown fox jumps over the lazy dog.
29515 The quick onyx goblin jumps over the lazy dwarf.
29519 New lists in formatting elements serialized w/o newlines
29531 <small><ul><li>hi</li></ul></small>
29543 New list in table doesn't need newlines
29547 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
29556 # ---------------------------------------------------
29557 # End of tests spec'ing wikitext serialization norms |
29558 # ---------------------------------------------------
29562 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29570 <td><b>c</b><p>d</p></td>
29589 Anchor without href scenarios
29591 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29594 <a class="no">dice</a>
29599 <span name="foo"></span>
29603 New transclusion added after a list should be serialized after the list
29607 <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>
29613 # -----------------------------------------------------------------
29614 # End of section for Parsoid-only html2wt tests for serialization
29616 # -----------------------------------------------------------------
29618 # -----------------------------------------------------------------
29619 # The following section of tests are primarily to spec behavior of
29620 # the selective serializer. All these tests have manual selser
29621 # changes. The automated selser changes for all tests handle the
29622 # wide variation of changes, but these tests here capture specs
29623 # deterministically.
29624 # ----------------------------------------------------------------
29628 Selser: New comments should not be lost
29631 "modes": ["selser"],
29633 [ "#a", "after", "<!--c1-->" ],
29634 [ "#b", "before", "<!--c2-->" ]
29638 <span id="a">a</span>
29640 <span id="b">b</span>
29642 <span id="a">a</span><!--c1-->
29644 <!--c2--><span id="b">b</span>
29649 Selser: Check for validity of DSR before using it
29652 "modes": ["selser"],
29654 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29658 <span id="a">a</span>
29660 {{DISPLAYTITLE:foo}}
29661 <span id="a">a</span>
29665 1. DOMDiff: Changes to <ref> content should be looked up using id
29668 "modes": ["selser"],
29670 ["#X", "after", "bar"],
29671 ["#Y", "after", "baz"]
29675 X <ref><span id="X">foo</span></ref>
29678 <ref name="a"><span id="Y">foo</span></ref>
29681 X <ref><span id="X">foo</span>bar</ref>
29684 <ref name="a"><span id="Y">foo</span>baz</ref>
29689 2. DOMDiff: Changes to <ref> content should be looked up using id
29692 "modes": ["selser"],
29694 ["#Z", "after", "bar"]
29698 A <ref>foo bar for a</ref>
29699 B <ref group="X" name="b" />
29703 <references group="X">
29704 <ref name="b"><span id="Z">foo</span></ref>
29707 A <ref>foo bar for a</ref>
29708 B <ref group="X" name="b" />
29712 <references group="X">
29713 <ref name="b"><span id="Z">foo</span>bar</ref>
29718 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29721 "modes": ["selser"],
29723 [ "div:first-child", "text", "bar" ]
29727 <div style="{{1x|color:red;}}%">foo</div>
29729 <div style="{{1x|color:red;}}%">bar</div>
29741 <li class="mw-empty-elt"></li>
29742 <li class="mw-empty-elt"></li>
29749 [[File:Thumb.png|thumb]]
29751 <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>
29753 <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>
29757 unclosed internal link XSS (T137264)
29759 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29761 <p>[[#<script>alert(1)</script>|
29764 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29768 Validating that <style> isn't eaten by tidy (T167349)
29773 <style>.foo::before { content: "<foo>"; }</style>
29774 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29778 <style>.foo::before { content: "<foo>"; }</style>
29779 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29784 Validating that <style> isn't wrapped in a paragraph (T186965)
29788 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29790 <style>.foo::before { content: "<foo>"; }</style>
29792 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29794 But if it's on a line with other content, let it be wrapped.
29796 <style>.foo::before { content: "<foo>"; }</style> bar
29798 foo <style>.foo::before { content: "<foo>"; }</style>
29800 foo <style>.foo::before { content: "<foo>"; }</style> bar
29802 And the same if we have non-paragraph-breaking whitespace
29805 <style>.foo::before { content: "<foo>"; }</style>
29808 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29810 <style>.foo::before { content: "<foo>"; }</style>
29811 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29812 <p>But if it's on a line with other content, let it be wrapped.
29813 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
29814 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
29815 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
29816 </p><p>And the same if we have non-paragraph-breaking whitespace
29818 <style>.foo::before { content: "<foo>"; }</style>
29824 Validating that <link> isn't wrapped in a paragraph (T186965)
29828 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29830 <link rel="foo" href="bar"/>
29832 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29834 But if it's on a line with other content, let it be wrapped.
29836 <link rel="foo" href="bar"/> bar
29838 foo <link rel="foo" href="bar"/>
29840 foo <link rel="foo" href="bar"/> bar
29842 And the same if we have non-paragraph-breaking whitespace
29845 <link rel="foo" href="bar"/>
29848 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29850 <link rel="foo" href="bar"/>
29851 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29852 <p>But if it's on a line with other content, let it be wrapped.
29853 </p><p><link rel="foo" href="bar"/> bar
29854 </p><p>foo <link rel="foo" href="bar"/>
29855 </p><p>foo <link rel="foo" href="bar"/> bar
29856 </p><p>And the same if we have non-paragraph-breaking whitespace
29858 <link rel="foo" href="bar"/>
29864 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29866 wgFragmentMode=[ 'html5', 'legacy' ]
29868 ==A&B&C&amp;D&amp;amp;E==
29869 [[#A&B&C&amp;D&amp;amp;E]]
29871 <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>
29872 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29875 <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>
29876 <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>
29880 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29882 wgFragmentMode=[ 'legacy' ]
29884 ==A&B&C&amp;D&amp;amp;E==
29885 [[#A&B&C&amp;D&amp;amp;E]]
29887 <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>
29888 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29893 Decoding of HTML entities in embedded HTML tags
29895 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29897 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29900 <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>
29904 Decoding of HTML entities in indicator names for IDs (T104196)
29906 parsoid=wt2html,html2html
29909 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29911 1&2&3&4&amp;5=Indicator
29914 <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>
29917 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29919 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29923 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29925 1&2&3&4&amp;5=Indicator
29928 <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>
29931 # This fragment mode is what Parsoid supports.
29933 HTML5 ids: fallback to legacy
29935 wgFragmentMode=[ 'html5', 'legacy' ]
29947 ==Hey < # " > % : '==
29948 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29950 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29952 <!-- These two links should produce identical HTML -->
29953 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29956 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29958 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29959 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29960 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29961 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29962 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29963 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29967 <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>
29968 <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>
29969 <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>
29970 <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>
29971 <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>
29972 <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>
29973 <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>
29974 </p><p>💩 <span id="💩"></span>
29975 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29978 <h2 id="Foo_bar">Foo bar</h2>
29980 <h2 id="foo_Bar_2">foo Bar</h2>
29982 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
29984 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
29986 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
29988 <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>
29989 <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>
29991 <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>
29993 <!-- These two links should produce identical HTML -->
29994 <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>
29997 # Parsoid doesn't support this mode
29999 HTML5 ids: legacy with a fallback to modern
30001 wgFragmentMode=[ 'legacy', 'html5' ]
30013 ==Hey < # " > % : '==
30014 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30016 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30018 <!-- These two links should produce identical HTML -->
30019 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30022 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30024 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30025 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30026 <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>
30027 <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>
30028 <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>
30029 <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>
30033 <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>
30034 <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>
30035 <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>
30036 <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>
30037 <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>
30038 <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>
30039 <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>
30040 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30041 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30045 # Parsoid doesn't support this mode.
30047 HTML5 ids: no legacy
30049 wgFragmentMode=[ 'html5' ]
30061 ==Hey < # " > % : '==
30062 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30064 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30066 <!-- These two links should produce identical HTML -->
30067 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30070 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30072 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30073 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30074 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30075 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30076 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30077 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30081 <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>
30082 <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>
30083 <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>
30084 <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>
30085 <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>
30086 <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>
30087 <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>
30088 </p><p>💩 <span id="💩"></span>
30089 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30094 T90902: Normalize weird characters in section IDs
30096 wgFragmentMode=[ 'html5', 'legacy' ]
30102 <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>
30103 <p><a href="#Foo_bar">#Foo bar</a>
30106 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30107 <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>
30111 T51672: Test for brackets in attributes of elements in external link texts
30113 [http://example.com/ link <span title="title with [brackets]">span</span>]
30114 [http://example.com/ link <span title="title with [brackets]">span</span>]
30117 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30118 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30121 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30122 <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>
30126 T72875: Test for brackets in attributes of elements in internal link texts
30128 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30129 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30132 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30133 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30136 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30137 <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>
30141 T179544: {{anchorencode:}} output should be always usable in links
30143 wgFragmentMode=[ 'html5' ]
30145 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30147 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30150 <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>
30153 ## ------------------------------
30154 ## Parsoid section-wrapping tests
30155 ## ------------------------------
30157 Section wrapping for well-nested sections (no leading content)
30160 "wrapSections": true
30181 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30184 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30187 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30190 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30193 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30196 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30203 Section wrapping for well-nested sections (with leading content)
30206 "wrapSections": true
30211 Para 2 with a <div>nested in it</div>
30224 <section data-mw-section-id="0"><p>Para 1.</p>
30226 <p>Para 2 with a </p><div>nested in it</div>
30230 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30233 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30236 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30239 </section></section>
30243 Section wrapping with template-generated sections (good nesting 1)
30246 "wrapSections": true
30263 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30266 <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">
30267 </span><p about="#mwt1">b</p>
30268 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30271 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30275 # In this example, the template scope is mildly expanded to incorporate the
30276 # trailing newline after the transclusion since that is part of section 1.1.1
30278 Section wrapping with template-generated sections (good nesting 2)
30281 "wrapSections": true,
30282 "modes": ["wt2html", "wt2wt"]
30297 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30300 <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">
30301 </span><p about="#mwt1">b</p><span about="#mwt1">
30302 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30303 </span><p about="#mwt1">d</p><span about="#mwt1">
30304 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30308 # In this example, the template scope is mildly expanded to incorporate the
30309 # trailing newline after the transclusion since that is part of section 1.2.1
30311 Section wrapping with template-generated sections (good nesting 3)
30314 "wrapSections": true,
30315 "modes": ["wt2html", "wt2wt"]
30333 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30336 <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">
30337 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30338 </span><p about="#mwt1">b</p><span about="#mwt1">
30339 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30340 </span><p about="#mwt1">c</p><span about="#mwt1">
30341 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30342 </span><p about="#mwt1">d</p><span about="#mwt1">
30343 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30347 # Because of section-wrapping and template-wrapping interactions,
30348 # the scope of the template is expanded so that the template markup
30349 # is valid in the presence of <section> tags.
30350 # This exercises the s1 is null scenario in the wrapSections code
30352 Section wrapping with template-generated sections (bad nesting 1)
30355 "wrapSections": true
30369 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30372 <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"]}'>
30373 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30374 </span><p about="#mwt1">b
30375 </p><span about="#mwt1">
30377 </span><p about="#mwt1">c</p><span about="#mwt1">
30378 </span></section></div></section>
30381 # Because of section-wrapping and template-wrapping interactions,
30382 # the scope of the template is expanded so that the template markup
30383 # is valid in the presence of <section> tags.
30384 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30386 Section wrapping with template-generated sections (bad nesting 2)
30389 "wrapSections": true
30407 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30410 </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">
30411 </span><p about="#mwt1">b</p><span about="#mwt1">
30412 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30413 </span><p about="#mwt1">c</p><span about="#mwt1">
30415 </span><p about="#mwt1">d</p><span about="#mwt1">
30417 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30421 # Because of section-wrapping and template-wrapping interactions,
30422 # additional template wrappers are added to <section> tags
30423 # so that template wrapping semantics are valid whether section
30424 # tags are retained or stripped. But, the template scope can expand
30425 # greatly when accounting for section tags.
30426 # This exercises the s1 and s2 are in different subtrees scenario
30428 Section wrapping with template-generated sections (bad nesting 3)
30431 "wrapSections": true,
30432 "modes": ["wt2html", "wt2wt"]
30450 <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>
30453 <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">
30454 </span><p about="#mwt1">b</p><span about="#mwt1">
30455 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30456 </span><p about="#mwt1">c</p>
30459 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30464 Section wrapping with uneditable lead section + div wrapping multiple sections
30467 "wrapSections": true
30472 <div style="border:1px solid red;">
30489 <section data-mw-section-id="-1"><p>foo</p>
30491 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30492 <section data-mw-section-id="1"><h1 id="1">1</h1>
30495 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30498 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30502 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30505 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30507 </section></section>
30511 Section wrapping with editable lead section + div overlapping multiple sections
30514 "wrapSections": true
30521 <div style="border:1px solid red;">
30538 <section data-mw-section-id="0"><p>foo</p>
30540 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
30542 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30545 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30548 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30553 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30556 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30558 </section></section>
30562 HTML header tags should not be wrapped in section tags
30565 "wrapSections": true
30578 <section data-mw-section-id="0"><p>foo</p>
30580 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30582 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
30584 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30586 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
30590 Lead section containing only whitespace and comments.
30593 "wrapSections": true
30597 <!-- this is a comment, presumably significant to editors -->
30604 <section data-mw-section-id="0" data-parsoid="{}">
30605 <!-- this is a comment, presumably significant to editors -->
30606 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30609 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30614 Pseudo-sections emitted by templates should have id -2
30617 "wrapSections": true
30627 <section data-mw-section-id="-1"><p>foo</p>
30628 </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}}]}'>
30629 <section data-mw-section-id="-1"><h2 id="a">a</h2>
30630 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
30631 </section></div><span about="#mwt1">
30635 ##########################################################################
30636 Tests demonstrating white-space insensitivity in input wikitext
30637 for wikitext headings, wikitext list items, and wikitext table captions,
30638 headings, and cells. HTML versions of the same should preserve whitespace.
30639 ##########################################################################
30641 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
30644 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
30645 == <!--c2--> <!--c2--> Tabs <!--c3--><!--c4--> ==
30646 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
30647 ; <!--term to define--> term : <!--term's definition--> definition
30649 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
30651 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
30653 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30655 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
30657 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
30660 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30663 <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>
30664 <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>
30665 <ul><li>List item</li></ul>
30666 <dl><dt>term </dt>
30667 <dd>definition</dd></dl>
30669 <caption>Table Caption
30672 <th>Table Heading 1</th>
30673 <th>Table Heading 2
30676 <td>Table Cell 1</td>
30680 <td>class="foo"</td>
30684 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
30685 </td></tr></tbody></table>
30688 <td>Table Cell 1</td>
30690 </td></tr></tbody></table> foo</dd></dl>
30693 # Looks like <caption> is not accepted in HTML
30695 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
30698 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
30699 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
30701 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
30702 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
30705 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
30706 <ul><li> List item </li></ul>
30708 <tbody><tr><th> Table Heading </th><th></th></tr>
30709 <tr><td> Table Cell </td><th></th></tr>
30714 Do not trim whitespace in links and quotes
30716 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
30717 [[Foo| some text ]]
30719 <p>foo <i> italic </i> and <b> bold </b>
30720 <a href="/wiki/Foo" title="Foo"> some text </a>
30725 Remove p tags surrounding a single element in a figcaption
30729 [[File:Foobar.jpg|right|200x200px|Caption]]
30731 <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>
30735 Selser preserves lack of newline before list and allows newline after the list
30738 "modes": ["selser"],
30739 "scrubWikitext": true,
30741 [ "ul", "after", "<p>footer</p>" ]
30758 Selser does not introduce newlines between unedited paragraph preceding the list
30761 "modes": ["selser"],
30763 [ "table tbody tr td p:last-child", "empty" ]
30785 Selser does not introduce newlines between unedited paragraph following the list
30788 "modes": ["selser"],
30790 [ "table tbody tr td p:first-child", "empty" ]
30812 Remove a list item but do not insert newline above list
30815 "modes": ["selser"],
30817 [ "ul li:last-child", "remove" ]